ld: Fix testcase errors due to -shared not support.
authorjiawei <jiawei@iscas.ac.cn>
Thu, 23 Dec 2021 06:19:58 +0000 (14:19 +0800)
committerNelson Chu <nelson.chu@sifive.com>
Tue, 28 Dec 2021 04:14:32 +0000 (12:14 +0800)
Reviewed-by: Jim Wilson <jim.wilson.gcc@gmail.com>
ld/ChangeLog:

        * testsuite/ld-ctf/ctf.exp: Add shared lib check.
        * testsuite/ld-plugin/lto.exp: Add lto shared check.

ld/testsuite/ld-ctf/ctf.exp
ld/testsuite/ld-plugin/lto.exp

index 0e74d6c569c7f48693507ca584239b601737361d..7f540072bf9160caac541cb396e5d27e7130dc15 100644 (file)
@@ -28,6 +28,11 @@ if ![is_elf_format] {
     return 0
 }
 
+if ![check_shared_lib_support] {
+    unsupported "CTF needs shared lib support"
+    return 0
+}
+
 if {[info exists env(LC_ALL)]} {
     set old_lc_all $env(LC_ALL)
 }
index 51e01046a12e4778fcfe0f06d48d17ae97c1c069..e63e79165311abc089777bab0db49f4bbf79f22e 100644 (file)
@@ -233,7 +233,7 @@ set lto_link_tests [list \
    [list [list "nm" "$plug_opt" "pr26389.d"]]] \
 ]
 
-if { [at_least_gcc_version 10 0] } {
+if { [at_least_gcc_version 10 0] && [check_lto_shared_available] } {
     set lto_link_tests [concat $lto_link_tests [list \
        [list "pr25355.o" \
         "" \