]> oss.titaniummirror.com Git - msp430-binutils.git/blobdiff - ld/testsuite/ld-scripts/crossref.exp
Imported binutils-2.20
[msp430-binutils.git] / ld / testsuite / ld-scripts / crossref.exp
index 4d43ecf0de51f8a29e5d07dfccb80f94aa30bcc4..98178de0639e285090be1a268059b37293d5a93c 100644 (file)
@@ -1,6 +1,6 @@
 # Test NOCROSSREFS in a linker script.
 # By Ian Lance Taylor, Cygnus Support.
-#   Copyright 2000, 2001, 2002, 2003, 2004, 2007
+#   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007
 #   Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
@@ -24,7 +24,7 @@ set test1 "NOCROSSREFS 1"
 set test2 "NOCROSSREFS 2"
 set test3 "NOCROSSREFS 3"
 
-if { [which $CC] == 0 } {
+if { ![is_remote host] && [which $CC] == 0 } {
     untested $test1
     untested $test2
     untested $test3
@@ -45,6 +45,12 @@ if [istarget powerpc64*-*-*] {
     set CFLAGS "$CFLAGS -mcall-aixdesc"
 }
 
+# Prevent the use of the MeP's small data area which references a symbol
+# called __sdabase which will not be defined by our test linker scripts.
+if [istarget mep*-*-elf] {
+    set CFLAGS "-mtiny=0"
+}
+
 if { ![ld_compile $CC "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \
      || ![ld_compile $CC "$srcdir/$subdir/cross2.c" tmpdir/cross2.o] } {
     unresolved $test1
@@ -62,9 +68,7 @@ if [istarget sh64*-*-elf] {
 # IA64 has both ordered and unordered sections in an input file.
 setup_xfail ia64-*-*
 
-verbose -log "$ld $flags -o tmpdir/cross1 -T $srcdir/$subdir/cross1.t tmpdir/cross1.o tmpdir/cross2.o"
-
-catch "exec $ld $flags -o tmpdir/cross1 -T $srcdir/$subdir/cross1.t tmpdir/cross1.o tmpdir/cross2.o" exec_output
+set exec_output [run_host_cmd "$ld" "$flags -o tmpdir/cross1 -T $srcdir/$subdir/cross1.t tmpdir/cross1.o tmpdir/cross2.o"]
 
 set exec_output [prune_warnings $exec_output]
 
@@ -88,10 +92,7 @@ if { ![ld_compile $CC "$srcdir/$subdir/cross3.c" tmpdir/cross3.o] } {
     return
 }
 
-verbose -log "$ld $flags -o tmpdir/cross2 -T $srcdir/$subdir/cross2.t tmpdir/cross3.o"
-
-catch "exec $ld $flags -o tmpdir/cross2 -T $srcdir/$subdir/cross2.t tmpdir/cross3.o" exec_output
-
+set exec_output [run_host_cmd "$ld" "$flags -o tmpdir/cross2 -T $srcdir/$subdir/cross2.t tmpdir/cross3.o"]
 set exec_output [prune_warnings $exec_output]
 
 regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output
@@ -119,9 +120,7 @@ if ![ld_relocate $ld tmpdir/cross3-partial.o "tmpdir/cross1.o tmpdir/cross4.o"]
     return
 }
 
-verbose -log "$ld $flags -o tmpdir/cross3 -T $srcdir/$subdir/cross3.t tmpdir/cross3-partial.o tmpdir/cross2.o"
-
-catch "exec $ld $flags -o tmpdir/cross3 -T $srcdir/$subdir/cross3.t tmpdir/cross3-partial.o tmpdir/cross2.o" exec_output
+set exec_output [run_host_cmd "$ld" "$flags -o tmpdir/cross3 -T $srcdir/$subdir/cross3.t tmpdir/cross3-partial.o tmpdir/cross2.o"]
 
 set exec_output [prune_warnings $exec_output]