From 7cdfc3462fbbb27727ddd83d356cf79af8854740 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Thu, 11 Jun 2020 15:44:48 +0100 Subject: ld, testsuite: only run CTF tests when ld and GCC support CTF The CTF testsuite runs GCC to generate CTF that it knows matches the input .c files before doing a run_dump_test over it. So we need a GCC capable of doing that, and we need to always avoid running those tests if libctf was disabled because the linker will never be capable of it. ld/ * configure.ac (enable_libctf): Substitute it. * Makefile.am (enablings.exp): New. (EXTRA_DEJAGNU_SITE_CONFIG): Add it. (DISTCLEANFILES): Likewise. * Makefile.in: Regenerate. * configure: Likewise. * testsuite/lib/ld-lib.exp (compile_one_cc): New. (check_ctf_available): Likewise. (skip_ctf_tests): Likewise. * testsuite/ld-ctf/ctf.exp: Call skip_ctf_tests. --- ld/configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ld/configure') diff --git a/ld/configure b/ld/configure index 8e6dcb76d07..b63bc88bdfc 100755 --- a/ld/configure +++ b/ld/configure @@ -678,6 +678,7 @@ WARN_WRITE_STRINGS NO_WERROR WARN_CFLAGS_FOR_BUILD WARN_CFLAGS +enable_libctf ENABLE_LIBCTF_FALSE ENABLE_LIBCTF_TRUE installed_linker @@ -12037,7 +12038,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12040 "configure" +#line 12041 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12143,7 +12144,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12146 "configure" +#line 12147 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15958,6 +15959,7 @@ fi + # Set the 'development' global. . $srcdir/../bfd/development.sh -- cgit v1.2.1