ld -m elf_x86_64 -o usr/kinit/ipconfig/static/ipconfig -z,noexecstack usr/klibc/arch/x86_64/crt0.o --start-group usr/kinit/ipconfig/main.o usr/kinit/ipconfig/netdev.o usr/kinit/ipconfig/packet.o usr/kinit/ipconfig/dhcp_proto.o usr/kinit/ipconfig/bootp_proto.o usr/klibc/libc.a /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/libgcc.a --end-group ; cp -f usr/kinit/ipconfig/static/ipconfig usr/kinit/ipconfig/static/ipconfig.g ; strip --strip-all -R .comment -R .note --strip-all -R .comment -R .note --strip-all -R .comment -R .note usr/kinit/ipconfig/static/ipconfig ld: ,noexecstack: unknown -z option ld: use the --help option for usage information make[3]: *** [usr/kinit/ipconfig/static/ipconfig] Error 1 make[2]: *** [usr/kinit/ipconfig] Error 2 make[1]: *** [all] Error 2 make: *** [klibc] Error 2 emake failed * ERROR: dev-libs/klibc-1.5.23 failed (compile phase): * Compile failed! $ einfo =dev-libs/klibc-1.5.23 sh: einfo: command not found
Created attachment 280433 [details] /tmp/einfo emerge --info
Created attachment 280435 [details] /var/log/portage/build/dev-libs/klibc-1.5.23:20110720-075810.log build.log
I can seem to reproduce this withh gcc-4.6.2. Is this still an issue for you with that compiler?
same with latest gcc:4.6 binutils and klibc.
I'm not sure why mine would work, and yours would not. Same klibc Same binutils Same arch rm -f usr/kinit/ipconfig/lib.a; ar cru usr/kinit/ipconfig/lib.a usr/kinit/ipconfig/main.o usr/kinit/ipconfig/netdev.o usr/kinit/ipconfig/packet.o usr/kinit/ipconfig/dhcp_proto.o usr/kinit/ipconfig/bootp_proto.o ld -m elf_x86_64 -o usr/kinit/ipconfig/static/ipconfig -z,noexecstack usr/klibc/arch/x86_64/crt0.o --start-group usr/kinit/ipconfig/main.o usr/kinit/ipconfig/netdev.o usr/kinit/ipconfig/packet.o usr/kinit/ipconfig/dhcp_proto.o usr/kinit/ipconfig/bootp_proto.o usr/klibc/libc.a /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libgcc.a --end-group ; cp -f usr/kinit/ipconfig/static/ipconfig usr/kinit/ipconfig/static/ipconfig.g ; strip --strip-all -R .comment -R .note --strip-all -R .comment -R .note --strip-all -R .comment -R .note usr/kinit/ipconfig/static/ipconfig ld -m elf_x86_64 -o usr/kinit/ipconfig/shared/ipconfig -z,noexecstack -e main usr/klibc/interp.o --start-group usr/kinit/ipconfig/main.o usr/kinit/ipconfig/netdev.o usr/kinit/ipconfig/packet.o usr/kinit/ipconfig/dhcp_proto.o usr/kinit/ipconfig/bootp_proto.o -R usr/klibc/libc.so /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libgcc.a --end-group ; cp -f usr/kinit/ipconfig/shared/ipconfig usr/kinit/ipconfig/shared/ipconfig.g ; strip --strip-all -R .comment -R .note --strip-all -R .comment -R .note --strip-all -R .comment -R .note usr/kinit/ipconfig/shared/ipconfig rm -f usr/kinit/fstype/lib.a; ar cru usr/kinit/fstype/lib.a usr/kinit/fstype/main.o usr/kinit/fstype/fstype.o
(In reply to comment #5) > I'm not sure why mine would work, and yours would not. Are you using the gold linker as mentioned in the summary? I can reproduce this using it.
Not sure gold linker can compile klibc. toolchain, any thoughts?
gold doesn't except -z,noexecstack, it needs to be -Wl,-z,noexecstack.
(In reply to comment #8) not quite. the compiler driver accepts -Wl,-z,noexecstack. when invoking the linker, you have to drop the comma: ld ... -z noexecstack ... atm your invocation is doing: ld ... -z,noexecstack ... hence the error: ld: ,noexecstack: unknown -z option because it's treating ",noexecstack" as the option. the ebuild is clearly broken: klibc-1.5.25.ebuild: EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
Fixed in >= 1.5.25