diff options
author | Khem Raj <raj.khem@gmail.com> | 2012-04-25 15:35:39 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-21 09:59:02 +0100 |
commit | 6174900a0e949c00c5a683f080b0cae73fdeb10b (patch) | |
tree | 35624d2376de83e46d2e5d075504be15e756f593 /meta/recipes-devtools/gcc | |
parent | fbfa7b75de31dc46c57a9b3635d75742162e1681 (diff) | |
download | poky-6174900a0e949c00c5a683f080b0cae73fdeb10b.tar.gz |
gcc-4.6, gcc-4.7: Add support for building mips64 cross compiler
Defaults to n64 ABI
(From OE-Core rev: 253f1f3aebd1a90c55efcc6d1f585204e7f3c371)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6/mips64-default-n64.patch | 32 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.7.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.7/mips64-default-n64.patch | 19 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-configure-common.inc | 4 |
5 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc index 65bc65d496..7a70a3848a 100644 --- a/meta/recipes-devtools/gcc/gcc-4.6.inc +++ b/meta/recipes-devtools/gcc/gcc-4.6.inc | |||
@@ -74,6 +74,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ | |||
74 | file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \ | 74 | file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \ |
75 | file://fortran-cross-compile-hack.patch \ | 75 | file://fortran-cross-compile-hack.patch \ |
76 | file://cpp-honour-sysroot.patch \ | 76 | file://cpp-honour-sysroot.patch \ |
77 | file://mips64-default-n64.patch \ | ||
77 | " | 78 | " |
78 | 79 | ||
79 | SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " | 80 | 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 index 0000000000..bf930ec36d --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6/mips64-default-n64.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | MIPS64 defaults to n32 ABI, this patch makes it | ||
2 | so that it defaults to N64 ABI | ||
3 | |||
4 | Upstream-Status: Inappropriate [OE config specific] | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | Index: gcc-4_6-branch/gcc/config.gcc | ||
8 | =================================================================== | ||
9 | --- gcc-4_6-branch.orig/gcc/config.gcc 2012-04-22 19:12:12.431061229 -0700 | ||
10 | +++ gcc-4_6-branch/gcc/config.gcc 2012-04-22 19:13:36.307065289 -0700 | ||
11 | @@ -1882,7 +1882,7 @@ | ||
12 | mips64*-*-linux* | mipsisa64*-*-linux*) | ||
13 | tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/linux.h mips/linux64.h" | ||
14 | tmake_file="${tmake_file} mips/t-linux64 mips/t-libgcc-mips16" | ||
15 | - tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32" | ||
16 | + tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64" | ||
17 | case ${target} in | ||
18 | mips64el-st-linux-gnu) | ||
19 | tm_file="${tm_file} mips/st.h" | ||
20 | Index: gcc-4_6-branch/gcc/config/mips/linux64.h | ||
21 | =================================================================== | ||
22 | --- gcc-4_6-branch.orig/gcc/config/mips/linux64.h 2012-04-22 19:10:59.743057711 -0700 | ||
23 | +++ gcc-4_6-branch/gcc/config/mips/linux64.h 2012-04-22 19:11:56.919060479 -0700 | ||
24 | @@ -26,7 +26,7 @@ | ||
25 | BASE_DRIVER_SELF_SPECS, \ | ||
26 | LINUX_DRIVER_SELF_SPECS \ | ||
27 | " %{!EB:%{!EL:%(endian_spec)}}" \ | ||
28 | - " %{!mabi=*: -mabi=n32}" | ||
29 | + " %{!mabi=*: -mabi=64}" | ||
30 | |||
31 | #undef LIB_SPEC | ||
32 | #define LIB_SPEC "\ | ||
diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc b/meta/recipes-devtools/gcc/gcc-4.7.inc index 8adeb8dde1..efd166c561 100644 --- a/meta/recipes-devtools/gcc/gcc-4.7.inc +++ b/meta/recipes-devtools/gcc/gcc-4.7.inc | |||
@@ -64,6 +64,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ | |||
64 | file://fortran-cross-compile-hack.patch \ | 64 | file://fortran-cross-compile-hack.patch \ |
65 | file://libgcc-sjlj-check.patch \ | 65 | file://libgcc-sjlj-check.patch \ |
66 | file://cpp-honor-sysroot.patch \ | 66 | file://cpp-honor-sysroot.patch \ |
67 | file://mips64-default-n64.patch \ | ||
67 | " | 68 | " |
68 | 69 | ||
69 | S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${BRANCH}" | 70 | 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 index 0000000000..a42569e058 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.7/mips64-default-n64.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | MIPS64 defaults to n32 ABI, this patch makes it | ||
2 | so that it defaults to N64 ABI | ||
3 | |||
4 | Upstream-Status: Inappropriate [OE config specific] | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | Index: gcc-4_7-branch/gcc/config.gcc | ||
8 | =================================================================== | ||
9 | --- gcc-4_7-branch.orig/gcc/config.gcc 2012-04-22 19:30:21.000000000 -0700 | ||
10 | +++ gcc-4_7-branch/gcc/config.gcc 2012-04-22 21:09:57.783403173 -0700 | ||
11 | @@ -1750,7 +1750,7 @@ | ||
12 | mips64*-*-linux* | mipsisa64*-*-linux*) | ||
13 | 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" | ||
14 | tmake_file="${tmake_file} mips/t-linux64" | ||
15 | - tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32" | ||
16 | + tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64" | ||
17 | case ${target} in | ||
18 | mips64el-st-linux-gnu) | ||
19 | tm_file="${tm_file} mips/st.h" | ||
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc index a812b989d4..4d11ef4f40 100644 --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc | |||
@@ -49,6 +49,10 @@ EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != | |||
49 | # Build uclibc compilers without cxa_atexit support | 49 | # Build uclibc compilers without cxa_atexit support |
50 | EXTRA_OECONF_append_linux = " --enable-__cxa_atexit" | 50 | EXTRA_OECONF_append_linux = " --enable-__cxa_atexit" |
51 | EXTRA_OECONF_append_libc-uclibc = " --enable-__cxa_atexit" | 51 | EXTRA_OECONF_append_libc-uclibc = " --enable-__cxa_atexit" |
52 | |||
53 | EXTRA_OECONF_append_mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64" | ||
54 | EXTRA_OECONF_append_mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64" | ||
55 | |||
52 | EXTRA_OECONF_FPU = "${@get_gcc_fpu_setting(bb, d)}" | 56 | EXTRA_OECONF_FPU = "${@get_gcc_fpu_setting(bb, d)}" |
53 | CPPFLAGS = "" | 57 | CPPFLAGS = "" |
54 | 58 | ||