+2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * 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.
+
2016-04-27 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/ld-elf/compressed1b.d: Only run for Linux/GNU targets.
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
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
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
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
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
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" ""]
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" ""]