public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Fix spurious failures in ld-plugin/lto.exp
@ 2014-04-06 18:47 Andreas Schwab
  2014-04-06 23:28 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Schwab @ 2014-04-06 18:47 UTC (permalink / raw)
  To: binutils

Fix a few spurious failures in ld-plugin/lto.exp:

- Remove -D_FORTIFY_SOURCE also without -Wp, prefix
- Make sure to use CXXFLAGS for C++ tests, since CFLAGS may contain
  flags not suitable for C++

Andreas.

	* ld-plugin/lto.exp: Make "-Wp," prefix optional when filtering
	out _FORTIFY_SOURCE.
	("Build libdummy.a 9", "PR ld/12696"): Mark as c++.

diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 53543a6..1a525fc 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -28,8 +28,8 @@ global CFLAGS
 global CXXFLAGS
 set saved_CFLAGS "$CFLAGS"
 set saved_CXXFLAGS "$CXXFLAGS"
-regsub -all "\\-Wp,-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS "" CFLAGS
-regsub -all "\\-Wp,-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS "" CXXFLAGS
+regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS "" CFLAGS
+regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS "" CXXFLAGS
 
 proc restore_notify { } {
   global saved_CFLAGS
@@ -69,7 +69,7 @@ set lto_link_tests {
    {lto-6.c} {} "lto-6.exe" "c"}
   {"Build libdummy.a 9"
    "" "-O2 -finline -flto"
-   {lto-9.cc} {} "libdummy.a"}
+   {lto-9.cc} {} "libdummy.a" "c++"}
   {"Build libdummy.a 11a"
    "" "-O -flto"
    {lto-11a.c} {} "libdummy.a"}
@@ -105,7 +105,7 @@ set lto_link_tests {
    {lto-15b.c} {} "liblto-15.a"}
   {"PR ld/12696"
    "-O2 -flto -fuse-linker-plugin -r -nostdlib" "-O2 -flto"
-   {pr12696-1.cc} {} "pr12696-1r.o" "c"}
+   {pr12696-1.cc} {} "pr12696-1r.o" "c++"}
   {"Build libdummy.a PR ld/12758"
    "" ""
    {pr12758a.s} {} "libdummy.a"}
-- 
1.9.1

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fix spurious failures in ld-plugin/lto.exp
  2014-04-06 18:47 Fix spurious failures in ld-plugin/lto.exp Andreas Schwab
@ 2014-04-06 23:28 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2014-04-06 23:28 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: binutils

On Sun, Apr 06, 2014 at 08:47:43PM +0200, Andreas Schwab wrote:
> 	* ld-plugin/lto.exp: Make "-Wp," prefix optional when filtering
> 	out _FORTIFY_SOURCE.
> 	("Build libdummy.a 9", "PR ld/12696"): Mark as c++.

OK, thanks.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-06 23:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-06 18:47 Fix spurious failures in ld-plugin/lto.exp Andreas Schwab
2014-04-06 23:28 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).