diff options
author | Stan Shebs <stanshebs@google.com> | 2018-11-15 11:52:35 -0800 |
---|---|---|
committer | Stan Shebs <stanshebs@google.com> | 2019-04-24 08:14:19 -0700 |
commit | fbf200117db8f703c05a6c2c53dc25d5b8dc080b (patch) | |
tree | 551aa6198fc4f1fa76d2cb39f2c770df130e5a16 | |
parent | 53eebacec0beede65887a085e8cd1f07b6cc1c0f (diff) | |
download | glibc-fbf200117db8f703c05a6c2c53dc25d5b8dc080b.tar glibc-fbf200117db8f703c05a6c2c53dc25d5b8dc080b.tar.gz glibc-fbf200117db8f703c05a6c2c53dc25d5b8dc080b.tar.bz2 glibc-fbf200117db8f703c05a6c2c53dc25d5b8dc080b.zip |
Work around clang assembler problem with ifunc relocs
-rwxr-xr-x | configure | 9 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | nptl/Makefile | 5 |
3 files changed, 21 insertions, 2 deletions
@@ -4028,6 +4028,13 @@ else fi fi +# Workaround for clang assembler problem with ifunc relocs, b/119574415 +if test "$with_clang" = no; then + no_integrated_as= +else + no_integrated_as=-no-integrated-as +fi + # For the multi-arch option we need support in the assembler & linker. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler and linker STT_GNU_IFUNC support" >&5 $as_echo_n "checking for assembler and linker STT_GNU_IFUNC support... " >&6; } @@ -4050,7 +4057,7 @@ __start: EOF libc_cv_ld_gnu_indirect_function=no if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \ - -nostartfiles -nostdlib $no_ssp \ + -nostartfiles -nostdlib $no_ssp $no_integrated_as \ -o conftest conftest.S 1>&5 2>&5; then # Do a link to see if the backend supports IFUNC relocs. $READELF -r conftest 1>&5 diff --git a/configure.ac b/configure.ac index 064743c131..8907900b31 100644 --- a/configure.ac +++ b/configure.ac @@ -635,6 +635,13 @@ else fi fi +# Workaround for clang assembler problem with ifunc relocs, b/119574415 +if test "$with_clang" = no; then + no_integrated_as= +else + no_integrated_as=-no-integrated-as +fi + # For the multi-arch option we need support in the assembler & linker. AC_CACHE_CHECK([for assembler and linker STT_GNU_IFUNC support], libc_cv_ld_gnu_indirect_function, [dnl @@ -654,7 +661,7 @@ __start: EOF libc_cv_ld_gnu_indirect_function=no if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \ - -nostartfiles -nostdlib $no_ssp \ + -nostartfiles -nostdlib $no_ssp $no_integrated_as \ -o conftest conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then # Do a link to see if the backend supports IFUNC relocs. $READELF -r conftest 1>&AS_MESSAGE_LOG_FD diff --git a/nptl/Makefile b/nptl/Makefile index 0e316edfac..2f3c7182a9 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -231,6 +231,11 @@ CFLAGS-fsync.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-pt-system.c += -fexceptions +# Workaround for clang assembler problem with ifunc relocs, b/119574415 +ifeq ($(with-clang),yes) +CFLAGS-pt-vfork.c += -no-integrated-as +endif + LDLIBS-tst-once5 = -lstdc++ CFLAGS-tst-thread_local1.o = -std=gnu++11 LDLIBS-tst-thread_local1 = -lstdc++ |