From 19f1a11e7ea2a5082bae9d9a079338c5658ba954 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 4 Aug 2017 12:17:15 -0700 Subject: Check linker support for INSERT in linker script Since gold doesn't support INSERT in linker script: https://sourceware.org/bugzilla/show_bug.cgi?id=21676 tst-split-dynreloc fails to link with gold. Check if linker supports INSERT in linker script before using it. * config.make.in (have-insert): New. * configure.ac (libc_cv_insert): New. Set to yes if linker supports INSERT in linker script. (AC_SUBST(libc_cv_insert): New. * configure: Regenerated. * sysdeps/x86_64/Makefile (tests): Add tst-split-dynreloc only if $(have-insert) == yes. --- sysdeps/x86_64/Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sysdeps') diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile index 132470d9..7f3ffe3 100644 --- a/sysdeps/x86_64/Makefile +++ b/sysdeps/x86_64/Makefile @@ -59,9 +59,11 @@ test-extras += tst-audit4-aux tst-audit10-aux \ extra-test-objs += tst-audit4-aux.o tst-audit10-aux.o \ tst-avx-aux.o tst-avx512-aux.o +ifeq ($(have-insert),yes) tests += tst-split-dynreloc LDFLAGS-tst-split-dynreloc = -Wl,-T,$(..)sysdeps/x86_64/tst-split-dynreloc.lds tst-split-dynreloc-ENV = LD_BIND_NOW=1 +endif modules-names += tst-auditmod3a tst-auditmod3b \ tst-auditmod4a tst-auditmod4b \ -- cgit v1.1