All right, so let's start with this stuff. The tests, that I have performed:
1) I tried to run the game with "bygfoot -L en", but it crashed.
After this test I ran the game as usual ("bygfoot"), so most of the messages were in Polish, and I had chosen some player name, some team, and then I saved the game. Then I pressed the "Next week" button. The game crashed, so I ran it again and loaded the saved game, and the crash happened again. All the following test were done with the same scheme: start the game, load the saved game, and then just press the "Next week" button.
2) I tried to remove all the compilation/linking flags that I had used before. The game built, and ran well. No crash happened this time.
3) I have successfully added the following compiler flags: -Os, -fomit-frame-pointer, -s, -pipe. I have also added the following linker flags: -s, -z combreloc. Still no crashes.
4) Then I have tried to add the -march=pentium4 flag. The game crashed.
5) So I have tried to add the -march=pentium3 flag. The game crashed.
6) Then I decided to try with the -march=i686 flag. The game didn't crash.
At this moment I decided to take a closer look at my gcc. I did
Code: Select all
$ touch empty.c
$ gcc -v -S -Q empty.c -march=i686
and I got
Code: Select all
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --prefix=/usr --enable-shared --enable-languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit
Thread model: posix
gcc version 3.4.3
/usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/cc1 -v empty.c -dumpbase empty.c -march=i686 -auxbase empty -version -o empty.s
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/include
/usr/include
End of search list.
GNU C version 3.4.3 (i686-pc-linux-gnu)
compiled by GNU C version 3.4.3.
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64468
options passed: -v -march=i686 -auxbase
options enabled: -feliminate-unused-debug-types -fpeephole -ffunction-cse
-fkeep-static-consts -fpcc-struct-return -fgcse-lm -fgcse-sm -fgcse-las
-fsched-interblock -fsched-spec -fsched-stalled-insns
-fsched-stalled-insns-dep -fbranch-count-reg -fcommon -fargument-alias
-fzero-initialized-in-bss -fident -fmath-errno -ftrapping-math -m80387
-mhard-float -mno-soft-float -mieee-fp -mfp-ret-in-387
-maccumulate-outgoing-args -mno-red-zone -mtls-direct-seg-refs -mtune=i686
-march=i686
Execution times (seconds)
parser : 0.01 (100%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
TOTAL : 0.01 0.00 0.01
After replacing -march=i686 with -march=pentium3 I got:
Code: Select all
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --prefix=/usr --enable-shared --enable-languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit
Thread model: posix
gcc version 3.4.3
/usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/cc1 -v empty.c -dumpbase empty.c -march=pentium3 -auxbase empty -version -o empty.s
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/include
/usr/include
End of search list.
GNU C version 3.4.3 (i686-pc-linux-gnu)
compiled by GNU C version 3.4.3.
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64468
options passed: -v -march=pentium3 -auxbase
options enabled: -feliminate-unused-debug-types -fpeephole -ffunction-cse
-fkeep-static-consts -fpcc-struct-return -fgcse-lm -fgcse-sm -fgcse-las
-fsched-interblock -fsched-spec -fsched-stalled-insns
-fsched-stalled-insns-dep -fbranch-count-reg -fcommon -fargument-alias
-fzero-initialized-in-bss -fident -fmath-errno -ftrapping-math -m80387
-mhard-float -mno-soft-float -mieee-fp -mfp-ret-in-387
-maccumulate-outgoing-args -mmmx -msse -mno-red-zone -mtls-direct-seg-refs
-mtune=pentium3 -march=pentium3
Execution times (seconds)
parser : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 (50%) wall
TOTAL : 0.01 0.00 0.02
Since the difference was the -mmmx and -msse flags (perhaps there are also some other differencies too...), I decided to perform the next test.
7) I tried to compile the game with the -march=i686 -mmmx flags. The game didn't crash.
8) So I tried to compile the game with the -march=i686 -mmmx -msse flags. The game crashed.
To sum it up: I think that "the winner" is -msse (-msse2, etc.). I don't know if the error is in the game code, in my compiler, or somewhere else. I'm not an expert in such sort of things. I just know, that I have successfully built and run many programs using the -march=pentium4 flag.
(BTW: I have performed all these test on my Celeron machine. I have also an older Celeron in my laptop, and this older one is P3, but I haven't performed any test on it. However, I could, if you'd like me to do it.)