diff options
Diffstat (limited to 'ld/testsuite/ld-plugin/lto.exp')
-rw-r--r-- | ld/testsuite/ld-plugin/lto.exp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index 3a56fb5..9ac3cf6 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -51,6 +51,11 @@ if { [check_lto_fat_available] } { set no_lto "-fno-lto" } +set as_gsframe "" +if { [gas_sframe_check] } { + set as_gsframe "-Wa,--gsframe" +} + # Simple LTO tests and generate input files for complex LTO tests. set lto_link_tests [list \ [list "LTO 1" \ @@ -76,10 +81,10 @@ set lto_link_tests [list \ "" "-flto $lto_fat" \ {lto-4a.c} {} ""] \ [list "Compile 4b" \ - "" "-O2" \ + "" "-O2 $as_gsframe" \ {lto-4b.c} {} ""] \ [list "Compile 4c" \ - "" "-O2" \ + "" "-O2 $as_gsframe" \ {lto-4c.c} {} ""] \ [list "Compile 5a" \ "" "-flto $lto_fat" \ @@ -1004,7 +1009,7 @@ run_cc_link_tests [list \ set board_flags [get_board_flags] set exec_output [run_host_cmd "sh" \ - "-c \"ulimit -n 20; \ + "-c \"ulimit -n 25; \ $CC_FOR_TARGET $gcc_B_opt $CFLAGS_FOR_TARGET \ $board_flags $ld_L_opt -o tmpdir/pr28138 \ tmpdir/pr28138.o tmpdir/pr28138.a\""] @@ -1158,9 +1163,8 @@ remote_exec host "mv" "tmpdir/dump tmpdir/lto-5.o" run_dump_test "lto-10r" remote_exec host "mv" "tmpdir/dump tmpdir/lto-10.o" set testname "nm mixed object" -set lto_plugin [string trim [run_host_cmd "$CC_FOR_TARGET" "-print-prog-name=liblto_plugin.so"]] -if { [ regexp "liblto_plugin.so" $lto_plugin ] } { - set exec_output [run_host_cmd "$NM" "--plugin $lto_plugin tmpdir/lto-10.o"] +if { $plug_opt != "" } { + set exec_output [run_host_cmd "$NM" "$plug_opt tmpdir/lto-10.o"] if { [ regexp "(D|T) main" $exec_output ] } { pass $testname } else { |