With CFLAGS="-O3 -pipe -fomit-frame-pointer" none of the above mentioned packages cannot be built on amd64. E.g.: emerge media-libs/sdl-mixer gives x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_mixer\" -DVERSION=\"1.2.6\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -O3 -pipe -fomit-frame-pointer -I/usr/include/SDL -D_REENTRANT -DUSE_RWOPS -DCMD_MUSIC -DWAV_MUSIC -DLIBMIKMOD_MUSIC -pthread -D_REENTRANT -DMID_MUSIC -DUSE_TIMIDITY_MIDI -I./timidity -DOGG_MUSIC -DMP3_MUSIC -I/usr/include/smpeg -I/usr/include/SDL -D_REENTRANT -c effect_position.c -fPIC -DPIC -o .libs/effect_position.o effect_position.c: In function `_Eff_position_u16msb': effect_position.c:878: error: extended registers have no high halves {standard input}: Assembler messages: {standard input}:2110: Error: bad register name `%' {standard input}:2133: Error: suffix or operands invalid for `xchg' {standard input}:2154: Error: suffix or operands invalid for `xchg' make[1]: *** [effect_position.lo] Fehler 1 make[1]: *** Warte auf noch nicht beendete Prozesse... x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_mixer\" -DVERSION=\"1.2.6\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -O3 -pipe -fomit-frame-pointer -I/usr/include/SDL -D_REENTRANT -DUSE_RWOPS -DCMD_MUSIC -DWAV_MUSIC -DLIBMIKMOD_MUSIC -pthread -D_REENTRANT -DMID_MUSIC -DUSE_TIMIDITY_MIDI -I./timidity -DOGG_MUSIC -DMP3_MUSIC -I/usr/include/smpeg -I/usr/include/SDL -D_REENTRANT -c effect_stereoreverse.c -fPIC -DPIC -o .libs/effect_stereoreverse.o x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_mixer\" -DVERSION=\"1.2.6\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -O3 -pipe -fomit-frame-pointer -I/usr/include/SDL -D_REENTRANT -DUSE_RWOPS -DCMD_MUSIC -DWAV_MUSIC -DLIBMIKMOD_MUSIC -pthread -D_REENTRANT -DMID_MUSIC -DUSE_TIMIDITY_MIDI -I./timidity -DOGG_MUSIC -DMP3_MUSIC -I/usr/include/smpeg -I/usr/include/SDL -D_REENTRANT -c effect_stereoreverse.c -o effect_stereoreverse.o >/dev/null 2>&1 make[1]: Leaving directory `/var/tmp/portage/sdl-mixer-1.2.6/work/SDL_mixer-1.2.6' make: *** [all-recursive] Fehler 1 The other two ebuilds also complain about Error: bad register name `%'
Dropping -O3 from the CFLAGS solves the problem. The problem is to set the CFLAGS right. Since I want all the other ebuilds to be built with -O3, I used an addon to portage that allows to append flags to the CFLAGS defined in /etc/make.conf (or the cmdline). This addon can be found under http://article.gmane.org/gmane.linux.gentoo.hardened/1204 (But be sure to replace the " <at> " with the at sign. Furthermore I had to alter line 136 from if [[ ${target%%#*} && ${target%% *} =~ "^(${CATEGORY}|${CATEGORY}/${PN})\>" ]]; then to if [[ ${target%% *} =~ "^(${CATEGORY}|${CATEGORY}/${PN})\>" ]]; then .) I attached my version of this addon and my settings of the per package added cflags.
Created attachment 48197 [details] the addon "/etc/portage/bashrc"
Created attachment 48198 [details] the cflags to override -O3 "/etc/portage/package.cflags"
*** This bug has been marked as a duplicate of 77300 ***
Closing to clean up after bugzilla upgrade. reopen if closed in error. Thanks.