]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc-4.6, gcc-4.7: Add support for building mips64 cross compiler
authorKhem Raj <raj.khem@gmail.com>
Wed, 25 Apr 2012 22:35:39 +0000 (15:35 -0700)
committerKhem Raj <raj.khem@gmail.com>
Mon, 21 May 2012 03:24:36 +0000 (20:24 -0700)
Defaults to n64 ABI

Signed-off-by: Khem Raj <raj.khem@gmail.com>
meta/recipes-devtools/gcc/gcc-4.6.inc
meta/recipes-devtools/gcc/gcc-4.6/mips64-default-n64.patch [new file with mode: 0644]
meta/recipes-devtools/gcc/gcc-4.7.inc
meta/recipes-devtools/gcc/gcc-4.7/mips64-default-n64.patch [new file with mode: 0644]
meta/recipes-devtools/gcc/gcc-configure-common.inc

index 65bc65d4969b9a06246bf705de37161f9359b5bf..7a70a3848a9c46e9996aab782c5d5f5682da4a4c 100644 (file)
@@ -74,6 +74,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
           file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \
           file://fortran-cross-compile-hack.patch \
           file://cpp-honour-sysroot.patch \
+          file://mips64-default-n64.patch \
          "
 
 SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch "
diff --git a/meta/recipes-devtools/gcc/gcc-4.6/mips64-default-n64.patch b/meta/recipes-devtools/gcc/gcc-4.6/mips64-default-n64.patch
new file mode 100644 (file)
index 0000000..bf930ec
--- /dev/null
@@ -0,0 +1,32 @@
+MIPS64 defaults to n32 ABI, this patch makes it
+so that it defaults to N64 ABI
+
+Upstream-Status: Inappropriate [OE config specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: gcc-4_6-branch/gcc/config.gcc
+===================================================================
+--- gcc-4_6-branch.orig/gcc/config.gcc 2012-04-22 19:12:12.431061229 -0700
++++ gcc-4_6-branch/gcc/config.gcc      2012-04-22 19:13:36.307065289 -0700
+@@ -1882,7 +1882,7 @@
+ mips64*-*-linux* | mipsisa64*-*-linux*)
+       tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/linux.h mips/linux64.h"
+       tmake_file="${tmake_file} mips/t-linux64 mips/t-libgcc-mips16"
+-      tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
++      tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64"
+       case ${target} in
+               mips64el-st-linux-gnu)
+                       tm_file="${tm_file} mips/st.h"
+Index: gcc-4_6-branch/gcc/config/mips/linux64.h
+===================================================================
+--- gcc-4_6-branch.orig/gcc/config/mips/linux64.h      2012-04-22 19:10:59.743057711 -0700
++++ gcc-4_6-branch/gcc/config/mips/linux64.h   2012-04-22 19:11:56.919060479 -0700
+@@ -26,7 +26,7 @@
+   BASE_DRIVER_SELF_SPECS, \
+   LINUX_DRIVER_SELF_SPECS \
+   " %{!EB:%{!EL:%(endian_spec)}}" \
+-  " %{!mabi=*: -mabi=n32}"
++  " %{!mabi=*: -mabi=64}"
+ #undef LIB_SPEC
+ #define LIB_SPEC "\
index 8adeb8dde1cfdfa180ab0aa2744617119d4359dd..efd166c561da569e5387775846fe2e0ebb25c50d 100644 (file)
@@ -64,6 +64,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
           file://fortran-cross-compile-hack.patch \
           file://libgcc-sjlj-check.patch \
           file://cpp-honor-sysroot.patch \
+          file://mips64-default-n64.patch \
          "
 
 S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${BRANCH}"
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/mips64-default-n64.patch b/meta/recipes-devtools/gcc/gcc-4.7/mips64-default-n64.patch
new file mode 100644 (file)
index 0000000..a42569e
--- /dev/null
@@ -0,0 +1,19 @@
+MIPS64 defaults to n32 ABI, this patch makes it
+so that it defaults to N64 ABI
+
+Upstream-Status: Inappropriate [OE config specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: gcc-4_7-branch/gcc/config.gcc
+===================================================================
+--- gcc-4_7-branch.orig/gcc/config.gcc 2012-04-22 19:30:21.000000000 -0700
++++ gcc-4_7-branch/gcc/config.gcc      2012-04-22 21:09:57.783403173 -0700
+@@ -1750,7 +1750,7 @@
+ mips64*-*-linux* | mipsisa64*-*-linux*)
+       tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h"
+       tmake_file="${tmake_file} mips/t-linux64"
+-      tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
++      tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64"
+       case ${target} in
+               mips64el-st-linux-gnu)
+                       tm_file="${tm_file} mips/st.h"
index a812b989d41acf2c03a23ce6402fdd694ad211ba..4d11ef4f40b4c5a8d9ca446fb53289c0d873bf6d 100644 (file)
@@ -49,6 +49,10 @@ EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) !=
 # Build uclibc compilers without cxa_atexit support
 EXTRA_OECONF_append_linux               = " --enable-__cxa_atexit"
 EXTRA_OECONF_append_libc-uclibc        = " --enable-__cxa_atexit"
+
+EXTRA_OECONF_append_mips64    = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
+EXTRA_OECONF_append_mips64el    = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
+
 EXTRA_OECONF_FPU = "${@get_gcc_fpu_setting(bb, d)}"
 CPPFLAGS = ""