Summary: | sys-libs/glibc-2.20-r2 with -fno-stack-protector in CXXFLAGS: librtld.os: In function `lookup_doit': rtld.c:(.text+0x136): undefined reference to `__stack_chk_fail_local' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Andrew Savchenko <bircoph> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED NEEDINFO | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge --info sys-libs/glibc
build.log.xz environment |
Description
Andrew Savchenko
2015-03-23 23:30:36 UTC
Created attachment 399574 [details]
emerge --info sys-libs/glibc
Created attachment 399576 [details]
build.log.xz
Created attachment 399578 [details]
environment
I have the same problem with 2.20 and 2.19-r1. Looks like stack-protector fired up, this is bad... my guess is your ridiculous CFLAGS are causing it to break. can you try with simple ones instead ? CFLAGS="-march=native -O2 -pipe" (In reply to SpanKY from comment #6) > my guess is your ridiculous CFLAGS But they're not ridiculous and can be grounded. > are causing it to break. can you try > with simple ones instead ? > CFLAGS="-march=native -O2 -pipe" I tried 2.20-r2 with these CFLAGS, the same failure. Please looked into build.log I uploaded. CFLAGS are stripped down to "-O2 -march=native" already. For gcc this is done in the eclass. (In reply to Andrew Savchenko from comment #7) your flags are ridiculous. the glibc ebuild does strip them down, but not entirely. if you look closer at the log, you'll see some leak through. i see now your LDFLAGS are also invalid. change them to: LDFLAGS='-Wl,-O1 -Wl,--as-needed' try turning off ccache/distcc to see if that makes a difference. and try with blank LDFLAGS and the simple suggested CFLAGS. (In reply to SpanKY from comment #8) > (In reply to Andrew Savchenko from comment #7) > > your flags are ridiculous. Please read -O3 flag expansion in man gcc before claiming this (most extra flags are from there). > the glibc ebuild does strip them down, but not > entirely. if you look closer at the log, you'll see some leak through. > > i see now your LDFLAGS are also invalid. change them to: > LDFLAGS='-Wl,-O1 -Wl,--as-needed' Please read carefully what I posted above. As can be seen from comment 1, for gcc LDFLAGS are set to "-Wl,-O1,--as-needed" despite system defaults (this is done via package.env) As can be seen from comment 7, I tried CFLAGS="-march=native -O2 -pipe" (together with simple LDFLAGS above) with negative result. > try turning off ccache/distcc to see if that makes a difference. and try > with blank LDFLAGS and the simple suggested CFLAGS. ccache and distcc have nothing to do here. I actually found a reason: "-fno-stack-protector" in CXXFLAGS (not CFLAGS) caused this failure. Before claiming this bug as INVALID, please consider that "-fno-stack-protector" was added to flags as was recommended in the news "2014-06-15 GCC 4.8.3 defaults to -fstack-protector", because I'm not happy with stack-protector enabled by default on this host. (In reply to Andrew Savchenko from comment #9) your settings are ridiculous, end of story. your LDFLAGS are invalid (we do not support combined flags in LDFLAGS in flag-o-matic) and you need to fix them. i did not say this report was invalid. if i did, i would have closed it already. it's also why i kept asking you to try things to narrow it down (because you have too much noise). if you want to be hostile, then i will punt the report. CXXFLAGS shouldn't be impacting the build ... that's weird. (In reply to Andrew Savchenko from comment #9) i can't reproduce this behavior. please post a full build log with ccache & distcc turned off with the minimal set of CFLAGS/CXXFLAGS/LDFLAGS flags that cause the issue to show up on your system. Strange, after I was able to build 2.20-r2 as described above (and have it installed), I can't reproduce this issue any longer. i looked through the source and couldn't find any place where CXXFLAGS would matter. they get used by a few tests, but not during normal configure/make -- everything is asm/C in glibc. oh well, if it comes up again, try finding a minimal flag set and re-open. |