diff options
Diffstat (limited to 'ld/testsuite/ld-elf/indirect.exp')
-rw-r--r-- | ld/testsuite/ld-elf/indirect.exp | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/ld/testsuite/ld-elf/indirect.exp b/ld/testsuite/ld-elf/indirect.exp index acda39e..8acae4d 100644 --- a/ld/testsuite/ld-elf/indirect.exp +++ b/ld/testsuite/ld-elf/indirect.exp @@ -58,19 +58,25 @@ proc check_link_message { cmd string testname } { } } -if { ![ld_compile $CC $srcdir/$subdir/indirect1a.c tmpdir/indirect1a.o] - || ![ld_compile $CC $srcdir/$subdir/indirect1b.c tmpdir/indirect1b.o] - || ![ld_compile "$CC -fPIC" $srcdir/$subdir/indirect2.c tmpdir/indirect2.o] - || ![ld_compile $CC $srcdir/$subdir/indirect3a.c tmpdir/indirect3a.o] - || ![ld_compile $CC $srcdir/$subdir/indirect3b.c tmpdir/indirect3b.o] - || ![ld_compile $CC $srcdir/$subdir/indirect4a.c tmpdir/indirect4a.o] - || ![ld_compile $CC $srcdir/$subdir/indirect4b.c tmpdir/indirect4b.o] - || ![ld_compile "$CC -O2 -fPIC -I../bfd" $srcdir/$subdir/pr18720a.c tmpdir/pr18720a.o] - || ![ld_compile $CC $srcdir/$subdir/pr18720b.c tmpdir/pr18720b.o] - || ![ld_compile "$CC -fPIC" $srcdir/$subdir/pr19553d.c tmpdir/pr19553d.o] - || ![ld_compile "$CC -fPIC" $srcdir/$subdir/pr19553c.c tmpdir/pr19553c.o] - || ![ld_compile "$CC -fPIC" $srcdir/$subdir/pr19553b.c tmpdir/pr19553b.o] - || ![ld_compile $CC $srcdir/$subdir/pr19553a.c tmpdir/pr19553a.o] } { +# Disable LTO for these tests. +set cc_cmd "$CC" +if {[check_lto_available]} { + append cc_cmd " -fno-lto" +} + +if { ![ld_compile $cc_cmd $srcdir/$subdir/indirect1a.c tmpdir/indirect1a.o] + || ![ld_compile $cc_cmd $srcdir/$subdir/indirect1b.c tmpdir/indirect1b.o] + || ![ld_compile "$cc_cmd -fPIC" $srcdir/$subdir/indirect2.c tmpdir/indirect2.o] + || ![ld_compile $cc_cmd $srcdir/$subdir/indirect3a.c tmpdir/indirect3a.o] + || ![ld_compile $cc_cmd $srcdir/$subdir/indirect3b.c tmpdir/indirect3b.o] + || ![ld_compile $cc_cmd $srcdir/$subdir/indirect4a.c tmpdir/indirect4a.o] + || ![ld_compile $cc_cmd $srcdir/$subdir/indirect4b.c tmpdir/indirect4b.o] + || ![ld_compile "$cc_cmd -O2 -fPIC -I../bfd" $srcdir/$subdir/pr18720a.c tmpdir/pr18720a.o] + || ![ld_compile $cc_cmd $srcdir/$subdir/pr18720b.c tmpdir/pr18720b.o] + || ![ld_compile "$cc_cmd -fPIC" $srcdir/$subdir/pr19553d.c tmpdir/pr19553d.o] + || ![ld_compile "$cc_cmd -fPIC" $srcdir/$subdir/pr19553c.c tmpdir/pr19553c.o] + || ![ld_compile "$cc_cmd -fPIC" $srcdir/$subdir/pr19553b.c tmpdir/pr19553b.o] + || ![ld_compile $cc_cmd $srcdir/$subdir/pr19553a.c tmpdir/pr19553a.o] } { unresolved "Indirect symbol tests" return } |