This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR ld/20321: Warn and return for duplicated plugin


On Mon, Jul 4, 2016 at 5:44 AM, Nick Clifton <nickc@redhat.com> wrote:
> Hi H.J.
>
>>       PR ld/20321
>>       * plugin.c (plugin_opt_plugin): Warn and return if plugin has
>>       been loaded already.
>>       * testsuite/ld-plugin/lto.exp: Run PR ld/20321 test.
>>       * testsuite/ld-plugin/pr20321.c: New file.
>
> Approved - please apply.
>

I checked in this patch to support older GCCs.

-- 
H.J.
From 29d7478bc63762606302a0ae0525b22eaf85b47b Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 5 Jul 2016 07:35:52 -0700
Subject: [PATCH] Add -flto to PR ld/20321 test

Before GCC 4.9, -flto is required for final LTO link.  Add -flto to PR
ld/20321 test to support older versions of GCC.

	* testsuite/ld-plugin/lto.exp: Add -flto to PR ld/20321 test.
---
 ld/ChangeLog                   | 4 ++++
 ld/testsuite/ld-plugin/lto.exp | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 6ee54fc..826ea7c 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2016-07-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/ld-plugin/lto.exp: Add -flto to PR ld/20321 test.
+
 2016-07-05  Andre Vieria  <andre.simoesdiasvieira@arm.com>
 
 	* testsuite/ld-arm/farcall-thumb2-purecode.d: New test result.
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 2ecb4d0..4ed163e 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -199,7 +199,7 @@ set lto_link_tests [list \
    "$plug_opt" "-flto $lto_no_fat" \
    {pr20267b.c} {} "libpr20267b.a"] \
   [list "Build pr20321" \
-   "-Wl,-plugin,$plug_so" "-flto" \
+   "-flto -Wl,-plugin,$plug_so" "-flto" \
    {pr20321.c} {} "pr20321" "c" ".*: duplicated plugin"] \
 ]
 
-- 
2.7.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]