| Summary: | dev-libs/klibc-1.5.23 fails with ld.gold: ,noexecstack: unknown -z option | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Justin Lecher (RETIRED) <jlec> |
| Component: | Current packages | Assignee: | Gentoo Kernel Miscellaneous <kernel-misc> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Bug Depends on: | |||
| Bug Blocks: | 356819 | ||
| Attachments: |
/tmp/einfo
/var/log/portage/build/dev-libs/klibc-1.5.23:20110720-075810.log |
||
|
Description
Justin Lecher (RETIRED)
2011-07-20 08:03:07 UTC
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 |