diff options
3 files changed, 53 insertions, 1 deletions
diff --git a/recipes-devtools/clang/clang/0001-ARMTargetLowering-Handle-MUSLEABI-to-fix-AEABI-helpe.patch b/recipes-devtools/clang/clang/0001-ARMTargetLowering-Handle-MUSLEABI-to-fix-AEABI-helpe.patch new file mode 100644 index 0000000..78756cd --- /dev/null +++ b/recipes-devtools/clang/clang/0001-ARMTargetLowering-Handle-MUSLEABI-to-fix-AEABI-helpe.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From fded84c3b6db127a0520b8216a82fe6c4b400247 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Dominic=20Sacr=C3=A9?= <dominic.sacre@gmx.de> | ||
3 | Date: Tue, 14 Jun 2016 09:50:21 +0200 | ||
4 | Subject: [PATCH] ARMTargetLowering: Handle MUSLEABI to fix AEABI helper | ||
5 | calling convention | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | AEABI floating point helper functions always use AAPCS (soft-float) | ||
11 | calling convention. Recognize MUSLEABI targets to fix the code generated | ||
12 | for musl-based hard-float builds. | ||
13 | |||
14 | Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> | ||
15 | --- | ||
16 | lib/Target/ARM/ARMISelLowering.cpp | 2 +- | ||
17 | lib/Target/ARM/ARMSubtarget.h | 5 +++++ | ||
18 | 2 files changed, 6 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp | ||
21 | index a2daa89..f4ed6f3 100644 | ||
22 | --- a/lib/Target/ARM/ARMISelLowering.cpp | ||
23 | +++ b/lib/Target/ARM/ARMISelLowering.cpp | ||
24 | @@ -254,7 +254,7 @@ ARMTargetLowering::ARMTargetLowering(const TargetMachine &TM, | ||
25 | // RTLIB | ||
26 | if (Subtarget->isAAPCS_ABI() && | ||
27 | (Subtarget->isTargetAEABI() || Subtarget->isTargetGNUAEABI() || | ||
28 | - Subtarget->isTargetAndroid())) { | ||
29 | + Subtarget->isTargetAndroid() || Subtarget->isTargetMUSLEABI())) { | ||
30 | static const struct { | ||
31 | const RTLIB::Libcall Op; | ||
32 | const char * const Name; | ||
33 | diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h | ||
34 | index 4d54e57..3ba330b 100644 | ||
35 | --- a/lib/Target/ARM/ARMSubtarget.h | ||
36 | +++ b/lib/Target/ARM/ARMSubtarget.h | ||
37 | @@ -399,6 +399,11 @@ public: | ||
38 | TargetTriple.getEnvironment() == Triple::GNUEABIHF) && | ||
39 | !isTargetDarwin() && !isTargetWindows(); | ||
40 | } | ||
41 | + bool isTargetMUSLEABI() const { | ||
42 | + return (TargetTriple.getEnvironment() == Triple::MUSLEABI || | ||
43 | + TargetTriple.getEnvironment() == Triple::MUSLEABIHF) && | ||
44 | + !isTargetDarwin() && !isTargetWindows(); | ||
45 | + } | ||
46 | |||
47 | // ARM Targets that support EHABI exception handling standard | ||
48 | // Darwin uses SjLj. Other targets might need more checks. | ||
49 | -- | ||
50 | 2.8.4 | ||
51 | |||
diff --git a/recipes-devtools/clang/clang/0001-triplet-Add-musl-support.patch b/recipes-devtools/clang/clang/0001-triplet-Add-musl-support.patch index 3fdf4b6..a6c8122 100644 --- a/recipes-devtools/clang/clang/0001-triplet-Add-musl-support.patch +++ b/recipes-devtools/clang/clang/0001-triplet-Add-musl-support.patch | |||
@@ -61,10 +61,10 @@ index 1967fac..f8b6236 100644 | |||
61 | .StartsWith("gnueabihf", Triple::GNUEABIHF) | 61 | .StartsWith("gnueabihf", Triple::GNUEABIHF) |
62 | .StartsWith("gnueabi", Triple::GNUEABI) | 62 | .StartsWith("gnueabi", Triple::GNUEABI) |
63 | .StartsWith("gnux32", Triple::GNUX32) | 63 | .StartsWith("gnux32", Triple::GNUX32) |
64 | + .StartsWith("musl", Triple::MUSL) | ||
65 | + .StartsWith("musleabihf", Triple::MUSLEABIHF) | 64 | + .StartsWith("musleabihf", Triple::MUSLEABIHF) |
66 | + .StartsWith("musleabi", Triple::MUSLEABI) | 65 | + .StartsWith("musleabi", Triple::MUSLEABI) |
67 | + .StartsWith("muslx32", Triple::MUSLX32) | 66 | + .StartsWith("muslx32", Triple::MUSLX32) |
67 | + .StartsWith("musl", Triple::MUSL) | ||
68 | .StartsWith("code16", Triple::CODE16) | 68 | .StartsWith("code16", Triple::CODE16) |
69 | .StartsWith("gnu", Triple::GNU) | 69 | .StartsWith("gnu", Triple::GNU) |
70 | .StartsWith("android", Triple::Android) | 70 | .StartsWith("android", Triple::Android) |
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 2a6aa58..286906d 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb | |||
@@ -18,6 +18,7 @@ SRC_URI = "${LLVM_GIT}/llvm.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};n | |||
18 | file://0001-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-compile.patch \ | 18 | file://0001-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-compile.patch \ |
19 | file://0002-Do-not-assume-linux-glibc.patch \ | 19 | file://0002-Do-not-assume-linux-glibc.patch \ |
20 | file://0001-triplet-Add-musl-support.patch \ | 20 | file://0001-triplet-Add-musl-support.patch \ |
21 | file://0001-ARMTargetLowering-Handle-MUSLEABI-to-fix-AEABI-helpe.patch \ | ||
21 | file://0001-driver-Add-musl-ldso-support.patch;patchdir=tools/clang \ | 22 | file://0001-driver-Add-musl-ldso-support.patch;patchdir=tools/clang \ |
22 | file://0001-driver-Use-lib-for-ldso-on-OE.patch;patchdir=tools/clang \ | 23 | file://0001-driver-Use-lib-for-ldso-on-OE.patch;patchdir=tools/clang \ |
23 | file://0001-musl-ppc-does-not-support-128-bit-long-double.patch;patchdir=tools/clang \ | 24 | file://0001-musl-ppc-does-not-support-128-bit-long-double.patch;patchdir=tools/clang \ |