The build fails on hardened x86 with: mv -f /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/rtld-libc.aT /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/rtld-libc.a make[3]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.2/work/glibc-2.12.2/elf' i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -nostdlib -nostartfiles -r -o /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os '-Wl,-(' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/dl-allobjs.os /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/rtld-libc.a -lgcc '-Wl,-)' \ -Wl,-Map,/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os.map i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -nostdlib -nostartfiles -shared -Wl,-z,now \ -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,defs -Wl,--verbose 2>&1 | \ LC_ALL=C \ sed -e '/^=========/,/^=========/!d;/^=========/d' \ -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \ > /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/ld.so.lds i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -nostdlib -nostartfiles -shared -o /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/ld.so \ -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,defs -Wl,-z,now \ /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os -Wl,--version-script=/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/ld.map \ -Wl,-soname=ld-linux.so.2 -T /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/ld.so.lds /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os: In function `_dl_initial_error_catch_tsd': (.text+0xa6): undefined reference to `__stack_chk_fail_local' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os: In function `rtld_lock_default_lock_recursive': rtld.c:(.text+0xd8): undefined reference to `__stack_chk_fail_local' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os: In function `rtld_lock_default_unlock_recursive': rtld.c:(.text+0x108): undefined reference to `__stack_chk_fail_local' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os: In function `lookup_doit': rtld.c:(.text+0x193): undefined reference to `__stack_chk_fail_local' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os: In function `dlmopen_doit': rtld.c:(.text+0x21c): undefined reference to `__stack_chk_fail_local' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/librtld.os:rtld.c:(.text+0x7f6): more undefined references to `__stack_chk_fail_local' follow /usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/ld.so: hidden symbol `__stack_chk_fail_local' isn't defined /usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-default-i686-pc-linux-gnu-nptl/elf/ld.so] Error 1 make[2]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.2/work/glibc-2.12.2/elf' make[1]: *** [elf/subdir_lib] Error 2 make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.2/work/glibc-2.12.2' make: *** [all] Error 2 emake failed * ERROR: sys-libs/glibc-2.12.2 failed (compile phase): and fails on amd64 multilib hardened with: mv -f /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/rtld-libc.aT /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/rtld-libc.a make[3]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.2/work/glibc-2.12.2/elf' x86_64-pc-linux-gnu-gcc -m32 -march=x86_64 -march=x86_64 -march=i686 -Wl,-O1 -Wl,--as-needed -nostdlib -nostartfiles -r -o /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/ elf/librtld.os '-Wl,-(' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/dl-allobjs.os /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf /rtld-libc.a -lgcc '-Wl,-)' \ -Wl,-Map,/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os.map x86_64-pc-linux-gnu-gcc -m32 -march=x86_64 -march=x86_64 -march=i686 -Wl,-O1 -Wl,--as-needed -nostdlib -nostartfiles -shared -Wl,-z,now \ -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,defs -Wl,--verbose 2>&1 | \ LC_ALL=C \ sed -e '/^=========/,/^=========/!d;/^=========/d' \ -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \ > /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so.lds x86_64-pc-linux-gnu-gcc -m32 -march=x86_64 -march=x86_64 -march=i686 -Wl,-O1 -Wl,--as-needed -nostdlib -nostartfiles -shared -o /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu- nptl/elf/ld.so \ -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,defs -Wl,-z,now \ /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os -Wl,--version-script=/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl /ld.map \ -Wl,-soname=ld-linux.so.2 -T /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so.lds /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `_dl_initial_error_catch_tsd': (.text+0xa6): undefined reference to `__stack_chk_fail_local' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `rtld_lock_default_lock_recursive': rtld.c:(.text+0xd8): undefined reference to `__stack_chk_fail_local' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `rtld_lock_default_unlock_recursive': rtld.c:(.text+0x108): undefined reference to `__stack_chk_fail_local' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `lookup_doit': rtld.c:(.text+0x193): undefined reference to `__stack_chk_fail_local' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `dlmopen_doit': rtld.c:(.text+0x21c): undefined reference to `__stack_chk_fail_local' /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os:rtld.c:(.text+0x830): more undefined references to `__stack_chk_fail_local' follow /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so: hidden symbol `__stack_chk_fail_lo cal' isn't defined /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.12.2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so] Error 1 make[2]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.2/work/glibc-2.12.2/elf' make[1]: *** [elf/subdir_lib] Error 2 make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.2/work/glibc-2.12.2' make: *** [all] Error 2 emake failed * ERROR: sys-libs/glibc-2.12.2 failed (compile phase):
Created attachment 292939 [details] Crompressed log for amd64 hardened stage1 build
Created attachment 292941 [details] Crompressed log for x86 hardened stage1 build
ok, i missed that you were building for hardened when we talked on irc your USE is buggered: USE: amd64 build elibc_glibc kernel_linux multilib userland_GNU seems to be missing pic/hardened/etc...
After looking more carefully, it seems the issue was caused by the rename of STAGE1_USE to BOOTSTRAP_USE as catalyst also used it for stage1. I've took this chance to update catalyst and make it use BOOTSTRAP_USE and dropped cxx from stage1 target as it's picked up from BOOTSTRAP_USE. I've bumped catalyst in the tree[1] and will run some tests tonight to confirm if the issue is fixed. I'll leave the bug open until I get the results. [1] - http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-util/catalyst/catalyst-2.0.7.ebuild?view=log
This issue was fixed on catalyst-2.0.7.1[1], [2]. [1] - http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=shortlog;h=refs/tags/CATALYST-2.0.7.1 [2] - http://www.jmbsvicetto.name/releases/amd64/hardened/20111119/