summaryrefslogtreecommitdiff
path: root/ld/testsuite/config
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-04-29 06:50:33 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-04-29 06:52:55 -0700
commit010f98a5859620001aed9f27f213ed681c73a59a (patch)
treee98758dcf1d1dbe2d263182bf90e8b8183f26543 /ld/testsuite/config
parentd347c9df495036dcbe5bc710ac5a07079bdd59ad (diff)
downloadbinutils-gdb-010f98a5859620001aed9f27f213ed681c73a59a.tar.gz
Download source only on remote host
There is no need to download source if we aren't on remote host. Otherwise, each ld test run on local host leaves behind a couple test files. * config/default.exp (NOPIE_CFLAGS): Download source only on remote host. (NOPIE_LDFLAGS): Likewise. * testsuite/lib/ld-lib.exp (check_lto_available): Likewise. (check_lto_fat_available): Likewise. (check_lto_shared_available): Likewise. (check_ifunc_available): Likewise. (check_ifunc_attribute_available): Likewise.
Diffstat (limited to 'ld/testsuite/config')
-rw-r--r--ld/testsuite/config/default.exp8
1 files changed, 6 insertions, 2 deletions
diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index 2c41ff2ee6b..8ccad111b5f 100644
--- a/ld/testsuite/config/default.exp
+++ b/ld/testsuite/config/default.exp
@@ -302,7 +302,9 @@ if { ![info exists PLT_CFLAGS] } then {
set f [open $src "w"]
puts $f ""
close $f
- remote_download host $src
+ if [is_remote host] {
+ set src [remote_download host $src]
+ }
set plt_available [run_host_cmd_yesno "$CC" "$flags -c -fplt $src -o $output"]
remote_file host delete $src
remote_file host delete $output
@@ -338,7 +340,9 @@ if { ![info exists NOPIE_CFLAGS] || ![info exists NOPIE_LDFLAGS] } then {
set f [open $src "w"]
puts $f "int main (void) { return 0; }"
close $f
- remote_download host $src
+ if [is_remote host] {
+ set src [remote_download host $src]
+ }
set nopie_available [run_host_cmd_yesno "$CC" "$flags -fno-PIE -no-pie $src -o $output"]
remote_file host delete $src
remote_file host delete $output