Patchwork [04/14] binutils: Default to n64 when configured for mips64

login
register
mail settings
Submitter Khem Raj
Date May 21, 2012, 3:35 a.m.
Message ID <99f859612e16d636702f9bb11825259d90e468f2.1337570904.git.raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/28033/
State Accepted
Commit 99f859612e16d636702f9bb11825259d90e468f2
Headers show

Comments

Khem Raj - May 21, 2012, 3:35 a.m.
Default ABI for mips64 is n64 so make it default in binutils

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../binutils/mips64-default-ld-emulation.patch     |   49 ++++++++++++++++++++
 meta/recipes-devtools/binutils/binutils_2.22.bb    |    3 +-
 2 files changed, 51 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/binutils/binutils/mips64-default-ld-emulation.patch

Patch

diff --git a/meta/recipes-devtools/binutils/binutils/mips64-default-ld-emulation.patch b/meta/recipes-devtools/binutils/binutils/mips64-default-ld-emulation.patch
new file mode 100644
index 0000000..ab01859
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/mips64-default-ld-emulation.patch
@@ -0,0 +1,49 @@ 
+for mips64*-*-linux we change the default emulations to be
+N64 instead of N32
+
+Upstream-Status: Inappropriate [ OE configuration Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: binutils-2.22/bfd/config.bfd
+===================================================================
+--- binutils-2.22.orig/bfd/config.bfd	2011-07-28 15:35:13.000000000 -0700
++++ binutils-2.22/bfd/config.bfd	2012-04-23 21:07:44.151578222 -0700
+@@ -970,13 +970,13 @@
+     ;;
+ #ifdef BFD64
+   mips64*el-*-linux*)
+-    targ_defvec=bfd_elf32_ntradlittlemips_vec
+-    targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
++    targ_defvec=bfd_elf64_tradlittlemips_vec
++    targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec"
+     want64=true
+     ;;
+   mips64*-*-linux*)
+-    targ_defvec=bfd_elf32_ntradbigmips_vec
+-    targ_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
++    targ_defvec=bfd_elf64_tradbigmips_vec
++    targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradlittlemips_vec"
+     want64=true
+     ;;
+ #endif
+Index: binutils-2.22/ld/configure.tgt
+===================================================================
+--- binutils-2.22.orig/ld/configure.tgt	2011-11-21 01:29:37.000000000 -0800
++++ binutils-2.22/ld/configure.tgt	2012-04-23 21:05:34.183571931 -0700
+@@ -395,11 +395,11 @@
+ mips*-*-vxworks*)	targ_emul=elf32ebmipvxworks
+ 		        targ_extra_emuls="elf32elmipvxworks" ;;
+ mips*-*-windiss)	targ_emul=elf32mipswindiss ;;
+-mips64*el-*-linux-*)	targ_emul=elf32ltsmipn32
+-			targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
++mips64*el-*-linux-*)	targ_emul=elf64ltsmip
++			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
+ 			targ_extra_libpath=$targ_extra_emuls ;;
+-mips64*-*-linux-*)	targ_emul=elf32btsmipn32
+-			targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
++mips64*-*-linux-*)	targ_emul=elf64btsmip
++			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
+ 			targ_extra_libpath=$targ_extra_emuls ;;
+ mips*el-*-linux-*)	targ_emul=elf32ltsmip
+ 			targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
diff --git a/meta/recipes-devtools/binutils/binutils_2.22.bb b/meta/recipes-devtools/binutils/binutils_2.22.bb
index d6d19a1..ae15e82 100644
--- a/meta/recipes-devtools/binutils/binutils_2.22.bb
+++ b/meta/recipes-devtools/binutils/binutils_2.22.bb
@@ -1,6 +1,6 @@ 
 require binutils.inc
 
-PR = "r6"
+PR = "r7"
 
 LIC_FILES_CHKSUM="\
     file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\
@@ -31,6 +31,7 @@  SRC_URI = "\
      file://clone-shadow.patch \
      file://binutils-powerpc-e5500.patch \
      file://binutils-armv5e.patch \
+     file://mips64-default-ld-emulation.patch \
      "
 
 SRC_URI[md5sum] = "ee0f10756c84979622b992a4a61ea3f5"