# 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.
#
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
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
} else {
run_dump_test "pr20022"
}
+ set LDFLAGS $old_ldflags
}
if { [is_remote host] || [which $CC] != 0 } {