diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.7/gcc-armv4-pass-fix-v4bx-to-ld.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.7/gcc-armv4-pass-fix-v4bx-to-ld.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/gcc-armv4-pass-fix-v4bx-to-ld.patch b/meta/recipes-devtools/gcc/gcc-4.7/gcc-armv4-pass-fix-v4bx-to-ld.patch new file mode 100644 index 0000000000..7e03a3a8a8 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.7/gcc-armv4-pass-fix-v4bx-to-ld.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | The LINK_SPEC for linux gets overwritten by linux-eabi.h which | ||
2 | means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result | ||
3 | the option is not passed to linker when chosing march=armv4 | ||
4 | This patch redefines this in linux-eabi.h and reinserts it | ||
5 | for eabi defaulting toolchains. | ||
6 | |||
7 | We might want to send it upstream | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | -Khem | ||
12 | Index: gcc-4_7-branch/gcc/config/arm/linux-eabi.h | ||
13 | =================================================================== | ||
14 | --- gcc-4_7-branch.orig/gcc/config/arm/linux-eabi.h 2012-08-21 22:54:12.448453417 -0700 | ||
15 | +++ gcc-4_7-branch/gcc/config/arm/linux-eabi.h 2012-08-21 23:05:18.008478722 -0700 | ||
16 | @@ -78,10 +78,14 @@ | ||
17 | %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ | ||
18 | %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" | ||
19 | |||
20 | +/* For armv4 we pass --fix-v4bx to linker to support EABI */ | ||
21 | +#undef TARGET_FIX_V4BX_SPEC | ||
22 | +#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}" | ||
23 | + | ||
24 | /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to | ||
25 | use the GNU/Linux version, not the generic BPABI version. */ | ||
26 | #undef LINK_SPEC | ||
27 | -#define LINK_SPEC BE8_LINK_SPEC \ | ||
28 | +#define LINK_SPEC BE8_LINK_SPEC TARGET_FIX_V4BX_SPEC \ | ||
29 | LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ | ||
30 | LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) | ||
31 | |||