ld: Fix testcase errors due to -shared not support.

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.
This commit is contained in:
jiawei
2021-12-23 14:19:58 +08:00
committed by Nelson Chu
parent d4ff0c5d00
commit 4748764aab
2 changed files with 6 additions and 1 deletions

View 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)
}

View 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" \
"" \