| Summary: | sys-libs/glibc-2.30[custom-cflags] CFLAGS=-flto fails with error: support for the symbol redirection needed | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Mike Lothian <mike> |
| Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | build.log | ||
Looks like it's LTO related
x86_64-pc-linux-gnu-gcc -m32 -O3 -march=native -pipe -O3 -march=native -pipe -Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--build-id=sha1 -fuse-ld=bfd -O3 -S conftest.c -o - | grep -F my_strstr
call my_strstr@PLT
I think the issue is we're passing all the CFLAGS into CC and the configure check isn't expecting that
D'oh This is probably related to the new custom-cflags USE-flag (In reply to Mike Lothian from comment #1) > Looks like it's LTO related > > x86_64-pc-linux-gnu-gcc -m32 -O3 -march=native -pipe -O3 -march=native -pipe > -Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--build-id=sha1 > -fuse-ld=bfd -O3 -S conftest.c -o - | grep -F my_strstr > call my_strstr@PLT I think that is expected output. Can you attach failed config.log as well? Let's declare it as works-as-intended for USE=custom-cflags. CFLAGS=-flto is too fragile for today's glibc ./configure. Feel free to file upstream bug report if you think it should work. |
Created attachment 585760 [details] build.log This is the test in question: AC_CACHE_CHECK(for redirection of built-in functions, libc_cv_gcc_builtin_redirection, [dnl cat > conftest.c <<\EOF extern char *strstr (const char *, const char *) __asm ("my_strstr"); char *foo (const char *a, const char *b) { return __builtin_strstr (a, b); } EOF dnl if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | grep -F "my_strstr" > /dev/null]); then libc_cv_gcc_builtin_redirection=yes else libc_cv_gcc_builtin_redirection=no fi rm -f conftest* ]) if test "$libc_cv_gcc_builtin_redirection" = no; then AC_MSG_ERROR([support for the symbol redirection needed]) fi