This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH COMMITTED: x86_64 gold supports x86
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Mon, 05 May 2008 13:21:24 -0700
- Subject: PATCH COMMITTED: x86_64 gold supports x86
When the GNU linker supports x86_64, it automatically include support
for x86 as well. This is convenient for bi-arch distributions.
I committed this patch to make gold act the same way.
Ian
2008-05-05 Ian Lance Taylor <iant@google.com>
* configure.ac: If targ_extra_obj is set, link it in.
* configure.tgt: Initialize all variables.
(x86_64*): Set targ_extra_obj and targ_extra_size.
* configure: Rebuild.
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gold/configure.ac,v
retrieving revision 1.32
diff -p -u -r1.32 configure.ac
--- configure.ac 17 Apr 2008 07:12:00 -0000 1.32
+++ configure.ac 5 May 2008 20:18:51 -0000
@@ -107,6 +107,9 @@ for targ in $target $canon_targets; do
AC_MSG_ERROR("unsupported target $targ")
else
targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)"
+ if test "$targ_extra_obj" != ""; then
+ targetobjs="$targetobjs ${targ_extra_obj}.\$(OBJEXT)"
+ fi
if test "$targ_size" = "32" -o "$targ_extra_size" = "32"; then
if test "$targ_big_endian" = "true" \
-o "$targ_extra_big_endian" = "true"; then
Index: configure.tgt
===================================================================
RCS file: /cvs/src/src/gold/configure.tgt,v
retrieving revision 1.2
diff -p -u -r1.2 configure.tgt
--- configure.tgt 15 Apr 2008 05:16:51 -0000 1.2
+++ configure.tgt 5 May 2008 20:18:51 -0000
@@ -30,6 +30,7 @@
# shell variables:
# targ_obj object file to include in the link, with no extension
+# targ_extra_obj extra object file to include
# targ_machine ELF machine code for this target
# targ_size size of this target--32 or 64
# targ_extra_size extra targ_size setting for the target
@@ -38,6 +39,12 @@
# If the target is not recognized targ_obj is set to "UNKNOWN".
+targ_extra_obj=
+targ_machine=
+targ_size=
+targ_extra_size=
+targ_big_endian=
+targ_extra_big_endian=
case "$targ" in
i?86-*)
targ_obj=i386
@@ -47,8 +54,10 @@ i?86-*)
;;
x86_64*)
targ_obj=x86_64
+ targ_extra_obj=i386
targ_machine=EM_X86_64
targ_size=64
+ targ_extra_size=32
targ_big_endian=false
;;
sparc-*)