diff options
Diffstat (limited to 'ld/testsuite/ld-plugin/lto.exp')
-rw-r--r-- | ld/testsuite/ld-plugin/lto.exp | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index 726dd93..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 { @@ -1215,24 +1219,24 @@ if { [is_elf_format] && [check_lto_shared_available] } { if { [check_lto_fat_available] } { run_cc_link_tests [list \ [list \ - "Build libpr32846a.a" \ - "$plug_opt" "-O2 -flto $lto_no_fat" \ - {pr32846a.c pr32846b.c} {} "libpr32846a.a" \ + "Build libpr32846a.a" \ + "$plug_opt" "-fPIC -O2 -flto $lto_no_fat" \ + {pr32846a.c pr32846b.c} {} "libpr32846a.a" \ ] \ [list \ "Build libpr32846b.a" \ - "$plug_opt" "-O2 -flto $lto_no_fat" \ + "$plug_opt" "-fPIC -O2 -flto $lto_no_fat" \ {pr32846a.c pr32846b.c pr32846c.c} {} "libpr32846b.a" \ ] \ [list \ - "Build pr32846d.o" \ - "$plug_opt" "-O2 -flto $lto_no_fat" \ - {pr32846d.c} {} \ + "Build pr32846d.o" \ + "$plug_opt" "-fPIC -O2 -flto $lto_no_fat" \ + {pr32846d.c} {} \ ] \ [list \ - "Build pr32846e.o" \ - "$plug_opt" "-O2 -flto $lto_no_fat" \ - {pr32846e.c} {} \ + "Build pr32846e.o" \ + "$plug_opt" "-fPIC -O2 -flto $lto_no_fat" \ + {pr32846e.c} {} \ ] \ [list \ "Build pr32846" \ |