public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Dave Korn <dave.korn.cygwin@gmail.com>
To: "binutils@sourceware.org" <binutils@sourceware.org>
Subject: Re: [x/6][PATCH] Portability tweaks for LTO tests.
Date: Sat, 26 Feb 2011 00:49:00 -0000	[thread overview]
Message-ID: <4D684E07.8050204@gmail.com> (raw)
In-Reply-To: <4D684D8B.8070408@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 11 bytes --]


  Patch.


[-- Attachment #2: 00xld-lto-test-tweaks.diff --]
[-- Type: text/x-c, Size: 2874 bytes --]

From 1dffc06f941e672e6bc68f1953834caeb5c494d9 Mon Sep 17 00:00:00 2001
From: Dave Korn <dave.korn.cygwin@gmail.com>
Date: Sat, 19 Feb 2011 23:02:23 +0000
Subject: [PATCH] Portability tweaks for LTO tests.

ld/testsuite/ChangeLog:

2011-02-20  Dave Korn  <...

	* ld-plugin/lto-10r.d: Allow optional underscore prefixes when
	checking for known symbol name.
	* ld-plugin/lto-3r.d: Likewise.
	* ld-plugin/lto-5r.d: Likewise.
	* ld-plugin/lto-6.c: Handle non-standard etext name on Windows.
	* ld-plugin/lto.exp: Add $gcc_ld_flag carrying -B option to ld under
	test when invoking $CC directly rather than via lib support routines.
---
 ld/testsuite/ld-plugin/lto-10r.d |    2 +-
 ld/testsuite/ld-plugin/lto-3r.d  |    2 +-
 ld/testsuite/ld-plugin/lto-5r.d  |    2 +-
 ld/testsuite/ld-plugin/lto-6.c   |    4 ++++
 ld/testsuite/ld-plugin/lto.exp   |    4 ++--
 5 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/ld/testsuite/ld-plugin/lto-10r.d b/ld/testsuite/ld-plugin/lto-10r.d
index 689e6ec..c496377 100644
--- a/ld/testsuite/ld-plugin/lto-10r.d
+++ b/ld/testsuite/ld-plugin/lto-10r.d
@@ -3,5 +3,5 @@
 #nm: -p
 
 #...
-[0-9a-f]+ C __gnu_lto_v.*
+[0-9a-f]+ C _?__gnu_lto_v.*
 #pass
diff --git a/ld/testsuite/ld-plugin/lto-3r.d b/ld/testsuite/ld-plugin/lto-3r.d
index 1d1befe..3726718 100644
--- a/ld/testsuite/ld-plugin/lto-3r.d
+++ b/ld/testsuite/ld-plugin/lto-3r.d
@@ -3,5 +3,5 @@
 #nm: -p
 
 #...
-[0-9a-f]+ C __gnu_lto_v.*
+[0-9a-f]+ C _?__gnu_lto_v.*
 #pass
diff --git a/ld/testsuite/ld-plugin/lto-5r.d b/ld/testsuite/ld-plugin/lto-5r.d
index 43e9a5c..ad1da70 100644
--- a/ld/testsuite/ld-plugin/lto-5r.d
+++ b/ld/testsuite/ld-plugin/lto-5r.d
@@ -3,5 +3,5 @@
 #nm: -p
 
 #...
-[0-9a-f]+ C __gnu_lto_v.*
+[0-9a-f]+ C _?__gnu_lto_v.*
 #pass
diff --git a/ld/testsuite/ld-plugin/lto-6.c b/ld/testsuite/ld-plugin/lto-6.c
index 749e4e0..c34b805 100644
--- a/ld/testsuite/ld-plugin/lto-6.c
+++ b/ld/testsuite/ld-plugin/lto-6.c
@@ -1,6 +1,10 @@
 #include <stdio.h>
 
+#if defined(__CYGWIN32__) || defined (_WIN32)
+extern char _etext[] asm ("etext");
+#else
 extern char _etext[];
+#endif
 
 int main(void)
 {
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 0c49cec..07aa5d0 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -201,8 +201,8 @@ if {![string match "" $catch_output]} {
 
 # Check exported LTO linker errors.
 set testname "PR ld/12365"
-set exec_output [run_host_cmd "$CC" "-O2 -flto -fuse-linker-plugin tmpdir/pr12365a.o tmpdir/pr12365b.o tmpdir/pr12365c.o"]
-if { [ regexp "undefined reference to `my_bcopy'" $exec_output ] } {
+set exec_output [run_host_cmd "$CC" "$gcc_ld_flag -O2 -flto -fuse-linker-plugin tmpdir/pr12365a.o tmpdir/pr12365b.o tmpdir/pr12365c.o"]
+if { [ regexp "undefined reference to `_?my_bcopy'" $exec_output ] } {
     pass $testname
 } {
     fail $testname

  reply	other threads:[~2011-02-26  0:49 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-26  0:44 [PATCH,trunk+2.20] Fix issues in ld.bfd plugin interface [0/6] Dave Korn
2011-02-26  0:45 ` [PATCH,trunk+2.21] " Dave Korn
2011-02-26  0:45   ` [1/6][PATCH] Fix PE-COFF bug in orphan section alignment handling Dave Korn
2011-02-26  9:14     ` Alan Modra
2011-02-26  0:46   ` [2/6][PATCH] Do not use dummy bfd suffix for recognition, make it human-readable instead Dave Korn
2011-02-26  0:46   ` [4/6][PATCH] Fix issue from GCC PR47527: no ELF flags, EABI attribs, etc. in dummy IR BFD Dave Korn
2011-02-26  0:48     ` Dave Korn
2011-02-26  9:16       ` Alan Modra
2011-02-26  0:46   ` [3/6][PATCH] Revise linker plugin API to better preserve link order Dave Korn
2011-02-26  9:15     ` Alan Modra
2011-02-26  0:46   ` [5/6][PATCH] Perform second link stage and ignore now-obsolete linker -pass-through= option Dave Korn
2011-02-26  0:48     ` Dave Korn
2011-02-26  4:03     ` Rafael Ávila de Espíndola
2011-02-27 18:54       ` Ian Lance Taylor
2011-02-27 19:11         ` Rafael Ávila de Espíndola
2011-02-27 19:22           ` Ian Lance Taylor
2011-02-27 19:37             ` Rafael Ávila de Espíndola
2011-02-26  9:05     ` Alan Modra
2011-02-26  0:47   ` [x/6][PATCH] Portability tweaks for LTO tests Dave Korn
2011-02-26  0:49     ` Dave Korn [this message]
2011-02-26  3:50     ` H.J. Lu
2011-02-26  5:33       ` H.J. Lu
2011-02-26  0:47   ` [6/6][PATCH] Respect symbol wrappers when computing symbol resolutions Dave Korn
2011-02-26  0:49     ` Dave Korn
2011-02-26  4:50     ` H.J. Lu
2011-02-26  9:28     ` Alan Modra
2011-02-26  2:14 ` [PATCH,trunk+2.20] Fix issues in ld.bfd plugin interface [0/6] H.J. Lu
2011-02-26  3:37   ` Dave Korn
2011-02-26  3:48     ` H.J. Lu
2011-03-10 10:43 ` Dave Korn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D684E07.8050204@gmail.com \
    --to=dave.korn.cygwin@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).