diff options
author | Alan Modra <amodra@gmail.com> | 2017-01-03 09:38:53 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-01-03 11:47:47 +1030 |
commit | 4ce6ca2c78c12931c31f46b9390e00a012eaa466 (patch) | |
tree | 915f1c9fe16e06f96f14c5434ef5725f8c4bb2af /ld/testsuite/ld-pie | |
parent | 052d038860998099a4cfdc9fe6825307be7453be (diff) | |
download | binutils-4ce6ca2c78c12931c31f46b9390e00a012eaa466.zip binutils-4ce6ca2c78c12931c31f46b9390e00a012eaa466.tar.gz binutils-4ce6ca2c78c12931c31f46b9390e00a012eaa466.tar.bz2 |
Don't run C tests in ld testsuite unless we have a C compiler
Removing the [isnative] check requires that we test for a C compiler.
* testsuite/ld-elf/elf.exp: Check that $CC exists before C tests.
* testsuite/ld-pie/pie.exp: Likewise.
* testsuite/ld-plugin/lto.exp: Likewise.
Diffstat (limited to 'ld/testsuite/ld-pie')
-rw-r--r-- | ld/testsuite/ld-pie/pie.exp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ld/testsuite/ld-pie/pie.exp b/ld/testsuite/ld-pie/pie.exp index e9d1162..44d9f09 100644 --- a/ld/testsuite/ld-pie/pie.exp +++ b/ld/testsuite/ld-pie/pie.exp @@ -25,6 +25,11 @@ if { ![istarget *-*-linux*] return } +# Check to see if the C compiler works +if { [which $CC] == 0 } { + return +} + # Check if -pie is supported or not. send_log "$CC -fpie -pie $srcdir/$subdir/pie.c -o tmpdir/pie" catch "exec $CC -fpie -pie $srcdir/$subdir/pie.c -o tmpdir/pie" exec_output |