On Fri, Feb 20, 2015 at 3:13 AM, Ben Elliston <[email protected]> wrote: > If you work up a patch for DejaGnu, I think this is the right place to > fix it. > > Thanks, > Ben
Here is a patch. Tested with GCC 5 on Linux/x86-64. Thanks. -- H.J.
From 38685059b26df074d6618f582e494d51e9602734 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" <[email protected]> Date: Fri, 20 Feb 2015 12:25:59 -0800 Subject: [PATCH] Prepend multilib_flags Some GCC testcases need explicit GCC options to properly run, like gcc.target/i386/pr32219-1.c has /* { dg-options "-O2 -fpie" } */ is specified explicitly. But with multlib, like make check-gcc RUNTESTFLAGS="--target_board='unix{-fpic}'" -fpic is appended to the command line options, which overrides the command line options specified by dg-options. multlib flags should be placed at the beginning of the command line options, not at the end. This patch updates default_target_compile to prepend multilib_flags, instead of appending it. * lib/target.exp (default_target_compile): Prepend multilib_flags, instead of appending it. --- lib/target.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/target.exp b/lib/target.exp index 71a78c7..30e4585 100644 --- a/lib/target.exp +++ b/lib/target.exp @@ -577,7 +577,7 @@ proc default_target_compile {source destfile type options} { } if {[board_info $dest exists multilib_flags]} { - append add_flags " [board_info $dest multilib_flags]" + set add_flags "[board_info $dest multilib_flags] $add_flags" } verbose "doing compile" -- 1.9.3
_______________________________________________ Bug-dejagnu mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-dejagnu
