toolchain/gcc: update 5.x to 5.5.0
[openwrt/staging/wigyori.git] / toolchain / gcc / patches / 5.5.0 / 201-musl_arm.patch
1 From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
2 Date: Wed, 27 May 2015 13:17:11 +0000 (+0000)
3 Subject: [PATCH 4/13] arm musl support
4 X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=de799bd087ab9a179768fea75bd195a31d3432a4
5
6 [PATCH 4/13] arm musl support
7
8 On behalf of szabolcs.nagy@arm.com
9
10 2015-05-27 Gregor Richards <gregor.richards@uwaterloo.ca>
11
12 * config/arm/linux-eabi.h (MUSL_DYNAMIC_LINKER): Define.
13
14
15 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223749 138bc75d-0d04-0410-961f-82ee72b054a4
16 ---
17
18 --- a/gcc/config/arm/linux-eabi.h
19 +++ b/gcc/config/arm/linux-eabi.h
20 @@ -77,6 +77,23 @@
21 %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
22 %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
23
24 +/* For ARM musl currently supports four dynamic linkers:
25 + - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
26 + - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
27 + - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
28 + - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
29 + musl does not support the legacy OABI mode.
30 + All the dynamic linkers live in /lib.
31 + We default to soft-float, EL. */
32 +#undef MUSL_DYNAMIC_LINKER
33 +#if TARGET_BIG_ENDIAN_DEFAULT
34 +#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
35 +#else
36 +#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
37 +#endif
38 +#define MUSL_DYNAMIC_LINKER \
39 + "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
40 +
41 /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
42 use the GNU/Linux version, not the generic BPABI version. */
43 #undef LINK_SPEC