From 92c09111f34c464c3dd2b0cfbfa13c3b6c74c3e5 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 9 Jan 2014 09:01:53 -0800 Subject: Add and use check_lto_shared_available 2014-01-09 Vidya Praveen * lib/ld-lib.exp (check_lto_shared_available): New check. * ld-plugin/lto.exp: Use check_lto_shared_available. --- ld/testsuite/ld-plugin/lto.exp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ld/testsuite/ld-plugin') diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index 69946de..d55dca4 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -300,8 +300,7 @@ set lto_run_elf_tests { run_cc_link_tests $lto_link_tests # Restrict these to ELF targets that support shared libs and PIC. -if { [is_elf_format] - && [run_host_cmd_yesno $CC "-shared -fPIC $srcdir/$subdir/dummy.c -o tmpdir/t.so"] } { +if { [is_elf_format] && [check_lto_shared_available] } { run_cc_link_tests $lto_link_elf_tests set testname "PR ld/15146 (2)" set exec_output [run_host_cmd "$CC" "$gcc_gas_flag $gcc_ld_flag -O2 -flto -fuse-linker-plugin -Wl,-rpath-link,. -Wl,--no-copy-dt-needed-entries -Wl,--no-as-needed tmpdir/pr15146d.o tmpdir/pr15146c.so"] -- cgit v1.1