binutils-gdb/ld/testsuite/ld-sh
Sandra Loosemore 44ed80923a Use better test for usable compiler in ld testsuite.
The ld testsuite includes numerous tests that depend on being able to
compile and link programs with the C compiler.  Some of these tests
use [which $CC] to check for the presence of the compiler before
proceeding with the test, but run_ld_link_exec_tests and run_cc_link_tests
give ERRORs if compilation fails.  Also, even if $CC is defined and present,
it may not be usable due to missing libraries, etc.

This patch adds a new procedure check_compiler_available that attempts
to build an empty program and caches the result.  Uses of [which $CC]
are replaced with calls to this procedure, and run_ld_link_exec_tests
and run_cc_link_tests now also guard attempts to use $CC.

2019-04-24  Sandra Loosemore  <sandra@codesourcery.com>

	ld/
	* testsuite/config/default.exp: Use [check_compiler_available]
	instead of [which $CC].
	* testsuite/ld-auto-import/auto-import.exp: Likewise.
	* testsuite/ld-cygwin/exe-export.exp: Likewise.
	* testsuite/ld-elf/audit.exp: Likewise.
	* testsuite/ld-elf/compress.exp: Likewise.
	* testsuite/ld-elf/dwarf.exp: Likewise.
	* testsuite/ld-elf/elf.exp: Likewise.
	* testsuite/ld-elf/indirect.exp: Likewise.
	* testsuite/ld-elf/linux-x86.exp: Likewise.
	* testsuite/ld-elf/shared.exp: Likewise.
	* testsuite/ld-elf/tls.exp: Likewise.
	* testsuite/ld-elf/wrap.exp: Likewise.
	* testsuite/ld-elfcomm/elfcomm.exp: Likewise.
	* testsuite/ld-elfvers/vers.exp: Likewise.
	* testsuite/ld-elfvsb/elfvsb.exp: Likewise.
	* testsuite/ld-elfweak/elfweak.exp: Likewise.
	* testsuite/ld-gc/gc.exp: Likewise.
	* testsuite/ld-i386/i386.exp: Likewise.
	* testsuite/ld-i386/no-plt.exp: Likewise.
	* testsuite/ld-i386/tls.exp: Likewise.
	* testsuite/ld-ifunc/ifunc.exp: Likewise.
	* testsuite/ld-mn10300/mn10300.exp: Likewise.
	* testsuite/ld-pe/pe-compile.exp: Likewise.
	* testsuite/ld-pe/pe-run.exp: Likewise.
	* testsuite/ld-pe/pe-run2.exp: Likewise.
	* testsuite/ld-pie/pie.exp: Likewise.
	* testsuite/ld-plugin/lto.exp: Likewise.
	* testsuite/ld-plugin/plugin.exp: Likewise.
	* testsuite/ld-scripts/crossref.exp: Likewise.
	* testsuite/ld-sh/sh.exp: Likewise.
	* testsuite/ld-shared/shared.exp: Likewise.
	* testsuite/ld-size/size.exp: Likewise.
	* testsuite/ld-srec/srec.exp: Likewise.
	* testsuite/ld-undefined/undefined.exp: Likewise.
	* testsuite/ld-unique/unique.exp: Likewise.
	* testsuite/ld-x86-64/mpx.exp: Likewise.
	* testsuite/ld-x86-64/no-plt.exp: Likewise.
	* testsuite/ld-x86-64/tls.exp: Likewise.
	* testsuite/ld-x86-64/x86-64.exp: Likewise.
	* testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Call
	check_compiler_available before trying to use the compiler.
	(run_cc_link_tests): Likewise.
	(check_compiler_available): New.  Use it instead of [which $CC].
2019-04-24 12:14:56 -07:00
..
arch Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
adjsw8.s Fix PR10378 which is SH relax bug. 2014-08-01 19:13:39 +09:00
fdpic-funcdesc-shared.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-funcdesc-shared.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-funcdesc-static.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-funcdesc-static.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotfuncdesc-shared.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotfuncdesc-shared.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotfuncdesc-static.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotfuncdesc-static.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotfuncdesci20-shared.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotfuncdesci20-shared.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotfuncdesci20-static.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotfuncdesci20-static.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-goti20-shared.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-goti20-shared.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-goti20-static.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-goti20-static.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotofffuncdesc-shared.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotofffuncdesc-shared.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotofffuncdesc-static.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotofffuncdesc-static.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotofffuncdesci20-shared.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotofffuncdesci20-shared.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotofffuncdesci20-static.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotofffuncdesci20-static.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotoffi20-shared.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotoffi20-shared.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotoffi20-static.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-gotoffi20-static.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-plt-be.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-plt-le.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-plt.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-plti20-be.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-plti20-le.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-stack-default.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-stack-set.d bfd/ 2012-10-23 09:33:56 +00:00
fdpic-stack-size.d 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
fdpic-stack.s 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com> 2010-05-25 14:12:43 +00:00
ld-r-1.d Remove sh5 and sh64 support 2018-04-16 15:29:39 +09:30
ldr1.s
ldr2.s
rd-sh.exp Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
refdbg-0-dso.d PR 11225 2010-01-28 15:25:20 +00:00
refdbg-1.d
refdbg.s
refdbglib.s
reloc1.d
reloc1.s
sh-vxworks.exp Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
sh.exp Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
sh1.s Fix PR10373 which is SH relax bug. 2014-08-01 19:17:47 +09:00
sh2.c
shared-1.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
shared-2.d Support different ld --hash-style in the ld testsuite 2017-08-07 22:10:51 +09:30
start.s
sub2l-1.d bfd/ 2012-06-06 10:50:18 +00:00
sub2l.s
textrel1.s
textrel2.s
tlsbin-0-dso.d
tlsbin-1.d
tlsbin-2.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tlsbin-3.d
tlsbin-4.d
tlsbin.s
tlsbinpic.s
tlslib.s
tlspic-1.d
tlspic-2.d Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
tlspic-3.d
tlspic-4.d
tlspic1.s
tlspic2.s
tlstpoff-1.d
tlstpoff-2.d
tlstpoff1.s
tlstpoff2.s
vxworks1-le.dd
vxworks1-lib-le.dd
vxworks1-lib.dd
vxworks1-lib.nd
vxworks1-lib.rd
vxworks1-lib.s
vxworks1-lib.td
vxworks1-static.d ld error/warning messages 2018-02-26 10:51:12 +10:30
vxworks1.dd
vxworks1.ld
vxworks1.rd
vxworks1.s
vxworks2-static.sd
vxworks2.s
vxworks2.sd
vxworks3-le.dd
vxworks3-lib-le.dd
vxworks3-lib.dd
vxworks3-lib.s
vxworks3.dd
vxworks3.s
vxworks4.d
vxworks4a.s
vxworks4b.s
weak1.d bfd/ 2012-06-06 10:50:18 +00:00
weak1.s