summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-08-24 19:10:35 -0700
committerKhem Raj <raj.khem@gmail.com>2018-09-09 07:59:31 -0700
commit12b98a5e70fc680e16dfe9e76e844d0d8276fa67 (patch)
treee3ed645c3b600287ea9e2fd1f5444c697b2dad0e /recipes-devtools
parent9a0bd29eac2be5f88e3e198929181d3591dd7ec7 (diff)
downloadmeta-clang-12b98a5e70fc680e16dfe9e76e844d0d8276fa67.tar.gz
recipes: Upgrade to clang 7.0.0 Release (rc2)
- Update compiler-rt/llvm/clang/lld licence checksums Triggerred due to copyright year update to 2018 Add libunwind and libcxxabi license to checksum list too - Switch to https protocol for fetching from github - Fix _finite functions on musl - Package new .so files built with clang - package libLLVM-${MAJOR_VER}.so as well since llvm-7 generates it without MINOR_VERSION Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/clang/clang.inc32
-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.patch12
-rw-r--r--recipes-devtools/clang/clang/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch22
-rw-r--r--recipes-devtools/clang/clang/0002-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch10
-rw-r--r--recipes-devtools/clang/clang/0002-llvm-allow-env-override-of-exe-path.patch12
-rw-r--r--recipes-devtools/clang/clang/0003-clang-musl-ppc-does-not-support-128-bit-long-double.patch10
-rw-r--r--recipes-devtools/clang/clang/0003-llvm-Disable-calls-to-_finite-and-other-glibc-only-f.patch65
-rw-r--r--recipes-devtools/clang/clang/0004-clang-Prepend-trailing-to-sysroot.patch10
-rw-r--r--recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch14
-rw-r--r--recipes-devtools/clang/clang/0006-clang-Define-releative-gcc-installation-dir.patch28
-rw-r--r--recipes-devtools/clang/clang/0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch12
-rw-r--r--recipes-devtools/clang/clang/0008-clang-scan-view-needs-python-2.x.patch4
-rw-r--r--recipes-devtools/clang/clang/0009-clang-Driver-Avoid-invalidated-iterator-in-insertTar.patch56
-rw-r--r--recipes-devtools/clang/clang_git.bb2
-rw-r--r--recipes-devtools/clang/common.inc2
-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.patch19
-rw-r--r--recipes-devtools/clang/compiler-rt/0003-Disable-tsan-on-OE-glibc.patch16
-rw-r--r--recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch8
-rw-r--r--recipes-devtools/clang/compiler-rt_git.bb2
-rw-r--r--recipes-devtools/clang/libcxx_git.bb2
-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.patch30
24 files changed, 207 insertions, 193 deletions
diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc
index 4af6a0a..5209f58 100644
--- a/recipes-devtools/clang/clang.inc
+++ b/recipes-devtools/clang/clang.inc
@@ -2,29 +2,29 @@ LLVM_RELEASE = ""
2LLVM_DIR = "llvm${LLVM_RELEASE}" 2LLVM_DIR = "llvm${LLVM_RELEASE}"
3 3
4LLVM_GIT ?= "git://github.com/llvm-mirror" 4LLVM_GIT ?= "git://github.com/llvm-mirror"
5LLVM_GIT_PROTOCOL ?= "git" 5LLVM_GIT_PROTOCOL ?= "https"
6 6
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 = "6" 10MAJOR_VER = "7"
11MINOR_VER = "0" 11MINOR_VER = "0"
12PATCH_VER = "1" 12PATCH_VER = "0"
13 13
14PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" 14PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}"
15BRANCH = "release_60" 15BRANCH = "release_${MAJOR_VER}${MINOR_VER}"
16 16
17SRCREV_llvm = "5136df4d089a086b70d452160ad5451861269498" 17SRCREV_llvm = "cd197f3be9d205665f3de699407c4fe1ed4415cc"
18SRCREV_clang = "2f27999df400d17b33cdd412fdd606a88208dfcc" 18SRCREV_clang = "658c2f1c721612e9a6545c0440665eebb2df632c"
19SRCREV_compiler-rt = "0cc870394e803e12048451659fc5ccf6e69d4e70" 19SRCREV_compiler-rt = "a4cbb02bca3b952117e9ccfbad8a485857f25935"
20SRCREV_cxxabi = "9245d481eb3e890f708ff2d7dadf2a10c04748ba" 20SRCREV_cxxabi = "809ebefc12d1cf3653a5459e7eb1cb13bb93fc39"
21SRCREV_libcxx = "cb9e96f6f152733457ddf0e3296fc10d3c34c39c" 21SRCREV_libcxx = "dffe9e0f1dde084f2aab8010345aeb1b7c8f7d4c"
22SRCREV_libunwind = "68c1bfc35687033aad28657404b80b1d558a4804" 22SRCREV_libunwind = "d1dee9d525dac7d7146b6e197bc330a7bd963075"
23SRCREV_lld = "b051c1d541461251e2a3bde2afb3d0b32590118f" 23SRCREV_lld = "a90eee85aee3b68cf20cbb8e4bc4a1a0469b7dd0"
24SRCREV_lldb = "b6df24ff1b258b18041161b8f32ac316a3b5d8d9" 24SRCREV_lldb = "434b6ab1b240bfdb60ba8ca645d3658bc7b27d81"
25SRCREV_openmp = "d5aa29cb3bcf51289d326b4e565613db8aff65ef" 25SRCREV_openmp = "366ce74b85790ed41f94fba7f17a0911bde83500"
26 26
27LLVMMD5SUM = "e825e017edc35cfd58e26116e5251771" 27LLVMMD5SUM = "c520ed40e11887bb1d24d86f7f5b1f05"
28CLANGMD5SUM = "a77eac638a3aae44a2d604217d6f0f01" 28CLANGMD5SUM = "444af0e124949f07f791f12c928e5994"
29LLDMD5SUM = "c7343e1ccb3d65a14eba72ce1d548cb4" 29LLDMD5SUM = "f4941ace8ddb3d6cf177fff94966319a"
30LLDBMD5SUM = "b6320ed0b0d00ae661dd94f277bbf024" 30LLDBMD5SUM = "b6320ed0b0d00ae661dd94f277bbf024"
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 d19dd99..2b06da2 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 a71c6f6cad70c1cb094ffd53ca28135eb87df406 Mon Sep 17 00:00:00 2001 1From 06033c7fa2d575a9a68b377f5ce9324433c23806 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/7] clang: driver: Use /lib for ldso on OE 4Subject: [PATCH 1/8] 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 1301cdf114..d59512627d 100644 18index f8f3623918..e662b6b262 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@@ -502,12 +502,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 21@@ -566,12 +566,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 1301cdf114..d59512627d 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@@ -517,7 +517,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 36@@ -593,7 +593,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 1301cdf114..d59512627d 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@@ -531,7 +531,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 45@@ -607,7 +607,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 1301cdf114..d59512627d 100644
52 break; 52 break;
53 } 53 }
54-- 54--
552.17.0 552.18.0
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 88702bc..297b56d 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 38ec6e5550b9f50a7393182b48c5c26cad4d541f Mon Sep 17 00:00:00 2001 1From a122717a9bc31e0ab44197e743aa466711c4bf79 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 1adbdb3..ba4e9d7 100644 20index d6648ed..12c02f2 100644
21--- a/CMakeLists.txt 21--- a/CMakeLists.txt
22+++ b/CMakeLists.txt 22+++ b/CMakeLists.txt
23@@ -409,15 +409,10 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") 23@@ -434,15 +434,10 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}")
24 # Setup Source Code 24 # Setup Source Code
25 #=============================================================================== 25 #===============================================================================
26 26
@@ -37,8 +37,8 @@ index 1adbdb3..ba4e9d7 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@@ -427,15 +422,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) 40@@ -454,15 +449,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM)
41 NO_DEFAULT_PATH 41 NO_CMAKE_FIND_ROOT_PATH
42 ) 42 )
43 43
44- if (LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL STREQUAL "LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL-NOTFOUND") 44- if (LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL STREQUAL "LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL-NOTFOUND")
@@ -64,5 +64,5 @@ index 1adbdb3..ba4e9d7 100644
64 # soname, etc... 64 # soname, etc...
65 add_subdirectory(src) 65 add_subdirectory(src)
66-- 66--
672.16.1 672.18.0
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 4f6ed94..de8da74 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,7 +1,7 @@
1From 96558c4f25d5132936014f6f2d6252cfdfdf478a Mon Sep 17 00:00:00 2001 1From fc9904be5d4ee1d1e92a1ff86b01218fbf91b12f 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/3] llvm: TargetLibraryInfo: Undefine libc functions if they
5 are macros 5 are macros
6 6
7musl defines some functions as macros and not inline functions 7musl defines some functions as macros and not inline functions
@@ -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 a461ed813b9..f9fd9faeee0 100644 16index f94debba9c5..e92dbc98c55 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@@ -665,6 +665,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") 19@@ -707,6 +707,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 a461ed813b9..f9fd9faeee0 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@@ -700,6 +703,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek") 29@@ -751,6 +754,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 a461ed813b9..f9fd9faeee0 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@@ -710,6 +716,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos") 39@@ -761,6 +767,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 a461ed813b9..f9fd9faeee0 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@@ -725,6 +734,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell") 49@@ -776,6 +785,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 a461ed813b9..f9fd9faeee0 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@@ -845,6 +857,9 @@ TLI_DEFINE_STRING_INTERNAL("logl") 59@@ -902,6 +914,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 a461ed813b9..f9fd9faeee0 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@@ -1064,6 +1079,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") 69@@ -1127,6 +1142,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 a461ed813b9..f9fd9faeee0 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@@ -1193,6 +1211,9 @@ TLI_DEFINE_STRING_INTERNAL("times") 79@@ -1256,6 +1274,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 a461ed813b9..f9fd9faeee0 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.16.1 902.18.0
91 91
diff --git a/recipes-devtools/clang/clang/0002-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0002-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch
index e9b36c3..f73b1c0 100644
--- a/recipes-devtools/clang/clang/0002-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch
+++ b/recipes-devtools/clang/clang/0002-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch
@@ -1,7 +1,7 @@
1From 0ace54d609aac7d5f1b67d9474e3782a17bec8bf Mon Sep 17 00:00:00 2001 1From fc628b03a5ac41a446fd2dfea0ecbe03331e54d8 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/7] clang: Driver/tools.cpp: Add -lssp_nonshared on musl 4Subject: [PATCH 2/8] 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
@@ -13,10 +13,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 1 file changed, 6 insertions(+) 13 1 file changed, 6 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 7845781f12..bbe7845765 100644 16index 3755673250..766c650b3c 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@@ -518,6 +518,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, 19@@ -503,6 +503,12 @@ 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
@@ -30,5 +30,5 @@ index 7845781f12..bbe7845765 100644
30 CmdArgs.push_back("--end-group"); 30 CmdArgs.push_back("--end-group");
31 else 31 else
32-- 32--
332.17.0 332.18.0
34 34
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 256e332..fa49e67 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,7 +1,7 @@
1From 2f8ea767afdaa440c6368040630e1b3ea6a0977a Mon Sep 17 00:00:00 2001 1From c65c0af4a5721e3c0dfcc56c15ef3310a54e0008 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/3] 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
@@ -15,12 +15,12 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
15 1 file changed, 7 insertions(+) 15 1 file changed, 7 insertions(+)
16 16
17diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp 17diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
18index 08b096afb05..d8d7742744e 100644 18index 892adc3b9dd..38f190ecbd1 100644
19--- a/tools/llvm-config/llvm-config.cpp 19--- a/tools/llvm-config/llvm-config.cpp
20+++ b/tools/llvm-config/llvm-config.cpp 20+++ b/tools/llvm-config/llvm-config.cpp
21@@ -225,6 +225,13 @@ Typical components:\n\ 21@@ -226,6 +226,13 @@ Typical components:\n\
22 22
23 /// \brief Compute the path to the main executable. 23 /// Compute the path to the main executable.
24 std::string GetExecutablePath(const char *Argv0) { 24 std::string GetExecutablePath(const char *Argv0) {
25+ // Hack for Yocto: we need to override the root path when we are using 25+ // Hack for Yocto: we need to override the root path when we are using
26+ // llvm-config from within a target sysroot. 26+ // llvm-config from within a target sysroot.
@@ -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.16.1 362.18.0
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 87778d3..868fc3b 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,7 +1,7 @@
1From d02f7f858c22fc1dcbc1ea3a96a597bcc4aa4d77 Mon Sep 17 00:00:00 2001 1From 48fa180df65f7ee63a85dd69fd2c1382609c5e95 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/7] clang: musl/ppc does not support 128-bit long double 4Subject: [PATCH 3/8] 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---
@@ -9,10 +9,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
9 1 file changed, 2 insertions(+), 1 deletion(-) 9 1 file changed, 2 insertions(+), 1 deletion(-)
10 10
11diff --git a/lib/Basic/Targets/PPC.h b/lib/Basic/Targets/PPC.h 11diff --git a/lib/Basic/Targets/PPC.h b/lib/Basic/Targets/PPC.h
12index 04bef258e3..0ae210698a 100644 12index 439c73a0e3..8da698ee21 100644
13--- a/lib/Basic/Targets/PPC.h 13--- a/lib/Basic/Targets/PPC.h
14+++ b/lib/Basic/Targets/PPC.h 14+++ b/lib/Basic/Targets/PPC.h
15@@ -272,7 +272,8 @@ public: 15@@ -328,7 +328,8 @@ public:
16 break; 16 break;
17 } 17 }
18 18
@@ -23,5 +23,5 @@ index 04bef258e3..0ae210698a 100644
23 LongDoubleFormat = &llvm::APFloat::IEEEdouble(); 23 LongDoubleFormat = &llvm::APFloat::IEEEdouble();
24 } 24 }
25-- 25--
262.17.0 262.18.0
27 27
diff --git a/recipes-devtools/clang/clang/0003-llvm-Disable-calls-to-_finite-and-other-glibc-only-f.patch b/recipes-devtools/clang/clang/0003-llvm-Disable-calls-to-_finite-and-other-glibc-only-f.patch
new file mode 100644
index 0000000..9f665e3
--- /dev/null
+++ b/recipes-devtools/clang/clang/0003-llvm-Disable-calls-to-_finite-and-other-glibc-only-f.patch
@@ -0,0 +1,65 @@
1From cb1b6f021d2ce82d7d0084758b7efaa3917640f5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 26 Aug 2018 22:43:19 -0700
4Subject: [PATCH 3/3] llvm: Disable calls to *_finite and other glibc-only
5 functions on Musl.
6
7glibc's finite lib calls are generated when possible.
8However, they are not supported on Musl/linux. This change also
9disables other functions not available on Musl.
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 lib/Analysis/TargetLibraryInfo.cpp | 29 +++++++++++++++--------------
14 1 file changed, 15 insertions(+), 14 deletions(-)
15
16diff --git a/lib/Analysis/TargetLibraryInfo.cpp b/lib/Analysis/TargetLibraryInfo.cpp
17index 102135fbf31..5bc4d2b47f5 100644
18--- a/lib/Analysis/TargetLibraryInfo.cpp
19+++ b/lib/Analysis/TargetLibraryInfo.cpp
20@@ -415,27 +415,28 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
21
22 // The following functions are available on Linux,
23 // but Android uses bionic instead of glibc.
24- if (!T.isOSLinux() || T.isAndroid()) {
25+ if (!T.isOSLinux() || T.isAndroid() || T.isMusl()) {
26 TLI.setUnavailable(LibFunc_dunder_strdup);
27 TLI.setUnavailable(LibFunc_dunder_strtok_r);
28 TLI.setUnavailable(LibFunc_dunder_isoc99_scanf);
29 TLI.setUnavailable(LibFunc_dunder_isoc99_sscanf);
30 TLI.setUnavailable(LibFunc_under_IO_getc);
31 TLI.setUnavailable(LibFunc_under_IO_putc);
32- // But, Android has memalign.
33- if (!T.isAndroid())
34+ // But, Android/Musl has memalign.
35+ if (!T.isAndroid() || !T.isMusl() )
36 TLI.setUnavailable(LibFunc_memalign);
37- TLI.setUnavailable(LibFunc_fopen64);
38- TLI.setUnavailable(LibFunc_fseeko64);
39- TLI.setUnavailable(LibFunc_fstat64);
40- TLI.setUnavailable(LibFunc_fstatvfs64);
41- TLI.setUnavailable(LibFunc_ftello64);
42- TLI.setUnavailable(LibFunc_lstat64);
43- TLI.setUnavailable(LibFunc_open64);
44- TLI.setUnavailable(LibFunc_stat64);
45- TLI.setUnavailable(LibFunc_statvfs64);
46- TLI.setUnavailable(LibFunc_tmpfile64);
47-
48+ if (!T.isMusl()) {
49+ TLI.setUnavailable(LibFunc_fopen64);
50+ TLI.setUnavailable(LibFunc_fseeko64);
51+ TLI.setUnavailable(LibFunc_fstat64);
52+ TLI.setUnavailable(LibFunc_fstatvfs64);
53+ TLI.setUnavailable(LibFunc_ftello64);
54+ TLI.setUnavailable(LibFunc_lstat64);
55+ TLI.setUnavailable(LibFunc_open64);
56+ TLI.setUnavailable(LibFunc_stat64);
57+ TLI.setUnavailable(LibFunc_statvfs64);
58+ TLI.setUnavailable(LibFunc_tmpfile64);
59+ }
60 // Relaxed math functions are included in math-finite.h on Linux (GLIBC).
61 TLI.setUnavailable(LibFunc_acos_finite);
62 TLI.setUnavailable(LibFunc_acosf_finite);
63--
642.18.0
65
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 1e5b71f..03c6bab 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 8a29645c68da82d6d7d1e7a74fdfad474f5c5755 Mon Sep 17 00:00:00 2001 1From 4764d8f8b613631de2e3c9a3614427d07c599017 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/7] clang: Prepend trailing '/' to sysroot 4Subject: [PATCH 4/8] 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,10 +24,10 @@ 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 d59512627d..624953b17f 100644 27index e662b6b262..5bca972cc2 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@@ -211,7 +211,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
31 GCCInstallation.init(Triple, Args); 31 GCCInstallation.init(Triple, Args);
32 Multilibs = GCCInstallation.getMultilibs(); 32 Multilibs = GCCInstallation.getMultilibs();
33 llvm::Triple::ArchType Arch = Triple.getArch(); 33 llvm::Triple::ArchType Arch = Triple.getArch();
@@ -37,5 +37,5 @@ index d59512627d..624953b17f 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.17.0 402.18.0
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 f491028..8425f8d 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 183123464de1762bf755af4f50d77353121188c1 Mon Sep 17 00:00:00 2001 1From e02d9f3e1c724a4161709952a3ef59f81432fc06 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/7] clang: Look inside the target sysroot for compiler 4Subject: [PATCH 5/8] 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,18 +16,18 @@ 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 f96a1182e3..d286622f8d 100644 19index cf3db34688..dae3178380 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@@ -13,6 +13,7 @@
23 #include "ToolChains/Arch/ARM.h"
24 #include "ToolChains/Clang.h" 23 #include "ToolChains/Clang.h"
25 #include "clang/Basic/ObjCRuntime.h" 24 #include "clang/Basic/ObjCRuntime.h"
25 #include "clang/Basic/Sanitizers.h"
26+#include "clang/Basic/Version.h" 26+#include "clang/Basic/Version.h"
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@@ -324,7 +325,10 @@ static StringRef getArchNameForCompilerRTLib(const ToolChain &TC, 30@@ -343,7 +344,10 @@ StringRef ToolChain::getOSLibName() const {
31 } 31 }
32 32
33 std::string ToolChain::getCompilerRTPath() const { 33 std::string ToolChain::getCompilerRTPath() const {
@@ -40,5 +40,5 @@ index f96a1182e3..d286622f8d 100644
40 llvm::sys::path::append(Path, "lib"); 40 llvm::sys::path::append(Path, "lib");
41 } else { 41 } else {
42-- 42--
432.17.0 432.18.0
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 cbc0d19..b611dd5 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 9a91d0b82ba48a9e2f634197809a1323298ef285 Mon Sep 17 00:00:00 2001 1From e6232d22df73b80ced3784fd85166ebe24e6c31b 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/7] clang: Define / releative gcc installation dir 4Subject: [PATCH 6/8] 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
@@ -10,21 +10,23 @@ installation in OE
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/Gnu.cpp | 1 + 13 lib/Driver/ToolChains/Gnu.cpp | 3 +++
14 1 file changed, 1 insertion(+) 14 1 file changed, 3 insertions(+)
15 15
16diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp 16diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
17index bbe7845765..692385ff27 100644 17index 766c650b3c..777526e063 100644
18--- a/lib/Driver/ToolChains/Gnu.cpp 18--- a/lib/Driver/ToolChains/Gnu.cpp
19+++ b/lib/Driver/ToolChains/Gnu.cpp 19+++ b/lib/Driver/ToolChains/Gnu.cpp
20@@ -2070,6 +2070,7 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( 20@@ -2190,6 +2190,9 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(
21 {"gcc-cross/" + CandidateTriple.str(), "../..",
22 TargetTriple.getOS() != llvm::Triple::Solaris},
21 23
22 // Debian puts cross-compilers in gcc-cross. 24+ // OE cross-compilers path structures
23 {"gcc-cross/" + CandidateTriple.str(), "../..", true}, 25+ {"/" + CandidateTriple.str(), "..", true},
24+ {"/" + CandidateTriple.str(), "..", true}, 26+
25 27 // The Freescale PPC SDK has the gcc libraries in
26 // The Freescale PPC SDK has the gcc libraries in 28 // <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 29 // this on Freescale triples, though, since some systems put a *lot* of
28-- 30--
292.17.0 312.18.0
30 32
diff --git a/recipes-devtools/clang/clang/0007-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 e54f250..b456a59 100644
--- a/recipes-devtools/clang/clang/0007-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 e847b02f05519e1f93d26c1c7985dca9a111f091 Mon Sep 17 00:00:00 2001 1From 5840f5a6756f8f67dbba1b47015e75c8c3264b2b 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 7/7] clang: Fix ldso for musl on x86 and x32 architectures 4Subject: [PATCH 7/8] 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,10 +14,10 @@ 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/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp 16diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
17index 624953b17f..69624f8432 100644 17index 5bca972cc2..2ca285679c 100644
18--- a/lib/Driver/ToolChains/Linux.cpp 18--- a/lib/Driver/ToolChains/Linux.cpp
19+++ b/lib/Driver/ToolChains/Linux.cpp 19+++ b/lib/Driver/ToolChains/Linux.cpp
20@@ -427,6 +427,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 20@@ -492,6 +492,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 624953b17f..69624f8432 100644
25 25
26 switch (Arch) { 26 switch (Arch) {
27 case llvm::Triple::arm: 27 case llvm::Triple::arm:
28@@ -439,6 +440,13 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { 28@@ -504,6 +505,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;
@@ -40,5 +40,5 @@ index 624953b17f..69624f8432 100644
40 ArchName = Triple.getArchName().str(); 40 ArchName = Triple.getArchName().str();
41 } 41 }
42-- 42--
432.17.0 432.18.0
44 44
diff --git a/recipes-devtools/clang/clang/0008-clang-scan-view-needs-python-2.x.patch b/recipes-devtools/clang/clang/0008-clang-scan-view-needs-python-2.x.patch
index a61ab09..c55b309 100644
--- a/recipes-devtools/clang/clang/0008-clang-scan-view-needs-python-2.x.patch
+++ b/recipes-devtools/clang/clang/0008-clang-scan-view-needs-python-2.x.patch
@@ -1,4 +1,4 @@
1From 38ea94d7476866d1ba337414e6834c5432140de8 Mon Sep 17 00:00:00 2001 1From 846e59787ec12b6cd817640151d1f23d3b78d6b5 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 8/8] clang: scan-view needs python 2.x 4Subject: [PATCH 8/8] clang: scan-view needs python 2.x
@@ -23,5 +23,5 @@ index 1b6e8ba90d..7c5867d1be 100755
23 """The clang static analyzer results viewer. 23 """The clang static analyzer results viewer.
24 """ 24 """
25-- 25--
262.17.0 262.18.0
27 27
diff --git a/recipes-devtools/clang/clang/0009-clang-Driver-Avoid-invalidated-iterator-in-insertTar.patch b/recipes-devtools/clang/clang/0009-clang-Driver-Avoid-invalidated-iterator-in-insertTar.patch
deleted file mode 100644
index 2f7b921..0000000
--- a/recipes-devtools/clang/clang/0009-clang-Driver-Avoid-invalidated-iterator-in-insertTar.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1From 19c832f5017f796012812414705f8d57e77b28ce Mon Sep 17 00:00:00 2001
2From: Serge Pavlov <sepavloff@gmail.com>
3Date: Mon, 19 Mar 2018 16:13:43 +0000
4Subject: [PATCH 9/9] clang: [Driver] Avoid invalidated iterator in
5 insertTargetAndModeArgs
6
7Doing an .insert() can potentially invalidate iterators by reallocating the
8vector's storage. When all the stars align just right, this causes segfaults
9or glibc aborts.
10
11Gentoo Linux bug (crashes while building Chromium): https://bugs.gentoo.org/650082.
12
13Patch by Hector Martin!
14
15Differential Revision: https://reviews.llvm.org/D44607
16
17git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327863 91177308-0d34-0410-b5e6-96231b3b80d8
18---
19Upstream-Status: Backport
20
21 tools/driver/driver.cpp | 9 +++++----
22 1 file changed, 5 insertions(+), 4 deletions(-)
23
24diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp
25index fa757da953..1b614accb2 100644
26--- a/tools/driver/driver.cpp
27+++ b/tools/driver/driver.cpp
28@@ -212,20 +212,21 @@ static void insertTargetAndModeArgs(const ParsedClangName &NameParts,
29 // Put target and mode arguments at the start of argument list so that
30 // arguments specified in command line could override them. Avoid putting
31 // them at index 0, as an option like '-cc1' must remain the first.
32- auto InsertionPoint = ArgVector.begin();
33- if (InsertionPoint != ArgVector.end())
34+ int InsertionPoint = 0;
35+ if (ArgVector.size() > 0)
36 ++InsertionPoint;
37
38 if (NameParts.DriverMode) {
39 // Add the mode flag to the arguments.
40- ArgVector.insert(InsertionPoint,
41+ ArgVector.insert(ArgVector.begin() + InsertionPoint,
42 GetStableCStr(SavedStrings, NameParts.DriverMode));
43 }
44
45 if (NameParts.TargetIsValid) {
46 const char *arr[] = {"-target", GetStableCStr(SavedStrings,
47 NameParts.TargetPrefix)};
48- ArgVector.insert(InsertionPoint, std::begin(arr), std::end(arr));
49+ ArgVector.insert(ArgVector.begin() + InsertionPoint,
50+ std::begin(arr), std::end(arr));
51 }
52 }
53
54--
552.17.0
56
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb
index 9cddfc9..058797c 100644
--- a/recipes-devtools/clang/clang_git.bb
+++ b/recipes-devtools/clang/clang_git.bb
@@ -143,12 +143,14 @@ BBCLASSEXTEND = "native nativesdk"
143FILES_${PN} += "\ 143FILES_${PN} += "\
144 ${libdir}/BugpointPasses.so \ 144 ${libdir}/BugpointPasses.so \
145 ${libdir}/LLVMHello.so \ 145 ${libdir}/LLVMHello.so \
146 ${libdir}/TestPlugin.so \
146 ${datadir}/scan-* \ 147 ${datadir}/scan-* \
147 ${datadir}/opt-viewer/ \ 148 ${datadir}/opt-viewer/ \
148" 149"
149 150
150FILES_${PN}-libllvm += "\ 151FILES_${PN}-libllvm += "\
151 ${libdir}/libLLVM-${MAJOR_VER}.${MINOR_VER}.so \ 152 ${libdir}/libLLVM-${MAJOR_VER}.${MINOR_VER}.so \
153 ${libdir}/libLLVM-${MAJOR_VER}.so \
152 ${libdir}/libLLVM-${MAJOR_VER}.${MINOR_VER}svn.so \ 154 ${libdir}/libLLVM-${MAJOR_VER}.${MINOR_VER}svn.so \
153" 155"
154 156
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc
index 7936405..92ac4ab 100644
--- a/recipes-devtools/clang/common.inc
+++ b/recipes-devtools/clang/common.inc
@@ -5,6 +5,7 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/clang:"
5LLVMPATCHES = "\ 5LLVMPATCHES = "\
6 file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ 6 file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \
7 file://0002-llvm-allow-env-override-of-exe-path.patch \ 7 file://0002-llvm-allow-env-override-of-exe-path.patch \
8 file://0003-llvm-Disable-calls-to-_finite-and-other-glibc-only-f.patch \
8" 9"
9# Fallback to no-PIE if not set 10# Fallback to no-PIE if not set
10GCCPIE ??= "" 11GCCPIE ??= ""
@@ -19,7 +20,6 @@ CLANGPATCHES = "\
19 file://0006-clang-Define-releative-gcc-installation-dir.patch;patchdir=tools/clang \ 20 file://0006-clang-Define-releative-gcc-installation-dir.patch;patchdir=tools/clang \
20 file://0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch;patchdir=tools/clang \ 21 file://0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch;patchdir=tools/clang \
21 file://0008-clang-scan-view-needs-python-2.x.patch;patchdir=tools/clang \ 22 file://0008-clang-scan-view-needs-python-2.x.patch;patchdir=tools/clang \
22 file://0009-clang-Driver-Avoid-invalidated-iterator-in-insertTar.patch;patchdir=tools/clang \
23" 23"
24#CLANGPATCHES += "${@'file://0007-clang-Enable-SSP-and-PIE-by-default.patch;patchdir=tools/clang' if '${GCCPIE}' else ''}" 24#CLANGPATCHES += "${@'file://0007-clang-Enable-SSP-and-PIE-by-default.patch;patchdir=tools/clang' if '${GCCPIE}' else ''}"
25 25
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 c844119..19651d1 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,13 +1,13 @@
1From 1a82e4a75ef6bf24597e886446ca06aa063a0c7f Mon Sep 17 00:00:00 2001 1From 0bff81915ecc52416e20b7226dddf6d7f3df29c9 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/5] 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---
8 lib/builtins/int_util.c | 3 +- 8 lib/builtins/int_util.c | 3 +-
9 make/platform/clang_linux_embedded.mk | 286 ++++++++++++++++++++++++ 9 make/platform/clang_linux_embedded.mk | 286 ++++++++++++++++++
10 make/platform/clang_linux_embedded_test_input.c | 0 10 .../clang_linux_embedded_test_input.c | 0
11 3 files changed, 287 insertions(+), 2 deletions(-) 11 3 files changed, 287 insertions(+), 2 deletions(-)
12 create mode 100644 make/platform/clang_linux_embedded.mk 12 create mode 100644 make/platform/clang_linux_embedded.mk
13 create mode 100644 make/platform/clang_linux_embedded_test_input.c 13 create mode 100644 make/platform/clang_linux_embedded_test_input.c
@@ -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.16.1 3252.18.0
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 ecb3fe7..a3d2a66 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,4 +1,4 @@
1From 6bfcd697851219f35688299c32e7068fad50c6f5 Mon Sep 17 00:00:00 2001 1From b1b791a330d6399c85fd304f4af12fd01c5b58b2 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/5] Simplify cross-compilation. Don't use native-compiled 4Subject: [PATCH 2/5] Simplify cross-compilation. Don't use native-compiled
@@ -16,14 +16,14 @@ https://us.codeaurora.org/patches/quic/llvm/50683/compiler-rt-cross-compilation.
16Signed-off-by: Greg Fitzgerald <gregf@codeaurora.org> 16Signed-off-by: Greg Fitzgerald <gregf@codeaurora.org>
17Signed-off-by: Khem Raj <raj.khem@gmail.com> 17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18--- 18---
19 CMakeLists.txt | 10 +++++++++- 19 CMakeLists.txt | 11 ++++++++++-
20 1 file changed, 9 insertions(+), 1 deletion(-) 20 1 file changed, 10 insertions(+), 1 deletion(-)
21 21
22diff --git a/CMakeLists.txt b/CMakeLists.txt 22diff --git a/CMakeLists.txt b/CMakeLists.txt
23index 4b953b212..571aee7ea 100644 23index 86ca2b3ef..07d894c8a 100644
24--- a/CMakeLists.txt 24--- a/CMakeLists.txt
25+++ b/CMakeLists.txt 25+++ b/CMakeLists.txt
26@@ -62,7 +62,15 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN 26@@ -63,7 +63,16 @@ 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)
@@ -37,9 +37,10 @@ index 4b953b212..571aee7ea 100644
37+ 37+
38+ set(LLVM_LIBRARY_OUTPUT_INTDIR 38+ set(LLVM_LIBRARY_OUTPUT_INTDIR
39+ ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) 39+ ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
40 40+
41 # Find Python interpreter. 41 if (TARGET intrinsics_gen)
42 set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5) 42 # Loading the llvm config causes this target to be imported so place it
43 # under the appropriate folder in an IDE.
43-- 44--
442.16.1 452.18.0
45 46
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 e6c5f9e..83f2d82 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,4 +1,4 @@
1From 2e8c6df7fe6e120063c3bdb87fb95e1326cf8434 Mon Sep 17 00:00:00 2001 1From c90304ffca9c886443e5736ae312e32415651dfe 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/5] Disable tsan on OE/glibc 4Subject: [PATCH 3/5] Disable tsan on OE/glibc
@@ -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/cmake/config-ix.cmake b/cmake/config-ix.cmake 15diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
16index 9e0c47748..227d661ae 100644 16index f3935ffd6..2c651b756 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@@ -549,7 +549,7 @@ else() 19@@ -564,7 +564,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
@@ -26,17 +26,17 @@ index 9e0c47748..227d661ae 100644
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 8b210a08a..50b6f7166 100644 29index 4e2c80390..990315f11 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|NetBSD") 32@@ -8,7 +8,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD|SunOS")
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 "NetBSD" OR (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)
39 list(APPEND SUPPORTED_TOOLS ubsan) 38 list(APPEND SUPPORTED_TOOLS ubsan)
39 endif()
40-- 40--
412.16.1 412.18.0
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 31daad0..5868c6e 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,4 +1,4 @@
1From 39e3271f270f75a4d65128f79be1dd3e455f5c85 Mon Sep 17 00:00:00 2001 1From 4c3f384a73a545183b0210f20ab84e7a5075b209 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/5] cmake/mips: Do not specify --target with OE 4Subject: [PATCH 4/5] cmake/mips: Do not specify --target with OE
@@ -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 b208f0852..2555b5e5b 100644 23index 91fe2494b..789b80628 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@@ -169,11 +169,11 @@ macro(test_targets) 26@@ -191,11 +191,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 b208f0852..2555b5e5b 100644
40 if(WIN32) 40 if(WIN32)
41 test_target_arch(arm "" "" "") 41 test_target_arch(arm "" "" "")
42-- 42--
432.16.1 432.18.0
44 44
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb
index 31e705a..ad260ba 100644
--- a/recipes-devtools/clang/compiler-rt_git.bb
+++ b/recipes-devtools/clang/compiler-rt_git.bb
@@ -12,7 +12,7 @@ TOOLCHAIN = "clang"
12 12
13PV .= "+git${SRCPV}" 13PV .= "+git${SRCPV}"
14 14
15LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=bf24bca27049b52e9738451aa55771d4; \ 15LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=92bfbe70fc44c6e5efc6403a31180ed7; \
16" 16"
17SRC_URI = "\ 17SRC_URI = "\
18 ${LLVM_GIT}/compiler-rt.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=compiler-rt \ 18 ${LLVM_GIT}/compiler-rt.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=compiler-rt \
diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb
index a88b46d..558a0f6 100644
--- a/recipes-devtools/clang/libcxx_git.bb
+++ b/recipes-devtools/clang/libcxx_git.bb
@@ -23,6 +23,8 @@ PACKAGECONFIG[unwind] = "-DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXXABI_LIBUNWIND_
23PROVIDES = "${@bb.utils.contains('PACKAGECONFIG', 'unwind', 'libunwind', '', d)}" 23PROVIDES = "${@bb.utils.contains('PACKAGECONFIG', 'unwind', 'libunwind', '', d)}"
24 24
25LIC_FILES_CHKSUM = "file://projects/libcxx/LICENSE.TXT;md5=7b3a0e1b99822669d630011defe9bfd9; \ 25LIC_FILES_CHKSUM = "file://projects/libcxx/LICENSE.TXT;md5=7b3a0e1b99822669d630011defe9bfd9; \
26 file://projects/libcxxabi/LICENSE.TXT;md5=3600117b7c18121ab04c53e4615dc36e \
27 file://projects/libunwind/LICENSE.TXT;md5=7ea986af7f70eaea5a297dd2744c79a5 \
26" 28"
27SRC_URI = "\ 29SRC_URI = "\
28 ${LLVM_GIT}/llvm.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=llvm \ 30 ${LLVM_GIT}/llvm.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=llvm \
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 3fabbfe..b4b835b 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,4 +1,4 @@
1From d630a82a405c44843bae28286a09ac5f9fa202bd Mon Sep 17 00:00:00 2001 1From d1b12ce65b563ed5eb0fdd6460d592d829fabc75 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 1/2] Include limits.h for PATH_MAX definition 4Subject: [PATCH 1/2] Include limits.h for PATH_MAX definition
@@ -11,10 +11,10 @@ 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 72f86917b..965ac744f 100644 14index b6952f7e3..2cedf5d90 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@@ -29,7 +29,7 @@
18 #include <assert.h> // for assert 18 #include <assert.h> // for assert
19 #include <stdio.h> // for size_t, NULL, snpr... 19 #include <stdio.h> // for size_t, NULL, snpr...
20 #include <string.h> // for strcmp 20 #include <string.h> // for strcmp
@@ -24,5 +24,5 @@ index 72f86917b..965ac744f 100644
24 using namespace lldb_private; 24 using namespace lldb_private;
25 25
26-- 26--
272.16.1 272.18.0
28 28
diff --git a/recipes-devtools/clang/lldb/0002-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 1167b5a..42e75f2 100644
--- a/recipes-devtools/clang/lldb/0002-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,4 +1,4 @@
1From 397a9e7dc35a7b360bb8466996ae7755574dc04c Mon Sep 17 00:00:00 2001 1From 479c943c3b87887d2b93c711220894e94d49979d 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 2/2] lldb: Add -lxml2 to linker cmdline of xml is found 4Subject: [PATCH 2/2] lldb: Add -lxml2 to linker cmdline of xml is found
@@ -19,24 +19,22 @@ Fixes
19 19
20Signed-off-by: Khem Raj <raj.khem@gmail.com> 20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21--- 21---
22 source/Host/CMakeLists.txt | 4 ++++ 22 source/Host/CMakeLists.txt | 2 +-
23 1 file changed, 4 insertions(+) 23 1 file changed, 1 insertion(+), 1 deletion(-)
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 2b6f0e48a..1a910a9af 100644 26index 5a92447ed..22ce6eee4 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@@ -175,6 +175,10 @@ if (NOT LLDB_DISABLE_LIBEDIT) 29@@ -149,7 +149,7 @@ if (APPLE)
30 list(APPEND EXTRA_LIBS edit) 30 list(APPEND EXTRA_LIBS xml2)
31 endif() 31 else ()
32 32 if (LIBXML2_FOUND)
33+if (LIBXML2_FOUND) 33- list(APPEND EXTRA_LIBS ${LIBXML2_LIBRARIES})
34+ list(APPEND EXTRA_LIBS xml2) 34+ list(APPEND EXTRA_LIBS xml2)
35+endif () 35 endif()
36+ 36 endif ()
37 add_lldb_library(lldbHost 37 if (HAVE_LIBDL)
38 ${HOST_SOURCES}
39
40-- 38--
412.16.1 392.18.0
42 40