This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR bootstrap/45958: --with-build-config=bootstrap-lto doesn't work
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 10 Oct 2010 00:27:31 -0700
- Subject: PATCH: PR bootstrap/45958: --with-build-config=bootstrap-lto doesn't work
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
--with-demangler-in-ld will make gcc to pass "--demangle -plugin ..." to
ld. But exec-tool.in has
collect-ld)
# when using a linker plugin, gcc will always pass '-plugin' as the
# first option to the linker.
if test x"$1" = "x-plugin"; then
original=$ORIGINAL_PLUGIN_LD_FOR_TARGET
else
original=$ORIGINAL_LD_FOR_TARGET
fi
It doesn't work with "--demangle -plugin ...". This patch supports
'-plugin' as the second option to the linker. OK to install?
Thanks.
H.J.
---
2010-10-10 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/45958
* exec-tool.in: Support '-plugin' as the second option to the
linker.
diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in
index a146899..020294e 100644
--- a/gcc/exec-tool.in
+++ b/gcc/exec-tool.in
@@ -36,8 +36,8 @@ case "$invoked" in
;;
collect-ld)
# when using a linker plugin, gcc will always pass '-plugin' as the
- # first option to the linker.
- if test x"$1" = "x-plugin"; then
+ # first or second option to the linker.
+ if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then
original=$ORIGINAL_PLUGIN_LD_FOR_TARGET
else
original=$ORIGINAL_LD_FOR_TARGET