+++ This bug was initially created as a clone of Bug #74899 +++ It would appear that I've run into an issue similar to the old -fPIC bug reported in #74899. Same error message, anyway. obj/mame/linux/blend/advance/osd/safequit.o obj/mame/linux/blend/advance/osd/fileio.o obj/mame/linux/blend/advance/osd/fuzzy.o obj/mame/linux/blend/advance/blit/blit.o advance/blit/icopy.h: In function `internal_copy8_step_mmx': advance/blit/icopy.h:195: error: can't find a register in class `BREG' while reloading `asm' make: *** [obj/mame/linux/blend/advance/blit/blit.o] Error 1 gcc -v reports: gcc version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9) Gentoo Base System version 1.12.0_pre13 Portage 2.1_pre3-r1 (default-linux/x86/2005.1, gcc-3.4.5-hardened, glibc-2.3.5-r3, 2.6.14.3 i686) ================================================================= System uname: 2.6.14.3 i686 AMD Athlon(tm) MP 1700+ ccache version 2.4 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -march=athlon-xp -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /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="-Os -march=athlon-xp -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks fixpackages sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.osuosl.org/" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://206.169.166.57/gentoo-portage" USE="x86 X acpi alsa apache2 arts atlas audiofile avi berkdb bitmap-fonts bzip2 crypt cups curl dga divx4linux dlloader doc dvdread eds emboss encode esd ethereal exif expat fam fbcon fbdev ffmpeg fftw flac flash foomaticdb fortran gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 idn imagemagick imlib ipv6 ithreads jack java jpeg junit kde kerberos lcms libg++ libgda libwww live lzo mad matroska mikmod mmx mng mozilla moznoirc mp3 mpeg mpm-worker musicbrainz ncurses network nfsv4 nptl nsplugin nvidia ogg oggvorbis opengl oss pam pcre pdflib perl png pnp ppds python qt quicktime readline real sdl slang speex spell sse ssl subtitles tcpd theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb vorbis win32codecs xine xinerama xml2 xmms xv xvid zlib elibc_glibc kernel_linux userland_GNU" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
FYI, games-emulation/advancemenu-2.4.12 fails with the same error message. obj/menu/linux/blend/lib/error.o obj/menu/linux/blend/lib/filter.o obj/menu/linux/blend/lib/complex.o obj/menu/linux/blend/blit/clear.o obj/menu/linux/blend/blit/blit.o advance/blit/icopy.h: In function `internal_copy8_step_mmx': advance/blit/icopy.h:195: error: can't find a register in class `BREG' while reloading `asm' make: *** [obj/menu/linux/blend/blit/blit.o] Error 1 !!! ERROR: games-emulation/advancemenu-2.4.12 failed.
the above errors occur with gcc-config set to i686-pc-linux-gnu-3.4.5-hardened. With i686-pc-linux-gnu-3.4.5-hardenednopie, both packages build just fine. Maybe -fno-pic in the CFLAGS would be a workaround?
(In reply to comment #2) > the above errors occur with gcc-config set to i686-pc-linux-gnu-3.4.5-hardened. > With i686-pc-linux-gnu-3.4.5-hardenednopie, both packages build just fine. > Maybe -fno-pic in the CFLAGS would be a workaround? No that would make it worse. Try to regain a register with -fomit-frame-pointer till somebody finds time to review the code in question. If that fails then you can maybe try -fno-pie
I just rebuilt advancemame and advancemenu. In both cases, -fomit-frame-pointer did not help. -fno-pie did successfully build both packages, with a warning and a QA notice about TEXTREL stuff.
Well, it seems like the pic patch for advancemame was dropped at some point. No idea why. I added it back in for 0.106.0 so can you give that a try please?
(In reply to comment #5) > Well, it seems like the pic patch for advancemame was dropped at some point. > No idea why. I added it back in for 0.106.0 so can you give that a try please? 0.106.0 builds fine for me with gcc-3.4.6-hardened. Thanks!
Great! Thanks for testing. I'll try to get the pic patch in upstream and make sure it doesn't get dropped going forward.
well that patch ignores the real issue ... try and fix the inline asm to be PIC