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]

Improve biarch x86-linux support


If binutils is configured for i686-pc-linux-gnu with --enable-64-bit-bfd, 
then it also supports x86_64 - but doesn't know to search lib64 
directories.  This patch fixes it so that it will search the proper 
directories, the same as an x86_64 binutils would search.  OK to commit?

(This is of use in conjunction with a GCC patch I'll submit for GCC 4.3 to 
allow a 64-bit multilib to be enabled for i686-pc-linux-gnu, so that you 
can have a 32/64-bit biarch configuration defaulting to 32-bit, not just 
one defaulting to 64-bit.)

2006-10-18  Joseph Myers  <joseph@codesourcery.com>

	* configure.tgt (i[3-7]86-*-linux-*): Also define
	targ_extra_libpath in want64 case.
	* emulparams/elf_x86_64.sh: Handle i[3-7]86-*-linux-* the same as
	x86_64*-linux*.

Index: ld/configure.tgt
===================================================================
RCS file: /cvs/src/src/ld/configure.tgt,v
retrieving revision 1.195
diff -u -r1.195 configure.tgt
--- ld/configure.tgt	20 Sep 2006 11:35:09 -0000	1.195
+++ ld/configure.tgt	18 Oct 2006 15:45:29 -0000
@@ -153,6 +153,7 @@
 			targ_extra_emuls=i386linux
 			if test x${want64} = xtrue; then
 			  targ_extra_emuls="$targ_extra_emuls elf_x86_64"
+			  targ_extra_libpath=elf_x86_64
 			fi
 			tdir_i386linux=${targ_alias}aout ;;
 x86_64-*-linux-*)	targ_emul=elf_x86_64
Index: ld/emulparams/elf_x86_64.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf_x86_64.sh,v
retrieving revision 1.18
diff -u -r1.18 elf_x86_64.sh
--- ld/emulparams/elf_x86_64.sh	24 Jul 2006 18:18:19 -0000	1.18
+++ ld/emulparams/elf_x86_64.sh	18 Oct 2006 15:45:29 -0000
@@ -25,7 +25,7 @@
 # Linux/Solaris modify the default library search path to first include
 # a 64-bit specific directory.
 case "$target" in
-  x86_64*-linux*)
+  x86_64*-linux*|i[3-7]86-*-linux-*)
     case "$EMULATION_NAME" in
       *64*) LIBPATH_SUFFIX=64 ;;
     esac

-- 
Joseph S. Myers
joseph@codesourcery.com


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