stage1/xgcc -Bstage1/ -B/usr/i686-pc-linux-gnu/bin/ -DEFAULT_PIE_SSP -DEFAULT_RELRO -DEFAULT_BIND_NOW -march=i686 -pipe -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -o gengenrtl \ gengenrtl.o ../libiberty/libiberty.a /bin/sh /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/move-if-change tmp-mlib.h multilib.h multilib.h is unchanged echo timestamp > s-mlib stage1/xgcc -Bstage1/ -B/usr/i686-pc-linux-gnu/bin/ -c -DEFAULT_PIE_SSP -DEFAULT_RELRO -DEFAULT_BIND_NOW -march=i686 -pipe -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I/var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc -I/var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/. -I/var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/config -I/var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/../include \ /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gengtype.c -o gengtype.o stage1/xgcc -Bstage1/ -B/usr/i686-pc-linux-gnu/bin/ -DEFAULT_PIE_SSP -DEFAULT_RELRO -DEFAULT_BIND_NOW -march=i686 -pipe -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -o genpreds \ genpreds.o ../libiberty/libiberty.a stage1/xgcc -Bstage1/ -B/usr/i686-pc-linux-gnu/bin/ -DEFAULT_PIE_SSP -DEFAULT_RELRO -DEFAULT_BIND_NOW -march=i686 -pipe -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -o gencheck \ gencheck.o ../libiberty/libiberty.a ./gengenrtl -h > tmp-genrtl.h /bin/sh: line 1: ./gengenrtl: No such file or directory make[2]: *** [s-genrtl] Error 127 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/gcc-3.3.5.20050130-r1/work/build/gcc' make[1]: *** [stage2_build] Error 2 make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.5.20050130-r1/work/build/gcc' make: *** [bootstrap-lean] Error 2 !!! ERROR: sys-devel/gcc-3.3.5.20050130-r1 failed. !!! Function gcc_do_make, Line 1204, Exitcode 2 !!! emake failed with bootstrap-lean !!! If you need support, post the topmost build error, NOT this status message. livecd portage # ls -l /etc/make.profile lrwxrwxrwx 1 root root 47 Jun 4 13:25 /etc/make.profile -> ../usr/portage/profiles/uclibc/x86/hardened/2.4 livecd portage # grep -v ^# /etc/make.conf | grep . USE="-* x86 uclibc hardened" CHOST="i686-pc-linux-gnu" CFLAGS="-march=i686 -Os -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" ACCEPT_KEYWORDS="x86" GENTOO_MIRRORS="http://portage.rt.lan/ http://pandemonium.tiscali.de/pub/gentoo/" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" RSYNC_TIMEOUT=15 MAKEOPTS="-j2" PORTAGE_NICENESS=-1 Reproducible: Always Steps to Reproduce: 1. wget stage1-x86-uclibc-hardened-2005.0.tar.bz2 2. untar,chroot,resolv.conf,emerge --sync,make.conf 3. cd /usr/portage; scripts/bootstrap.sh Actual Results: i was unable to build gcc Expected Results: gcc should be build
CHOST=*-gnu is should be changed to *-uclibc (haven't said which stage1 was used) this seems to be a cross-compile attempt from glibc to uclibc, that can't be done like that Use an uclibc stage1 to start up I wonder why USE="pic" does not show up?
thanks Peter. Closing bug as INVALID as the usr clearly had the wrong CHOST= setting in make.conf
Hi, added pic to Useflags and changed chost to *-uclibc. But i am still not able to compile gcc: gcc -DUSE_UCLIBC -march=i686 -pipe -O2 -DIN_GCC -W -Wall -Wwrite-strings -Ws trict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long - DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3. 5/gcc -I/var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/. -I/var/tmp/p ortage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/config -I/var/tmp/portage/gcc-3. 3.5.20050130-r1/work/gcc-3.3.5/gcc/../include \ -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/usr/lib/gc c-lib/\" -DDEFAULT_TARGET_VERSION=\"3.3.5-20050130\" -DDEFAULT_TARGET_MACHINE=\" i686-pc-linux-uclibc\" -DSTANDARD_BINDIR_PREFIX=\"/usr/i686-pc-linux-uclibc/gcc- bin/3.3.5-20050130/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" `test "X${SHLIB_LI NK}" = "X" || test "yes" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` `test "X${SH LIB_MULTILIB}" = "X" || echo "-DNO_SHARED_LIBGCC_MULTILIB"` \ -c /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c -o gcc.o) In file included from /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/ gcc.c:87: /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/pie-ssp-chain.h:75:2: warning: suggest hiding #error from traditional C with an indented # In file included from /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/ gcc.c:156: configargs.h:2: warning: string length `864' is greater than the length `509' IS O C89 compilers are required to support /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:695: warning: tr aditional C rejects string concatenation /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:718: warning: tr aditional C rejects string concatenation /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:738: warning: st ring length `524' is greater than the length `509' ISO C89 compilers are require d to support /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:765: warning: st ring length `626' is greater than the length `509' ISO C89 compilers are require d to support /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:887: warning: st ring length `523' is greater than the length `509' ISO C89 compilers are require d to support /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:1472: warning: s tring length `733' is greater than the length `509' ISO C89 compilers are requir ed to support /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c: In function `re try_ice': /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:5897: warning: ` fd' might be used uninitialized in this function /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:7544:25: warning : function-like macro "fputc" must be used with arguments in traditional C /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:7545:23: warning : function-like macro "fputc" must be used with arguments in traditional C /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:7565:25: warning /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:7572:28: warning : function-like macro "fputc" must be used with arguments in traditional C /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:7595:37: warning : function-like macro "fputc" must be used with arguments in traditional C /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:7596:34: warning : function-like macro "fputc" must be used with arguments in traditional C /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/gcc/gcc.c:7602:24: warning : function-like macro "fputc" must be used with arguments in traditional C gcc -DUSE_UCLIBC -march=i686 -pipe -O2 -DIN_GCC -W -Wall -Wwrite-strings -Ws trict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long - DHAVE_CONFIG_H -o xgcc gcc.o gccspec.o intl.o \ prefix.o version.o ../libiberty/libiberty.a /usr/bin/ld: warning: creating a DT_TEXTREL in object. /var/tmp/portage/gcc-3.3.5.20050130-r1/work/build/gcc/xgcc -B/var/tmp/portage/gc c-3.3.5.20050130-r1/work/build/gcc/ -B/usr/i686-pc-linux-uclibc/bin/ -B/usr/i686 -pc-linux-uclibc/lib/ -isystem /usr/i686-pc-linux-uclibc/include -dumpspecs > tm p-specs make[1]: *** [specs] Error 139 make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.5.20050130-r1/work/build/gc c' make: *** [install-gcc] Error 2 !!! ERROR: sys-devel/gcc-3.3.5.20050130-r1 failed. !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. the stage is used is: http://pandemonium.tiscali.de/pub/gentoo/experimental/x86/embedded/stages/stage1-x86-uclibc-2005.0.tar.bz2
sry, forgot something that happened befor: /usr/bin/ld: warning: creating a DT_TEXTREL in object. * Creating a hardened no-pie gcc specs file /usr/lib/portage/bin/ebuild.sh: line 1874: 29237 Segmentation fault ./xgcc -dumpspecs >${WORKDIR}/build/hardenednopie.specs [ .... ] /usr/bin/ld: warning: creating a DT_TEXTREL in object. * Creating a hardened no-pie no-ssp gcc specs file /usr/lib/portage/bin/ebuild.sh: line 1874: 29348 Segmentation fault ./xgcc -dumpspecs >${WORKDIR}/build/hardenednopiessp.specs >>> Test phase [not enabled]: sys-devel/gcc-3.3.5.20050130-r1 >>> Install gcc-3.3.5.20050130-r1 into /var/tmp/portage/gcc-3.3.5.20050130-r1/im age/ category sys-devel * Installing GCC...
two things happen here probably 1. bug in all gcc, from which someone removed the libiberty-pic patch (files/3.3.3), this will produce text relocations in all intermediate binaries, if the user uses a pax/grsec kernel with NOELFRELOCS enabled 2. the other warning (ssp-pie-chain.h:75, I wonder why it didn't bailed out) shows, that the user uses a non-pie supporting binutils. I can't believe that such a binutils is in the named stage, so probably he downgraded binutils The user says, he enabled hardened pic , USE="-* hardened uclibc" is faulty If make.profile is properly linked to the hardened stage (relative link!!!) then pic/hardened USE is not necessary, but gcc build commands show that hardened was not enabled (missing -DEFAULT_PIE_SSP). The first bug should be corrected, the user should start up again using a gcc that has the libiberty-pic patch in the patches tarball
If you want to use hardened feature you should start from the hardened stages for uclibc. They are in the same directory that you found the non hardened ones in. The conversion process gains you nothing but headache from non hardened to hardened userslands in most cases. Please start over with the proper stage.
Created attachment 74847 [details, diff] patch to fix the ignored legal USE flags.
Comment on attachment 74847 [details, diff] patch to fix the ignored legal USE flags. Ignore this patch, it was meant for bug 93525. I fat fingered something.
i guess you need to use a uclibc hardened stage