summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-02-06 17:13:41 -0800
committerKhem Raj <raj.khem@gmail.com>2019-02-07 22:44:28 -0800
commit7bd92153728422fcca645863daf84e87e065db75 (patch)
treeed7e750126cdd6cd4e0d18a8f12210f8a647b709 /recipes-devtools/clang
parent49e9e00f48ae01b5f76fabee4aff55d060c68189 (diff)
downloadmeta-clang-7bd92153728422fcca645863daf84e87e065db75.tar.gz
clang: Refresh patches and use static libunwind.a during default link
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools/clang')
-rw-r--r--recipes-devtools/clang/clang/0001-clang-Enable-SSP-and-PIE-by-default.patch (renamed from recipes-devtools/clang/clang/0000-clang-Enable-SSP-and-PIE-by-default.patch)8
-rw-r--r--recipes-devtools/clang/clang/0002-clang-driver-Use-lib-for-ldso-on-OE.patch (renamed from recipes-devtools/clang/clang/0001-clang-driver-Use-lib-for-ldso-on-OE.patch)6
-rw-r--r--recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch (renamed from recipes-devtools/clang/clang/0002-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch)4
-rw-r--r--recipes-devtools/clang/clang/0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch (renamed from recipes-devtools/clang/clang/0003-clang-musl-ppc-does-not-support-128-bit-long-double.patch)4
-rw-r--r--recipes-devtools/clang/clang/0005-clang-Prepend-trailing-to-sysroot.patch (renamed from recipes-devtools/clang/clang/0004-clang-Prepend-trailing-to-sysroot.patch)6
-rw-r--r--recipes-devtools/clang/clang/0006-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch (renamed from recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch)4
-rw-r--r--recipes-devtools/clang/clang/0007-clang-Define-releative-gcc-installation-dir.patch (renamed from recipes-devtools/clang/clang/0006-clang-Define-releative-gcc-installation-dir.patch)4
-rw-r--r--recipes-devtools/clang/clang/0008-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch (renamed from recipes-devtools/clang/clang/0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch)6
-rw-r--r--recipes-devtools/clang/clang/0009-clang-scan-view-needs-python-2.x.patch (renamed from recipes-devtools/clang/clang/0008-clang-scan-view-needs-python-2.x.patch)4
-rw-r--r--recipes-devtools/clang/clang/0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch (renamed from recipes-devtools/clang/clang/0016-clang-Append-libunwind-to-compiler-rt-for-linking.patch)8
-rw-r--r--recipes-devtools/clang/clang/0011-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch (renamed from recipes-devtools/clang/clang/0009-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch)4
-rw-r--r--recipes-devtools/clang/clang/0012-llvm-allow-env-override-of-exe-path.patch (renamed from recipes-devtools/clang/clang/0010-llvm-allow-env-override-of-exe-path.patch)4
-rw-r--r--recipes-devtools/clang/clang/0013-llvm-AARCH64-Add-support-for-.dword-directives.patch (renamed from recipes-devtools/clang/clang/0017-llvm-AARCH64-Add-support-for-.dword-directives.patch)4
-rw-r--r--recipes-devtools/clang/clang/0014-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch (renamed from recipes-devtools/clang/clang/0011-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch)4
-rw-r--r--recipes-devtools/clang/clang/0015-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch (renamed from recipes-devtools/clang/clang/0012-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch)4
-rw-r--r--recipes-devtools/clang/clang/0016-compiler-rt-support-a-new-embedded-linux-target.patch (renamed from recipes-devtools/clang/clang/0013-compiler-rt-support-a-new-embedded-linux-target.patch)4
-rw-r--r--recipes-devtools/clang/clang/0017-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch (renamed from recipes-devtools/clang/clang/0014-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch)4
-rw-r--r--recipes-devtools/clang/clang/0018-compiler-rt-Disable-tsan-on-OE-glibc.patch (renamed from recipes-devtools/clang/clang/0015-compiler-rt-Disable-tsan-on-OE-glibc.patch)8
-rw-r--r--recipes-devtools/clang/common.inc36
19 files changed, 63 insertions, 63 deletions
diff --git a/recipes-devtools/clang/clang/0000-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0001-clang-Enable-SSP-and-PIE-by-default.patch
index d7b76b1..ac7abed 100644
--- a/recipes-devtools/clang/clang/0000-clang-Enable-SSP-and-PIE-by-default.patch
+++ b/recipes-devtools/clang/clang/0001-clang-Enable-SSP-and-PIE-by-default.patch
@@ -1,7 +1,7 @@
1From 76718d7d905029a2304c1ad275cd528b404dc7d4 Mon Sep 17 00:00:00 2001 1From 400745857bc7bbcc31df9cab36d1fa9816c3c07b Mon Sep 17 00:00:00 2001
2From: Evangelos Foutras <evangelos@foutrelis.com> 2From: Evangelos Foutras <evangelos@foutrelis.com>
3Date: Thu, 20 Sep 2018 06:20:28 +0300 3Date: Thu, 20 Sep 2018 06:20:28 +0300
4Subject: [PATCH] clang: Enable SSP and PIE by default 4Subject: [PATCH 01/18] clang: Enable SSP and PIE by default
5 5
6This is a minimal set of changes needed to make clang use SSP and PIE by 6This is a minimal set of changes needed to make clang use SSP and PIE by
7default on Arch Linux. Tests that were easy to adjust have been changed 7default on Arch Linux. Tests that were easy to adjust have been changed
@@ -22,10 +22,10 @@ of a compile-time option (https://bugs.llvm.org/show_bug.cgi?id=13410)
22 2 files changed, 13 insertions(+), 2 deletions(-) 22 2 files changed, 13 insertions(+), 2 deletions(-)
23 23
24diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp 24diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
25index 5dc7b506d6f..4dfef25aa63 100644 25index 65ab9b2daf5..5b757b8028c 100644
26--- a/clang/lib/Driver/ToolChains/Linux.cpp 26--- a/clang/lib/Driver/ToolChains/Linux.cpp
27+++ b/clang/lib/Driver/ToolChains/Linux.cpp 27+++ b/clang/lib/Driver/ToolChains/Linux.cpp
28@@ -976,8 +976,18 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs, 28@@ -968,8 +968,18 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs,
29 } 29 }
30 30
31 bool Linux::isPIEDefault() const { 31 bool Linux::isPIEDefault() const {
diff --git a/recipes-devtools/clang/clang/0001-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 42e920a..9b92b69 100644
--- a/recipes-devtools/clang/clang/0001-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,7 +1,7 @@
1From 4fe687292a2b2952a360eecdd6954db11750c903 Mon Sep 17 00:00:00 2001 1From 089b7e146cfc86fafe7c21e74238d638ae997df9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 21 May 2016 21:52:36 -0700 3Date: Sat, 21 May 2016 21:52:36 -0700
4Subject: [PATCH 01/15] clang: driver: Use /lib for ldso on OE 4Subject: [PATCH 02/18] clang: driver: Use /lib for ldso on OE
5 5
6OE does not follow the default base_libdir 6OE does not follow the default base_libdir
7that clang has, therefore adjust it for OE 7that clang has, therefore adjust it for OE
@@ -15,7 +15,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
15 1 file changed, 4 insertions(+), 4 deletions(-) 15 1 file changed, 4 insertions(+), 4 deletions(-)
16 16
17diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp 17diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
18index 65ab9b2daf5..33e2fcec299 100644 18index 5b757b8028c..552d329e7b8 100644
19--- a/clang/lib/Driver/ToolChains/Linux.cpp 19--- a/clang/lib/Driver/ToolChains/Linux.cpp
20+++ b/clang/lib/Driver/ToolChains/Linux.cpp 20+++ b/clang/lib/Driver/ToolChains/Linux.cpp
21@@ -590,12 +590,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 21@@ -590,12 +590,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
diff --git a/recipes-devtools/clang/clang/0002-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch
index 35b3d4f..217facc 100644
--- a/recipes-devtools/clang/clang/0002-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch
+++ b/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch
@@ -1,7 +1,7 @@
1From 14a9ed6fa67f7e988d85408554f88a8d72c6a607 Mon Sep 17 00:00:00 2001 1From c4e958d8d61d443cb882214993b129c45bd8a21d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 May 2016 21:11:06 -0700 3Date: Thu, 19 May 2016 21:11:06 -0700
4Subject: [PATCH 02/15] clang: Driver/tools.cpp: Add -lssp_nonshared on musl 4Subject: [PATCH 03/18] clang: Driver/tools.cpp: Add -lssp_nonshared on musl
5 5
6musl driver will need to add ssp_nonshared for stack_check_local 6musl driver will need to add ssp_nonshared for stack_check_local
7on the linker cmdline when using stack protector commands on 7on the linker cmdline when using stack protector commands on
diff --git a/recipes-devtools/clang/clang/0003-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 80ec006..ca4ef9f 100644
--- a/recipes-devtools/clang/clang/0003-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,7 +1,7 @@
1From 0f183864a6e89461143e082d4b7e5df4cd0f4480 Mon Sep 17 00:00:00 2001 1From 419cb3ac8f7f23c3f7aa620a93974b366509c2b7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 10 May 2016 02:00:11 -0700 3Date: Tue, 10 May 2016 02:00:11 -0700
4Subject: [PATCH 03/15] clang: musl/ppc does not support 128-bit long double 4Subject: [PATCH 04/18] clang: musl/ppc does not support 128-bit long double
5 5
6Signed-off-by: Khem Raj <raj.khem@gmail.com> 6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7--- 7---
diff --git a/recipes-devtools/clang/clang/0004-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0005-clang-Prepend-trailing-to-sysroot.patch
index 0cb81cd..641ca32 100644
--- a/recipes-devtools/clang/clang/0004-clang-Prepend-trailing-to-sysroot.patch
+++ b/recipes-devtools/clang/clang/0005-clang-Prepend-trailing-to-sysroot.patch
@@ -1,7 +1,7 @@
1From 792786fb04bf505cdcd39a22744111cfd57a2ac5 Mon Sep 17 00:00:00 2001 1From dae39fcc475883d6367929d5d4bd39bd82cebb22 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 16 Mar 2017 09:02:13 -0700 3Date: Thu, 16 Mar 2017 09:02:13 -0700
4Subject: [PATCH 04/15] clang: Prepend trailing '/' to sysroot 4Subject: [PATCH 05/18] clang: Prepend trailing '/' to sysroot
5 5
6This is needed to handle a case where clang 6This is needed to handle a case where clang
7isntall and target sysroot are perilously same 7isntall and target sysroot are perilously same
@@ -24,7 +24,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
24 1 file changed, 1 insertion(+), 1 deletion(-) 24 1 file changed, 1 insertion(+), 1 deletion(-)
25 25
26diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp 26diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
27index 33e2fcec299..4dfaf052f86 100644 27index 552d329e7b8..7d5a85ed744 100644
28--- a/clang/lib/Driver/ToolChains/Linux.cpp 28--- a/clang/lib/Driver/ToolChains/Linux.cpp
29+++ b/clang/lib/Driver/ToolChains/Linux.cpp 29+++ b/clang/lib/Driver/ToolChains/Linux.cpp
30@@ -219,7 +219,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) 30@@ -219,7 +219,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
diff --git a/recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0006-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch
index 61caa3c..4fd4627 100644
--- a/recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch
+++ b/recipes-devtools/clang/clang/0006-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch
@@ -1,7 +1,7 @@
1From 0327863d99125908e209e46e2687e9fb77ff25a7 Mon Sep 17 00:00:00 2001 1From 258f04d89f8d7cca4fdd1f4d2fba068b090854b3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 16 Mar 2017 19:06:26 -0700 3Date: Thu, 16 Mar 2017 19:06:26 -0700
4Subject: [PATCH 05/15] clang: Look inside the target sysroot for compiler 4Subject: [PATCH 06/18] clang: Look inside the target sysroot for compiler
5 runtime 5 runtime
6 6
7In OE compiler-rt and libc++ are built and staged into target 7In OE compiler-rt and libc++ are built and staged into target
diff --git a/recipes-devtools/clang/clang/0006-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0007-clang-Define-releative-gcc-installation-dir.patch
index 92e660c..707a550 100644
--- a/recipes-devtools/clang/clang/0006-clang-Define-releative-gcc-installation-dir.patch
+++ b/recipes-devtools/clang/clang/0007-clang-Define-releative-gcc-installation-dir.patch
@@ -1,7 +1,7 @@
1From 15fab22ab9478935b30d55de1d871553991bc3ad Mon Sep 17 00:00:00 2001 1From b8dbd4166e7ce4d88ca5e6b6da1a07b408a1230d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 21 May 2017 15:38:25 -0700 3Date: Sun, 21 May 2017 15:38:25 -0700
4Subject: [PATCH 06/15] clang: Define / releative gcc installation dir 4Subject: [PATCH 07/18] clang: Define / releative gcc installation dir
5 5
6This is required for OE gcc installation to work. 6This is required for OE gcc installation to work.
7Without this its not able to find the paths for libgcc 7Without this its not able to find the paths for libgcc
diff --git a/recipes-devtools/clang/clang/0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch b/recipes-devtools/clang/clang/0008-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch
index 7965fc6..a223f1a 100644
--- a/recipes-devtools/clang/clang/0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch
+++ b/recipes-devtools/clang/clang/0008-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch
@@ -1,7 +1,7 @@
1From e2f49f7535aeb72592f8386cddb611f7bcdf2f32 Mon Sep 17 00:00:00 2001 1From f7908f063e790b2930d969a382a8aabb83e7e2a2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 16 Aug 2017 15:16:15 -0700 3Date: Wed, 16 Aug 2017 15:16:15 -0700
4Subject: [PATCH 07/15] clang: Fix ldso for musl on x86 and x32 architectures 4Subject: [PATCH 08/18] clang: Fix ldso for musl on x86 and x32 architectures
5 5
6x32 linker is called ld-musl-x32.so.1 and x86 linker 6x32 linker is called ld-musl-x32.so.1 and x86 linker
7is called ld-musl-i386.so.1, Currently, linker for 7is called ld-musl-i386.so.1, Currently, linker for
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
14 1 file changed, 8 insertions(+) 14 1 file changed, 8 insertions(+)
15 15
16diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp 16diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
17index 4dfaf052f86..5dc7b506d6f 100644 17index 7d5a85ed744..4dfef25aa63 100644
18--- a/clang/lib/Driver/ToolChains/Linux.cpp 18--- a/clang/lib/Driver/ToolChains/Linux.cpp
19+++ b/clang/lib/Driver/ToolChains/Linux.cpp 19+++ b/clang/lib/Driver/ToolChains/Linux.cpp
20@@ -516,6 +516,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 20@@ -516,6 +516,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
diff --git a/recipes-devtools/clang/clang/0008-clang-scan-view-needs-python-2.x.patch b/recipes-devtools/clang/clang/0009-clang-scan-view-needs-python-2.x.patch
index 047c038..befbcdc 100644
--- a/recipes-devtools/clang/clang/0008-clang-scan-view-needs-python-2.x.patch
+++ b/recipes-devtools/clang/clang/0009-clang-scan-view-needs-python-2.x.patch
@@ -1,7 +1,7 @@
1From f86a9b4d0b8ee8818a0a86561c33c2dbb1c12535 Mon Sep 17 00:00:00 2001 1From c09c33bec431aa61f36e0ab94bd14c273c5262db Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 15 May 2018 10:28:43 -0700 3Date: Tue, 15 May 2018 10:28:43 -0700
4Subject: [PATCH 08/15] clang: scan-view needs python 2.x 4Subject: [PATCH 09/18] clang: scan-view needs python 2.x
5 5
6Some distributions e.g. archlinux have switched to pointing 6Some distributions e.g. archlinux have switched to pointing
7python to python3, therefore its better to be specific about 7python to python3, therefore its better to be specific about
diff --git a/recipes-devtools/clang/clang/0016-clang-Append-libunwind-to-compiler-rt-for-linking.patch b/recipes-devtools/clang/clang/0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch
index 7fc5795..4f23d69 100644
--- a/recipes-devtools/clang/clang/0016-clang-Append-libunwind-to-compiler-rt-for-linking.patch
+++ b/recipes-devtools/clang/clang/0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch
@@ -1,7 +1,7 @@
1From 89c9b5e2bec26bad047a60bd08722ff138cb7cb3 Mon Sep 17 00:00:00 2001 1From 3ba6f05d35c8b0c405bf62cdd93eecc5a5094165 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 25 Jan 2019 14:39:04 -0800 3Date: Fri, 25 Jan 2019 14:39:04 -0800
4Subject: [PATCH] clang: Append libunwind to compiler-rt for linking 4Subject: [PATCH 10/18] clang: Append libunwind to compiler-rt for linking
5 5
6Some packages which use libgcc tend to use low level unwind functions 6Some packages which use libgcc tend to use low level unwind functions
7too, and they are missing in compiler-rt but provided by llvm libunwind 7too, and they are missing in compiler-rt but provided by llvm libunwind
@@ -12,7 +12,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 1 file changed, 6 insertions(+) 12 1 file changed, 6 insertions(+)
13 13
14diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp 14diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
15index d7e316befa6..72226dd09ce 100644 15index d7e316befa6..5f6b24e33eb 100644
16--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp 16--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
17+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp 17+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
18@@ -1191,6 +1191,12 @@ void tools::AddRunTimeLibs(const ToolChain &TC, const Driver &D, 18@@ -1191,6 +1191,12 @@ void tools::AddRunTimeLibs(const ToolChain &TC, const Driver &D,
@@ -20,7 +20,7 @@ index d7e316befa6..72226dd09ce 100644
20 case ToolChain::RLT_CompilerRT: 20 case ToolChain::RLT_CompilerRT:
21 CmdArgs.push_back(TC.getCompilerRTArgString(Args, "builtins")); 21 CmdArgs.push_back(TC.getCompilerRTArgString(Args, "builtins"));
22+ CmdArgs.push_back("--as-needed"); 22+ CmdArgs.push_back("--as-needed");
23+ CmdArgs.push_back("-lunwind"); 23+ CmdArgs.push_back("-l:libunwind.a");
24+ CmdArgs.push_back("-lpthread"); 24+ CmdArgs.push_back("-lpthread");
25+ CmdArgs.push_back("-ldl"); 25+ CmdArgs.push_back("-ldl");
26+ CmdArgs.push_back("--no-as-needed"); 26+ CmdArgs.push_back("--no-as-needed");
diff --git a/recipes-devtools/clang/clang/0009-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0011-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
index 793fbaf..0316f79 100644
--- a/recipes-devtools/clang/clang/0009-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
+++ b/recipes-devtools/clang/clang/0011-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
@@ -1,7 +1,7 @@
1From da9fe6d6a6160b7eaeef22dff38bbb3f17f26822 Mon Sep 17 00:00:00 2001 1From 4c6422fe53445384c1d9289000cc4c3c7f16e378 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 21 May 2016 00:33:20 +0000 3Date: Sat, 21 May 2016 00:33:20 +0000
4Subject: [PATCH 09/15] llvm: TargetLibraryInfo: Undefine libc functions if 4Subject: [PATCH 11/18] llvm: TargetLibraryInfo: Undefine libc functions if
5 they are macros 5 they are macros
6 6
7musl defines some functions as macros and not inline functions 7musl defines some functions as macros and not inline functions
diff --git a/recipes-devtools/clang/clang/0010-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0012-llvm-allow-env-override-of-exe-path.patch
index c28da3c..85d4c85 100644
--- a/recipes-devtools/clang/clang/0010-llvm-allow-env-override-of-exe-path.patch
+++ b/recipes-devtools/clang/clang/0012-llvm-allow-env-override-of-exe-path.patch
@@ -1,7 +1,7 @@
1From 2af0752ca682d14984aac80e1b84a79b9fa69fb9 Mon Sep 17 00:00:00 2001 1From 765b7c57c6102d1b1c7fad2e8cd1be78a4a32960 Mon Sep 17 00:00:00 2001
2From: Martin Kelly <mkelly@xevo.com> 2From: Martin Kelly <mkelly@xevo.com>
3Date: Fri, 19 May 2017 00:22:57 -0700 3Date: Fri, 19 May 2017 00:22:57 -0700
4Subject: [PATCH 10/15] llvm: allow env override of exe path 4Subject: [PATCH 12/18] llvm: allow env override of exe path
5 5
6When using a native llvm-config from inside a sysroot, we need llvm-config to 6When using a native llvm-config from inside a sysroot, we need llvm-config to
7return the libraries, include directories, etc. from inside the sysroot rather 7return the libraries, include directories, etc. from inside the sysroot rather
diff --git a/recipes-devtools/clang/clang/0017-llvm-AARCH64-Add-support-for-.dword-directives.patch b/recipes-devtools/clang/clang/0013-llvm-AARCH64-Add-support-for-.dword-directives.patch
index 4ac102d..542658b 100644
--- a/recipes-devtools/clang/clang/0017-llvm-AARCH64-Add-support-for-.dword-directives.patch
+++ b/recipes-devtools/clang/clang/0013-llvm-AARCH64-Add-support-for-.dword-directives.patch
@@ -1,7 +1,7 @@
1From 2c85adc50b677e9094932828aa7a51affde892fb Mon Sep 17 00:00:00 2001 1From f55e2d5f21917bca619db7aabffd9488748c8165 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 31 Jan 2019 10:53:22 -0800 3Date: Thu, 31 Jan 2019 10:53:22 -0800
4Subject: [PATCH] llvm: [AARCH64] Add support for .dword directives 4Subject: [PATCH 13/18] llvm: [AARCH64] Add support for .dword directives
5 5
6This directives is supported in GNU assembler, Add support via addAliasForDirective. 6This directives is supported in GNU assembler, Add support via addAliasForDirective.
7Add a testcase to check for data directives 7Add a testcase to check for data directives
diff --git a/recipes-devtools/clang/clang/0011-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/recipes-devtools/clang/clang/0014-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch
index 737a053..980af36 100644
--- a/recipes-devtools/clang/clang/0011-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch
+++ b/recipes-devtools/clang/clang/0014-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch
@@ -1,7 +1,7 @@
1From 61d80370805142f531059d3ea58f363aadd1ff06 Mon Sep 17 00:00:00 2001 1From 392b59a684640eb000dbc4f89dcec44f8e3b4600 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 22 May 2017 17:36:16 -0700 3Date: Mon, 22 May 2017 17:36:16 -0700
4Subject: [PATCH 11/15] lldb: Add -lxml2 to linker cmdline of xml is found 4Subject: [PATCH 14/18] lldb: Add -lxml2 to linker cmdline of xml is found
5 5
6When cross compiling for systems where static libs 6When cross compiling for systems where static libs
7for libxml are not available cmake's detection mechanism 7for libxml are not available cmake's detection mechanism
diff --git a/recipes-devtools/clang/clang/0012-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0015-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch
index 92fe682..7ea17e4 100644
--- a/recipes-devtools/clang/clang/0012-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch
+++ b/recipes-devtools/clang/clang/0015-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch
@@ -1,7 +1,7 @@
1From 058935ad2f27735cedf838b82a8a2d7d1883ab5f Mon Sep 17 00:00:00 2001 1From da86f4425f23511b6af49b10c532a9c7788017a9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 27 Aug 2017 10:37:49 -0700 3Date: Sun, 27 Aug 2017 10:37:49 -0700
4Subject: [PATCH 12/15] libcxxabi: Find libunwind headers when 4Subject: [PATCH 15/18] libcxxabi: Find libunwind headers when
5 LIBCXXABI_LIBUNWIND_INCLUDES is set 5 LIBCXXABI_LIBUNWIND_INCLUDES is set
6 6
7Currently, when LIBCXXABI_LIBUNWIND_INCLUDES is set via CMake arguments 7Currently, when LIBCXXABI_LIBUNWIND_INCLUDES is set via CMake arguments
diff --git a/recipes-devtools/clang/clang/0013-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0016-compiler-rt-support-a-new-embedded-linux-target.patch
index 8951241..0c93b47 100644
--- a/recipes-devtools/clang/clang/0013-compiler-rt-support-a-new-embedded-linux-target.patch
+++ b/recipes-devtools/clang/clang/0016-compiler-rt-support-a-new-embedded-linux-target.patch
@@ -1,7 +1,7 @@
1From b56bc6f9b522b0359cb09e73d719622990dd2c38 Mon Sep 17 00:00:00 2001 1From 6c509374a016e149c06d7cf8db6032864197f89c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 19 Apr 2015 15:16:23 -0700 3Date: Sun, 19 Apr 2015 15:16:23 -0700
4Subject: [PATCH 13/15] compiler-rt: support a new embedded linux target 4Subject: [PATCH 16/18] compiler-rt: support a new embedded linux target
5 5
6Signed-off-by: Khem Raj <raj.khem@gmail.com> 6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7--- 7---
diff --git a/recipes-devtools/clang/clang/0014-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/recipes-devtools/clang/clang/0017-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch
index 40168b0..d7d57f7 100644
--- a/recipes-devtools/clang/clang/0014-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch
+++ b/recipes-devtools/clang/clang/0017-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch
@@ -1,7 +1,7 @@
1From a010673fd33c7311763620cf62159993255bb559 Mon Sep 17 00:00:00 2001 1From bdd021f901d8bc4ed9f09fa53902674e1517662c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 May 2016 23:11:45 -0700 3Date: Thu, 19 May 2016 23:11:45 -0700
4Subject: [PATCH 14/15] compiler-rt: Simplify cross-compilation. Don't use 4Subject: [PATCH 17/18] compiler-rt: Simplify cross-compilation. Don't use
5 native-compiled llvm-config. 5 native-compiled llvm-config.
6 6
7 Note: AddLLVM.cmake does not expose the LLVM source directory. 7 Note: AddLLVM.cmake does not expose the LLVM source directory.
diff --git a/recipes-devtools/clang/clang/0015-compiler-rt-Disable-tsan-on-OE-glibc.patch b/recipes-devtools/clang/clang/0018-compiler-rt-Disable-tsan-on-OE-glibc.patch
index f6a8743..4c64d04 100644
--- a/recipes-devtools/clang/clang/0015-compiler-rt-Disable-tsan-on-OE-glibc.patch
+++ b/recipes-devtools/clang/clang/0018-compiler-rt-Disable-tsan-on-OE-glibc.patch
@@ -1,7 +1,7 @@
1From e166d4e3568de2718b687c046b1d8b89504d1451 Mon Sep 17 00:00:00 2001 1From 4a9f02d94f311a866b663d5ff163bbea8fde490e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 18 Jul 2016 08:05:02 +0000 3Date: Mon, 18 Jul 2016 08:05:02 +0000
4Subject: [PATCH 15/15] compiler-rt: Disable tsan on OE/glibc 4Subject: [PATCH 18/18] compiler-rt: Disable tsan on OE/glibc
5 5
6It does not build see 6It does not build see
7http://lists.llvm.org/pipermail/llvm-dev/2016-July/102235.html 7http://lists.llvm.org/pipermail/llvm-dev/2016-July/102235.html
@@ -13,10 +13,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 2 files changed, 1 insertion(+), 2 deletions(-) 13 2 files changed, 1 insertion(+), 2 deletions(-)
14 14
15diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake 15diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
16index db5c4645dc0..83ebc95fc98 100644 16index 5b943387717..151b6069e16 100644
17--- a/compiler-rt/cmake/config-ix.cmake 17--- a/compiler-rt/cmake/config-ix.cmake
18+++ b/compiler-rt/cmake/config-ix.cmake 18+++ b/compiler-rt/cmake/config-ix.cmake
19@@ -593,7 +593,7 @@ else() 19@@ -594,7 +594,7 @@ else()
20 endif() 20 endif()
21 21
22 if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND 22 if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc
index 65589f9..f2c5d74 100644
--- a/recipes-devtools/clang/common.inc
+++ b/recipes-devtools/clang/common.inc
@@ -8,24 +8,24 @@ LICENSE = "NCSA"
8BASEURI ??= "${LLVM_GIT}/llvm-project;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH}" 8BASEURI ??= "${LLVM_GIT}/llvm-project;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH}"
9SRC_URI = "\ 9SRC_URI = "\
10 ${BASEURI} \ 10 ${BASEURI} \
11 ${@'file://0000-clang-Enable-SSP-and-PIE-by-default.patch' if '${GCCPIE}' else ''} \ 11 ${@'file://0001-clang-Enable-SSP-and-PIE-by-default.patch' if '${GCCPIE}' else ''} \
12 file://0001-clang-driver-Use-lib-for-ldso-on-OE.patch \ 12 file://0002-clang-driver-Use-lib-for-ldso-on-OE.patch \
13 file://0002-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch \ 13 file://0003-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch \
14 file://0003-clang-musl-ppc-does-not-support-128-bit-long-double.patch \ 14 file://0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch \
15 file://0004-clang-Prepend-trailing-to-sysroot.patch \ 15 file://0005-clang-Prepend-trailing-to-sysroot.patch \
16 file://0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch \ 16 file://0006-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch \
17 file://0006-clang-Define-releative-gcc-installation-dir.patch \ 17 file://0007-clang-Define-releative-gcc-installation-dir.patch \
18 file://0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch \ 18 file://0008-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch \
19 file://0008-clang-scan-view-needs-python-2.x.patch \ 19 file://0009-clang-scan-view-needs-python-2.x.patch \
20 file://0009-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ 20 file://0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch \
21 file://0010-llvm-allow-env-override-of-exe-path.patch \ 21 file://0011-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \
22 file://0011-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch \ 22 file://0012-llvm-allow-env-override-of-exe-path.patch \
23 file://0012-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \ 23 file://0013-llvm-AARCH64-Add-support-for-.dword-directives.patch \
24 file://0013-compiler-rt-support-a-new-embedded-linux-target.patch \ 24 file://0014-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch \
25 file://0014-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch \ 25 file://0015-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \
26 file://0015-compiler-rt-Disable-tsan-on-OE-glibc.patch \ 26 file://0016-compiler-rt-support-a-new-embedded-linux-target.patch \
27 file://0016-clang-Append-libunwind-to-compiler-rt-for-linking.patch \ 27 file://0017-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch \
28 file://0017-llvm-AARCH64-Add-support-for-.dword-directives.patch \ 28 file://0018-compiler-rt-Disable-tsan-on-OE-glibc.patch \
29" 29"
30 30
31# Fallback to no-PIE if not set 31# Fallback to no-PIE if not set