X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=ld%2Ftestsuite%2Fld-undefined%2Fundefined.exp;fp=ld%2Ftestsuite%2Fld-undefined%2Fundefined.exp;h=e80be032f0b0830c89fab234cb913d32ed56842d;hp=e6bf359b50818b5356874d20a5bac40d84df7b52;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/ld/testsuite/ld-undefined/undefined.exp b/ld/testsuite/ld-undefined/undefined.exp index e6bf359..e80be03 100644 --- a/ld/testsuite/ld-undefined/undefined.exp +++ b/ld/testsuite/ld-undefined/undefined.exp @@ -2,7 +2,7 @@ # By Ian Lance Taylor, Cygnus Support # # Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2007 Free Software Foundation, Inc. +# 2005, 2007, 2008 Free Software Foundation, Inc. # # This file is part of the GNU Binutils. # @@ -25,7 +25,7 @@ set testund "undefined" set testfn "undefined function" set testline "undefined line" -if { [which $CC] == 0 } { +if { ![is_remote host] && [which $CC] == 0 } { verbose "Could not find C compiler!" 1 untested $testund untested $testfn @@ -41,16 +41,15 @@ if ![ld_compile "$CC -g" $srcdir/$subdir/undefined.c tmpdir/undefined.o] { return } -catch "exec rm -f tmpdir/undefined" exec_output +remote_file host delete "tmpdir/undefined" set flags [big_or_little_endian] # Using -e start prevents the SunOS linker from trying to build a # shared library. send_log "$ld -e start $flags -o tmpdir/undefined tmpdir/undefined.o\n" -verbose "$ld -e start $flags -o tmpdir/undefined tmpdir/undefined.o" +set exec_output [run_host_cmd "$ld" "-e start $flags -o tmpdir/undefined tmpdir/undefined.o"] -catch "exec $ld -e start $flags -o tmpdir/undefined tmpdir/undefined.o" exec_output send_log "$exec_output\n" verbose "$exec_output" @@ -72,6 +71,12 @@ checkund $mu $testund #setup_xfail "arm*-*-pe*" #setup_xfail "thumb*-*-pe*" +# For Xtensa on GNU Linux systems (or any other system where PIC code is +# always used), the address of the undefined function is in a literal pool +# outside the function, so that both the "undefined function" and "undefined +# line" tests fail. +setup_xfail xtensa*-*-linux* + set mf "tmpdir/undefined.o* In function `function':" checkund $mf $testfn @@ -133,4 +138,7 @@ setup_xfail "sh64-*-*" # doesn't need a literal pool entry. setup_xfail s390-*-* +# See comments above for Xtensa. +setup_xfail xtensa*-*-linux* + checkund $ml $testline