aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gcc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-09-25 15:59:43 -0700
committerKhem Raj <raj.khem@gmail.com>2010-09-27 15:05:26 -0700
commite33feda488545dbec4a71c590fee8f6f3c2a7a0d (patch)
tree839eb4b8499d6ac55f8f14516bb497fecc682408 /recipes/gcc
parentda15db4c4935f0349499cdc0120eea287bc5330b (diff)
downloadopenembedded-e33feda488545dbec4a71c590fee8f6f3c2a7a0d.tar.gz
openembedded-e33feda488545dbec4a71c590fee8f6f3c2a7a0d.tar.bz2
openembedded-e33feda488545dbec4a71c590fee8f6f3c2a7a0d.zip
gcc-4.5: Add support to build for mips64
* Defaults to mabi=64 which means N64 is the default supported ABI * Tweak multilib directories to emit mips64 into /lib instead of /lib64 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/gcc')
-rw-r--r--recipes/gcc/gcc-4.5.inc6
-rw-r--r--recipes/gcc/gcc-4.5/mips64-nomultilib.patch52
-rw-r--r--recipes/gcc/gcc-configure-common.inc2
3 files changed, 60 insertions, 0 deletions
diff --git a/recipes/gcc/gcc-4.5.inc b/recipes/gcc/gcc-4.5.inc
index b7bd87bb3c..0a13c2b9d9 100644
--- a/recipes/gcc/gcc-4.5.inc
+++ b/recipes/gcc/gcc-4.5.inc
@@ -33,6 +33,9 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH} \
file://Makefile.in.patch \
"
+SRC_URI_append_mips64 = " file://mips64-nomultilib.patch"
+SRC_URI_append_mips64el = " file://mips64-nomultilib.patch"
+
# Language Overrides
FORTRAN = ""
JAVA = ""
@@ -55,3 +58,6 @@ EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap --disable-libgomp --disable-li
EXTRA_OECONF_append_linux-uclibc = " --disable-decimal-float "
EXTRA_OECONF_append_linux-uclibceabi = " --disable-decimal-float "
EXTRA_OECONF_append_linux-uclibcspe = " --disable-decimal-float "
+
+EXTRA_OECONF_append_mips64 = " --with-arch-64=mips64 --with-tune-64=mips64"
+EXTRA_OECONF_append_mips64el = " --with-arch-64=mips64 --with-tune-64=mips64"
diff --git a/recipes/gcc/gcc-4.5/mips64-nomultilib.patch b/recipes/gcc/gcc-4.5/mips64-nomultilib.patch
new file mode 100644
index 0000000000..1ef69f899d
--- /dev/null
+++ b/recipes/gcc/gcc-4.5/mips64-nomultilib.patch
@@ -0,0 +1,52 @@
+Index: gcc-4.5/gcc/config/mips/linux64.h
+===================================================================
+--- gcc-4.5.orig/gcc/config/mips/linux64.h 2010-09-25 02:05:05.484423095 -0700
++++ gcc-4.5/gcc/config/mips/linux64.h 2010-09-25 02:31:18.524931014 -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 "\
+@@ -35,9 +35,9 @@
+ %{!shared: \
+ %{profile:-lc_p} %{!profile:-lc}}"
+
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKERN32 "/lib64/ld.so.1"
+ #define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
+ #define LINUX_DYNAMIC_LINKERN32 \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
+Index: gcc-4.5/gcc/config.gcc
+===================================================================
+--- gcc-4.5.orig/gcc/config.gcc 2010-07-22 16:37:17.000000000 -0700
++++ gcc-4.5/gcc/config.gcc 2010-09-25 02:25:41.412414136 -0700
+@@ -1707,7 +1707,7 @@
+ *-*-irix6*)
+ tm_file="${tm_file} mips/iris6.h"
+ tmake_file="${tmake_file} mips/t-iris6"
+- tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
++ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_64"
+ case ${target} in
+ *-*-irix6.[0-4]*)
+ use_gcc_stdint=provide
+Index: gcc-4.5/gcc/config/mips/t-linux64
+===================================================================
+--- gcc-4.5.orig/gcc/config/mips/t-linux64 2010-07-11 16:14:42.000000000 -0700
++++ gcc-4.5/gcc/config/mips/t-linux64 2010-09-25 02:29:52.758708250 -0700
+@@ -18,7 +18,7 @@
+
+ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
+ MULTILIB_DIRNAMES = n32 32 64
+-MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
++MULTILIB_OSDIRNAMES = ../lib64 ../lib32 ../lib
+
+ EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
+
diff --git a/recipes/gcc/gcc-configure-common.inc b/recipes/gcc/gcc-configure-common.inc
index bad70a4094..fe0d32d39f 100644
--- a/recipes/gcc/gcc-configure-common.inc
+++ b/recipes/gcc/gcc-configure-common.inc
@@ -53,6 +53,8 @@ EXTRA_OECONF_append_linux = " --enable-__cxa_atexit"
EXTRA_OECONF_append_linux-gnueabi = " --enable-__cxa_atexit"
EXTRA_OECONF_append_linux-uclibc = " --disable-__cxa_atexit"
EXTRA_OECONF_append_linux-uclibceabi = " --disable-__cxa_atexit"
+EXTRA_OECONF_append_mips64 = " --with-abi=64"
+EXTRA_OECONF_append_mips64el = " --with-abi=64"
EXTRA_OECONF_FPU = "${@get_gcc_fpu_setting(bb, d)}"
CPPFLAGS = ""