From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29126 invoked by alias); 26 Feb 2011 00:49:37 -0000 Received: (qmail 29115 invoked by uid 22791); 26 Feb 2011 00:49:36 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f169.google.com (HELO mail-wy0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 26 Feb 2011 00:49:32 +0000 Received: by mail-wy0-f169.google.com with SMTP id 11so2570441wyi.0 for ; Fri, 25 Feb 2011 16:49:31 -0800 (PST) Received: by 10.216.168.67 with SMTP id j45mr7377370wel.101.1298681371671; Fri, 25 Feb 2011 16:49:31 -0800 (PST) Received: from [192.168.2.99] (cpc2-cmbg8-0-0-cust61.5-4.cable.virginmedia.com [82.6.108.62]) by mx.google.com with ESMTPS id o6sm1026748wbo.21.2011.02.25.16.49.30 (version=SSLv3 cipher=OTHER); Fri, 25 Feb 2011 16:49:30 -0800 (PST) Message-ID: <4D684E07.8050204@gmail.com> Date: Sat, 26 Feb 2011 00:49:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: "binutils@sourceware.org" Subject: Re: [x/6][PATCH] Portability tweaks for LTO tests. References: <4D684CB8.6020106@gmail.com> <4D684D00.70803@gmail.com> <4D684D8B.8070408@gmail.com> In-Reply-To: <4D684D8B.8070408@gmail.com> Content-Type: multipart/mixed; boundary="------------010502090404010001030209" Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00339.txt.bz2 This is a multi-part message in MIME format. --------------010502090404010001030209 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 11 Patch. --------------010502090404010001030209 Content-Type: text/x-c; name="00xld-lto-test-tweaks.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="00xld-lto-test-tweaks.diff" Content-length: 2875 >From 1dffc06f941e672e6bc68f1953834caeb5c494d9 Mon Sep 17 00:00:00 2001 From: Dave Korn 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 +#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 --------------010502090404010001030209--