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/Makefile.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ld/Makefile.in') diff --git a/ld/Makefile.in b/ld/Makefile.in index aaf322d..0c4dff3 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -492,6 +492,7 @@ elf_list_options = @elf_list_options@ elf_plt_unwind_list_options = @elf_plt_unwind_list_options@ elf_shlib_list_options = @elf_shlib_list_options@ enable_initfini_array = @enable_initfini_array@ +enable_libctf = @enable_libctf@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ @@ -1017,7 +1018,7 @@ MAINTAINERCLEANFILES = configdoc.texi ld.1 ld.info CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \ $(BFDDIR)/development.sh -EXTRA_DEJAGNU_SITE_CONFIG = development.exp +EXTRA_DEJAGNU_SITE_CONFIG = development.exp enablings.exp MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \ ldemul-list.h crtbegin.@OBJEXT@ crtend.@OBJEXT@ ld.log ld.sum @@ -1028,7 +1029,7 @@ CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s spu_ovl.@OBJEXT@ spu_icache.s EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.@OBJEXT@_c \ emultempl/spu_icache.@OBJEXT@_c deffilep.c deffilep.h $(man_MANS) -DISTCLEANFILES = site.exp development.exp site.bak stringify.sed +DISTCLEANFILES = site.exp development.exp enablings.exp site.bak stringify.sed all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -2549,6 +2550,9 @@ development.exp: $(BFDDIR)/development.sh $(EGREP) "[development|experimental]=" $(BFDDIR)/development.sh \ | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@ +enablings.exp: + echo "set enable_libctf ${enable_libctf}" >> $@ + # DOCUMENTATION TARGETS # Manual configuration file; not usually attached to normal configuration, # because almost all configs use "gen" version of manual. -- cgit v1.1