gcc -c -Wall -m32 -march=i486 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC init.c test.c: In function `modtst': test.c:975: error: can't find a register in class `BREG' while reloading `asm' make: *** [test.o] Error 1 make: *** Waiting for unfinished jobs.... Reproducible: Always Steps to Reproduce: 1. 2. 3. Portage 2.0.51-r8 (gcc34-x86-2004.2, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10-rc3-ck1 i686) ================================================================= System uname: 2.6.10-rc3-ck1 i686 AMD Athlon(tm) Gentoo Base System version 1.6.7 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Nov 29 2004, 12:17:47)] distcc 2.18.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.8.5-r2, 1.9.3, 1.5, 1.6.3, 1.7.9, 1.4_p6 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10 virtual/os-headers: 2.6.8.1-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -mtune=athlon-xp -O2 -pipe -frename-registers -fomit-frame-pointer -fprefetch-loop-arrays" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -mtune=athlon-xp -O2 -pipe -frename-registers -fomit-frame-pointer -fprefetch-loop-arrays -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs candy ccache digest distlocks prelink sandbox" GENTOO_MIRRORS=" ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/bmg-main /usr/lportage" SYNC="rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage/" USE="3dnow 3dnowex S3TC X Xaw3d aac acpi acpi4linux alsa apm audiofile avi berkdb bitmap-fonts cddb cdparanoia cdr crypt cups curl dga divx4linux dts dv dvb dvd dvdr dvdread edl encode ext-png ext-zlib faac faad ffmpeg fftw flac foomaticdb freetype gdbm gif gimp gimpprint gnome gphoto2 gpm gs gstreamer gtk gtk2 gtkhtml hal ieee1394 imlib ithreads java javascript jpeg jpeg2k kde ldap libg++ libwww live lm_sensors lzo mad matroska mikmodmmx mmx2 monkey motif moznocompose mpeg mpi nas ncurses network nls no_wxgtk1 nocd nptl nvidia oggvorbis openal opengl openssh oss pam pdflib perl pic png povray ppds python qt qtmt quicktime readline real rtc samba scanner sdl slang smime speex spell sqlite sse ssl tcpd tetex theora threads tiff transcode truetype usb videos wmf wxwindows x86 xfs xine xinetd xml xml2 xmms xprint xv xvid xvmc yv12 zlib linguas_de"
I was able to reproduce that bug on my system for a while. It turned out it was realated to #68799. Please update gcc-config and make sure that you are using the i686-pc-linux-gnu-3.4.3 gcc profile. Then do `unset GCC_SPECS` just to be sure, and try emerging memtest86+ again.
To my big disbelief: It worked...
In that case, I consider this bug to be fixed by the new gcc-config release.
Doesn't work for me. ** gcc-config -c = i686-pc-linux-gnu-3.4.3 ** Error: gcc -c -Wall -m32 -march=i486 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC init.c test.c: In function `modtst': test.c:975: error: can't find a register in class `BREG' while reloading `asm' make: *** [test.o] Error 1 ** Emerge info:: Portage 2.0.51-r8 (default-linux/x86/2004.0, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10-nitro2 i686) ================================================================= System uname: 2.6.10-nitro2 i686 AMD Athlon(TM) XP 2500+ Gentoo Base System version 1.6.8 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Dec 27 2004, 21:33:48)] ccache version 2.3 [enabled] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.8.5-r2, 1.6.3, 1.9.3, 1.5, 1.7.9 sys-devel/binutils: 2.15.92.0.2-r2 sys-devel/libtool: 1.5.10-r2 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -mmmx -m3dnow -msse -mfpmath=sse,387 -ffast-math -O2 -fomit-frame-pointer -frename-registers -funroll-loops -fPIC -fstack-protector -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/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="-march=athlon-xp -mmmx -m3dnow -msse -mfpmath=sse,387 -ffast-math -O2 -fomit-frame-pointer -frename-registers -funroll-loops -fPIC -fstack-protector -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" LDFLAGS="" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 16bit 3dnow 3dnowex S3TC X aac aalib acl acpi alsa avi berkdb bidi bzip2 cdparanoia cdr chroot cjk crypt cups dvd dvdr dvdread edl faac faad fam fbcon flac font-server foomaticdb foreign-sysvinit fortran gd gdbm gif gimpprint gphoto2 gpm graphviz gstreamer gtk gtk2 hardenedimagemagick imap imlib imlib2 ipv6 ithreads jabber java javascript jbig jce jikes jpeg jpeg2k justify kde lcms libcaca libwww live lzo lzw-tiff mad matroska mikmod mmap mmx mmx2 mng monkey mozilla moznoirc mozsvg mpeg mpeg4 mpi mplayer msn ncurses network nls no-old-linux no_wxgtk1 nomac nomalloccheck nptl nptlonly nvidia oggvorbis opengl pam pdflib perl pic png ppds python qt readline real rtc sasl snmp speex spell sse ssl stencil-buffer svg tcltk tcpd tga theora threads tiff truetype truetype-fonts unicode usb userlocales vim-with-x wmf xml xml2 xmms xprint xrandr xscreensaver xv xvid xvmc zlib"
Again the same error as before with memtest86+ v1.50, same config. I've no problems with memtest86-3.2. Maybe the + version needs the same patches used in the original version.
I have the same problem here using a hardened gentoo the flags -fstack-protecor -fPIC must be filtred for pepole having it in their CFLAGS and for hardened gcc -fno-stack-protector and -fno-pic must be added. This is really the same problem than on bug #66630 I'm joining a patch, really simmilar to the one from solar for memtest i think this bug should be reopend ...
Created attachment 49276 [details, diff] patch enabling -fno-stack-protector and -fno-pic for memtest86+ against memtest86+-1.50
Created attachment 49277 [details, diff] makes the ebuid use the patch for ssp/pic i dont know if "test_flag -fno-stack-protector && epatch ... " is needed as it is done in the ebuild of memtest86-3.2
Bug is still present. Patches need to be added. But they also have to be reworked for 1.50. I'll hack on it and post here.
Created attachment 49285 [details, diff] memtest86+-1.50-hardened.patch fstack has to be filtered on reloc.c also. have fun fighting the dos format of the orig Makefile while trying to patch.
Spock, I you do not wish to make the changes yourself then feel free to reassign the bug to hardened@
If you ^^
Patch added to CVS. Thanks for your help :)
WFM, thanks.