diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-06-25 12:03:35 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2016-06-25 12:03:35 -0700 |
commit | f10ddad456e41c600f8f798b40e175a11ad2a5a0 (patch) | |
tree | 2ea8beeb29260df8346deb07eb7b2f2bfeb3ccd0 | |
parent | 5d4b99374707af0f8a726d6e789eb87dcdb575b4 (diff) | |
download | meta-clang-f10ddad456e41c600f8f798b40e175a11ad2a5a0.tar.gz |
llvm/clang: Upgrade to latest tip on 3.9
Signed-off-by: Khem Raj <raj.khem@gmail.com>
11 files changed, 40 insertions, 205 deletions
diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 080d5d9..4795f02 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc | |||
@@ -10,12 +10,12 @@ LLVM_GIT_PROTOCOL ?= "git" | |||
10 | 10 | ||
11 | PV = "3.9.0" | 11 | PV = "3.9.0" |
12 | BRANCH = "master" | 12 | BRANCH = "master" |
13 | SRCREV_llvm = "b7ebc01945b9efb5efffd77cb7a7f6dd3ab72dd5" | 13 | SRCREV_llvm = "d207fc4c12d5a4a2660fb925858811544119a07a" |
14 | SRCREV_clang = "56fdf6c411068bbc01fcd802eddb489c79bf4852" | 14 | SRCREV_clang = "116ce8458879ac0721cfd7badfd4c3868ed2da78" |
15 | SRCREV_compiler-rt = "97a35f8a8e9741e9157c0afdbb48a9db99d8a718" | 15 | SRCREV_compiler-rt = "8ec81ae4bda307e683f25ffd7b2caf2d65aa18ad" |
16 | SRCREV_libcxxabi = "6fd0d958b55fbbefeb5e1fb78cdc086eddb92a43" | 16 | SRCREV_libcxxabi = "5328c6b635a145efc1204ad25341706fb705e346" |
17 | SRCREV_libcxx = "d8df1781e3e0041d81899c9131b43c6655c75351" | 17 | SRCREV_libcxx = "dd421f5acd9016a2f88a09150904af463ad17815" |
18 | SRCREV_libunwind = "7b1a88cf2a276f26d7f22c09f05accd3c750ca35" | 18 | SRCREV_libunwind = "7a00ec9517645046685fd6c115f0b1dc775f0bb3" |
19 | 19 | ||
20 | LLVMMD5SUM = "43fdaa303c1c5589ad60f4ffc6a0b9ce" | 20 | LLVMMD5SUM = "43fdaa303c1c5589ad60f4ffc6a0b9ce" |
21 | CLANGMD5SUM = "a77eac638a3aae44a2d604217d6f0f01" | 21 | CLANGMD5SUM = "a77eac638a3aae44a2d604217d6f0f01" |
diff --git a/recipes-devtools/clang/clang/0001-clang-driver-Add-musl-ldso-support.patch b/recipes-devtools/clang/clang/0001-clang-driver-Add-musl-ldso-support.patch index 43f54e2..6b81afa 100644 --- a/recipes-devtools/clang/clang/0001-clang-driver-Add-musl-ldso-support.patch +++ b/recipes-devtools/clang/clang/0001-clang-driver-Add-musl-ldso-support.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 0cc06b502547b54f976a9cbd12aa529b95a97c5b Mon Sep 17 00:00:00 2001 | 1 | From 88840f268e6e86ea56654ef62c75b1ee52badee0 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sat, 21 May 2016 21:49:08 -0700 | 3 | Date: Sat, 21 May 2016 21:49:08 -0700 |
4 | Subject: [PATCH 1/4] clang: driver: Add musl ldso support | 4 | Subject: [PATCH 1/4] clang: driver: Add musl ldso support |
@@ -9,14 +9,14 @@ as a musl based Linux platform | |||
9 | 9 | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
11 | --- | 11 | --- |
12 | lib/Driver/Tools.cpp | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++ | 12 | lib/Driver/Tools.cpp | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++ |
13 | 1 file changed, 107 insertions(+) | 13 | 1 file changed, 104 insertions(+) |
14 | 14 | ||
15 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp | 15 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp |
16 | index e73c22d..737cd02 100644 | 16 | index c4ac773..cf3b4ae 100644 |
17 | --- a/lib/Driver/Tools.cpp | 17 | --- a/lib/Driver/Tools.cpp |
18 | +++ b/lib/Driver/Tools.cpp | 18 | +++ b/lib/Driver/Tools.cpp |
19 | @@ -9076,6 +9076,113 @@ static void AddLibgcc(const llvm::Triple &Triple, const Driver &D, | 19 | @@ -9108,6 +9108,110 @@ static void AddLibgcc(const llvm::Triple &Triple, const Driver &D, |
20 | CmdArgs.push_back("-ldl"); | 20 | CmdArgs.push_back("-ldl"); |
21 | } | 21 | } |
22 | 22 | ||
@@ -32,9 +32,6 @@ index e73c22d..737cd02 100644 | |||
32 | + case llvm::Triple::x86: | 32 | + case llvm::Triple::x86: |
33 | + return "/lib/ld-musl-i386.so.1"; | 33 | + return "/lib/ld-musl-i386.so.1"; |
34 | + case llvm::Triple::x86_64: | 34 | + case llvm::Triple::x86_64: |
35 | + if (ToolChain.getTriple().getEnvironment() == llvm::Triple::MUSLX32) | ||
36 | + return "/lib/ld-musl-x32.so.1"; | ||
37 | + else | ||
38 | + return "/lib/ld-musl-x86_64.so.1"; | 35 | + return "/lib/ld-musl-x86_64.so.1"; |
39 | + case llvm::Triple::aarch64: | 36 | + case llvm::Triple::aarch64: |
40 | + return "/lib/ld-musl-aarch64.so.1"; | 37 | + return "/lib/ld-musl-aarch64.so.1"; |
@@ -131,5 +128,5 @@ index e73c22d..737cd02 100644 | |||
131 | ArgStringList &CmdArgs, const ArgList &Args) { | 128 | ArgStringList &CmdArgs, const ArgList &Args) { |
132 | // Make use of compiler-rt if --rtlib option is used | 129 | // Make use of compiler-rt if --rtlib option is used |
133 | -- | 130 | -- |
134 | 2.8.3 | 131 | 2.9.0 |
135 | 132 | ||
diff --git a/recipes-devtools/clang/clang/0002-llvm-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-com.patch b/recipes-devtools/clang/clang/0001-llvm-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-com.patch index f7d21f5..8190bfb 100644 --- a/recipes-devtools/clang/clang/0002-llvm-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-com.patch +++ b/recipes-devtools/clang/clang/0001-llvm-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-com.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From dc8cd377118609209b864b4cfc64e3acfef25d67 Mon Sep 17 00:00:00 2001 | 1 | From f480eebd16f502fabddb5e61f49205606e82945d Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 15 May 2015 12:13:17 -0700 | 3 | Date: Fri, 15 May 2015 12:13:17 -0700 |
4 | Subject: [PATCH 2/5] llvm: Remove CMAKE_CROSSCOMPILING so it can cross compile | 4 | Subject: [PATCH 1/3] llvm: Remove CMAKE_CROSSCOMPILING so it can cross compile |
5 | 5 | ||
6 | we already have llvm-config from clang-native | 6 | we already have llvm-config from clang-native |
7 | 7 | ||
@@ -11,10 +11,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
11 | 1 file changed, 2 insertions(+), 2 deletions(-) | 11 | 1 file changed, 2 insertions(+), 2 deletions(-) |
12 | 12 | ||
13 | diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt | 13 | diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt |
14 | index 32d0f4c..8d90b3b 100644 | 14 | index d458771..2e0c634 100644 |
15 | --- a/tools/llvm-config/CMakeLists.txt | 15 | --- a/tools/llvm-config/CMakeLists.txt |
16 | +++ b/tools/llvm-config/CMakeLists.txt | 16 | +++ b/tools/llvm-config/CMakeLists.txt |
17 | @@ -51,7 +51,7 @@ add_definitions(-DCMAKE_CFG_INTDIR="${CMAKE_CFG_INTDIR}") | 17 | @@ -57,7 +57,7 @@ add_definitions(-DCMAKE_CFG_INTDIR="${CMAKE_CFG_INTDIR}") |
18 | # Add the dependency on the generation step. | 18 | # Add the dependency on the generation step. |
19 | add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH}) | 19 | add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH}) |
20 | 20 | ||
@@ -23,12 +23,12 @@ index 32d0f4c..8d90b3b 100644 | |||
23 | set(${project}_LLVM_CONFIG_EXE "${LLVM_NATIVE_BUILD}/bin/llvm-config") | 23 | set(${project}_LLVM_CONFIG_EXE "${LLVM_NATIVE_BUILD}/bin/llvm-config") |
24 | set(${project}_LLVM_CONFIG_EXE ${${project}_LLVM_CONFIG_EXE} PARENT_SCOPE) | 24 | set(${project}_LLVM_CONFIG_EXE ${${project}_LLVM_CONFIG_EXE} PARENT_SCOPE) |
25 | 25 | ||
26 | @@ -64,4 +64,4 @@ if(CMAKE_CROSSCOMPILING) | 26 | @@ -70,4 +70,4 @@ if(CMAKE_CROSSCOMPILING) |
27 | add_dependencies(${project}NativeLLVMConfig CONFIGURE_LLVM_NATIVE) | 27 | add_dependencies(${project}NativeLLVMConfig CONFIGURE_LLVM_NATIVE) |
28 | 28 | ||
29 | add_dependencies(llvm-config ${project}NativeLLVMConfig) | 29 | add_dependencies(llvm-config ${project}NativeLLVMConfig) |
30 | -endif(CMAKE_CROSSCOMPILING) | 30 | -endif(CMAKE_CROSSCOMPILING) |
31 | +endif(CMAKE_CROSSCOMPILING1) | 31 | +endif(CMAKE_CROSSCOMPILING1) |
32 | -- | 32 | -- |
33 | 2.8.3 | 33 | 2.9.0 |
34 | 34 | ||
diff --git a/recipes-devtools/clang/clang/0001-llvm-triplet-Add-musl-support.patch b/recipes-devtools/clang/clang/0001-llvm-triplet-Add-musl-support.patch deleted file mode 100644 index f3202e1..0000000 --- a/recipes-devtools/clang/clang/0001-llvm-triplet-Add-musl-support.patch +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | From 3ae67407feefed7c7a5dc3d3205aa6b2e4e0f9c1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 30 Mar 2016 19:55:41 -0700 | ||
4 | Subject: [PATCH 1/5] llvm: triplet: Add musl support | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | include/llvm/ADT/Triple.h | 13 +++++++++++++ | ||
9 | lib/Support/Triple.cpp | 8 ++++++++ | ||
10 | lib/Target/ARM/ARMSubtarget.h | 3 +++ | ||
11 | lib/Target/ARM/ARMTargetMachine.cpp | 2 ++ | ||
12 | 4 files changed, 26 insertions(+) | ||
13 | |||
14 | diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h | ||
15 | index 5e35e8e..f4e4ee0 100644 | ||
16 | --- a/include/llvm/ADT/Triple.h | ||
17 | +++ b/include/llvm/ADT/Triple.h | ||
18 | @@ -175,6 +175,10 @@ public: | ||
19 | GNUEABI, | ||
20 | GNUEABIHF, | ||
21 | GNUX32, | ||
22 | + MUSL, | ||
23 | + MUSLEABI, | ||
24 | + MUSLEABIHF, | ||
25 | + MUSLX32, | ||
26 | CODE16, | ||
27 | EABI, | ||
28 | EABIHF, | ||
29 | @@ -497,6 +501,15 @@ public: | ||
30 | return getOS() == Triple::Win32 && getEnvironment() == Triple::GNU; | ||
31 | } | ||
32 | |||
33 | + /// Checks if the environment is Linux with musl | ||
34 | + bool isLinuxMuslEnvironment() const { | ||
35 | + return isOSLinux() && | ||
36 | + (getEnvironment() == Triple::MUSL || | ||
37 | + getEnvironment() == Triple::MUSLX32 || | ||
38 | + getEnvironment() == Triple::MUSLEABI || | ||
39 | + getEnvironment() == Triple::MUSLEABIHF); | ||
40 | + } | ||
41 | + | ||
42 | /// Tests for either Cygwin or MinGW OS | ||
43 | bool isOSCygMing() const { | ||
44 | return isWindowsCygwinEnvironment() || isWindowsGNUEnvironment(); | ||
45 | diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp | ||
46 | index 1967fac..2046613 100644 | ||
47 | --- a/lib/Support/Triple.cpp | ||
48 | +++ b/lib/Support/Triple.cpp | ||
49 | @@ -201,6 +201,10 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) { | ||
50 | case GNUEABIHF: return "gnueabihf"; | ||
51 | case GNUEABI: return "gnueabi"; | ||
52 | case GNUX32: return "gnux32"; | ||
53 | + case MUSLEABIHF: return "musleabihf"; | ||
54 | + case MUSLEABI: return "musleabi"; | ||
55 | + case MUSLX32: return "muslx32"; | ||
56 | + case MUSL: return "musl"; | ||
57 | case CODE16: return "code16"; | ||
58 | case EABI: return "eabi"; | ||
59 | case EABIHF: return "eabihf"; | ||
60 | @@ -461,6 +465,10 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) { | ||
61 | .StartsWith("gnueabihf", Triple::GNUEABIHF) | ||
62 | .StartsWith("gnueabi", Triple::GNUEABI) | ||
63 | .StartsWith("gnux32", Triple::GNUX32) | ||
64 | + .StartsWith("musleabihf", Triple::MUSLEABIHF) | ||
65 | + .StartsWith("musleabi", Triple::MUSLEABI) | ||
66 | + .StartsWith("muslx32", Triple::MUSLX32) | ||
67 | + .StartsWith("musl", Triple::MUSL) | ||
68 | .StartsWith("code16", Triple::CODE16) | ||
69 | .StartsWith("gnu", Triple::GNU) | ||
70 | .StartsWith("android", Triple::Android) | ||
71 | diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h | ||
72 | index 1eeb622..6f3cbd8 100644 | ||
73 | --- a/lib/Target/ARM/ARMSubtarget.h | ||
74 | +++ b/lib/Target/ARM/ARMSubtarget.h | ||
75 | @@ -428,8 +428,10 @@ public: | ||
76 | bool isTargetEHABICompatible() const { | ||
77 | return (TargetTriple.getEnvironment() == Triple::EABI || | ||
78 | TargetTriple.getEnvironment() == Triple::GNUEABI || | ||
79 | + TargetTriple.getEnvironment() == Triple::MUSLEABI || | ||
80 | TargetTriple.getEnvironment() == Triple::EABIHF || | ||
81 | TargetTriple.getEnvironment() == Triple::GNUEABIHF || | ||
82 | + TargetTriple.getEnvironment() == Triple::MUSLEABIHF || | ||
83 | isTargetAndroid()) && | ||
84 | !isTargetDarwin() && !isTargetWindows(); | ||
85 | } | ||
86 | @@ -437,6 +439,7 @@ public: | ||
87 | bool isTargetHardFloat() const { | ||
88 | // FIXME: this is invalid for WindowsCE | ||
89 | return TargetTriple.getEnvironment() == Triple::GNUEABIHF || | ||
90 | + TargetTriple.getEnvironment() == Triple::MUSLEABIHF || | ||
91 | TargetTriple.getEnvironment() == Triple::EABIHF || | ||
92 | isTargetWindows() || isAAPCS16_ABI(); | ||
93 | } | ||
94 | diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp | ||
95 | index b2b6f3a..10cbbe9 100644 | ||
96 | --- a/lib/Target/ARM/ARMTargetMachine.cpp | ||
97 | +++ b/lib/Target/ARM/ARMTargetMachine.cpp | ||
98 | @@ -100,6 +100,8 @@ computeTargetABI(const Triple &TT, StringRef CPU, | ||
99 | case llvm::Triple::Android: | ||
100 | case llvm::Triple::GNUEABI: | ||
101 | case llvm::Triple::GNUEABIHF: | ||
102 | + case llvm::Triple::MUSLEABI: | ||
103 | + case llvm::Triple::MUSLEABIHF: | ||
104 | case llvm::Triple::EABIHF: | ||
105 | case llvm::Triple::EABI: | ||
106 | TargetABI = ARMBaseTargetMachine::ARM_ABI_AAPCS; | ||
107 | -- | ||
108 | 2.8.3 | ||
109 | |||
diff --git a/recipes-devtools/clang/clang/0002-clang-driver-Use-lib-for-ldso-on-OE.patch b/recipes-devtools/clang/clang/0002-clang-driver-Use-lib-for-ldso-on-OE.patch index fcd1ee8..fc208d1 100644 --- a/recipes-devtools/clang/clang/0002-clang-driver-Use-lib-for-ldso-on-OE.patch +++ b/recipes-devtools/clang/clang/0002-clang-driver-Use-lib-for-ldso-on-OE.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 5dd25c4c9ed04093361569b63a96a8b1cb8b51f9 Mon Sep 17 00:00:00 2001 | 1 | From 73106ac819c30f7f86dad3b459693cd11dd54963 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sat, 21 May 2016 21:52:36 -0700 | 3 | Date: Sat, 21 May 2016 21:52:36 -0700 |
4 | Subject: [PATCH 2/4] clang: driver: Use /lib for ldso on OE | 4 | Subject: [PATCH 2/4] clang: driver: Use /lib for ldso on OE |
@@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
15 | 1 file changed, 7 insertions(+), 7 deletions(-) | 15 | 1 file changed, 7 insertions(+), 7 deletions(-) |
16 | 16 | ||
17 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp | 17 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp |
18 | index 737cd02..1b4c469 100644 | 18 | index cf3b4ae..1196eac 100644 |
19 | --- a/lib/Driver/Tools.cpp | 19 | --- a/lib/Driver/Tools.cpp |
20 | +++ b/lib/Driver/Tools.cpp | 20 | +++ b/lib/Driver/Tools.cpp |
21 | @@ -9162,24 +9162,24 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, | 21 | @@ -9191,24 +9191,24 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, |
22 | case llvm::Triple::ppc: | 22 | case llvm::Triple::ppc: |
23 | return "/lib/ld.so.1"; | 23 | return "/lib/ld.so.1"; |
24 | case llvm::Triple::ppc64: | 24 | case llvm::Triple::ppc64: |
@@ -51,5 +51,5 @@ index 737cd02..1b4c469 100644 | |||
51 | } | 51 | } |
52 | 52 | ||
53 | -- | 53 | -- |
54 | 2.8.3 | 54 | 2.9.0 |
55 | 55 | ||
diff --git a/recipes-devtools/clang/clang/0003-llvm-Do-not-assume-linux-glibc.patch b/recipes-devtools/clang/clang/0002-llvm-Do-not-assume-linux-glibc.patch index dfdb30c..ae33470 100644 --- a/recipes-devtools/clang/clang/0003-llvm-Do-not-assume-linux-glibc.patch +++ b/recipes-devtools/clang/clang/0002-llvm-Do-not-assume-linux-glibc.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From ebd6f77cfd58fbdcde4efb378ee1690d2a38579d Mon Sep 17 00:00:00 2001 | 1 | From 267078b86f351f2806604a74a05cf02e4ba0a7b8 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 15 Mar 2016 05:26:47 +0000 | 3 | Date: Tue, 15 Mar 2016 05:26:47 +0000 |
4 | Subject: [PATCH 3/5] llvm: Do not assume linux == glibc | 4 | Subject: [PATCH 2/3] llvm: Do not assume linux == glibc |
5 | 5 | ||
6 | musl's implementation of std functions is different | 6 | musl's implementation of std functions is different |
7 | 7 | ||
@@ -24,5 +24,5 @@ index 9a7aeb5..e3b7fe2 100644 | |||
24 | EXPLICIT_SYMBOL(stderr); | 24 | EXPLICIT_SYMBOL(stderr); |
25 | EXPLICIT_SYMBOL(stdout); | 25 | EXPLICIT_SYMBOL(stdout); |
26 | -- | 26 | -- |
27 | 2.8.3 | 27 | 2.9.0 |
28 | 28 | ||
diff --git a/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch b/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch index a579f52..5146572 100644 --- a/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch +++ b/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 965c0c46fcec3580829a9d28c6e1af7fea5def87 Mon Sep 17 00:00:00 2001 | 1 | From cab3a8b1785fabe9c2278c98d401c2eee027d044 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 19 May 2016 21:11:06 -0700 | 3 | Date: Thu, 19 May 2016 21:11:06 -0700 |
4 | Subject: [PATCH 3/4] clang: Driver/tools.cpp: Add -lssp and -lssp_nonshared on | 4 | Subject: [PATCH 3/4] clang: Driver/tools.cpp: Add -lssp and -lssp_nonshared on |
@@ -13,12 +13,12 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
13 | 1 file changed, 7 insertions(+) | 13 | 1 file changed, 7 insertions(+) |
14 | 14 | ||
15 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp | 15 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp |
16 | index 1b4c469..b850b0f 100644 | 16 | index 1196eac..9582af9 100644 |
17 | --- a/lib/Driver/Tools.cpp | 17 | --- a/lib/Driver/Tools.cpp |
18 | +++ b/lib/Driver/Tools.cpp | 18 | +++ b/lib/Driver/Tools.cpp |
19 | @@ -9463,6 +9463,13 @@ void gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, | 19 | @@ -9503,6 +9503,13 @@ void gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, |
20 | 20 | if (IsIAMCU) | |
21 | CmdArgs.push_back("-lc"); | 21 | CmdArgs.push_back("-lgloss"); |
22 | 22 | ||
23 | + if (ToolChain.getTriple().isLinuxMuslEnvironment() && | 23 | + if (ToolChain.getTriple().isLinuxMuslEnvironment() && |
24 | + (Args.hasArg(options::OPT_fstack_protector) || | 24 | + (Args.hasArg(options::OPT_fstack_protector) || |
@@ -31,5 +31,5 @@ index 1b4c469..b850b0f 100644 | |||
31 | CmdArgs.push_back("--end-group"); | 31 | CmdArgs.push_back("--end-group"); |
32 | else | 32 | else |
33 | -- | 33 | -- |
34 | 2.8.3 | 34 | 2.9.0 |
35 | 35 | ||
diff --git a/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0003-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index bb928ed..289fe7a 100644 --- a/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0003-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From b466434ed4abbf43018bc4dbeb2ae0b3d0bd59f8 Mon Sep 17 00:00:00 2001 | 1 | From d9873239ee2dc198c7d2a1225d71a6d1ca5aa283 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sat, 21 May 2016 00:33:20 +0000 | 3 | Date: Sat, 21 May 2016 00:33:20 +0000 |
4 | Subject: [PATCH 4/5] llvm: TargetLibraryInfo: Undefine libc functions if they | 4 | Subject: [PATCH 3/3] llvm: TargetLibraryInfo: Undefine libc functions if they |
5 | are macros | 5 | are macros |
6 | 6 | ||
7 | musl defines some functions as macros and not inline functions | 7 | musl defines some functions as macros and not inline functions |
@@ -87,5 +87,5 @@ index b2a593d..327894c 100644 | |||
87 | TLI_DEFINE_STRING_INTERNAL("tmpfile64") | 87 | TLI_DEFINE_STRING_INTERNAL("tmpfile64") |
88 | /// int toascii(int c); | 88 | /// int toascii(int c); |
89 | -- | 89 | -- |
90 | 2.8.3 | 90 | 2.9.0 |
91 | 91 | ||
diff --git a/recipes-devtools/clang/clang/0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch index 9a1c912..642d988 100644 --- a/recipes-devtools/clang/clang/0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 3c3627dbd4358c8e97c95a614e63803cc9048fa6 Mon Sep 17 00:00:00 2001 | 1 | From 34c294478178a0dcf028a037b5297e21ba91f501 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 10 May 2016 02:00:11 -0700 | 3 | Date: Tue, 10 May 2016 02:00:11 -0700 |
4 | Subject: [PATCH 4/4] clang: musl/ppc does not support 128-bit long double | 4 | Subject: [PATCH 4/4] clang: musl/ppc does not support 128-bit long double |
@@ -9,7 +9,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
9 | 1 file changed, 2 insertions(+), 1 deletion(-) | 9 | 1 file changed, 2 insertions(+), 1 deletion(-) |
10 | 10 | ||
11 | diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp | 11 | diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp |
12 | index 134b84b..159f5d8 100644 | 12 | index 0292e1d..67f70ed 100644 |
13 | --- a/lib/Basic/Targets.cpp | 13 | --- a/lib/Basic/Targets.cpp |
14 | +++ b/lib/Basic/Targets.cpp | 14 | +++ b/lib/Basic/Targets.cpp |
15 | @@ -1585,7 +1585,8 @@ public: | 15 | @@ -1585,7 +1585,8 @@ public: |
@@ -23,5 +23,5 @@ index 134b84b..159f5d8 100644 | |||
23 | LongDoubleFormat = &llvm::APFloat::IEEEdouble; | 23 | LongDoubleFormat = &llvm::APFloat::IEEEdouble; |
24 | } | 24 | } |
25 | -- | 25 | -- |
26 | 2.8.3 | 26 | 2.9.0 |
27 | 27 | ||
diff --git a/recipes-devtools/clang/clang/0005-ARMTargetLowering-Handle-MUSLEABI-to-fix-AEABI-helpe.patch b/recipes-devtools/clang/clang/0005-ARMTargetLowering-Handle-MUSLEABI-to-fix-AEABI-helpe.patch deleted file mode 100644 index c34bd4e..0000000 --- a/recipes-devtools/clang/clang/0005-ARMTargetLowering-Handle-MUSLEABI-to-fix-AEABI-helpe.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | From 694404d57821bd3da38cfcbaa3123c88d1f071b1 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 5/5] 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 55de31b..32df88c 100644 | ||
22 | --- a/lib/Target/ARM/ARMISelLowering.cpp | ||
23 | +++ b/lib/Target/ARM/ARMISelLowering.cpp | ||
24 | @@ -255,7 +255,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 6f3cbd8..00f21fd 100644 | ||
35 | --- a/lib/Target/ARM/ARMSubtarget.h | ||
36 | +++ b/lib/Target/ARM/ARMSubtarget.h | ||
37 | @@ -422,6 +422,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.3 | ||
51 | |||
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index d0fb155..90ddbc6 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb | |||
@@ -15,11 +15,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=${LLVMMD5SUM}; \ | |||
15 | " | 15 | " |
16 | SRC_URI = "${LLVM_GIT}/llvm.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=llvm \ | 16 | SRC_URI = "${LLVM_GIT}/llvm.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=llvm \ |
17 | ${LLVM_GIT}/clang.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};destsuffix=git/tools/clang;name=clang \ | 17 | ${LLVM_GIT}/clang.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};destsuffix=git/tools/clang;name=clang \ |
18 | file://0001-llvm-triplet-Add-musl-support.patch \ | 18 | file://0001-llvm-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-com.patch \ |
19 | file://0002-llvm-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-com.patch \ | 19 | file://0002-llvm-Do-not-assume-linux-glibc.patch \ |
20 | file://0003-llvm-Do-not-assume-linux-glibc.patch \ | 20 | file://0003-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ |
21 | file://0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ | ||
22 | file://0005-ARMTargetLowering-Handle-MUSLEABI-to-fix-AEABI-helpe.patch \ | ||
23 | \ | 21 | \ |
24 | file://0001-clang-driver-Add-musl-ldso-support.patch;patchdir=tools/clang \ | 22 | file://0001-clang-driver-Add-musl-ldso-support.patch;patchdir=tools/clang \ |
25 | file://0002-clang-driver-Use-lib-for-ldso-on-OE.patch;patchdir=tools/clang \ | 23 | file://0002-clang-driver-Use-lib-for-ldso-on-OE.patch;patchdir=tools/clang \ |