When trying to emerge Generator, I receive a warning that SSE instructions are disabled. They shouldn't be because I'm compiling on a Pentium 4 and USE flage SSE set appropriately. Reproducible: Always Steps to Reproduce: 1. Setup portage environment per my output of 'emerge info' 2. Make sure that /var/log/portage exists to get a log of ebuild. 3. emerge games-emulation/generator 4. Warnings appear on screen and output of log (see attachment) Actual Results: See warnings. Also doesn't compile (due to syntax problem with ebuild. Expected Results: Should build successfully gundam generator # emerge info Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r0, 2.6.10-gentoo-r6 i686) ================================================================= System uname: 2.6.10-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.20GHz Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar 5 2005, 17:08:16)] distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS=" -O3 -fweb -frename-registers -march=pentium4 -pipe -mtune=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -funroll-loops -falign-functions -fmerge-all-constants -mfpmath=sse -maccumulate-outgoing-args -fprefetch-loop-arrays " CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS=" -O3 -fweb -frename-registers -march=pentium4 -pipe -mtune=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -funroll-loops -falign-functions -fmerge-all-constants -mfpmath=sse -maccumulate-outgoing-args -fprefetch-loop-arrays -fvisibility-inlines-hidden " DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks newuse sandbox sfperms" GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo http://mirrors.tds.net/gentoo ftp://mirrors.tds.net/gentoo http://mirror.datapipe.net/gentoo http://mirror.datapipe.net/gentoo http://www.gigaload.org/gentoo.org/ http://gentoo.osuosl.org" LANG="en_US.UTF-8" 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="x86 16bit X Xaw3d a52 aac aalib acpi alsa apache2 avi bash-completion canna cdr cjk cross crypt cups curl dio directfb divx4linux dvd dvdr dvdread emacs emboss encode esd exif f77 fbcon foomaticdb fortran freetype freewnn gcj gdbm ggi gif gnome gnustep gphoto2 gpm gstreamer gtk gtk2 hal imlib immqt-bc ipv6 ithreads jack java jikes joystick jpeg junit libg++ libwww lm_sensors m17n-lib mad matroska memlimit mikmod mime mmx mozilla mp3 mpeg nas ncurses nls nptl objc ogg oggvorbis openal opengl pam pcmcia pda pdflib perl png pnp portaudio posix ppds profile pthreads python qt quicktime radeon readline samba sdl skey slang soap sockets source speex spell sse ssl svg svga tcltk tcpd threads tiff truetype truetype-fonts trusted type1-fonts unicode usb v4l vcd videos wifi xine xinerama xml2 xmlrpc xmms xosd xpm xprint xsl xv xvid zlib video_cards_radeon" Unset: ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS See attached log in additional comment
Created attachment 52990 [details] Result of trying to build on Pentium 4 with SSE enabled The ebuild ignores the flag and consequently, SSE optimizations are not used.
You have -mfpmath=sse in your CFLAGS. Most likely your compiler was configured to disable SSE instructions, fall-back to floating poiunt.
You must add -msse (and, optionally, -mmmx or -msse2) into your variables CFLAGS and CXXFLAGS. See 'man 1 gcc': "-mfpmath=sse: Use scalar floating point instructions present in the SSE instruction set. This instruction set is supported by Pentium3 and newer chips, in the AMD line by Athlon-4, Athlon-xp and Athlon-mp chips. The earlier version of SSE instruction set supports only single precision arithmetics, thus the double and extended precision arithmetics is still done using 387. Later version, present only in Pentium4 and the future AMD x86-64 chips supports double precision arithmetics too. For i387 you need to use -march=cpu-type, -msse or -msse2 switches to enable SSE extensions and make this option effec- tive. For x86-64 compiler, these extensions are enabled by default. The resulting code should be considerably faster in the major- ity of cases and avoid the numerical instability problems of 387 code, but may break some existing code that expects tempo- raries to be 80bit."
Why do you have -march and -mtune set? You should pick one not both. Also SSE is enabled when -march is set to pentium4 so no need to have in your CFLAGS.
Other than because other people set both flags I don't have a reason. http://lunar-linux.org/?q=node/view/289 http://forums.gentoo.org/viewtopic.php?t=248245&start=50 Closing bug.