gdb: Convert language la_word_break_characters field to a method
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elfvsb / elfvsb.exp
index fb7a3afac3c342fce5af79d748fbd47f50850931..5e19d32ae619dee6f4a7947796c989c3db2aa195 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld-visibility tests
-#   Copyright (C) 2000-2018 Free Software Foundation, Inc.
+#   Copyright (C) 2000-2020 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -25,7 +25,7 @@
 # Make sure that ld can generate ELF shared libraries with visibility.
 
 # Check to see if the C compiler works
-if { [which $CC] == 0 } {
+if { ![check_compiler_available] } {
     return
 }
 
@@ -49,11 +49,6 @@ if { ![istarget hppa*64*-*-hpux*] \
     return
 }
 
-if { [istarget *-*-linux*aout*] \
-     || [istarget *-*-linux*oldld*] } {
-    return
-}
-
 set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
 foreach t $test_list {
     # We need to strip the ".d", but can leave the dirname.
@@ -147,6 +142,9 @@ proc visibility_test { visibility progname testname main sh1 sh2 dat args } {
     if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
        set shared "-bM:SRE -bE:$tmpdir/xcoff.exp"
     }
+    if { [is_elf_format] && [check_shared_lib_support] } {
+       append shared " -Wl,-z,notext"
+    }
     if {![ld_link $CC $tmpdir/$progname.so "$shared $shldflags $tmpdir/$sh1 $tmpdir/$sh2"]} {
        if { [ string match $visibility "hidden_undef" ]
             && [regexp "undefined reference to \`\.?visibility\'" $link_output]
@@ -299,8 +297,6 @@ proc visibility_run {visibility} {
                if [ string match $support_protected "no" ] {
                    setup_xfail $target_triplet
                }
-           } else {
-               setup_xfail "*-*-sunos4*"
            }
 
            # Non-pic code uses name binding rules for applications to
@@ -342,9 +338,6 @@ proc visibility_run {visibility} {
                if [ string match $support_protected "no" ] {
                    setup_xfail $target_triplet
                }
-           } else {
-               setup_xfail "*-*-sunos4*"
-               setup_xfail "*-*-linux*libc1"
            }
            if { [ string match $visibility "hidden_normal" ]
                 || [ string match $visibility "hidden_weak" ]
@@ -392,14 +385,11 @@ proc visibility_run {visibility} {
                    setup_xfail $target_triplet
                }
            }
-           # SunOS can not compare function pointers correctly
-           if [istarget "*-*-sunos4*"] {
-               visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o sun4
-           } else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
+           if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
                visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o xcoff
            } else {
                visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o elfvsb $COMPRESS_LDFLAG
-           } }
+           }
        }
     }}
 
@@ -423,8 +413,6 @@ proc visibility_run {visibility} {
                    if [ string match $support_protected "no" ] {
                        setup_xfail $target_triplet
                    }
-               } else {
-                   setup_xfail "*-*-sunos4*"
                }
                if { ![ string match $visibility "hidden_undef" ]
                     && ![ string match $visibility "protected_undef" ] } {
@@ -493,11 +481,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"
     }
 }
 verbose "Using $picflag to compile PIC code"
This page took 0.023923 seconds and 4 git commands to generate.