[gdb/testsuite] Add cc-with-dwz.exp and cc-with-dwz-m.exp
[deliverable/binutils-gdb.git] / ld / testsuite / ld-gc / gc.exp
index ad983ef7cdbe2dac37706630d49640da0caaffd6..536356c3816301b1ad469476dc3a8199e981ce45 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld-gc tests
-#   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+#   Copyright (C) 2008-2019 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -59,15 +59,6 @@ proc test_gc { testname filename linker ldflags} {
     set options "-L$srcdir/$subdir"
     append options " " $ldflags " " [ld_link_defsyms] " " $objfile
 
-    # SH64 targets needs an extra ld option for this test.
-    if [istarget sh64*-*-*] {
-       if [istarget sh64*l*-*-*] {
-           set options "-mshlelf32 $options"
-       } else {
-           set options "-mshelf32 $options"
-       }
-    }
-
     if ![ld_link $linker $outfile $options] {
        fail $testname
        return
@@ -116,6 +107,13 @@ if { [is_elf_format] && [check_shared_lib_support] } then {
     if { [istarget tic6x-*] } then {
        set gasopt "-mpic -mpid=near"
     }
+    # These targets do not default to linking with shared libraries.
+    set old_ldflags $LDFLAGS
+    if { [istarget "mips*vr4100*-*-elf*"] \
+        || [istarget "mips*vr4300*-*-elf*"] \
+        || [istarget "mips*vr5000*-*-elf*"] } {
+       append LDFLAGS " -call_shared"
+    }
     if {![ld_assemble_flags $as $gasopt $srcdir/$subdir/libpersonality.s tmpdir/libpersonality.o]
        || ![ld_link $ld tmpdir/libpersonality.so "-shared tmpdir/libpersonality.o"] } then {
        fail libpersonality
@@ -129,6 +127,7 @@ if { [is_elf_format] && [check_shared_lib_support] } then {
     } else {
        run_dump_test "pr20022"
     }
+    set LDFLAGS $old_ldflags
 }
 
 if { [is_remote host] || [which $CC] != 0 } {
This page took 0.024067 seconds and 4 git commands to generate.