Use better test for usable compiler in ld testsuite.
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elfvers / vers.exp
index 55875917fdf19a0b410bcdd89d587a9b14d886a8..ebaaa785320ccc709fce7c645a9513d71c96ef0f 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld-version tests
-#   Copyright (C) 1997-2017 Free Software Foundation, Inc.
+#   Copyright (C) 1997-2019 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -23,7 +23,7 @@
 #
 
 # Check to see if the C compiler works
-if { [which $CC] == 0 } {
+if { ![check_compiler_available] } {
     return
 }
 
@@ -59,11 +59,6 @@ if { ![istarget hppa*64*-*-hpux*]
     return
 }
 
-if { [istarget *-*-linux*aout*]
-     || [istarget *-*-linux*oldld*] } {
-    return
-}
-
 if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
     return
 }
@@ -93,11 +88,7 @@ if { [istarget mips*-*-*] && ! [at_least_gcc_version 4 3] } then {
         || [string match "*option ignored*" $exec_output]
         || [string match "*unrecognized option*" $exec_output]
         || [string match "*passed to ld*" $exec_output] } {
-       if [istarget *-*-sunos4*] {
-           set picflag "-pic"
-       } else {
-           set picflag "-KPIC"
-       }
+       set picflag "-KPIC"
     }
 }
 
This page took 0.024198 seconds and 4 git commands to generate.