Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
Not eligible to see or edit group visibility for this bug.
View Bug Activity | Format For Printing | XML | Clone This Bug
Compiling ufo-ai with CFLAGS="-march=athlon-xp -mcpu=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -fstack-protector" either leads to signal 11 when clicking on "equip" or "buy/sell" inside the game or, sometimes, it works but character/object models are "invisible". Building with CFLAGS="-mcpu=athlon-xp -O3 -pipe -fomit-frame-pointer -falign-functions=4 -fstack-protector" the game works properly. Thus the ebuild needs to filter the flags causing the problem. Reproducible: Always Steps to Reproduce: 1. Compile the build with the given CFLAGS 2. Start the game 3. Begin new game 4. Click on "equip" or "buy/sell" Actual Results: Game crashed, see given URL for debug output. Expected Results: Work properly. Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 i686 AMD Athlon(tm) Gentoo Base System version 1.4.10 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -mcpu=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -fstack-protector" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -mcpu=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -fstack-protector" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp.linux.ee/pub/gentoo/distfiles/ http://212.219.247.11/sites/www.ibiblio.org/gentoo/ http://ftp.linux.ee/pub/gentoo/distfiles/ http://212.219.247.21/sites/www.ibiblio.org/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X aalib acpi alsa avi berkdb cdr crypt cups directfb dvd emacs encode esd fam fbcon flac foomaticdb gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 icq imap imlib java joystick jpeg ldap libg++ libwww mad maildir matroska mikmod mitshm mmx mng motif mozilla moznocompose moznoirc moznomail mpeg ncurses nls nocd nptl oggvorbis opengl oscar oss pam pdflib perl png ppds python quicktime readline samba sdl slang spell sse ssl svga tcpd theora threads truetype unicode videos x86 xml2 xmms xv zlib"
I've just rebuilt the game a *lot* of times, and I can say that the only flag that trips me up in the way you describe is "-fstack-protector". That would have been my first guess, but you said it worked! Well, perhaps it does on your system, but not here. These CFLAGS work fine here, once -fstack-protector has been filtered out: "-march=pentium3 -mcpu=pentium3 -msse -mfpmath=sse -mmmx -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays" Obviously I had to change the CPU type to my Pentium III and remove -m3dnow, which is an AMD specific feature.
Created an attachment (id=31488) [details] This patch filters out the -fstack-protector flag. I tested this with all sorts of weird optimizations, and the game doesn't trip up any more.
fixed in cvs, thanks
Well this is strange for I am sure I've recompiled my working version with -fstack-protector; I'm going to recompile without -fstack-protector but with the other flags within the next hour and re-report if the build works.
I just tried this on my Athlon machine with those *exact* CFLAGS. With the filter-flags it works, wihout the filter-flags it doesn't. If you have a different experience, I suspect something else is broken. I recommend keeping this bug closed.