* cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
authorJan Hubicka <jh@suse.cz>
Mon, 18 Mar 2002 16:42:43 +0000 (16:42 +0000)
committerJan Hubicka <jh@suse.cz>
Mon, 18 Mar 2002 16:42:43 +0000 (16:42 +0000)
* configure.tgt (x86_64-*-linux-gnu*): Configure i386 as native.

* elf_x86_64.sh (ARCH): Set to i386:x86-64
set libraries to default to lib64 paths.

bfd/ChangeLog
bfd/cpu-i386.c
ld/ChangeLog
ld/configure.tgt
ld/emulparams/elf_x86_64.sh

index ab7b7d07d067d0a31cc8c2076e58b8198d21f4da..01a13ffe6379cd434f9244683fccf5520540ca9e 100644 (file)
@@ -1,3 +1,7 @@
+Mon Mar 18 17:38:03 CET 2002  Jan Hubicka  <jh@suse.cz>
+
+       * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
+
 2002-03-18  Tom Rix  <trix@redhat.com>
 
        * aix5ppc.core.c : New file for AIX 5 64 bit core support.
index 5110e959ef20d6d2fb0fcbde197ed35fbecbc80b..f4928275727c8482a4645d79ead3bab4aa4ddae4 100644 (file)
@@ -44,8 +44,8 @@ const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
   8,  /* 8 bits in a byte */
   bfd_arch_i386,
   bfd_mach_x86_64_intel_syntax,
-  "x86-64:intel",
-  "x86-64:intel",
+  "i386:intel",
+  "i386:x86-64:intel",
   3,
   true,
   bfd_default_compatible,
@@ -75,8 +75,8 @@ const bfd_arch_info_type bfd_x86_64_arch =
   8,  /* 8 bits in a byte */
   bfd_arch_i386,
   bfd_mach_x86_64,
-  "x86-64",
-  "x86-64",
+  "i386",
+  "i386:x86-64",
   3,
   true,
   bfd_default_compatible,
index b68b47e780d4f0ac2be69306f0c93e0ff8959366..378c00db5505171f503d4281cb0641e9e37d7b84 100644 (file)
@@ -1,3 +1,11 @@
+Mon Mar 18 17:38:39 CET 2002  Jan Hubicka  <jh@suse.cz>
+                             Andreas Jaeger  <aj@suse.de>
+                             Andreas Schwab  <schwab@suse.de>
+
+       * configure.tgt (x86_64-*-linux-gnu*): Configure i386 as native.
+       * elf_x86_64.sh (ARCH): Set to i386:x86-64
+       set libraries to default to lib64 paths.
+
 2002-03-18  Tom Rix  <trix@redhat.com>
 
        * Makefile.am : Add eaix5ppc and eaix5rs6, AIX 5 support.
index 504c26fb2064b71b2b3c7ce37497e69537162ec2..4f75a128c1c8b2c3ecd6a4a109150813980be463 100644 (file)
@@ -145,7 +145,9 @@ i[3456]86-*-linux-gnu*)     targ_emul=elf_i386
                        ;;
 x86_64-*-linux-gnu*)   targ_emul=elf_x86_64
                        targ_extra_emuls="elf_i386 i386linux"
-                       tdir_i386linux=${targ_alias}aout
+                       targ_extra_libpath=elf_i386
+                       tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
+                       tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
                        ;;
 i[3456]86-*-sysv[45]*) targ_emul=elf_i386 ;;
 i[3456]86-*-solaris2*)  targ_emul=elf_i386_ldso
index 27931c76b2b7f0dfb940ca33549437e0a5f8698d..4f7433e541c0ab2175f91c3ceed999dd52fb55d1 100644 (file)
@@ -4,9 +4,40 @@ OUTPUT_FORMAT="elf64-x86-64"
 TEXT_START_ADDR=0x400000
 MAXPAGESIZE=0x100000
 NONPAGED_TEXT_START_ADDR=0x400000
-ARCH=i386
+ARCH="i386:x86-64"
 MACHINE=
 NOP=0x90909090
 TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
 NO_SMALL_DATA=yes
+
+if [ "x${host}" = "x${target}" ]; then
+  case " $EMULATION_LIBPATH " in
+    *" ${EMULATION_NAME} "*)
+      # Native, and default or emulation requesting LIB_PATH.
+
+      # Linux modify the default library search path to first include
+      # a 64-bit specific directory.
+      case "$target" in
+        x86_64*-linux*)
+          suffix=64 ;;
+      esac
+
+      if [ -n "${suffix}" ]; then
+
+       LIB_PATH=/lib${suffix}:/lib
+       LIB_PATH=${LIB_PATH}:/usr/lib${suffix}:/usr/lib
+       if [ -n "${NATIVE_LIB_DIRS}" ]; then
+         LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s_:_${suffix}:_g`${suffix}:${NATIVE_LIB_DIRS}
+       fi
+       if [ "${libdir}" != /usr/lib ]; then
+         LIB_PATH=${LIB_PATH}:${libdir}${suffix}:${libdir}
+       fi
+       if [ "${libdir}" != /usr/local/lib ]; then
+         LIB_PATH=${LIB_PATH}:/usr/local/lib${suffix}:/usr/local/lib
+       fi
+
+      fi
+    ;;
+  esac
+fi