RFA/RFC: Enable both gold and ld in a single toolchain

H.J. Lu hjl.tools@gmail.com
Tue Apr 27 16:04:00 GMT 2010


On Tue, Apr 27, 2010 at 7:28 AM, Nick Clifton <nickc@redhat.com> wrote:
> Hi H.J.
>
>> Only this part of the patch above:
>>
>> 2010-04-19  Roland McGrath  <roland@redhat.com>
>>            H.J. Lu  <hongjiu.lu@intel.com>
>>
>>        * configure.ac (--enable-gold): Support both, both/gold and
>>        both/bfd to add gold to configdirs without removing ld.
>>        * configure: Regenerated.
>>
>>        * Makefile.def: Add install-gold dependency to install-ld.
>>        * Makefile.in: Regenerated.
>>
>> changes gcc source tree and it has no impact on gcc configuration. I
>> am not sure if any gcc maintainers care about this change. Ian
>> has no objection:
>
> Right - I have checked in the binutils part of the patch and I will check in
> the top level changes shortly.
>
> Cheers
>  Nick
>

Hi Nick,

I am checking in this patch to properly install gold/ld as default
cross linker.

-- 
H.J.
-------------- next part --------------
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 714998b..979901f 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,4 +1,10 @@
 2010-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.am (install-exec-local): Properly install gold as
+	default cross linker.
+	* Makefile.in: Regenerated.
+
+2010-04-27  H.J. Lu  <hongjiu.lu@intel.com>
 	    Nick Clifton  <nickc@redhat.com>
 
 	* configure.ac (install_as_default): Define and set to false
diff --git a/gold/Makefile.am b/gold/Makefile.am
index a24e185..df5e66c 100644
--- a/gold/Makefile.am
+++ b/gold/Makefile.am
@@ -186,9 +186,10 @@ install-exec-local: ld-new$(EXEEXT)
 	  || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT); \
 	fi; \
 	if test "x$(install_as_default)" = "xyes"; then \
-	  rm -f $(DESTDIR)$(bindir)/ld$(EXEEXT); \
-	  ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(bindir)/ld$(EXEEXT) >/dev/null 2>/dev/null \
-	  || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/ld$(EXEEXT); \
+	  ld=`echo ld | sed '$(transform)'`; \
+	  rm -f $(DESTDIR)$(bindir)/$${ld}$(EXEEXT); \
+	  ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(bindir)/$${ld}$(EXEEXT) >/dev/null 2>/dev/null \
+	  || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$${ld}$(EXEEXT); \
 	  if test "$(bindir)" != "$(tooldir)/bin"; then \
 	    rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
 	    ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
diff --git a/gold/Makefile.in b/gold/Makefile.in
index 13c71ca..2fc2eca 100644
--- a/gold/Makefile.in
+++ b/gold/Makefile.in
@@ -1012,9 +1012,10 @@ install-exec-local: ld-new$(EXEEXT)
 	  || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT); \
 	fi; \
 	if test "x$(install_as_default)" = "xyes"; then \
-	  rm -f $(DESTDIR)$(bindir)/ld$(EXEEXT); \
-	  ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(bindir)/ld$(EXEEXT) >/dev/null 2>/dev/null \
-	  || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/ld$(EXEEXT); \
+	  ld=`echo ld | sed '$(transform)'`; \
+	  rm -f $(DESTDIR)$(bindir)/$${ld}$(EXEEXT); \
+	  ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(bindir)/$${ld}$(EXEEXT) >/dev/null 2>/dev/null \
+	  || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$${ld}$(EXEEXT); \
 	  if test "$(bindir)" != "$(tooldir)/bin"; then \
 	    rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
 	    ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 36559b2..ad61f05 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,4 +1,10 @@
 2010-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.am (install-exec-local): Properly install ld as
+	default cross linker.
+	* Makefile.in: Regenerated.
+
+2010-04-27  H.J. Lu  <hongjiu.lu@intel.com>
 	    Nick Clifton  <nickc@redhat.com>
 
 	* configure.in (install_as_default): Define and set to true
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 9134971..3896fda 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -2004,9 +2004,10 @@ install-exec-local: ld-new$(EXEEXT) install-binPROGRAMS
 	  || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT); \
 	fi; \
 	if test "x$(install_as_default)" = "xyes"; then \
-	  rm -f $(DESTDIR)$(bindir)/ld$(EXEEXT); \
-	  ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(bindir)/ld$(EXEEXT) >/dev/null 2>/dev/null \
-	  || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/ld$(EXEEXT); \
+	  ld=`echo ld | sed '$(transform)'`; \
+	  rm -f $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \
+	  ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT) >/dev/null 2>/dev/null \
+	  || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \
 	  if test "$(bindir)" != "$(tooldir)/bin"; then \
 	    rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
 	    ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 3b53c90..4c2f2bf 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -3331,9 +3331,10 @@ install-exec-local: ld-new$(EXEEXT) install-binPROGRAMS
 	  || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT); \
 	fi; \
 	if test "x$(install_as_default)" = "xyes"; then \
-	  rm -f $(DESTDIR)$(bindir)/ld$(EXEEXT); \
-	  ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(bindir)/ld$(EXEEXT) >/dev/null 2>/dev/null \
-	  || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/ld$(EXEEXT); \
+	  ld=`echo ld | sed '$(transform)'`; \
+	  rm -f $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \
+	  ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT) >/dev/null 2>/dev/null \
+	  || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \
 	  if test "$(bindir)" != "$(tooldir)/bin"; then \
 	    rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
 	    ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \


More information about the Binutils mailing list