The specs file should contain something like that, to allow gcc/ld find the runtime libraries: *multilib: . !m64 !m32;.:../lib64 m64 !m32;./32:../lib32:. !m64 m32; but instead my specs file looks like that: *multilib: . !m64 !m32;.:../lib64 m64 !m32;.:../lib32:. !m64 m32; So when building the current glibc-2.3.4.20050125 i get that error in the config.log: configure:5599: x86_64-pc-linux-gnu-gcc -march=k8 -O2 -pipe -O2 -shared -o conftest.so conftest.c -lgcc_s -Wl,--as-needed -nostdlib 1>&5 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/./libgcc_s.so when searching for -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/libgcc_s.so when searching for -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/./libgcc_s.so when searching for -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/libgcc_s.so when searching for -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit status Reproducible: Always Steps to Reproduce: Portage 2.0.51-r15 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9 x86_64) ================================================================= System uname: 2.6.9 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.6.9 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 7 2005, 17:01:20)] distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.8.5-r2, 1.6.3, 1.5, 1.7.9, 1.4_p6, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r2, 2.15.92.0.2-r3 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.10 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-O3 -march=athlon64 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -march=athlon64 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox" GENTOO_MIRRORS="ftp://ftp.du.se/pub/os/gentoo/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage/gentoo" PORTDIR_OVERLAY="/usr/portage/my" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X aac aalib acpi adns alsa arts avi bash-completion berkdb bitmap-fonts bonobo cdr crypt cups curl dvd encode f77 fam flac fortran gdbm gif gimpprint gnome gphoto2 gpm gstreamer gtk gtk2 guile imagemagick imlib ipv6 jp2 jpeg kde latex ldap libcaca libwww lirc lzw lzw-tiff mad mbox mikmod mng motif mozilla ncurses nls nptl nvidia oggvorbis opengl oss pam pdflib perl plotutils png postgres ppds python qt readline samba sasl scanner sdl slang sqlite ssl svg svgz tcltk tcpd tetex threads tiff truetype truetype-fonts type1-fonts usb userlocales v4l v4l2 wmf xanim xinerama xml xml2 xmms xpm xprint xrandr xv xvid xvmc zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Please update gcc-config to 1.3.10-r1 and run gcc-config. This should get it working for you.
Running gcc-config is the first thing i did after that happened. # gcc-config --version gcc-config-1.3.10-r1 # gcc-config -l [1] x86_64-pc-linux-gnu-3.3.3 [2] x86_64-pc-linux-gnu-3.4.3 * [3] x86_64-pc-linux-gnu-3.4.3-hardened [4] x86_64-pc-linux-gnu-3.4.3-hardenednopie [5] x86_64-pc-linux-gnu-3.4.3-hardenednossp [6] x86_64-pc-linux-gnu-4.0.0 # ls /usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.4.3/32/ crtbegin.o libfrtbegin.a libg2c.so.0.0.0 libgcov.a libstdc++.so.6.0.3 crtbeginS.o libg2c.a libgcc.a libstdc++.a libsupc++.a crtbeginT.o libg2c.la libgcc_eh.a libstdc++.la libsupc++.la crtend.o libg2c.so libgcc_s.so.1 libstdc++.so crtendS.o libg2c.so.0 libgcc_s_32.so libstdc++.so.6 # ls /usr/lib/gcc-lib/x86_64-pc-linux-gnu/lib32/ libgcc_s.so.1 libgcc_s_32.so
I should also mention that it also fails to find something to satisfy " -lgcc" configure:5732: x86_64-pc-linux-gnu-gcc -O3 -march=athlon64 -pipe -O2 -pie -fpie -o conftest conftest.c 1>&5 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/./libgcc.a when searching for -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/libgcc.a when searching for -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/./libgcc.a when searching for -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/libgcc.a when searching for -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc
This bug is invalid, it is based on outdated broken toolchain classes, combined with older gcc ebuilds