diff options
11 files changed, 109 insertions, 206 deletions
diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 0b65a78..4e03d0f 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc | |||
@@ -10,11 +10,11 @@ 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 = "18b9b9a1f4d2582b2b2ff240f39f7298f3fe5708" | 13 | SRCREV_llvm = "ae50a144ace99690fb530a2d56b625ac3cb13845" |
14 | SRCREV_clang = "9f075b782a61c9af1b8652d2a4bd7d0165789830" | 14 | SRCREV_clang = "bf0295e9294348694b7b203149fb108be098c56c" |
15 | SRCREV_compiler-rt = "5981c629cb4879ed91a74c6f88ad96e8996f2ee5" | 15 | SRCREV_compiler-rt = "0ef859b2aaaaf976fb32d0e6c6a28cfecb57a1e7" |
16 | SRCREV_libcxxabi = "5328c6b635a145efc1204ad25341706fb705e346" | 16 | SRCREV_libcxxabi = "5328c6b635a145efc1204ad25341706fb705e346" |
17 | SRCREV_libcxx = "70bf1c2280d514792b4bc6035c4685e82da79645" | 17 | SRCREV_libcxx = "56a761493d40cd528d548dfbf5fb27fa37a92556" |
18 | SRCREV_libunwind = "7a00ec9517645046685fd6c115f0b1dc775f0bb3" | 18 | SRCREV_libunwind = "7a00ec9517645046685fd6c115f0b1dc775f0bb3" |
19 | 19 | ||
20 | LLVMMD5SUM = "43fdaa303c1c5589ad60f4ffc6a0b9ce" | 20 | LLVMMD5SUM = "43fdaa303c1c5589ad60f4ffc6a0b9ce" |
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 deleted file mode 100644 index 1ed45e7..0000000 --- a/recipes-devtools/clang/clang/0001-clang-driver-Add-musl-ldso-support.patch +++ /dev/null | |||
@@ -1,132 +0,0 @@ | |||
1 | From fb45cce576a5a748df271ba9e3aa4c4acaece100 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 21 May 2016 21:49:08 -0700 | ||
4 | Subject: [PATCH 1/4] clang: driver: Add musl ldso support | ||
5 | |||
6 | Linux/musl libc implementation has different ldso | ||
7 | this needs to take effect when target arch is detected | ||
8 | as a musl based Linux platform | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | lib/Driver/Tools.cpp | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
13 | 1 file changed, 104 insertions(+) | ||
14 | |||
15 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp | ||
16 | index c4ac773..ea8b528 100644 | ||
17 | --- a/lib/Driver/Tools.cpp | ||
18 | +++ b/lib/Driver/Tools.cpp | ||
19 | @@ -9108,6 +9108,110 @@ static void AddLibgcc(const llvm::Triple &Triple, const Driver &D, | ||
20 | CmdArgs.push_back("-ldl"); | ||
21 | } | ||
22 | |||
23 | +static std::string getLinuxDynamicLinker(const ArgList &Args, | ||
24 | + const toolchains::Linux &ToolChain) { | ||
25 | + const llvm::Triple::ArchType Arch = ToolChain.getArch(); | ||
26 | + const llvm::Triple &Triple = ToolChain.getTriple(); | ||
27 | + | ||
28 | + if (Triple.isAndroid()) | ||
29 | + return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker"; | ||
30 | + if (ToolChain.getTriple().isMusl()) { | ||
31 | + switch (Arch) { | ||
32 | + case llvm::Triple::x86: | ||
33 | + return "/lib/ld-musl-i386.so.1"; | ||
34 | + case llvm::Triple::x86_64: | ||
35 | + return "/lib/ld-musl-x86_64.so.1"; | ||
36 | + case llvm::Triple::aarch64: | ||
37 | + return "/lib/ld-musl-aarch64.so.1"; | ||
38 | + case llvm::Triple::aarch64_be: | ||
39 | + return "/lib/ld-musl-aarch64_be.so.1"; | ||
40 | + case llvm::Triple::ppc: | ||
41 | + return "/lib/ld-musl-powerpc.so.1"; | ||
42 | + case llvm::Triple::ppc64: | ||
43 | + return "/lib/ld-musl-powerpc64.so.1"; | ||
44 | + case llvm::Triple::arm: | ||
45 | + case llvm::Triple::thumb: | ||
46 | + if(arm::getARMFloatABI(ToolChain, Args) == arm::FloatABI::Hard) | ||
47 | + return "/lib/ld-musl-armhf.so.1"; | ||
48 | + else | ||
49 | + return "/lib/ld-musl-arm.so.1"; | ||
50 | + case llvm::Triple::armeb: | ||
51 | + case llvm::Triple::thumbeb: | ||
52 | + if(arm::getARMFloatABI(ToolChain, Args) == arm::FloatABI::Hard) | ||
53 | + return "/lib/ld-musl-armebhf.so.1"; | ||
54 | + else | ||
55 | + return "/lib/ld-musl-armeb.so.1"; | ||
56 | + case llvm::Triple::mips: | ||
57 | + return "/lib/ld-musl-mips.so.1"; | ||
58 | + case llvm::Triple::mipsel: | ||
59 | + return "/lib/ld-musl-mipsel.so.1"; | ||
60 | + case llvm::Triple::mips64: | ||
61 | + return "/lib/ld-musl-mips64.so.1"; | ||
62 | + case llvm::Triple::mips64el: | ||
63 | + return "/lib/ld-musl-mipsel64el.so.1"; | ||
64 | + default: | ||
65 | + llvm_unreachable("unsupported musl architecture"); | ||
66 | + break; | ||
67 | + } | ||
68 | + } | ||
69 | + switch (Arch) { | ||
70 | + default: llvm_unreachable("unsupported architecture"); | ||
71 | + | ||
72 | + case llvm::Triple::aarch64: | ||
73 | + return "/lib/ld-linux-aarch64.so.1"; | ||
74 | + case llvm::Triple::aarch64_be: | ||
75 | + return "/lib/ld-linux-aarch64_be.so.1"; | ||
76 | + case llvm::Triple::arm: | ||
77 | + case llvm::Triple::thumb: | ||
78 | + case llvm::Triple::armeb: | ||
79 | + case llvm::Triple::thumbeb: { | ||
80 | + const bool IsHardFloat = | ||
81 | + Triple.getEnvironment() == llvm::Triple::GNUEABIHF || | ||
82 | + arm::getARMFloatABI(ToolChain, Args) == arm::FloatABI::Hard; | ||
83 | + | ||
84 | + return IsHardFloat ? "/lib/ld-linux-armhf.so.3" : "/lib/ld-linux.so.3"; | ||
85 | + } | ||
86 | + case llvm::Triple::mips: | ||
87 | + case llvm::Triple::mipsel: | ||
88 | + case llvm::Triple::mips64: | ||
89 | + case llvm::Triple::mips64el: { | ||
90 | + bool IsNaN2008 = mips::isNaN2008(Args, Triple); | ||
91 | + bool LE = (Triple.getArch() == llvm::Triple::mipsel) || | ||
92 | + (Triple.getArch() == llvm::Triple::mips64el); | ||
93 | + | ||
94 | + std::string LibDir = "/lib" + mips::getMipsABILibSuffix(Args, Triple); | ||
95 | + StringRef LibName; | ||
96 | + if (mips::isUCLibc(Args)) | ||
97 | + LibName = IsNaN2008 ? "ld-uClibc-mipsn8.so.0" : "ld-uClibc.so.0"; | ||
98 | + else | ||
99 | + LibName = IsNaN2008 ? "ld-linux-mipsn8.so.1" : "ld.so.1"; | ||
100 | + | ||
101 | + return (LibDir + "/" + LibName).str(); | ||
102 | + } | ||
103 | + case llvm::Triple::ppc: | ||
104 | + return "/lib/ld.so.1"; | ||
105 | + case llvm::Triple::ppc64: | ||
106 | + return (ppc::hasPPCAbiArg(Args, "elfv2")) ? "/lib64/ld64.so.2" | ||
107 | + : "/lib64/ld64.so.1"; | ||
108 | + case llvm::Triple::ppc64le: | ||
109 | + return (ppc::hasPPCAbiArg(Args, "elfv1")) ? "/lib64/ld64.so.1" | ||
110 | + : "/lib64/ld64.so.2"; | ||
111 | + case llvm::Triple::sparc: | ||
112 | + case llvm::Triple::sparcel: | ||
113 | + return "/lib/ld-linux.so.2"; | ||
114 | + case llvm::Triple::sparcv9: | ||
115 | + return "/lib64/ld-linux.so.2"; | ||
116 | + case llvm::Triple::systemz: | ||
117 | + return "/lib/ld64.so.1"; | ||
118 | + case llvm::Triple::x86: | ||
119 | + return "/lib/ld-linux.so.2"; | ||
120 | + case llvm::Triple::x86_64: | ||
121 | + return (Triple.getEnvironment() == llvm::Triple::GNUX32) | ||
122 | + ? "/libx32/ld-linux-x32.so.2" | ||
123 | + : "/lib64/ld-linux-x86-64.so.2"; | ||
124 | + } | ||
125 | +} | ||
126 | + | ||
127 | static void AddRunTimeLibs(const ToolChain &TC, const Driver &D, | ||
128 | ArgStringList &CmdArgs, const ArgList &Args) { | ||
129 | // Make use of compiler-rt if --rtlib option is used | ||
130 | -- | ||
131 | 2.9.0 | ||
132 | |||
diff --git a/recipes-devtools/clang/clang/0001-clang-driver-Use-lib-for-ldso-on-OE.patch b/recipes-devtools/clang/clang/0001-clang-driver-Use-lib-for-ldso-on-OE.patch new file mode 100644 index 0000000..7571c3a --- /dev/null +++ b/recipes-devtools/clang/clang/0001-clang-driver-Use-lib-for-ldso-on-OE.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 5273f61c9e93d1fa263fba29f0d62ab2860cde65 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 21 May 2016 21:52:36 -0700 | ||
4 | Subject: [PATCH 1/4] clang: driver: Use /lib for ldso on OE | ||
5 | |||
6 | OE does not follow the default base_libdir | ||
7 | that clang has, therefore adjust it for OE | ||
8 | it wont be able to support multilib since | ||
9 | in multilib case OE switches the base libdir | ||
10 | for 64bit to /lib64 instead of /lib | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | lib/Driver/ToolChains.cpp | 8 ++++---- | ||
15 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
16 | |||
17 | diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp | ||
18 | index 7884c40..706612d 100644 | ||
19 | --- a/lib/Driver/ToolChains.cpp | ||
20 | +++ b/lib/Driver/ToolChains.cpp | ||
21 | @@ -4227,12 +4227,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | ||
22 | Loader = "ld.so.1"; | ||
23 | break; | ||
24 | case llvm::Triple::ppc64: | ||
25 | - LibDir = "lib64"; | ||
26 | + LibDir = "lib"; | ||
27 | Loader = | ||
28 | (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; | ||
29 | break; | ||
30 | case llvm::Triple::ppc64le: | ||
31 | - LibDir = "lib64"; | ||
32 | + LibDir = "lib"; | ||
33 | Loader = | ||
34 | (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; | ||
35 | break; | ||
36 | @@ -4242,7 +4242,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | ||
37 | Loader = "ld-linux.so.2"; | ||
38 | break; | ||
39 | case llvm::Triple::sparcv9: | ||
40 | - LibDir = "lib64"; | ||
41 | + LibDir = "lib"; | ||
42 | Loader = "ld-linux.so.2"; | ||
43 | break; | ||
44 | case llvm::Triple::systemz: | ||
45 | @@ -4256,7 +4256,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | ||
46 | case llvm::Triple::x86_64: { | ||
47 | bool X32 = Triple.getEnvironment() == llvm::Triple::GNUX32; | ||
48 | |||
49 | - LibDir = X32 ? "libx32" : "lib64"; | ||
50 | + LibDir = "lib"; | ||
51 | Loader = X32 ? "ld-linux-x32.so.2" : "ld-linux-x86-64.so.2"; | ||
52 | break; | ||
53 | } | ||
54 | -- | ||
55 | 2.9.0 | ||
56 | |||
diff --git a/recipes-devtools/clang/clang/0001-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 8190bfb..b659f24 100644 --- a/recipes-devtools/clang/clang/0001-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,4 +1,4 @@ | |||
1 | From f480eebd16f502fabddb5e61f49205606e82945d Mon Sep 17 00:00:00 2001 | 1 | From c69a4eba88cff26594193be9aca54f54733689e5 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 1/3] llvm: Remove CMAKE_CROSSCOMPILING so it can cross compile | 4 | Subject: [PATCH 1/3] llvm: Remove CMAKE_CROSSCOMPILING so it can cross compile |
diff --git a/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch b/recipes-devtools/clang/clang/0002-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch index 532c1b1..35b8009 100644 --- a/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch +++ b/recipes-devtools/clang/clang/0002-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 44c64caafedfbcda712102354450b1c5a13a4551 Mon Sep 17 00:00:00 2001 | 1 | From ad80343e25ebf5ef82ab3f1b8ce339d4702e5fa6 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 2/4] clang: Driver/tools.cpp: Add -lssp and -lssp_nonshared on |
5 | musl | 5 | musl |
6 | 6 | ||
7 | musl driver will need to add ssp libraries to linker cmdline | 7 | musl driver will need to add ssp libraries to linker cmdline |
@@ -13,10 +13,10 @@ 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 abb7d3b..11b418d 100644 | 16 | index 2425619..ab048ba 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 | @@ -9503,6 +9503,13 @@ void gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, | 19 | @@ -9451,6 +9451,13 @@ void gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, |
20 | if (IsIAMCU) | 20 | if (IsIAMCU) |
21 | CmdArgs.push_back("-lgloss"); | 21 | CmdArgs.push_back("-lgloss"); |
22 | 22 | ||
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 deleted file mode 100644 index eab2743..0000000 --- a/recipes-devtools/clang/clang/0002-clang-driver-Use-lib-for-ldso-on-OE.patch +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | From 9f267c3838ce237712d3bf62d77218040d10bfaf Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 21 May 2016 21:52:36 -0700 | ||
4 | Subject: [PATCH 2/4] clang: driver: Use /lib for ldso on OE | ||
5 | |||
6 | OE does not follow the default base_libdir | ||
7 | that clang has, therefore adjust it for OE | ||
8 | it wont be able to support multilib since | ||
9 | in multilib case OE switches the base libdir | ||
10 | for 64bit to /lib64 instead of /lib | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | lib/Driver/Tools.cpp | 14 +++++++------- | ||
15 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
16 | |||
17 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp | ||
18 | index ea8b528..abb7d3b 100644 | ||
19 | --- a/lib/Driver/Tools.cpp | ||
20 | +++ b/lib/Driver/Tools.cpp | ||
21 | @@ -9191,24 +9191,24 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, | ||
22 | case llvm::Triple::ppc: | ||
23 | return "/lib/ld.so.1"; | ||
24 | case llvm::Triple::ppc64: | ||
25 | - return (ppc::hasPPCAbiArg(Args, "elfv2")) ? "/lib64/ld64.so.2" | ||
26 | - : "/lib64/ld64.so.1"; | ||
27 | + return (ppc::hasPPCAbiArg(Args, "elfv2")) ? "/lib/ld64.so.2" | ||
28 | + : "/lib/ld64.so.1"; | ||
29 | case llvm::Triple::ppc64le: | ||
30 | - return (ppc::hasPPCAbiArg(Args, "elfv1")) ? "/lib64/ld64.so.1" | ||
31 | - : "/lib64/ld64.so.2"; | ||
32 | + return (ppc::hasPPCAbiArg(Args, "elfv1")) ? "/lib/ld64.so.1" | ||
33 | + : "/lib/ld64.so.2"; | ||
34 | case llvm::Triple::sparc: | ||
35 | case llvm::Triple::sparcel: | ||
36 | return "/lib/ld-linux.so.2"; | ||
37 | case llvm::Triple::sparcv9: | ||
38 | - return "/lib64/ld-linux.so.2"; | ||
39 | + return "/lib/ld-linux.so.2"; | ||
40 | case llvm::Triple::systemz: | ||
41 | return "/lib/ld64.so.1"; | ||
42 | case llvm::Triple::x86: | ||
43 | return "/lib/ld-linux.so.2"; | ||
44 | case llvm::Triple::x86_64: | ||
45 | return (Triple.getEnvironment() == llvm::Triple::GNUX32) | ||
46 | - ? "/libx32/ld-linux-x32.so.2" | ||
47 | - : "/lib64/ld-linux-x86-64.so.2"; | ||
48 | + ? "/lib/ld-linux-x32.so.2" | ||
49 | + : "/lib/ld-linux-x86-64.so.2"; | ||
50 | } | ||
51 | } | ||
52 | |||
53 | -- | ||
54 | 2.9.0 | ||
55 | |||
diff --git a/recipes-devtools/clang/clang/0002-llvm-Do-not-assume-linux-glibc.patch b/recipes-devtools/clang/clang/0002-llvm-Do-not-assume-linux-glibc.patch index ae33470..94f79b0 100644 --- a/recipes-devtools/clang/clang/0002-llvm-Do-not-assume-linux-glibc.patch +++ b/recipes-devtools/clang/clang/0002-llvm-Do-not-assume-linux-glibc.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 267078b86f351f2806604a74a05cf02e4ba0a7b8 Mon Sep 17 00:00:00 2001 | 1 | From 4a90b1c48b3aa8fe43a93e337def93bdbf82bf0f 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 2/3] llvm: Do not assume linux == glibc | 4 | Subject: [PATCH 2/3] llvm: Do not assume linux == glibc |
diff --git a/recipes-devtools/clang/clang/0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0003-clang-musl-ppc-does-not-support-128-bit-long-double.patch index 9904d9e..182ae91 100644 --- a/recipes-devtools/clang/clang/0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0003-clang-musl-ppc-does-not-support-128-bit-long-double.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 688d89497051b733691d38aa3cd0aa045540448e Mon Sep 17 00:00:00 2001 | 1 | From 8a9808b868c81d3fc65a84af74f0969dfc2df877 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 3/4] clang: musl/ppc does not support 128-bit long double |
5 | 5 | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
7 | --- | 7 | --- |
@@ -9,10 +9,10 @@ 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 0292e1d..43b34f1 100644 | 12 | index 5e9ea68..33f0d89 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 | @@ -1592,7 +1592,8 @@ public: |
16 | break; | 16 | break; |
17 | } | 17 | } |
18 | 18 | ||
diff --git a/recipes-devtools/clang/clang/0003-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0003-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index 289fe7a..d1b2aff 100644 --- a/recipes-devtools/clang/clang/0003-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0003-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From d9873239ee2dc198c7d2a1225d71a6d1ca5aa283 Mon Sep 17 00:00:00 2001 | 1 | From b01b39e5b7c7803783ab7bc00fb4e414189d4d10 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 3/3] llvm: TargetLibraryInfo: Undefine libc functions if they | 4 | Subject: [PATCH 3/3] llvm: TargetLibraryInfo: Undefine libc functions if they |
diff --git a/recipes-devtools/clang/clang/0004-clang-Check-for-float-ABI-on-arm.patch b/recipes-devtools/clang/clang/0004-clang-Check-for-float-ABI-on-arm.patch new file mode 100644 index 0000000..1b54c65 --- /dev/null +++ b/recipes-devtools/clang/clang/0004-clang-Check-for-float-ABI-on-arm.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 30fb1a92b9d0899a2f25cf1917000aad2f4578c5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 4 Jul 2016 20:14:52 -0700 | ||
4 | Subject: [PATCH 4/4] clang: Check for float ABI on arm | ||
5 | |||
6 | Triggering hard-float on arm does not just | ||
7 | depend upong triplet being *-*-eabihf but | ||
8 | also check for float ABI which can be | ||
9 | set on commandline | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | xx | ||
14 | --- | ||
15 | lib/Driver/ToolChains.cpp | 3 ++- | ||
16 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp | ||
19 | index 706612d..8bac35a 100644 | ||
20 | --- a/lib/Driver/ToolChains.cpp | ||
21 | +++ b/lib/Driver/ToolChains.cpp | ||
22 | @@ -4169,7 +4169,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | ||
23 | default: | ||
24 | ArchName = Triple.getArchName().str(); | ||
25 | } | ||
26 | - if (Triple.getEnvironment() == llvm::Triple::MuslEABIHF) | ||
27 | + if (Triple.getEnvironment() == llvm::Triple::MuslEABIHF || | ||
28 | + tools::arm::getARMFloatABI(*this, Args) == tools::arm::FloatABI::Hard) | ||
29 | ArchName += "hf"; | ||
30 | |||
31 | return "/lib/ld-musl-" + ArchName + ".so.1"; | ||
32 | -- | ||
33 | 2.9.0 | ||
34 | |||
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 90ddbc6..4ed88d0 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb | |||
@@ -19,10 +19,10 @@ SRC_URI = "${LLVM_GIT}/llvm.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};n | |||
19 | file://0002-llvm-Do-not-assume-linux-glibc.patch \ | 19 | file://0002-llvm-Do-not-assume-linux-glibc.patch \ |
20 | file://0003-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ | 20 | file://0003-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ |
21 | \ | 21 | \ |
22 | file://0001-clang-driver-Add-musl-ldso-support.patch;patchdir=tools/clang \ | 22 | file://0001-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 \ | 23 | file://0002-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch;patchdir=tools/clang \ |
24 | file://0003-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch;patchdir=tools/clang \ | 24 | file://0003-clang-musl-ppc-does-not-support-128-bit-long-double.patch;patchdir=tools/clang \ |
25 | file://0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch;patchdir=tools/clang \ | 25 | file://0004-clang-Check-for-float-ABI-on-arm.patch;patchdir=tools/clang \ |
26 | " | 26 | " |
27 | 27 | ||
28 | SRCREV_FORMAT = "llvm_clang" | 28 | SRCREV_FORMAT = "llvm_clang" |