GCC gets confused (literally) trying to optimize SpiderMonkey under "-march=pentium4 -O2 -pipe -fomit-frame-pointer -mfpmath=sse" Filtering -march=pentium4 into -march=pentium3 solves the problem.
works for me over here ... could you provide `emerge info` ? root@vapier spidermonkey-1.5_rc5 # pwd /var/db/pkg/dev-lang/spidermonkey-1.5_rc5 root@vapier spidermonkey-1.5_rc5 # cat CFLAGS -march=pentium4 -O2 -pipe -fomit-frame-pointer -mfpmath=sse -pipe root@vapier spidermonkey-1.5_rc5 # cat CXXFLAGS -march=pentium4 -O2 -pipe -fomit-frame-pointer -mfpmath=sse -pipe root@vapier spidermonkey-1.5_rc5 # gcc -v Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs Configured with: /var/tmp/portage/gcc-3.2.3-r1/work/gcc-3.2.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --disable-nls Thread model: posix gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)
Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4) ================================================================= System uname: 2.4.20-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 1500MHz GENTOO_MIRRORS="http://karl.planetmirror.com/pub/gentoo/ http://gentoo.gnukorea.org/ http://chaos.planetmirror.com/pub/gentoo/ http://www.zentek-international.com/mirrors/gentoo/ http://maxwell.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ http://chandra.mirror.ac.uk/sites/www.ibiblio.org/gentoo/" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /var/bind /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="/usr/portage.local" USE="x86 oss apm avi crypt cups encode gif jpeg libg++ mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gtkhtml alsa gdbm berkdb slang readline tetex bonobo svga tcltk java guile mysql X sdl gpm tcpd pam libwww ssl perl python esd imlib oggvorbis gnome gtk motif opengl mozilla gphoto2 ldap cdr cjk dga gb jikes kerberos krb4 mbox mule odbc pic samba sse tiff usb -3dnow -arts -qt -kde" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -mfpmath=sse" CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -mfpmath=sse" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage" FEATURES="sandbox ccache userpriv usersandbox" Unfortunately, I've recompiled GCC since then, but I assume my GCC is -march=pentium4 -O{2,3,s} -pipe -fomit-frame-pointer [-mfpmath=sse] , before filtering. The error was in a LISP like syntax.... gcc -o Linux_All_OPT.OBJ/jsdtoa.o -c -march=pentium4 -O2 -pipe -fomit-frame-pointer -mfpmath=sse -Wall -Wno-format -O -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R -DX86_LINUX -UDEBUG -DNDEBUG -UDEBUG_portage -DEDITLINE -ILinux_All_OPT.OBJ -Wall -Wno-format -O -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R -DX86_LINUX -UDEBUG -DNDEBUG -UDEBUG_portage -DEDITLINE -ILinux_All_OPT.OBJ jsdtoa.c jsdtoa.c: In function `ulp': jsdtoa.c:987: warning: `a' might be used uninitialized in this function jsdtoa.c: In function `b2d': jsdtoa.c:1018: warning: `d' might be used uninitialized in this function jsdtoa.c: In function `JS_strtod': jsdtoa.c:1239: warning: `rv0' might be used uninitialized in this function jsdtoa.c:1874: unable to find a register to spill in class `AREG' jsdtoa.c:1874: this is the insn: (insn 1757 1756 1758 (set (reg:CCNO 17 flags) (compare:CCNO (and:SI (subreg:SI (reg/v:DI 21 rxmm0 [243]) 0) (const_int 1 [0x1])) (const_int 0 [0x0]))) 281 {testsi_1} (insn_list 1753 (nil)) (expr_list:REG_DEAD (reg/v:DI 21 rxmm0 [243]) (nil)))
so are you saying the bug doesnt occur anymore ? if so it may have been an over optimization in gcc itself ...
No, I just got the error again, as shown previously. My current gcc -v : Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/specs Configured with: /var/tmp/portage/gcc-3.2.2/work/gcc-3.2.2/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext Thread model: posix gcc version 3.2.2 was compiled with -march=pentium3 -mcpu=pentium4 -pipe
to see what any pkg on your system was compiled with you can just look at /var/db/pkg/<category>/<pkgname>-<version>/CFLAGS
I know that, but the old CFLAGS file has been erased for about a week now. What did you compile your GCC under?
ok i just emerged 3.2.2 and i got the bug you have ... guess it was fixed in 3.2.3 ;) http://cvs.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-x86/dev-lang/spidermonkey/spidermonkey-1.5_rc5.ebuild.diff?r1=1.1&r2=1.2