Emerging sys-boot/grub fails with line "configure: error: i686-pc-linux-gnu-gcc cannot link at address 2000" Running 'CFlAGS="-fno-pie" emerge grub' fails in the same fashion. Running 'CC="gcc -fno-pie" emerge grub' succeeds as expected. Reproducible: Always Steps to Reproduce: 1. Compile gcc with +hardened. 2. Try to emerge grub. Actual Results: emerge grub failed in configure. Expected Results: Succeeded at emerging grub. # gcc -v Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/specs Configured with: /var/tmp/portage/gcc-3.3.5-r1/work/gcc-3.3.5/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3.5 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5/info --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/include/g++-v3 --host=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --enable-shared --enable-threads=posix --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 Thread model: posix gcc version 3.3.5 (Gentoo Hardened Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1) NameMe boot # emerge grub Calculating dependencies ...done! >>> emerge (1 of 1) sys-boot/grub-0.94-r1 to / >>> md5 src_uri ;-) grub-0.94.tar.gz >>> md5 src_uri ;-) grub-0.94-splash.patch.bz2 >>> Unpacking source... >>> Unpacking grub-0.94.tar.gz to /var/tmp/portage/grub-0.94-r1/work >>> Unpacking grub-0.94-splash.patch.bz2 to /var/tmp/portage/grub-0.94-r1/work * Applying grub-0.94-splash.patch ... [ ok ] * Applying grub-0.94-gcc3.4.patch ... [ ok ] >>> Source unpacked. * econf: updating /var/tmp/portage/grub-0.94-r1/work/grub-0.94/config.guess with /usr/share/gnuconfig/config.guess * econf: updating /var/tmp/portage/grub-0.94-r1/work/grub-0.94/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --datadir=/usr/lib/grub --exec-prefix=/ --disable-auto-linux-mem-opt --enable-diskless --enable-3c503 --enable-3c507 --enable-3c509 --enable-3c529 --enable-3c595 --enable-3c90x --enable-cs89x0 --enable-davicom --enable-depca --enable-eepro --enable-eepro100 --enable-epic100 --enable-exos205 --enable-ni5210 --enable-lance --enable-ne2100 --enable-ni5010 --enable-ni6510 --enable-natsemi --enable-ne --enable-ns8390 --enable-wd --enable-otulip --enable-rtl8139 --enable-sis900 --enable-sk-g16 --enable-smc9000 --enable-tiara --enable-tulip --enable-via-rhine --enable-w89c840 configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. checking for a BSD-compatible install... /bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for i686-pc-linux-gnu-strip... no checking for strip... strip checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking whether to enable maintainer-specific portions of Makefiles... no checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc checking for i686-pc-linux-gnu-gcc... (cached) i686-pc-linux-gnu-gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether i686-pc-linux-gnu-gcc accepts -g... yes checking for i686-pc-linux-gnu-gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of i686-pc-linux-gnu-gcc... gcc3 checking dependency style of i686-pc-linux-gnu-gcc... (cached) gcc3 checking for i686-pc-linux-gnu-ranlib... no checking for ranlib... ranlib checking whether optimization for size works... yes checking whether -Wundef works... yes checking whether -falign-loops works... yes checking for i686-pc-linux-gnu-objcopy... no checking for objcopy... objcopy checking if C symbols get an underscore after compilation... no checking whether objcopy works for absolute addresses... configure: error: i686-pc-linux-gnu-gcc cannot link at address 2000 !!! ERROR: sys-boot/grub-0.94-r1 failed. !!! Function econf, Line 449, Exitcode 1 !!! econf failed !!! If you need support, post the topmost build error, NOT this status message. NameMe boot # emerge info Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20040808-r1, 2.6.10-hardened-r1 i686) ================================================================= System uname: 2.6.10-hardened-r1 i686 Intel(R) Pentium(R) 4 CPU 1.60GHz Gentoo Base System version 1.4.16 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux26-headers-2.6.8.1-r2 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" 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/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 acpi apm arts avi bash-completion berkdb bitmap-fonts crypt cups encode f77 font-server foomaticdb fortran gdbm gif gpm gtk2 hardened imlib ipv6 jpeg libg++ libwww mad mikmod motif mpeg ncurses nls nptl nptlonly oggvorbis opengl oss pam pdflib perl pic png postgres python quicktime readline sdl spell ssl svga tcpd truetype truetype-fonts type1-fonts xml2 xmms xv zlib"
*** This bug has been marked as a duplicate of 69726 ***