From e6a6c7676a7df49cfbbffda26eadd2032dbc2bbe Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 31 Jul 2020 07:40:27 -0700 Subject: ld: Add -fno-lto to linker tests LTO can be used to build binutils with $ CC="gcc -flto -ffat-lto-objects -Wl,--as-needed" CXX="g++ -flto -ffat-lto-objects -Wl,--as-needed" .../configure But not all linker tests are compatible with LTO. Pass -fno-lto to CC to disable LTO on linker tests by default. -flto is passed explicitly to CC in linker LTO tests. * testsuite/ld-elf/indirect.exp: Append -fno-lto to CC. * testsuite/ld-elfvers/vers.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-ifunc/ifunc.exp: Likewise. * testsuite/ld-plugin/lto.exp (no_lto): New. Add $no_lto to build pr15146c.so. * testsuite/lib/ld-lib.exp (at_least_gcc_version): Filter out -Wl,xxx options. (check_gcc_plugin_enabled): Likewise. (run_ld_link_exec_tests): Prepend -fno-lto to $cflags. (run_cc_link_tests): Likewise. --- ld/ChangeLog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ld/ChangeLog') diff --git a/ld/ChangeLog b/ld/ChangeLog index 13919b2..f5a42f1 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,17 @@ +2020-07-31 H.J. Lu + + * testsuite/ld-elf/indirect.exp: Append -fno-lto to CC. + * testsuite/ld-elfvers/vers.exp: Likewise. + * testsuite/ld-elfweak/elfweak.exp: Likewise. + * testsuite/ld-ifunc/ifunc.exp: Likewise. + * testsuite/ld-plugin/lto.exp (no_lto): New. + Add $no_lto to build pr15146c.so. + * testsuite/lib/ld-lib.exp (at_least_gcc_version): Filter out + -Wl,xxx options. + (check_gcc_plugin_enabled): Likewise. + (run_ld_link_exec_tests): Prepend -fno-lto to $cflags. + (run_cc_link_tests): Likewise. + 2020-07-31 Shahab Vahedi * scripttempl/elfarc.sc (.init_array): Keep ".init_array.*". -- cgit v1.1