gcc: port missing patches from 4.6 to 4.8
[openwrt/svn-archive/archive.git] / toolchain / gcc / patches / 4.8.0 / 840-armv4_pass_fix-v4bx_to_ld.patch
1 --- a/gcc/config/arm/linux-eabi.h
2 +++ b/gcc/config/arm/linux-eabi.h
3 @@ -81,10 +81,15 @@
4 #undef MUSL_DYNAMIC_LINKER
5 #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-arm.so.1"
6
7 +/* For armv4 we pass --fix-v4bx to linker to support EABI */
8 +#undef TARGET_FIX_V4BX_SPEC
9 +#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\
10 + "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}"
11 +
12 /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
13 use the GNU/Linux version, not the generic BPABI version. */
14 #undef LINK_SPEC
15 -#define LINK_SPEC BE8_LINK_SPEC \
16 +#define LINK_SPEC BE8_LINK_SPEC TARGET_FIX_V4BX_SPEC \
17 LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
18 LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
19