summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-01-27 13:36:19 -0800
committerKhem Raj <raj.khem@gmail.com>2018-01-27 14:08:32 -0800
commitd1f09ba88a5add3bd9ac7a7c84ac5159217a6d3b (patch)
treecf592e1929315b4e192525387c440e63764690de
parent9209b9d3e087dc5ebf44b72b621c29d5505f1aab (diff)
downloadmeta-clang-d1f09ba88a5add3bd9ac7a7c84ac5159217a6d3b.tar.gz
clang: Upgrade to upcoming 6.0 release branches
clang 6.0 is upcoming release, its already in RC phases Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-devtools/clang/clang.inc22
-rw-r--r--recipes-devtools/clang/clang/0001-clang-driver-Use-lib-for-ldso-on-OE.patch14
-rw-r--r--recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch10
-rw-r--r--recipes-devtools/clang/clang/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch20
-rw-r--r--recipes-devtools/clang/clang/0002-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch10
-rw-r--r--recipes-devtools/clang/clang/0002-llvm-allow-env-override-of-exe-path.patch4
-rw-r--r--recipes-devtools/clang/clang/0003-clang-musl-ppc-does-not-support-128-bit-long-double.patch18
-rw-r--r--recipes-devtools/clang/clang/0003-llvm-ARM-Use-correct-calling-convention-for-libm.patch152
-rw-r--r--recipes-devtools/clang/clang/0004-clang-Prepend-trailing-to-sysroot.patch8
-rw-r--r--recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch20
-rw-r--r--recipes-devtools/clang/clang/0006-clang-Define-releative-gcc-installation-dir.patch17
-rw-r--r--recipes-devtools/clang/clang/0007-clang-Enable-SSP-and-PIE-by-default.patch95
-rw-r--r--recipes-devtools/clang/clang/0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch (renamed from recipes-devtools/clang/clang/0008-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch)23
-rw-r--r--recipes-devtools/clang/clang/0008-clang-Default-to-gnu-14-for-c-standard.patch28
-rw-r--r--recipes-devtools/clang/common.inc7
-rw-r--r--recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch10
-rw-r--r--recipes-devtools/clang/compiler-rt/0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch10
-rw-r--r--recipes-devtools/clang/compiler-rt/0003-Disable-tsan-on-OE-glibc.patch20
-rw-r--r--recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch10
-rw-r--r--recipes-devtools/clang/compiler-rt/0005-Pass-march-armv8.1-a-instead-of-mcrc.patch19
-rw-r--r--recipes-devtools/clang/lldb/0001-Include-limits.h-for-PATH_MAX-definition.patch8
-rw-r--r--recipes-devtools/clang/lldb/0002-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch (renamed from recipes-devtools/clang/lldb/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch)14
-rw-r--r--recipes-devtools/clang/lldb_git.bb2
23 files changed, 135 insertions, 406 deletions
diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc
index a3f8045..f2ad0bc 100644
--- a/recipes-devtools/clang/clang.inc
+++ b/recipes-devtools/clang/clang.inc
@@ -7,19 +7,19 @@ LLVM_GIT_PROTOCOL ?= "git"
7# 7#
8# Uncomment below to enable master version of clang/llvm 8# Uncomment below to enable master version of clang/llvm
9# 9#
10MAJOR_VER="5" 10MAJOR_VER="6"
11MINOR_VER="0" 11MINOR_VER="0"
12PATCH_VER="1" 12PATCH_VER="0"
13PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" 13PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}"
14BRANCH = "release_50" 14BRANCH = "release_60"
15SRCREV_llvm = "1368f4044e62cad4316da638d919a93fd3ac3fe6" 15SRCREV_llvm = "f1286127b73c0d81ced8595af62e78ed703ced8b"
16SRCREV_clang = "9fc5dfce8e15fd7b3ffe657278c045ee5471d26f" 16SRCREV_clang = "abf562a42defe561f4286a55b795369782c8a1a0"
17SRCREV_compiler-rt = "4b38c4038a4f2b8e2d02b5f5d7877fa79d940009" 17SRCREV_compiler-rt = "bd2cfdd1fa03adb7fb366da3842c75016af71101"
18SRCREV_cxxabi = "5df6b5da0deba63bbf9046bcaa385241c4d72847" 18SRCREV_cxxabi = "9245d481eb3e890f708ff2d7dadf2a10c04748ba"
19SRCREV_libcxx = "598ae4fa2e4da8b0a4b839c8c26b6cd3f672a968" 19SRCREV_libcxx = "d6e2b16376f19b09127324d4f5c2f8e6ce635687"
20SRCREV_libunwind = "29d162446817bbd4847f6e291f4eb36252ae3173" 20SRCREV_libunwind = "68c1bfc35687033aad28657404b80b1d558a4804"
21SRCREV_lld = "ac8b85009855899ae8daf1ba40e2447a904b8305" 21SRCREV_lld = "a4e0f76208b2d56ee4b92735bf28275f8d5ff819"
22SRCREV_lldb = "c9b520a36641d09f00c7ee079353a1af19e4c707" 22SRCREV_lldb = "19e7bfe182cd17761d08325a988b1c4238ad9aa9"
23SRCREV_openmp = "1333cd34fa88de8461c0dbd2fbd439321073a334" 23SRCREV_openmp = "1333cd34fa88de8461c0dbd2fbd439321073a334"
24 24
25LLVMMD5SUM = "e825e017edc35cfd58e26116e5251771" 25LLVMMD5SUM = "e825e017edc35cfd58e26116e5251771"
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
index 06f3b9e..e1da8f8 100644
--- 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
@@ -1,7 +1,7 @@
1From 40c82edf60ec3ee7f62b9029856f9eee8a81ae2e Mon Sep 17 00:00:00 2001 1From fa869f4c31bf70694014d24f7b50623aa6247f47 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 1/6] clang: driver: Use /lib for ldso on OE 4Subject: [PATCH 1/7] 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,10 +15,10 @@ 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/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp 17diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
18index 50443a1252..4865ec99da 100644 18index 1301cdf114..d59512627d 100644
19--- a/lib/Driver/ToolChains/Linux.cpp 19--- a/lib/Driver/ToolChains/Linux.cpp
20+++ b/lib/Driver/ToolChains/Linux.cpp 20+++ b/lib/Driver/ToolChains/Linux.cpp
21@@ -540,12 +540,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 21@@ -502,12 +502,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
22 Loader = "ld.so.1"; 22 Loader = "ld.so.1";
23 break; 23 break;
24 case llvm::Triple::ppc64: 24 case llvm::Triple::ppc64:
@@ -33,7 +33,7 @@ index 50443a1252..4865ec99da 100644
33 Loader = 33 Loader =
34 (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; 34 (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2";
35 break; 35 break;
36@@ -555,7 +555,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 36@@ -517,7 +517,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
37 Loader = "ld-linux.so.2"; 37 Loader = "ld-linux.so.2";
38 break; 38 break;
39 case llvm::Triple::sparcv9: 39 case llvm::Triple::sparcv9:
@@ -42,7 +42,7 @@ index 50443a1252..4865ec99da 100644
42 Loader = "ld-linux.so.2"; 42 Loader = "ld-linux.so.2";
43 break; 43 break;
44 case llvm::Triple::systemz: 44 case llvm::Triple::systemz:
45@@ -569,7 +569,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 45@@ -531,7 +531,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
46 case llvm::Triple::x86_64: { 46 case llvm::Triple::x86_64: {
47 bool X32 = Triple.getEnvironment() == llvm::Triple::GNUX32; 47 bool X32 = Triple.getEnvironment() == llvm::Triple::GNUX32;
48 48
@@ -52,5 +52,5 @@ index 50443a1252..4865ec99da 100644
52 break; 52 break;
53 } 53 }
54-- 54--
552.13.0 552.16.1
56 56
diff --git a/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch
index ed0e9ef..88702bc 100644
--- a/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch
+++ b/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch
@@ -1,4 +1,4 @@
1From ad79d6051f2c4299b7b286d5a60e2aa1b9a92898 Mon Sep 17 00:00:00 2001 1From 38ec6e5550b9f50a7393182b48c5c26cad4d541f 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] libcxxabi: Find libunwind headers when 4Subject: [PATCH] libcxxabi: Find libunwind headers when
@@ -17,10 +17,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
17 1 file changed, 11 insertions(+), 10 deletions(-) 17 1 file changed, 11 insertions(+), 10 deletions(-)
18 18
19diff --git a/CMakeLists.txt b/CMakeLists.txt 19diff --git a/CMakeLists.txt b/CMakeLists.txt
20index 4db3328..29cba1a 100644 20index 1adbdb3..ba4e9d7 100644
21--- a/CMakeLists.txt 21--- a/CMakeLists.txt
22+++ b/CMakeLists.txt 22+++ b/CMakeLists.txt
23@@ -402,15 +402,10 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") 23@@ -409,15 +409,10 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}")
24 # Setup Source Code 24 # Setup Source Code
25 #=============================================================================== 25 #===============================================================================
26 26
@@ -37,7 +37,7 @@ index 4db3328..29cba1a 100644
37 libunwind.h 37 libunwind.h
38 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} 38 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES}
39 ${LIBCXXABI_LIBUNWIND_PATH}/include 39 ${LIBCXXABI_LIBUNWIND_PATH}/include
40@@ -420,15 +415,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) 40@@ -427,15 +422,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM)
41 NO_DEFAULT_PATH 41 NO_DEFAULT_PATH
42 ) 42 )
43 43
@@ -64,5 +64,5 @@ index 4db3328..29cba1a 100644
64 # soname, etc... 64 # soname, etc...
65 add_subdirectory(src) 65 add_subdirectory(src)
66-- 66--
672.14.1 672.16.1
68 68
diff --git a/recipes-devtools/clang/clang/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
index cb047ea..4f6ed94 100644
--- a/recipes-devtools/clang/clang/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
+++ b/recipes-devtools/clang/clang/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
@@ -1,4 +1,4 @@
1From 28293e48cf1a52004c6a78de448718441f9e05f9 Mon Sep 17 00:00:00 2001 1From 96558c4f25d5132936014f6f2d6252cfdfdf478a 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 1/2] llvm: TargetLibraryInfo: Undefine libc functions if they 4Subject: [PATCH 1/2] llvm: TargetLibraryInfo: Undefine libc functions if they
@@ -13,10 +13,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 1 file changed, 21 insertions(+) 13 1 file changed, 21 insertions(+)
14 14
15diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def 15diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def
16index 9cbe917c146..aff8419cf54 100644 16index a461ed813b9..f9fd9faeee0 100644
17--- a/include/llvm/Analysis/TargetLibraryInfo.def 17--- a/include/llvm/Analysis/TargetLibraryInfo.def
18+++ b/include/llvm/Analysis/TargetLibraryInfo.def 18+++ b/include/llvm/Analysis/TargetLibraryInfo.def
19@@ -656,6 +656,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") 19@@ -665,6 +665,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl")
20 TLI_DEFINE_ENUM_INTERNAL(fopen) 20 TLI_DEFINE_ENUM_INTERNAL(fopen)
21 TLI_DEFINE_STRING_INTERNAL("fopen") 21 TLI_DEFINE_STRING_INTERNAL("fopen")
22 /// FILE *fopen64(const char *filename, const char *opentype) 22 /// FILE *fopen64(const char *filename, const char *opentype)
@@ -26,7 +26,7 @@ index 9cbe917c146..aff8419cf54 100644
26 TLI_DEFINE_ENUM_INTERNAL(fopen64) 26 TLI_DEFINE_ENUM_INTERNAL(fopen64)
27 TLI_DEFINE_STRING_INTERNAL("fopen64") 27 TLI_DEFINE_STRING_INTERNAL("fopen64")
28 /// int fprintf(FILE *stream, const char *format, ...); 28 /// int fprintf(FILE *stream, const char *format, ...);
29@@ -691,6 +694,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek") 29@@ -700,6 +703,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek")
30 /// int fseeko(FILE *stream, off_t offset, int whence); 30 /// int fseeko(FILE *stream, off_t offset, int whence);
31 TLI_DEFINE_ENUM_INTERNAL(fseeko) 31 TLI_DEFINE_ENUM_INTERNAL(fseeko)
32 TLI_DEFINE_STRING_INTERNAL("fseeko") 32 TLI_DEFINE_STRING_INTERNAL("fseeko")
@@ -36,7 +36,7 @@ index 9cbe917c146..aff8419cf54 100644
36 /// int fseeko64(FILE *stream, off64_t offset, int whence) 36 /// int fseeko64(FILE *stream, off64_t offset, int whence)
37 TLI_DEFINE_ENUM_INTERNAL(fseeko64) 37 TLI_DEFINE_ENUM_INTERNAL(fseeko64)
38 TLI_DEFINE_STRING_INTERNAL("fseeko64") 38 TLI_DEFINE_STRING_INTERNAL("fseeko64")
39@@ -701,6 +707,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos") 39@@ -710,6 +716,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos")
40 TLI_DEFINE_ENUM_INTERNAL(fstat) 40 TLI_DEFINE_ENUM_INTERNAL(fstat)
41 TLI_DEFINE_STRING_INTERNAL("fstat") 41 TLI_DEFINE_STRING_INTERNAL("fstat")
42 /// int fstat64(int filedes, struct stat64 *buf) 42 /// int fstat64(int filedes, struct stat64 *buf)
@@ -46,7 +46,7 @@ index 9cbe917c146..aff8419cf54 100644
46 TLI_DEFINE_ENUM_INTERNAL(fstat64) 46 TLI_DEFINE_ENUM_INTERNAL(fstat64)
47 TLI_DEFINE_STRING_INTERNAL("fstat64") 47 TLI_DEFINE_STRING_INTERNAL("fstat64")
48 /// int fstatvfs(int fildes, struct statvfs *buf); 48 /// int fstatvfs(int fildes, struct statvfs *buf);
49@@ -716,6 +725,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell") 49@@ -725,6 +734,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell")
50 TLI_DEFINE_ENUM_INTERNAL(ftello) 50 TLI_DEFINE_ENUM_INTERNAL(ftello)
51 TLI_DEFINE_STRING_INTERNAL("ftello") 51 TLI_DEFINE_STRING_INTERNAL("ftello")
52 /// off64_t ftello64(FILE *stream) 52 /// off64_t ftello64(FILE *stream)
@@ -56,7 +56,7 @@ index 9cbe917c146..aff8419cf54 100644
56 TLI_DEFINE_ENUM_INTERNAL(ftello64) 56 TLI_DEFINE_ENUM_INTERNAL(ftello64)
57 TLI_DEFINE_STRING_INTERNAL("ftello64") 57 TLI_DEFINE_STRING_INTERNAL("ftello64")
58 /// int ftrylockfile(FILE *file); 58 /// int ftrylockfile(FILE *file);
59@@ -836,6 +848,9 @@ TLI_DEFINE_STRING_INTERNAL("logl") 59@@ -845,6 +857,9 @@ TLI_DEFINE_STRING_INTERNAL("logl")
60 TLI_DEFINE_ENUM_INTERNAL(lstat) 60 TLI_DEFINE_ENUM_INTERNAL(lstat)
61 TLI_DEFINE_STRING_INTERNAL("lstat") 61 TLI_DEFINE_STRING_INTERNAL("lstat")
62 /// int lstat64(const char *path, struct stat64 *buf); 62 /// int lstat64(const char *path, struct stat64 *buf);
@@ -66,7 +66,7 @@ index 9cbe917c146..aff8419cf54 100644
66 TLI_DEFINE_ENUM_INTERNAL(lstat64) 66 TLI_DEFINE_ENUM_INTERNAL(lstat64)
67 TLI_DEFINE_STRING_INTERNAL("lstat64") 67 TLI_DEFINE_STRING_INTERNAL("lstat64")
68 /// void *malloc(size_t size); 68 /// void *malloc(size_t size);
69@@ -1055,6 +1070,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") 69@@ -1064,6 +1079,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf")
70 TLI_DEFINE_ENUM_INTERNAL(stat) 70 TLI_DEFINE_ENUM_INTERNAL(stat)
71 TLI_DEFINE_STRING_INTERNAL("stat") 71 TLI_DEFINE_STRING_INTERNAL("stat")
72 /// int stat64(const char *path, struct stat64 *buf); 72 /// int stat64(const char *path, struct stat64 *buf);
@@ -76,7 +76,7 @@ index 9cbe917c146..aff8419cf54 100644
76 TLI_DEFINE_ENUM_INTERNAL(stat64) 76 TLI_DEFINE_ENUM_INTERNAL(stat64)
77 TLI_DEFINE_STRING_INTERNAL("stat64") 77 TLI_DEFINE_STRING_INTERNAL("stat64")
78 /// int statvfs(const char *path, struct statvfs *buf); 78 /// int statvfs(const char *path, struct statvfs *buf);
79@@ -1184,6 +1202,9 @@ TLI_DEFINE_STRING_INTERNAL("times") 79@@ -1193,6 +1211,9 @@ TLI_DEFINE_STRING_INTERNAL("times")
80 TLI_DEFINE_ENUM_INTERNAL(tmpfile) 80 TLI_DEFINE_ENUM_INTERNAL(tmpfile)
81 TLI_DEFINE_STRING_INTERNAL("tmpfile") 81 TLI_DEFINE_STRING_INTERNAL("tmpfile")
82 /// FILE *tmpfile64(void) 82 /// FILE *tmpfile64(void)
@@ -87,5 +87,5 @@ index 9cbe917c146..aff8419cf54 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--
902.13.1 902.16.1
91 91
diff --git a/recipes-devtools/clang/clang/0002-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 8792a51..b3189d5 100644
--- a/recipes-devtools/clang/clang/0002-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 @@
1From 94d3e80a88c58043bd22d7aafbfcb0579c8356e7 Mon Sep 17 00:00:00 2001 1From 1d96d952f5c293847a405d3566011e015aaa0e88 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 2/6] clang: Driver/tools.cpp: Add -lssp and -lssp_nonshared on 4Subject: [PATCH 2/7] clang: Driver/tools.cpp: Add -lssp and -lssp_nonshared on
5 musl 5 musl
6 6
7musl driver will need to add ssp libraries to linker cmdline 7musl 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
15diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp 15diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
16index f1015e62ee..1843150b45 100644 16index 7845781f12..802d2e4e4f 100644
17--- a/lib/Driver/ToolChains/Gnu.cpp 17--- a/lib/Driver/ToolChains/Gnu.cpp
18+++ b/lib/Driver/ToolChains/Gnu.cpp 18+++ b/lib/Driver/ToolChains/Gnu.cpp
19@@ -609,6 +609,13 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, 19@@ -518,6 +518,13 @@ void tools::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
@@ -31,5 +31,5 @@ index f1015e62ee..1843150b45 100644
31 CmdArgs.push_back("--end-group"); 31 CmdArgs.push_back("--end-group");
32 else 32 else
33-- 33--
342.13.0 342.16.1
35 35
diff --git a/recipes-devtools/clang/clang/0002-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0002-llvm-allow-env-override-of-exe-path.patch
index 6864bcd..256e332 100644
--- a/recipes-devtools/clang/clang/0002-llvm-allow-env-override-of-exe-path.patch
+++ b/recipes-devtools/clang/clang/0002-llvm-allow-env-override-of-exe-path.patch
@@ -1,4 +1,4 @@
1From d776487bac17650704614248d19d1e6b35775001 Mon Sep 17 00:00:00 2001 1From 2f8ea767afdaa440c6368040630e1b3ea6a0977a 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 2/2] llvm: allow env override of exe path 4Subject: [PATCH 2/2] llvm: allow env override of exe path
@@ -33,5 +33,5 @@ index 08b096afb05..d8d7742744e 100644
33 // allow taking the address of ::main however. 33 // allow taking the address of ::main however.
34 void *P = (void *)(intptr_t)GetExecutablePath; 34 void *P = (void *)(intptr_t)GetExecutablePath;
35-- 35--
362.13.1 362.16.1
37 37
diff --git a/recipes-devtools/clang/clang/0003-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 3c52b40..c5fff97 100644
--- a/recipes-devtools/clang/clang/0003-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,18 +1,18 @@
1From b6c1b462d2b08726a4dbce717012e3c52f447906 Mon Sep 17 00:00:00 2001 1From e12b563d7e5ff427e889f18f035e9b433a578d5f 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 3/6] clang: musl/ppc does not support 128-bit long double 4Subject: [PATCH 3/7] 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---
8 lib/Basic/Targets.cpp | 3 ++- 8 lib/Basic/Targets/PPC.h | 3 ++-
9 1 file changed, 2 insertions(+), 1 deletion(-) 9 1 file changed, 2 insertions(+), 1 deletion(-)
10 10
11diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp 11diff --git a/lib/Basic/Targets/PPC.h b/lib/Basic/Targets/PPC.h
12index 1b9fbed177..d0a2ca6997 100644 12index 04bef258e3..0ae210698a 100644
13--- a/lib/Basic/Targets.cpp 13--- a/lib/Basic/Targets/PPC.h
14+++ b/lib/Basic/Targets.cpp 14+++ b/lib/Basic/Targets/PPC.h
15@@ -1693,7 +1693,8 @@ public: 15@@ -272,7 +272,8 @@ public:
16 break; 16 break;
17 } 17 }
18 18
@@ -23,5 +23,5 @@ index 1b9fbed177..d0a2ca6997 100644
23 LongDoubleFormat = &llvm::APFloat::IEEEdouble(); 23 LongDoubleFormat = &llvm::APFloat::IEEEdouble();
24 } 24 }
25-- 25--
262.13.0 262.16.1
27 27
diff --git a/recipes-devtools/clang/clang/0003-llvm-ARM-Use-correct-calling-convention-for-libm.patch b/recipes-devtools/clang/clang/0003-llvm-ARM-Use-correct-calling-convention-for-libm.patch
deleted file mode 100644
index 131e062..0000000
--- a/recipes-devtools/clang/clang/0003-llvm-ARM-Use-correct-calling-convention-for-libm.patch
+++ /dev/null
@@ -1,152 +0,0 @@
1From 61a5983d8ba6eea3f535a33ab80374a5fe6b515b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 19 Sep 2017 12:37:23 -0700
4Subject: [PATCH 3/3] llvm: [ARM] Use correct calling convention for libm
5
6-mfloat-abi doesn't control the calling convention for compiler-rt: it's built with the compiler, so it can only have one calling convention for a given target. -mfloat-abi does control the calling convention for any function provided by libm: libm is built by the user, so the user should have control over its calling convention. See https://bugs.llvm.org/show_bug.cgi?id=30543 for previous discussion on the subject.
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 lib/Target/ARM/ARMISelLowering.cpp | 71 ++++++++++++++++++++++++++++++++++++
11 test/CodeGen/Thumb2/intrinsics-cc.ll | 25 ++++++++++++-
12 2 files changed, 94 insertions(+), 2 deletions(-)
13
14diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp
15index 27dda93387b..53ba8f4dd52 100644
16--- a/lib/Target/ARM/ARMISelLowering.cpp
17+++ b/lib/Target/ARM/ARMISelLowering.cpp
18@@ -225,6 +225,8 @@ ARMTargetLowering::ARMTargetLowering(const TargetMachine &TM,
19
20 if (!Subtarget->isTargetDarwin() && !Subtarget->isTargetIOS() &&
21 !Subtarget->isTargetWatchOS()) {
22+ // Most builtins have their calling convention determined by the
23+ // target (they don't vary with -float-abi).
24 const auto &E = Subtarget->getTargetTriple().getEnvironment();
25
26 bool IsHFTarget = E == Triple::EABIHF || E == Triple::GNUEABIHF ||
27@@ -238,6 +240,75 @@ ARMTargetLowering::ARMTargetLowering(const TargetMachine &TM,
28 setLibcallCallingConv(static_cast<RTLIB::Libcall>(LCID),
29 IsHFTarget ? CallingConv::ARM_AAPCS_VFP
30 : CallingConv::ARM_AAPCS);
31+
32+ // Builtins provided by libm have their calling convention determined by
33+ // -float-abi.
34+ bool IsHFMode = TM.Options.FloatABIType == FloatABI::Hard;
35+ CallingConv::ID LibmConv = IsHFMode ? CallingConv::ARM_AAPCS_VFP
36+ : CallingConv::ARM_AAPCS;
37+ setLibcallCallingConv(RTLIB::REM_F32, LibmConv);
38+ setLibcallCallingConv(RTLIB::REM_F64, LibmConv);
39+ setLibcallCallingConv(RTLIB::REM_F128, LibmConv);
40+ setLibcallCallingConv(RTLIB::FMA_F32, LibmConv);
41+ setLibcallCallingConv(RTLIB::FMA_F64, LibmConv);
42+ setLibcallCallingConv(RTLIB::FMA_F128, LibmConv);
43+ setLibcallCallingConv(RTLIB::SQRT_F32, LibmConv);
44+ setLibcallCallingConv(RTLIB::SQRT_F64, LibmConv);
45+ setLibcallCallingConv(RTLIB::SQRT_F128, LibmConv);
46+ setLibcallCallingConv(RTLIB::LOG_F32, LibmConv);
47+ setLibcallCallingConv(RTLIB::LOG_F64, LibmConv);
48+ setLibcallCallingConv(RTLIB::LOG_F128, LibmConv);
49+ setLibcallCallingConv(RTLIB::LOG2_F32, LibmConv);
50+ setLibcallCallingConv(RTLIB::LOG2_F64, LibmConv);
51+ setLibcallCallingConv(RTLIB::LOG2_F128, LibmConv);
52+ setLibcallCallingConv(RTLIB::LOG10_F32, LibmConv);
53+ setLibcallCallingConv(RTLIB::LOG10_F64, LibmConv);
54+ setLibcallCallingConv(RTLIB::LOG10_F128, LibmConv);
55+ setLibcallCallingConv(RTLIB::EXP_F32, LibmConv);
56+ setLibcallCallingConv(RTLIB::EXP_F64, LibmConv);
57+ setLibcallCallingConv(RTLIB::EXP_F128, LibmConv);
58+ setLibcallCallingConv(RTLIB::EXP2_F32, LibmConv);
59+ setLibcallCallingConv(RTLIB::EXP2_F64, LibmConv);
60+ setLibcallCallingConv(RTLIB::EXP2_F128, LibmConv);
61+ setLibcallCallingConv(RTLIB::SIN_F32, LibmConv);
62+ setLibcallCallingConv(RTLIB::SIN_F64, LibmConv);
63+ setLibcallCallingConv(RTLIB::SIN_F128, LibmConv);
64+ setLibcallCallingConv(RTLIB::COS_F32, LibmConv);
65+ setLibcallCallingConv(RTLIB::COS_F64, LibmConv);
66+ setLibcallCallingConv(RTLIB::COS_F128, LibmConv);
67+ setLibcallCallingConv(RTLIB::SINCOS_F32, LibmConv);
68+ setLibcallCallingConv(RTLIB::SINCOS_F64, LibmConv);
69+ setLibcallCallingConv(RTLIB::SINCOS_F128, LibmConv);
70+ setLibcallCallingConv(RTLIB::POW_F32, LibmConv);
71+ setLibcallCallingConv(RTLIB::POW_F64, LibmConv);
72+ setLibcallCallingConv(RTLIB::POW_F128, LibmConv);
73+ setLibcallCallingConv(RTLIB::CEIL_F32, LibmConv);
74+ setLibcallCallingConv(RTLIB::CEIL_F64, LibmConv);
75+ setLibcallCallingConv(RTLIB::CEIL_F128, LibmConv);
76+ setLibcallCallingConv(RTLIB::TRUNC_F32, LibmConv);
77+ setLibcallCallingConv(RTLIB::TRUNC_F64, LibmConv);
78+ setLibcallCallingConv(RTLIB::TRUNC_F128, LibmConv);
79+ setLibcallCallingConv(RTLIB::RINT_F32, LibmConv);
80+ setLibcallCallingConv(RTLIB::RINT_F64, LibmConv);
81+ setLibcallCallingConv(RTLIB::RINT_F128, LibmConv);
82+ setLibcallCallingConv(RTLIB::NEARBYINT_F32, LibmConv);
83+ setLibcallCallingConv(RTLIB::NEARBYINT_F64, LibmConv);
84+ setLibcallCallingConv(RTLIB::NEARBYINT_F128, LibmConv);
85+ setLibcallCallingConv(RTLIB::ROUND_F32, LibmConv);
86+ setLibcallCallingConv(RTLIB::ROUND_F64, LibmConv);
87+ setLibcallCallingConv(RTLIB::ROUND_F128, LibmConv);
88+ setLibcallCallingConv(RTLIB::FLOOR_F32, LibmConv);
89+ setLibcallCallingConv(RTLIB::FLOOR_F64, LibmConv);
90+ setLibcallCallingConv(RTLIB::FLOOR_F128, LibmConv);
91+ setLibcallCallingConv(RTLIB::COPYSIGN_F32, LibmConv);
92+ setLibcallCallingConv(RTLIB::COPYSIGN_F64, LibmConv);
93+ setLibcallCallingConv(RTLIB::COPYSIGN_F128, LibmConv);
94+ setLibcallCallingConv(RTLIB::FMIN_F32, LibmConv);
95+ setLibcallCallingConv(RTLIB::FMIN_F64, LibmConv);
96+ setLibcallCallingConv(RTLIB::FMIN_F128, LibmConv);
97+ setLibcallCallingConv(RTLIB::FMAX_F32, LibmConv);
98+ setLibcallCallingConv(RTLIB::FMAX_F64, LibmConv);
99+ setLibcallCallingConv(RTLIB::FMAX_F128, LibmConv);
100 }
101
102 if (Subtarget->isTargetMachO()) {
103diff --git a/test/CodeGen/Thumb2/intrinsics-cc.ll b/test/CodeGen/Thumb2/intrinsics-cc.ll
104index ab5081e3ab9..3a3014fc919 100644
105--- a/test/CodeGen/Thumb2/intrinsics-cc.ll
106+++ b/test/CodeGen/Thumb2/intrinsics-cc.ll
107@@ -15,7 +15,7 @@
108
109 declare float @llvm.powi.f32(float, i32)
110
111-define float @f(float %f, i32 %i) {
112+define float @powi_f32(float %f, i32 %i) {
113 entry:
114 %0 = call float @llvm.powi.f32(float %f, i32 %i)
115 ret float %0
116@@ -28,7 +28,7 @@ entry:
117
118 declare double @llvm.powi.f64(double, i32)
119
120-define double @g(double %d, i32 %i) {
121+define double @powi_f64(double %d, i32 %i) {
122 entry:
123 %0 = call double @llvm.powi.f64(double %d, i32 %i)
124 ret double %0
125@@ -39,3 +39,24 @@ entry:
126 ; CHECK-TO-SOFT: vmov d0, r0, r1
127 ; CHECK-TO-HARD: vmov r0, r1, d0
128
129+declare float @llvm.floor.f32(float)
130+
131+define float @floor_f32(float %f) {
132+entry:
133+ %0 = call float @llvm.floor.f32(float %f)
134+ ret float %0
135+}
136+
137+; CHECK-MATCH: b floorf
138+; CHECK-MISMATCH: b floorf
139+
140+declare double @llvm.floor.f64(double)
141+
142+define double @floor_f64(double %d) {
143+entry:
144+ %0 = call double @llvm.floor.f64(double %d)
145+ ret double %0
146+}
147+
148+; CHECK-MATCH: b floor
149+; CHECK-MISMATCH: b floor
150--
1512.14.1
152
diff --git a/recipes-devtools/clang/clang/0004-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0004-clang-Prepend-trailing-to-sysroot.patch
index 50ce4d0..b0bd060 100644
--- a/recipes-devtools/clang/clang/0004-clang-Prepend-trailing-to-sysroot.patch
+++ b/recipes-devtools/clang/clang/0004-clang-Prepend-trailing-to-sysroot.patch
@@ -1,7 +1,7 @@
1From 3257464995af44e5baafa1d1dd80b79b6260754d Mon Sep 17 00:00:00 2001 1From 10d236bdc55bddde95d399931514b417f2c96284 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 4/6] clang: Prepend trailing '/' to sysroot 4Subject: [PATCH 4/7] 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/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp 26diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
27index 4865ec99da..719525ad7d 100644 27index d59512627d..624953b17f 100644
28--- a/lib/Driver/ToolChains/Linux.cpp 28--- a/lib/Driver/ToolChains/Linux.cpp
29+++ b/lib/Driver/ToolChains/Linux.cpp 29+++ b/lib/Driver/ToolChains/Linux.cpp
30@@ -193,7 +193,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) 30@@ -193,7 +193,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
@@ -37,5 +37,5 @@ index 4865ec99da..719525ad7d 100644
37 // Cross-compiling binutils and GCC installations (vanilla and openSUSE at 37 // Cross-compiling binutils and GCC installations (vanilla and openSUSE at
38 // least) put various tools in a triple-prefixed directory off of the parent 38 // least) put various tools in a triple-prefixed directory off of the parent
39-- 39--
402.13.0 402.16.1
41 41
diff --git a/recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch
index 14db1e6..7ec01cd 100644
--- a/recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch
+++ b/recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch
@@ -1,7 +1,7 @@
1From b47912e2304c1e3d3bca7e973037b859739aea15 Mon Sep 17 00:00:00 2001 1From d4121c0c5ad01dab4f3c35d4fc59ec92bdca36b7 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 5/6] clang: Look inside the target sysroot for compiler 4Subject: [PATCH 5/7] 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
@@ -16,7 +16,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
16 1 file changed, 5 insertions(+), 1 deletion(-) 16 1 file changed, 5 insertions(+), 1 deletion(-)
17 17
18diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp 18diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
19index 4f82503276..507e051afc 100644 19index f96a1182e3..d286622f8d 100644
20--- a/lib/Driver/ToolChain.cpp 20--- a/lib/Driver/ToolChain.cpp
21+++ b/lib/Driver/ToolChain.cpp 21+++ b/lib/Driver/ToolChain.cpp
22@@ -12,6 +12,7 @@ 22@@ -12,6 +12,7 @@
@@ -27,18 +27,18 @@ index 4f82503276..507e051afc 100644
27 #include "clang/Basic/VirtualFileSystem.h" 27 #include "clang/Basic/VirtualFileSystem.h"
28 #include "clang/Config/config.h" 28 #include "clang/Config/config.h"
29 #include "clang/Driver/Action.h" 29 #include "clang/Driver/Action.h"
30@@ -320,7 +321,10 @@ std::string ToolChain::getCompilerRT(const ArgList &Args, StringRef Component, 30@@ -324,7 +325,10 @@ static StringRef getArchNameForCompilerRTLib(const ToolChain &TC,
31 const char *Suffix = Shared ? (Triple.isOSWindows() ? ".dll" : ".so") 31 }
32 : (IsITANMSVCWindows ? ".lib" : ".a");
33 32
33 std::string ToolChain::getCompilerRTPath() const {
34- SmallString<128> Path(getDriver().ResourceDir); 34- SmallString<128> Path(getDriver().ResourceDir);
35+ SmallString<128> Path(getDriver().SysRoot); 35+ SmallString<128> Path(getDriver().SysRoot);
36+ StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX); 36+ StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX);
37+ llvm::sys::path::append(Path, "/usr/", Twine("lib") + ClangLibdirSuffix, "clang", 37+ llvm::sys::path::append(Path, "/usr/", Twine("lib") + ClangLibdirSuffix, "clang",
38+ CLANG_VERSION_STRING); 38+ CLANG_VERSION_STRING);
39 StringRef OSLibName = Triple.isOSFreeBSD() ? "freebsd" : getOS(); 39 if (Triple.isOSUnknown()) {
40 llvm::sys::path::append(Path, "lib", OSLibName); 40 llvm::sys::path::append(Path, "lib");
41 llvm::sys::path::append(Path, Prefix + Twine("clang_rt.") + Component + "-" + 41 } else {
42-- 42--
432.13.0 432.16.1
44 44
diff --git a/recipes-devtools/clang/clang/0006-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0006-clang-Define-releative-gcc-installation-dir.patch
index 473f610..755e8bb 100644
--- a/recipes-devtools/clang/clang/0006-clang-Define-releative-gcc-installation-dir.patch
+++ b/recipes-devtools/clang/clang/0006-clang-Define-releative-gcc-installation-dir.patch
@@ -1,7 +1,7 @@
1From b56c57ef523bed20dc9e9beb271667a85cf56478 Mon Sep 17 00:00:00 2001 1From 2dfc688d82a570bdcb8b512f91122e388db0684a 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 6/6] clang: Define / releative gcc installation dir 4Subject: [PATCH 6/7] 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
@@ -13,11 +13,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 lib/Driver/ToolChains/Gnu.cpp | 1 + 13 lib/Driver/ToolChains/Gnu.cpp | 1 +
14 1 file changed, 1 insertion(+) 14 1 file changed, 1 insertion(+)
15 15
16Index: clang/lib/Driver/ToolChains/Gnu.cpp 16diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
17=================================================================== 17index 802d2e4e4f..3b5c1f860e 100644
18--- clang.orig/lib/Driver/ToolChains/Gnu.cpp 18--- a/lib/Driver/ToolChains/Gnu.cpp
19+++ clang/lib/Driver/ToolChains/Gnu.cpp 19+++ b/lib/Driver/ToolChains/Gnu.cpp
20@@ -2101,6 +2101,7 @@ void Generic_GCC::GCCInstallationDetecto 20@@ -2071,6 +2071,7 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(
21 21
22 // Debian puts cross-compilers in gcc-cross. 22 // Debian puts cross-compilers in gcc-cross.
23 {"gcc-cross/" + CandidateTriple.str(), "../..", true}, 23 {"gcc-cross/" + CandidateTriple.str(), "../..", true},
@@ -25,3 +25,6 @@ Index: clang/lib/Driver/ToolChains/Gnu.cpp
25 25
26 // The Freescale PPC SDK has the gcc libraries in 26 // The Freescale PPC SDK has the gcc libraries in
27 // <sysroot>/usr/lib/<triple>/x.y.z so have a look there as well. Only do 27 // <sysroot>/usr/lib/<triple>/x.y.z so have a look there as well. Only do
28--
292.16.1
30
diff --git a/recipes-devtools/clang/clang/0007-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0007-clang-Enable-SSP-and-PIE-by-default.patch
deleted file mode 100644
index 481dd24..0000000
--- a/recipes-devtools/clang/clang/0007-clang-Enable-SSP-and-PIE-by-default.patch
+++ /dev/null
@@ -1,95 +0,0 @@
1From 013035de788d1e2e00a4238fb2fdd39591c5c009 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 29 Jul 2017 08:29:19 -0700
4Subject: [PATCH 7/7] clang: Enable SSP and PIE by default
5
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
8accordingly; only test/Driver/linux-ld.c has been marked as "expected
9failure" due to the number of changes it would require (mostly replacing
10crtbegin.o with crtbeginS.o).
11
12Doing so is needed in order to align clang with the new default GCC
13behavior in Arch which generates PIE executables by default and also
14defaults to -fstack-protector-strong. It is not meant to be a long term
15solution, but a simple temporary fix.
16
17Hopefully these changes will be obsoleted by the introduction upstream
18of a compile-time option (https://bugs.llvm.org/show_bug.cgi?id=13410)
19
20From: Evangelos Foutras <evangelos@foutrelis.com>
21
22https://git.archlinux.org/svntogit/packages.git/tree/trunk/0002-Enable-SSP-and-PIE-by-default.patch?h=packages/llvm
23
24Signed-off-by: Khem Raj <raj.khem@gmail.com>
25---
26 lib/Driver/ToolChains/FreeBSD.cpp | 1 +
27 lib/Driver/ToolChains/Gnu.cpp | 1 +
28 lib/Driver/ToolChains/Linux.cpp | 14 +++++++++++++-
29 lib/Driver/ToolChains/Linux.h | 1 +
30 4 files changed, 16 insertions(+), 1 deletion(-)
31
32diff --git a/lib/Driver/ToolChains/FreeBSD.cpp b/lib/Driver/ToolChains/FreeBSD.cpp
33index c6626e922e..39d0d6fb0d 100644
34--- a/lib/Driver/ToolChains/FreeBSD.cpp
35+++ b/lib/Driver/ToolChains/FreeBSD.cpp
36@@ -128,6 +128,7 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
37 const llvm::Triple::ArchType Arch = ToolChain.getArch();
38 const bool IsPIE =
39 !Args.hasArg(options::OPT_shared) &&
40+ !Args.hasArg(options::OPT_nopie) &&
41 (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault());
42 ArgStringList CmdArgs;
43
44diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
45index 8eb7401b24..8d06196231 100644
46--- a/lib/Driver/ToolChains/Gnu.cpp
47+++ b/lib/Driver/ToolChains/Gnu.cpp
48@@ -417,6 +417,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
49 const bool IsIAMCU = ToolChain.getTriple().isOSIAMCU();
50 const bool IsPIE =
51 !Args.hasArg(options::OPT_shared) && !Args.hasArg(options::OPT_static) &&
52+ !Args.hasArg(options::OPT_nopie) &&
53 (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault());
54 const bool HasCRTBeginEndFiles =
55 ToolChain.getTriple().hasEnvironment() ||
56diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
57index 6dd6d52633..773063249a 100644
58--- a/lib/Driver/ToolChains/Linux.cpp
59+++ b/lib/Driver/ToolChains/Linux.cpp
60@@ -810,7 +810,19 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs,
61 }
62 }
63
64-bool Linux::isPIEDefault() const { return getSanitizerArgs().requiresPIE(); }
65+bool Linux::isPIEDefault() const {
66+ const bool IsMips = tools::isMipsArch(getTriple().getArch());
67+ const bool IsAndroid = getTriple().isAndroid();
68+
69+ if (IsMips || IsAndroid)
70+ return getSanitizerArgs().requiresPIE();
71+
72+ return true;
73+}
74+
75+unsigned Linux::GetDefaultStackProtectorLevel(bool KernelOrKext) const {
76+ return 2;
77+}
78
79 SanitizerMask Linux::getSupportedSanitizers() const {
80 const bool IsX86 = getTriple().getArch() == llvm::Triple::x86;
81diff --git a/lib/Driver/ToolChains/Linux.h b/lib/Driver/ToolChains/Linux.h
82index 9778c1832c..ddd46a1d58 100644
83--- a/lib/Driver/ToolChains/Linux.h
84+++ b/lib/Driver/ToolChains/Linux.h
85@@ -36,6 +36,7 @@ public:
86 void AddIAMCUIncludeArgs(const llvm::opt::ArgList &DriverArgs,
87 llvm::opt::ArgStringList &CC1Args) const override;
88 bool isPIEDefault() const override;
89+ unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override;
90 SanitizerMask getSupportedSanitizers() const override;
91 void addProfileRTLibs(const llvm::opt::ArgList &Args,
92 llvm::opt::ArgStringList &CmdArgs) const override;
93--
942.13.3
95
diff --git a/recipes-devtools/clang/clang/0008-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch b/recipes-devtools/clang/clang/0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch
index 51970e8..c730477 100644
--- a/recipes-devtools/clang/clang/0008-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch
+++ b/recipes-devtools/clang/clang/0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch
@@ -1,7 +1,7 @@
1From cdae04d9e1950f07e89ea5aa8eed7ed7ce6b7938 Mon Sep 17 00:00:00 2001 1From 7b0b7262849c2e0ff713cd1ce1b38b70ea04f4e5 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] clang: Fix ldso for musl on x86 and x32 architectures 4Subject: [PATCH 7/7] 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
@@ -10,14 +10,14 @@ arch is i586, which is not the right thing
10 10
11Signed-off-by: Khem Raj <raj.khem@gmail.com> 11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12--- 12---
13 lib/Driver/ToolChains/Linux.cpp | 7 +++++++ 13 lib/Driver/ToolChains/Linux.cpp | 8 ++++++++
14 1 file changed, 7 insertions(+) 14 1 file changed, 8 insertions(+)
15 15
16Index: clang/lib/Driver/ToolChains/Linux.cpp 16diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
17=================================================================== 17index 624953b17f..69624f8432 100644
18--- clang.orig/lib/Driver/ToolChains/Linux.cpp 18--- a/lib/Driver/ToolChains/Linux.cpp
19+++ clang/lib/Driver/ToolChains/Linux.cpp 19+++ b/lib/Driver/ToolChains/Linux.cpp
20@@ -422,6 +422,7 @@ std::string Linux::getDynamicLinker(cons 20@@ -427,6 +427,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
21 if (Triple.isMusl()) { 21 if (Triple.isMusl()) {
22 std::string ArchName; 22 std::string ArchName;
23 bool IsArm = false; 23 bool IsArm = false;
@@ -25,7 +25,7 @@ Index: clang/lib/Driver/ToolChains/Linux.cpp
25 25
26 switch (Arch) { 26 switch (Arch) {
27 case llvm::Triple::arm: 27 case llvm::Triple::arm:
28@@ -434,6 +435,13 @@ std::string Linux::getDynamicLinker(cons 28@@ -439,6 +440,13 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
29 ArchName = "armeb"; 29 ArchName = "armeb";
30 IsArm = true; 30 IsArm = true;
31 break; 31 break;
@@ -39,3 +39,6 @@ Index: clang/lib/Driver/ToolChains/Linux.cpp
39 default: 39 default:
40 ArchName = Triple.getArchName().str(); 40 ArchName = Triple.getArchName().str();
41 } 41 }
42--
432.16.1
44
diff --git a/recipes-devtools/clang/clang/0008-clang-Default-to-gnu-14-for-c-standard.patch b/recipes-devtools/clang/clang/0008-clang-Default-to-gnu-14-for-c-standard.patch
deleted file mode 100644
index 74bfc69..0000000
--- a/recipes-devtools/clang/clang/0008-clang-Default-to-gnu-14-for-c-standard.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 521fdfcc2031d22b50125b3295b837229c77abd6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 12 Aug 2017 12:56:06 -0700
4Subject: [PATCH 8/8] clang: Default to gnu++14 for c++ standard
5
6GCC 7.x and newer default to same as well
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 lib/Frontend/CompilerInvocation.cpp | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
14index b2c14554a4..eed925fac4 100644
15--- a/lib/Frontend/CompilerInvocation.cpp
16+++ b/lib/Frontend/CompilerInvocation.cpp
17@@ -1667,7 +1667,7 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK,
18 if (T.isPS4())
19 LangStd = LangStandard::lang_gnucxx11;
20 else
21- LangStd = LangStandard::lang_gnucxx98;
22+ LangStd = LangStandard::lang_gnucxx14;
23 break;
24 case InputKind::RenderScript:
25 LangStd = LangStandard::lang_c99;
26--
272.14.1
28
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc
index 5a7328a..a751150 100644
--- a/recipes-devtools/clang/common.inc
+++ b/recipes-devtools/clang/common.inc
@@ -1,12 +1,10 @@
1FILESEXTRAPATHS =. "${FILE_DIRNAME}/clang:" 1FILESEXTRAPATHS =. "${FILE_DIRNAME}/clang:"
2 2
3# llvm patches 3# llvm patches
4#file://0001-llvm-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-com.patch \
5# 4#
6LLVMPATCHES = "\ 5LLVMPATCHES = "\
7 file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ 6 file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \
8 file://0002-llvm-allow-env-override-of-exe-path.patch \ 7 file://0002-llvm-allow-env-override-of-exe-path.patch \
9 file://0003-llvm-ARM-Use-correct-calling-convention-for-libm.patch \
10" 8"
11# Fallback to no-PIE if not set 9# Fallback to no-PIE if not set
12GCCPIE ??= "" 10GCCPIE ??= ""
@@ -19,10 +17,9 @@ CLANGPATCHES = "\
19 file://0004-clang-Prepend-trailing-to-sysroot.patch;patchdir=tools/clang \ 17 file://0004-clang-Prepend-trailing-to-sysroot.patch;patchdir=tools/clang \
20 file://0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch;patchdir=tools/clang \ 18 file://0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch;patchdir=tools/clang \
21 file://0006-clang-Define-releative-gcc-installation-dir.patch;patchdir=tools/clang \ 19 file://0006-clang-Define-releative-gcc-installation-dir.patch;patchdir=tools/clang \
22 file://0008-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch;patchdir=tools/clang \ 20 file://0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch;patchdir=tools/clang \
23 file://0008-clang-Default-to-gnu-14-for-c-standard.patch;patchdir=tools/clang \
24" 21"
25CLANGPATCHES += "${@'file://0007-clang-Enable-SSP-and-PIE-by-default.patch;patchdir=tools/clang' if '${GCCPIE}' else ''}" 22#CLANGPATCHES += "${@'file://0007-clang-Enable-SSP-and-PIE-by-default.patch;patchdir=tools/clang' if '${GCCPIE}' else ''}"
26 23
27# libcxxabi patches 24# libcxxabi patches
28LIBCXXABIPATCHES ="\ 25LIBCXXABIPATCHES ="\
diff --git a/recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch
index 45bd645..c844119 100644
--- a/recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch
+++ b/recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch
@@ -1,7 +1,7 @@
1From 489a11bdd48c04983e5d042808b91c9f9844d403 Mon Sep 17 00:00:00 2001 1From 1a82e4a75ef6bf24597e886446ca06aa063a0c7f 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 1/4] support a new embedded linux target 4Subject: [PATCH 1/5] 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---
@@ -13,10 +13,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 create mode 100644 make/platform/clang_linux_embedded_test_input.c 13 create mode 100644 make/platform/clang_linux_embedded_test_input.c
14 14
15diff --git a/lib/builtins/int_util.c b/lib/builtins/int_util.c 15diff --git a/lib/builtins/int_util.c b/lib/builtins/int_util.c
16index 420d1e237..0e4614100 100644 16index de87410db..0d5b56fe1 100644
17--- a/lib/builtins/int_util.c 17--- a/lib/builtins/int_util.c
18+++ b/lib/builtins/int_util.c 18+++ b/lib/builtins/int_util.c
19@@ -48,8 +48,7 @@ void compilerrt_abort_impl(const char *file, int line, const char *function) { 19@@ -58,8 +58,7 @@ void compilerrt_abort_impl(const char *file, int line, const char *function) {
20 #else 20 #else
21 21
22 /* Get the system definition of abort() */ 22 /* Get the system definition of abort() */
@@ -322,5 +322,5 @@ diff --git a/make/platform/clang_linux_embedded_test_input.c b/make/platform/cla
322new file mode 100644 322new file mode 100644
323index 000000000..e69de29bb 323index 000000000..e69de29bb
324-- 324--
3252.13.0 3252.16.1
326 326
diff --git a/recipes-devtools/clang/compiler-rt/0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch b/recipes-devtools/clang/compiler-rt/0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch
index 1a63a9b..ecb3fe7 100644
--- a/recipes-devtools/clang/compiler-rt/0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch
+++ b/recipes-devtools/clang/compiler-rt/0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch
@@ -1,7 +1,7 @@
1From 521311b98ffb4e912a6d863f134856d365eb9d36 Mon Sep 17 00:00:00 2001 1From 6bfcd697851219f35688299c32e7068fad50c6f5 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 2/4] Simplify cross-compilation. Don't use native-compiled 4Subject: [PATCH 2/5] Simplify cross-compilation. Don't use native-compiled
5 llvm-config. 5 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.
@@ -20,10 +20,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
20 1 file changed, 9 insertions(+), 1 deletion(-) 20 1 file changed, 9 insertions(+), 1 deletion(-)
21 21
22diff --git a/CMakeLists.txt b/CMakeLists.txt 22diff --git a/CMakeLists.txt b/CMakeLists.txt
23index b522c340d..7f2e49d17 100644 23index 4b953b212..571aee7ea 100644
24--- a/CMakeLists.txt 24--- a/CMakeLists.txt
25+++ b/CMakeLists.txt 25+++ b/CMakeLists.txt
26@@ -35,7 +35,15 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN 26@@ -62,7 +62,15 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN
27 "Build for a bare-metal target.") 27 "Build for a bare-metal target.")
28 28
29 if (COMPILER_RT_STANDALONE_BUILD) 29 if (COMPILER_RT_STANDALONE_BUILD)
@@ -41,5 +41,5 @@ index b522c340d..7f2e49d17 100644
41 # Find Python interpreter. 41 # Find Python interpreter.
42 set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5) 42 set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5)
43-- 43--
442.13.0 442.16.1
45 45
diff --git a/recipes-devtools/clang/compiler-rt/0003-Disable-tsan-on-OE-glibc.patch b/recipes-devtools/clang/compiler-rt/0003-Disable-tsan-on-OE-glibc.patch
index dc2a999..e6c5f9e 100644
--- a/recipes-devtools/clang/compiler-rt/0003-Disable-tsan-on-OE-glibc.patch
+++ b/recipes-devtools/clang/compiler-rt/0003-Disable-tsan-on-OE-glibc.patch
@@ -1,7 +1,7 @@
1From 9390b3a6552d8f122e186797416904066df418be Mon Sep 17 00:00:00 2001 1From 2e8c6df7fe6e120063c3bdb87fb95e1326cf8434 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 3/4] Disable tsan on OE/glibc 4Subject: [PATCH 3/5] 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,30 +13,30 @@ 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/cmake/config-ix.cmake b/cmake/config-ix.cmake 15diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
16index ae2a262a1..edc6dc63e 100644 16index 9e0c47748..227d661ae 100644
17--- a/cmake/config-ix.cmake 17--- a/cmake/config-ix.cmake
18+++ b/cmake/config-ix.cmake 18+++ b/cmake/config-ix.cmake
19@@ -497,7 +497,7 @@ else() 19@@ -549,7 +549,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
23- OS_NAME MATCHES "Darwin|Linux|FreeBSD|Android") 23- OS_NAME MATCHES "Darwin|Linux|FreeBSD|Android|NetBSD")
24+ OS_NAME MATCHES "Darwin|FreeBSD|Android") 24+ OS_NAME MATCHES "Darwin|FreeBSD|Android|NetBSD")
25 set(COMPILER_RT_HAS_TSAN TRUE) 25 set(COMPILER_RT_HAS_TSAN TRUE)
26 else() 26 else()
27 set(COMPILER_RT_HAS_TSAN FALSE) 27 set(COMPILER_RT_HAS_TSAN FALSE)
28diff --git a/test/sanitizer_common/CMakeLists.txt b/test/sanitizer_common/CMakeLists.txt 28diff --git a/test/sanitizer_common/CMakeLists.txt b/test/sanitizer_common/CMakeLists.txt
29index 9b4070b0f..e76f2680c 100644 29index 8b210a08a..50b6f7166 100644
30--- a/test/sanitizer_common/CMakeLists.txt 30--- a/test/sanitizer_common/CMakeLists.txt
31+++ b/test/sanitizer_common/CMakeLists.txt 31+++ b/test/sanitizer_common/CMakeLists.txt
32@@ -8,7 +8,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD" AND NOT ANDROID) 32@@ -8,7 +8,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD")
33 list(APPEND SUPPORTED_TOOLS asan) 33 list(APPEND SUPPORTED_TOOLS asan)
34 endif() 34 endif()
35 if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID) 35 if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID)
36- list(APPEND SUPPORTED_TOOLS tsan) 36- list(APPEND SUPPORTED_TOOLS tsan)
37 list(APPEND SUPPORTED_TOOLS msan) 37 list(APPEND SUPPORTED_TOOLS msan)
38 list(APPEND SUPPORTED_TOOLS lsan) 38 list(APPEND SUPPORTED_TOOLS lsan)
39 endif() 39 list(APPEND SUPPORTED_TOOLS ubsan)
40-- 40--
412.13.0 412.16.1
42 42
diff --git a/recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch b/recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch
index 0b2e14d..31daad0 100644
--- a/recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch
+++ b/recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch
@@ -1,7 +1,7 @@
1From 0be126894e872108eaa7eae3629a5564598ee25e Mon Sep 17 00:00:00 2001 1From 39e3271f270f75a4d65128f79be1dd3e455f5c85 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 11 Feb 2017 17:54:33 +0000 3Date: Sat, 11 Feb 2017 17:54:33 +0000
4Subject: [PATCH 4/4] cmake/mips: Do not specify --target with OE 4Subject: [PATCH 4/5] cmake/mips: Do not specify --target with OE
5 5
6OE already specifies cross compiler correctly, adding this additional 6OE already specifies cross compiler correctly, adding this additional
7--target confuses the clang driver and it resorts to invoke host assembler 7--target confuses the clang driver and it resorts to invoke host assembler
@@ -20,10 +20,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
20 1 file changed, 4 insertions(+), 4 deletions(-) 20 1 file changed, 4 insertions(+), 4 deletions(-)
21 21
22diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake 22diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
23index 6f9f15139..7002a60ac 100644 23index b208f0852..2555b5e5b 100644
24--- a/cmake/base-config-ix.cmake 24--- a/cmake/base-config-ix.cmake
25+++ b/cmake/base-config-ix.cmake 25+++ b/cmake/base-config-ix.cmake
26@@ -161,11 +161,11 @@ macro(test_targets) 26@@ -169,11 +169,11 @@ macro(test_targets)
27 # clang's default CPU's. In the 64-bit case, we must also specify the ABI 27 # clang's default CPU's. In the 64-bit case, we must also specify the ABI
28 # since the default ABI differs between gcc and clang. 28 # since the default ABI differs between gcc and clang.
29 # FIXME: Ideally, we would build the N32 library too. 29 # FIXME: Ideally, we would build the N32 library too.
@@ -40,5 +40,5 @@ index 6f9f15139..7002a60ac 100644
40 if(WIN32) 40 if(WIN32)
41 test_target_arch(arm "" "" "") 41 test_target_arch(arm "" "" "")
42-- 42--
432.13.0 432.16.1
44 44
diff --git a/recipes-devtools/clang/compiler-rt/0005-Pass-march-armv8.1-a-instead-of-mcrc.patch b/recipes-devtools/clang/compiler-rt/0005-Pass-march-armv8.1-a-instead-of-mcrc.patch
index e6628f5..b2e8e25 100644
--- a/recipes-devtools/clang/compiler-rt/0005-Pass-march-armv8.1-a-instead-of-mcrc.patch
+++ b/recipes-devtools/clang/compiler-rt/0005-Pass-march-armv8.1-a-instead-of-mcrc.patch
@@ -1,4 +1,4 @@
1From ce33b77707e708348311aea2a9b2401ed4685aa2 Mon Sep 17 00:00:00 2001 1From ef9b0bacf7a2fd097c241da674ed726c3dfb11d2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 20 Jul 2017 12:14:03 -0700 3Date: Thu, 20 Jul 2017 12:14:03 -0700
4Subject: [PATCH 5/5] Pass -march=armv8.1-a instead of -mcrc 4Subject: [PATCH 5/5] Pass -march=armv8.1-a instead of -mcrc
@@ -20,18 +20,19 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
20 lib/scudo/CMakeLists.txt | 2 +- 20 lib/scudo/CMakeLists.txt | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-) 21 1 file changed, 1 insertion(+), 1 deletion(-)
22 22
23Index: git/lib/scudo/CMakeLists.txt 23diff --git a/lib/scudo/CMakeLists.txt b/lib/scudo/CMakeLists.txt
24=================================================================== 24index 4d26a3477..965174727 100644
25--- git.orig/lib/scudo/CMakeLists.txt 25--- a/lib/scudo/CMakeLists.txt
26+++ git/lib/scudo/CMakeLists.txt 26+++ b/lib/scudo/CMakeLists.txt
27@@ -26,7 +26,9 @@ endif() 27@@ -28,7 +28,7 @@ endif()
28 # Enable the AArch64 CRC32 feature for scudo_crc32.cpp, if available. 28 # Enable the AArch64 CRC32 feature for scudo_crc32.cpp, if available.
29 # Note that it is enabled by default starting with armv8.1-a. 29 # Note that it is enabled by default starting with armv8.1-a.
30 if (COMPILER_RT_HAS_MCRC_FLAG) 30 if (COMPILER_RT_HAS_MCRC_FLAG)
31- set_source_files_properties(scudo_crc32.cpp PROPERTIES COMPILE_FLAGS -mcrc) 31- set_source_files_properties(scudo_crc32.cpp PROPERTIES COMPILE_FLAGS -mcrc)
32+ if ("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch64") 32+ set_source_files_properties(scudo_crc32.cpp PROPERTIES COMPILE_FLAGS -march=armv8.1-a)
33+ set_source_files_properties(scudo_crc32.cpp PROPERTIES COMPILE_FLAGS -march=armv8.1-a)
34+ endif()
35 endif() 33 endif()
36 34
37 if(COMPILER_RT_HAS_SCUDO) 35 if(COMPILER_RT_HAS_SCUDO)
36--
372.16.1
38
diff --git a/recipes-devtools/clang/lldb/0001-Include-limits.h-for-PATH_MAX-definition.patch b/recipes-devtools/clang/lldb/0001-Include-limits.h-for-PATH_MAX-definition.patch
index 4423061..3fabbfe 100644
--- a/recipes-devtools/clang/lldb/0001-Include-limits.h-for-PATH_MAX-definition.patch
+++ b/recipes-devtools/clang/lldb/0001-Include-limits.h-for-PATH_MAX-definition.patch
@@ -1,7 +1,7 @@
1From eba8b855017605c42368e509e599875f71440940 Mon Sep 17 00:00:00 2001 1From d630a82a405c44843bae28286a09ac5f9fa202bd Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 18 May 2017 23:12:34 -0700 3Date: Thu, 18 May 2017 23:12:34 -0700
4Subject: [PATCH] Include limits.h for PATH_MAX definition 4Subject: [PATCH 1/2] Include limits.h for PATH_MAX definition
5 5
6Helps compiling on musl targets 6Helps compiling on musl targets
7 7
@@ -11,7 +11,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
11 1 file changed, 1 insertion(+), 1 deletion(-) 11 1 file changed, 1 insertion(+), 1 deletion(-)
12 12
13diff --git a/source/Utility/FileSpec.cpp b/source/Utility/FileSpec.cpp 13diff --git a/source/Utility/FileSpec.cpp b/source/Utility/FileSpec.cpp
14index 3c4e3407d..2d071fa36 100644 14index 72f86917b..965ac744f 100644
15--- a/source/Utility/FileSpec.cpp 15--- a/source/Utility/FileSpec.cpp
16+++ b/source/Utility/FileSpec.cpp 16+++ b/source/Utility/FileSpec.cpp
17@@ -31,7 +31,7 @@ 17@@ -31,7 +31,7 @@
@@ -24,5 +24,5 @@ index 3c4e3407d..2d071fa36 100644
24 using namespace lldb_private; 24 using namespace lldb_private;
25 25
26-- 26--
272.13.0 272.16.1
28 28
diff --git a/recipes-devtools/clang/lldb/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/recipes-devtools/clang/lldb/0002-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch
index 1a4d1d7..1167b5a 100644
--- a/recipes-devtools/clang/lldb/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch
+++ b/recipes-devtools/clang/lldb/0002-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch
@@ -1,7 +1,7 @@
1From 6a38064611f3506b67656e5de680a957ee95adb6 Mon Sep 17 00:00:00 2001 1From 397a9e7dc35a7b360bb8466996ae7755574dc04c 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] lldb: Add -lxml2 to linker cmdline of xml is found 4Subject: [PATCH 2/2] 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
@@ -23,12 +23,12 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
23 1 file changed, 4 insertions(+) 23 1 file changed, 4 insertions(+)
24 24
25diff --git a/source/Host/CMakeLists.txt b/source/Host/CMakeLists.txt 25diff --git a/source/Host/CMakeLists.txt b/source/Host/CMakeLists.txt
26index 2a73c30f8..f5e132fee 100644 26index 2b6f0e48a..1a910a9af 100644
27--- a/source/Host/CMakeLists.txt 27--- a/source/Host/CMakeLists.txt
28+++ b/source/Host/CMakeLists.txt 28+++ b/source/Host/CMakeLists.txt
29@@ -163,6 +163,10 @@ if (CMAKE_SYSTEM_NAME MATCHES "NetBSD") 29@@ -175,6 +175,10 @@ if (NOT LLDB_DISABLE_LIBEDIT)
30 set(EXTRA_LIBS kvm) 30 list(APPEND EXTRA_LIBS edit)
31 endif () 31 endif()
32 32
33+if (LIBXML2_FOUND) 33+if (LIBXML2_FOUND)
34+ list(APPEND EXTRA_LIBS xml2) 34+ list(APPEND EXTRA_LIBS xml2)
@@ -38,5 +38,5 @@ index 2a73c30f8..f5e132fee 100644
38 ${HOST_SOURCES} 38 ${HOST_SOURCES}
39 39
40-- 40--
412.13.0 412.16.1
42 42
diff --git a/recipes-devtools/clang/lldb_git.bb b/recipes-devtools/clang/lldb_git.bb
index a6a1a9d..3ec9ec2 100644
--- a/recipes-devtools/clang/lldb_git.bb
+++ b/recipes-devtools/clang/lldb_git.bb
@@ -31,7 +31,7 @@ SRC_URI = "\
31# lldb patches 31# lldb patches
32SRC_URI += "\ 32SRC_URI += "\
33 file://0001-Include-limits.h-for-PATH_MAX-definition.patch;patchdir=tools/lldb \ 33 file://0001-Include-limits.h-for-PATH_MAX-definition.patch;patchdir=tools/lldb \
34 file://0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch;patchdir=tools/lldb \ 34 file://0002-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch;patchdir=tools/lldb \
35 " 35 "
36SRCREV_FORMAT = "llvm_clang_lldb" 36SRCREV_FORMAT = "llvm_clang_lldb"
37 37