Here is a patch from our backlog that addresses a libitm issue where
setting ENABLE_LTO=1 in site.exp causes the following error with dejagnu:
ERROR: (DejaGnu) proc "libitm_target_compile linker_plugin19344.c
linker_plugin19344.exe executable {{additional_flags=-flto
-fuse-linker-plugin}}" does not exist.
This problem usually does not occur since the default site.exp does not
contain ENABLE_LTO=1. This patch has been tested both with and without
our custom site.exp.
Is this OK for trunk? If so, please check it in since I do not have commit
rights.
Cesar Philippidis
2013-05-30 Iain Sandoe <[email protected]>
Cesar Philippidis <[email protected]>
libitm/
* testsuite/lib/libitm.exp: Reorder lib loads into dependency order.
Do not load_gcc_lib gcc-dg.exp and add a comment as to why.
* testsuite/libitm.c/c.exp: load_gcc_lib gcc-dg.exp.
* testsuite/libitm.c++/c++.exp: load_gcc_lib gcc-dg.exp.
Index: libitm/testsuite/lib/libitm.exp
===================================================================
--- libitm/testsuite/lib/libitm.exp (revision 199267)
+++ libitm/testsuite/lib/libitm.exp (working copy)
@@ -23,23 +23,27 @@
}
load_lib dg.exp
+
+# Required to use gcc-dg.exp - however, the latter should NOT be
+# loaded until ${tool}_target_compile is defined since it uses that
+# to determine default LTO options.
+
+load_gcc_lib prune.exp
+load_gcc_lib target-libpath.exp
+load_gcc_lib wrapper.exp
+load_gcc_lib gcc-defs.exp
+load_gcc_lib timeout.exp
+load_gcc_lib target-supports.exp
load_gcc_lib file-format.exp
-load_gcc_lib target-supports.exp
load_gcc_lib target-supports-dg.exp
load_gcc_lib scanasm.exp
load_gcc_lib scandump.exp
load_gcc_lib scanrtl.exp
load_gcc_lib scantree.exp
load_gcc_lib scanipa.exp
-load_gcc_lib prune.exp
-load_gcc_lib target-libpath.exp
-load_gcc_lib wrapper.exp
-load_gcc_lib gcc-defs.exp
+load_gcc_lib timeout-dg.exp
load_gcc_lib torture-options.exp
-load_gcc_lib timeout.exp
-load_gcc_lib timeout-dg.exp
load_gcc_lib fortran-modules.exp
-load_gcc_lib gcc-dg.exp
set dg-do-what-default run
Index: libitm/testsuite/libitm.c++/c++.exp
===================================================================
--- libitm/testsuite/libitm.c++/c++.exp (revision 199267)
+++ libitm/testsuite/libitm.c++/c++.exp (working copy)
@@ -15,6 +15,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.
load_lib libitm-dg.exp
+load_gcc_lib gcc-dg.exp
global shlib_ext
Index: libitm/testsuite/libitm.c/c.exp
===================================================================
--- libitm/testsuite/libitm.c/c.exp (revision 199267)
+++ libitm/testsuite/libitm.c/c.exp (working copy)
@@ -21,6 +21,7 @@
}
load_lib libitm-dg.exp
+load_gcc_lib gcc-dg.exp
# If a testcase doesn't have special options, use these.
if ![info exists DEFAULT_CFLAGS] then {