diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-04-29 06:50:33 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-04-29 06:52:55 -0700 |
commit | 010f98a5859620001aed9f27f213ed681c73a59a (patch) | |
tree | e98758dcf1d1dbe2d263182bf90e8b8183f26543 /ld/testsuite/lib | |
parent | d347c9df495036dcbe5bc710ac5a07079bdd59ad (diff) | |
download | gdb-010f98a5859620001aed9f27f213ed681c73a59a.zip gdb-010f98a5859620001aed9f27f213ed681c73a59a.tar.gz gdb-010f98a5859620001aed9f27f213ed681c73a59a.tar.bz2 |
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/lib')
-rw-r--r-- | ld/testsuite/lib/ld-lib.exp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index 88afc5a..9333f52 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -1819,7 +1819,9 @@ proc check_lto_available { } { set f [open $src "w"] puts $f "int main() { return 0; }" close $f - remote_download host $src + if [is_remote host] { + set src [remote_download host $src] + } set lto_available_saved [run_host_cmd_yesno "$CC" "$flags -flto -fuse-linker-plugin $src -o $output"] remote_file host delete $src remote_file host delete $output @@ -1860,7 +1862,9 @@ proc check_lto_fat_available { } { set f [open $src "w"] puts $f "int main() { return 0; }" close $f - remote_download host $src + if [is_remote host] { + set src [remote_download host $src] + } set lto_fat_available_saved [run_host_cmd_yesno "$CC" "$flags -flto -ffat-lto-objects -fuse-linker-plugin $src -o $output"] remote_file host delete $src remote_file host delete $output @@ -1901,7 +1905,9 @@ proc check_lto_shared_available { } { set f [open $src "w"] puts $f "" close $f - remote_download host $src + if [is_remote host] { + set src [remote_download host $src] + } set lto_shared_available_saved [run_host_cmd_yesno "$CC" "$flags -shared -fPIC -flto -fuse-linker-plugin $src -o $output"] remote_file host delete $src remote_file host delete $output @@ -1971,7 +1977,9 @@ proc check_ifunc_available { } { puts $f "void *foo (void) { return library_func1; }" puts $f "__asm__(\".type library_func2, %gnu_indirect_function\");" close $f - remote_download host $src + if [is_remote host] { + set src [remote_download host $src] + } set ifunc_available_saved [run_host_cmd_yesno "$CC" "$flags $src -o $output"] if { $ifunc_available_saved == 1 } { set ifunc_available_saved [run_host_cmd_yesno "$output" ""] @@ -2016,7 +2024,9 @@ proc check_ifunc_attribute_available { } { puts $f "static int library_func1 (void) {return 2; }" puts $f "void *foo (void) { return library_func1; }" close $f - remote_download host $src + if [is_remote host] { + set src [remote_download host $src] + } set ifunc_attribute_available_saved [run_host_cmd_yesno "$CC" "$flags $src -o $output"] if { $ifunc_attribute_available_saved == 1 } { set ifunc_attribute_available_saved [run_host_cmd_yesno "$output" ""] |