From 12b98a5e70fc680e16dfe9e76e844d0d8276fa67 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 24 Aug 2018 19:10:35 -0700 Subject: 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 --- recipes-devtools/clang/clang.inc | 32 +++++------ .../0001-clang-driver-Use-lib-for-ldso-on-OE.patch | 14 ++--- ...ind-libunwind-headers-when-LIBCXXABI_LIBU.patch | 12 ++-- ...LibraryInfo-Undefine-libc-functions-if-th.patch | 22 ++++---- ...iver-tools.cpp-Add-lssp_nonshared-on-musl.patch | 10 ++-- .../0002-llvm-allow-env-override-of-exe-path.patch | 12 ++-- ...-ppc-does-not-support-128-bit-long-double.patch | 10 ++-- ...e-calls-to-_finite-and-other-glibc-only-f.patch | 65 ++++++++++++++++++++++ .../0004-clang-Prepend-trailing-to-sysroot.patch | 10 ++-- ...inside-the-target-sysroot-for-compiler-ru.patch | 14 ++--- ...ang-Define-releative-gcc-installation-dir.patch | 28 +++++----- ...dso-for-musl-on-x86-and-x32-architectures.patch | 12 ++-- .../0008-clang-scan-view-needs-python-2.x.patch | 4 +- ...r-Avoid-invalidated-iterator-in-insertTar.patch | 56 ------------------- recipes-devtools/clang/clang_git.bb | 2 + recipes-devtools/clang/common.inc | 2 +- .../0001-support-a-new-embedded-linux-target.patch | 10 ++-- ...oss-compilation.-Don-t-use-native-compile.patch | 19 ++++--- .../0003-Disable-tsan-on-OE-glibc.patch | 16 +++--- ...-cmake-mips-Do-not-specify-target-with-OE.patch | 8 +-- recipes-devtools/clang/compiler-rt_git.bb | 2 +- recipes-devtools/clang/libcxx_git.bb | 2 + ...-Include-limits.h-for-PATH_MAX-definition.patch | 8 +-- ...d-lxml2-to-linker-cmdline-of-xml-is-found.patch | 30 +++++----- 24 files changed, 207 insertions(+), 193 deletions(-) create mode 100644 recipes-devtools/clang/clang/0003-llvm-Disable-calls-to-_finite-and-other-glibc-only-f.patch delete mode 100644 recipes-devtools/clang/clang/0009-clang-Driver-Avoid-invalidated-iterator-in-insertTar.patch 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 = "" LLVM_DIR = "llvm${LLVM_RELEASE}" LLVM_GIT ?= "git://github.com/llvm-mirror" -LLVM_GIT_PROTOCOL ?= "git" +LLVM_GIT_PROTOCOL ?= "https" # # Uncomment below to enable master version of clang/llvm # -MAJOR_VER = "6" +MAJOR_VER = "7" MINOR_VER = "0" -PATCH_VER = "1" +PATCH_VER = "0" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" -BRANCH = "release_60" +BRANCH = "release_${MAJOR_VER}${MINOR_VER}" -SRCREV_llvm = "5136df4d089a086b70d452160ad5451861269498" -SRCREV_clang = "2f27999df400d17b33cdd412fdd606a88208dfcc" -SRCREV_compiler-rt = "0cc870394e803e12048451659fc5ccf6e69d4e70" -SRCREV_cxxabi = "9245d481eb3e890f708ff2d7dadf2a10c04748ba" -SRCREV_libcxx = "cb9e96f6f152733457ddf0e3296fc10d3c34c39c" -SRCREV_libunwind = "68c1bfc35687033aad28657404b80b1d558a4804" -SRCREV_lld = "b051c1d541461251e2a3bde2afb3d0b32590118f" -SRCREV_lldb = "b6df24ff1b258b18041161b8f32ac316a3b5d8d9" -SRCREV_openmp = "d5aa29cb3bcf51289d326b4e565613db8aff65ef" +SRCREV_llvm = "cd197f3be9d205665f3de699407c4fe1ed4415cc" +SRCREV_clang = "658c2f1c721612e9a6545c0440665eebb2df632c" +SRCREV_compiler-rt = "a4cbb02bca3b952117e9ccfbad8a485857f25935" +SRCREV_cxxabi = "809ebefc12d1cf3653a5459e7eb1cb13bb93fc39" +SRCREV_libcxx = "dffe9e0f1dde084f2aab8010345aeb1b7c8f7d4c" +SRCREV_libunwind = "d1dee9d525dac7d7146b6e197bc330a7bd963075" +SRCREV_lld = "a90eee85aee3b68cf20cbb8e4bc4a1a0469b7dd0" +SRCREV_lldb = "434b6ab1b240bfdb60ba8ca645d3658bc7b27d81" +SRCREV_openmp = "366ce74b85790ed41f94fba7f17a0911bde83500" -LLVMMD5SUM = "e825e017edc35cfd58e26116e5251771" -CLANGMD5SUM = "a77eac638a3aae44a2d604217d6f0f01" -LLDMD5SUM = "c7343e1ccb3d65a14eba72ce1d548cb4" +LLVMMD5SUM = "c520ed40e11887bb1d24d86f7f5b1f05" +CLANGMD5SUM = "444af0e124949f07f791f12c928e5994" +LLDMD5SUM = "f4941ace8ddb3d6cf177fff94966319a" LLDBMD5SUM = "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 @@ -From a71c6f6cad70c1cb094ffd53ca28135eb87df406 Mon Sep 17 00:00:00 2001 +From 06033c7fa2d575a9a68b377f5ce9324433c23806 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 21 May 2016 21:52:36 -0700 -Subject: [PATCH 1/7] clang: driver: Use /lib for ldso on OE +Subject: [PATCH 1/8] clang: driver: Use /lib for ldso on OE OE does not follow the default base_libdir that clang has, therefore adjust it for OE @@ -15,10 +15,10 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp -index 1301cdf114..d59512627d 100644 +index f8f3623918..e662b6b262 100644 --- a/lib/Driver/ToolChains/Linux.cpp +++ b/lib/Driver/ToolChains/Linux.cpp -@@ -502,12 +502,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -566,12 +566,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { Loader = "ld.so.1"; break; case llvm::Triple::ppc64: @@ -33,7 +33,7 @@ index 1301cdf114..d59512627d 100644 Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; break; -@@ -517,7 +517,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -593,7 +593,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { Loader = "ld-linux.so.2"; break; case llvm::Triple::sparcv9: @@ -42,7 +42,7 @@ index 1301cdf114..d59512627d 100644 Loader = "ld-linux.so.2"; break; case llvm::Triple::systemz: -@@ -531,7 +531,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -607,7 +607,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { case llvm::Triple::x86_64: { bool X32 = Triple.getEnvironment() == llvm::Triple::GNUX32; @@ -52,5 +52,5 @@ index 1301cdf114..d59512627d 100644 break; } -- -2.17.0 +2.18.0 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 @@ -From 38ec6e5550b9f50a7393182b48c5c26cad4d541f Mon Sep 17 00:00:00 2001 +From a122717a9bc31e0ab44197e743aa466711c4bf79 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 27 Aug 2017 10:37:49 -0700 Subject: [PATCH] libcxxabi: Find libunwind headers when @@ -17,10 +17,10 @@ Signed-off-by: Khem Raj 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1adbdb3..ba4e9d7 100644 +index d6648ed..12c02f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -409,15 +409,10 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") +@@ -434,15 +434,10 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") # Setup Source Code #=============================================================================== @@ -37,8 +37,8 @@ index 1adbdb3..ba4e9d7 100644 libunwind.h PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} ${LIBCXXABI_LIBUNWIND_PATH}/include -@@ -427,15 +422,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) - NO_DEFAULT_PATH +@@ -454,15 +449,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) + NO_CMAKE_FIND_ROOT_PATH ) - if (LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL STREQUAL "LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL-NOTFOUND") @@ -64,5 +64,5 @@ index 1adbdb3..ba4e9d7 100644 # soname, etc... add_subdirectory(src) -- -2.16.1 +2.18.0 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 @@ -From 96558c4f25d5132936014f6f2d6252cfdfdf478a Mon Sep 17 00:00:00 2001 +From fc9904be5d4ee1d1e92a1ff86b01218fbf91b12f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 21 May 2016 00:33:20 +0000 -Subject: [PATCH 1/2] llvm: TargetLibraryInfo: Undefine libc functions if they +Subject: [PATCH 1/3] llvm: TargetLibraryInfo: Undefine libc functions if they are macros musl defines some functions as macros and not inline functions @@ -13,10 +13,10 @@ Signed-off-by: Khem Raj 1 file changed, 21 insertions(+) diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def -index a461ed813b9..f9fd9faeee0 100644 +index f94debba9c5..e92dbc98c55 100644 --- a/include/llvm/Analysis/TargetLibraryInfo.def +++ b/include/llvm/Analysis/TargetLibraryInfo.def -@@ -665,6 +665,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") +@@ -707,6 +707,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") TLI_DEFINE_ENUM_INTERNAL(fopen) TLI_DEFINE_STRING_INTERNAL("fopen") /// FILE *fopen64(const char *filename, const char *opentype) @@ -26,7 +26,7 @@ index a461ed813b9..f9fd9faeee0 100644 TLI_DEFINE_ENUM_INTERNAL(fopen64) TLI_DEFINE_STRING_INTERNAL("fopen64") /// int fprintf(FILE *stream, const char *format, ...); -@@ -700,6 +703,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek") +@@ -751,6 +754,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek") /// int fseeko(FILE *stream, off_t offset, int whence); TLI_DEFINE_ENUM_INTERNAL(fseeko) TLI_DEFINE_STRING_INTERNAL("fseeko") @@ -36,7 +36,7 @@ index a461ed813b9..f9fd9faeee0 100644 /// int fseeko64(FILE *stream, off64_t offset, int whence) TLI_DEFINE_ENUM_INTERNAL(fseeko64) TLI_DEFINE_STRING_INTERNAL("fseeko64") -@@ -710,6 +716,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos") +@@ -761,6 +767,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos") TLI_DEFINE_ENUM_INTERNAL(fstat) TLI_DEFINE_STRING_INTERNAL("fstat") /// int fstat64(int filedes, struct stat64 *buf) @@ -46,7 +46,7 @@ index a461ed813b9..f9fd9faeee0 100644 TLI_DEFINE_ENUM_INTERNAL(fstat64) TLI_DEFINE_STRING_INTERNAL("fstat64") /// int fstatvfs(int fildes, struct statvfs *buf); -@@ -725,6 +734,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell") +@@ -776,6 +785,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell") TLI_DEFINE_ENUM_INTERNAL(ftello) TLI_DEFINE_STRING_INTERNAL("ftello") /// off64_t ftello64(FILE *stream) @@ -56,7 +56,7 @@ index a461ed813b9..f9fd9faeee0 100644 TLI_DEFINE_ENUM_INTERNAL(ftello64) TLI_DEFINE_STRING_INTERNAL("ftello64") /// int ftrylockfile(FILE *file); -@@ -845,6 +857,9 @@ TLI_DEFINE_STRING_INTERNAL("logl") +@@ -902,6 +914,9 @@ TLI_DEFINE_STRING_INTERNAL("logl") TLI_DEFINE_ENUM_INTERNAL(lstat) TLI_DEFINE_STRING_INTERNAL("lstat") /// int lstat64(const char *path, struct stat64 *buf); @@ -66,7 +66,7 @@ index a461ed813b9..f9fd9faeee0 100644 TLI_DEFINE_ENUM_INTERNAL(lstat64) TLI_DEFINE_STRING_INTERNAL("lstat64") /// void *malloc(size_t size); -@@ -1064,6 +1079,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") +@@ -1127,6 +1142,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") TLI_DEFINE_ENUM_INTERNAL(stat) TLI_DEFINE_STRING_INTERNAL("stat") /// int stat64(const char *path, struct stat64 *buf); @@ -76,7 +76,7 @@ index a461ed813b9..f9fd9faeee0 100644 TLI_DEFINE_ENUM_INTERNAL(stat64) TLI_DEFINE_STRING_INTERNAL("stat64") /// int statvfs(const char *path, struct statvfs *buf); -@@ -1193,6 +1211,9 @@ TLI_DEFINE_STRING_INTERNAL("times") +@@ -1256,6 +1274,9 @@ TLI_DEFINE_STRING_INTERNAL("times") TLI_DEFINE_ENUM_INTERNAL(tmpfile) TLI_DEFINE_STRING_INTERNAL("tmpfile") /// FILE *tmpfile64(void) @@ -87,5 +87,5 @@ index a461ed813b9..f9fd9faeee0 100644 TLI_DEFINE_STRING_INTERNAL("tmpfile64") /// int toascii(int c); -- -2.16.1 +2.18.0 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 @@ -From 0ace54d609aac7d5f1b67d9474e3782a17bec8bf Mon Sep 17 00:00:00 2001 +From fc628b03a5ac41a446fd2dfea0ecbe03331e54d8 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 19 May 2016 21:11:06 -0700 -Subject: [PATCH 2/7] clang: Driver/tools.cpp: Add -lssp_nonshared on musl +Subject: [PATCH 2/8] clang: Driver/tools.cpp: Add -lssp_nonshared on musl musl driver will need to add ssp_nonshared for stack_check_local on the linker cmdline when using stack protector commands on @@ -13,10 +13,10 @@ Signed-off-by: Khem Raj 1 file changed, 6 insertions(+) diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp -index 7845781f12..bbe7845765 100644 +index 3755673250..766c650b3c 100644 --- a/lib/Driver/ToolChains/Gnu.cpp +++ b/lib/Driver/ToolChains/Gnu.cpp -@@ -518,6 +518,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, +@@ -503,6 +503,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (IsIAMCU) CmdArgs.push_back("-lgloss"); @@ -30,5 +30,5 @@ index 7845781f12..bbe7845765 100644 CmdArgs.push_back("--end-group"); else -- -2.17.0 +2.18.0 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 @@ -From 2f8ea767afdaa440c6368040630e1b3ea6a0977a Mon Sep 17 00:00:00 2001 +From c65c0af4a5721e3c0dfcc56c15ef3310a54e0008 Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Fri, 19 May 2017 00:22:57 -0700 -Subject: [PATCH 2/2] llvm: allow env override of exe path +Subject: [PATCH 2/3] llvm: allow env override of exe path When using a native llvm-config from inside a sysroot, we need llvm-config to return the libraries, include directories, etc. from inside the sysroot rather @@ -15,12 +15,12 @@ Signed-off-by: Khem Raj 1 file changed, 7 insertions(+) diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp -index 08b096afb05..d8d7742744e 100644 +index 892adc3b9dd..38f190ecbd1 100644 --- a/tools/llvm-config/llvm-config.cpp +++ b/tools/llvm-config/llvm-config.cpp -@@ -225,6 +225,13 @@ Typical components:\n\ +@@ -226,6 +226,13 @@ Typical components:\n\ - /// \brief Compute the path to the main executable. + /// Compute the path to the main executable. std::string GetExecutablePath(const char *Argv0) { + // Hack for Yocto: we need to override the root path when we are using + // llvm-config from within a target sysroot. @@ -33,5 +33,5 @@ index 08b096afb05..d8d7742744e 100644 // allow taking the address of ::main however. void *P = (void *)(intptr_t)GetExecutablePath; -- -2.16.1 +2.18.0 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 @@ -From d02f7f858c22fc1dcbc1ea3a96a597bcc4aa4d77 Mon Sep 17 00:00:00 2001 +From 48fa180df65f7ee63a85dd69fd2c1382609c5e95 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 02:00:11 -0700 -Subject: [PATCH 3/7] clang: musl/ppc does not support 128-bit long double +Subject: [PATCH 3/8] clang: musl/ppc does not support 128-bit long double Signed-off-by: Khem Raj --- @@ -9,10 +9,10 @@ Signed-off-by: Khem Raj 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Basic/Targets/PPC.h b/lib/Basic/Targets/PPC.h -index 04bef258e3..0ae210698a 100644 +index 439c73a0e3..8da698ee21 100644 --- a/lib/Basic/Targets/PPC.h +++ b/lib/Basic/Targets/PPC.h -@@ -272,7 +272,8 @@ public: +@@ -328,7 +328,8 @@ public: break; } @@ -23,5 +23,5 @@ index 04bef258e3..0ae210698a 100644 LongDoubleFormat = &llvm::APFloat::IEEEdouble(); } -- -2.17.0 +2.18.0 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 @@ +From cb1b6f021d2ce82d7d0084758b7efaa3917640f5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 26 Aug 2018 22:43:19 -0700 +Subject: [PATCH 3/3] llvm: Disable calls to *_finite and other glibc-only + functions on Musl. + +glibc's finite lib calls are generated when possible. +However, they are not supported on Musl/linux. This change also +disables other functions not available on Musl. + +Signed-off-by: Khem Raj +--- + lib/Analysis/TargetLibraryInfo.cpp | 29 +++++++++++++++-------------- + 1 file changed, 15 insertions(+), 14 deletions(-) + +diff --git a/lib/Analysis/TargetLibraryInfo.cpp b/lib/Analysis/TargetLibraryInfo.cpp +index 102135fbf31..5bc4d2b47f5 100644 +--- a/lib/Analysis/TargetLibraryInfo.cpp ++++ b/lib/Analysis/TargetLibraryInfo.cpp +@@ -415,27 +415,28 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, + + // The following functions are available on Linux, + // but Android uses bionic instead of glibc. +- if (!T.isOSLinux() || T.isAndroid()) { ++ if (!T.isOSLinux() || T.isAndroid() || T.isMusl()) { + TLI.setUnavailable(LibFunc_dunder_strdup); + TLI.setUnavailable(LibFunc_dunder_strtok_r); + TLI.setUnavailable(LibFunc_dunder_isoc99_scanf); + TLI.setUnavailable(LibFunc_dunder_isoc99_sscanf); + TLI.setUnavailable(LibFunc_under_IO_getc); + TLI.setUnavailable(LibFunc_under_IO_putc); +- // But, Android has memalign. +- if (!T.isAndroid()) ++ // But, Android/Musl has memalign. ++ if (!T.isAndroid() || !T.isMusl() ) + TLI.setUnavailable(LibFunc_memalign); +- TLI.setUnavailable(LibFunc_fopen64); +- TLI.setUnavailable(LibFunc_fseeko64); +- TLI.setUnavailable(LibFunc_fstat64); +- TLI.setUnavailable(LibFunc_fstatvfs64); +- TLI.setUnavailable(LibFunc_ftello64); +- TLI.setUnavailable(LibFunc_lstat64); +- TLI.setUnavailable(LibFunc_open64); +- TLI.setUnavailable(LibFunc_stat64); +- TLI.setUnavailable(LibFunc_statvfs64); +- TLI.setUnavailable(LibFunc_tmpfile64); +- ++ if (!T.isMusl()) { ++ TLI.setUnavailable(LibFunc_fopen64); ++ TLI.setUnavailable(LibFunc_fseeko64); ++ TLI.setUnavailable(LibFunc_fstat64); ++ TLI.setUnavailable(LibFunc_fstatvfs64); ++ TLI.setUnavailable(LibFunc_ftello64); ++ TLI.setUnavailable(LibFunc_lstat64); ++ TLI.setUnavailable(LibFunc_open64); ++ TLI.setUnavailable(LibFunc_stat64); ++ TLI.setUnavailable(LibFunc_statvfs64); ++ TLI.setUnavailable(LibFunc_tmpfile64); ++ } + // Relaxed math functions are included in math-finite.h on Linux (GLIBC). + TLI.setUnavailable(LibFunc_acos_finite); + TLI.setUnavailable(LibFunc_acosf_finite); +-- +2.18.0 + 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 @@ -From 8a29645c68da82d6d7d1e7a74fdfad474f5c5755 Mon Sep 17 00:00:00 2001 +From 4764d8f8b613631de2e3c9a3614427d07c599017 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 16 Mar 2017 09:02:13 -0700 -Subject: [PATCH 4/7] clang: Prepend trailing '/' to sysroot +Subject: [PATCH 4/8] clang: Prepend trailing '/' to sysroot This is needed to handle a case where clang isntall and target sysroot are perilously same @@ -24,10 +24,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp -index d59512627d..624953b17f 100644 +index e662b6b262..5bca972cc2 100644 --- a/lib/Driver/ToolChains/Linux.cpp +++ b/lib/Driver/ToolChains/Linux.cpp -@@ -193,7 +193,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) +@@ -211,7 +211,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) GCCInstallation.init(Triple, Args); Multilibs = GCCInstallation.getMultilibs(); llvm::Triple::ArchType Arch = Triple.getArch(); @@ -37,5 +37,5 @@ index d59512627d..624953b17f 100644 // Cross-compiling binutils and GCC installations (vanilla and openSUSE at // least) put various tools in a triple-prefixed directory off of the parent -- -2.17.0 +2.18.0 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 @@ -From 183123464de1762bf755af4f50d77353121188c1 Mon Sep 17 00:00:00 2001 +From e02d9f3e1c724a4161709952a3ef59f81432fc06 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 16 Mar 2017 19:06:26 -0700 -Subject: [PATCH 5/7] clang: Look inside the target sysroot for compiler +Subject: [PATCH 5/8] clang: Look inside the target sysroot for compiler runtime In OE compiler-rt and libc++ are built and staged into target @@ -16,18 +16,18 @@ Signed-off-by: Khem Raj 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp -index f96a1182e3..d286622f8d 100644 +index cf3db34688..dae3178380 100644 --- a/lib/Driver/ToolChain.cpp +++ b/lib/Driver/ToolChain.cpp -@@ -12,6 +12,7 @@ - #include "ToolChains/Arch/ARM.h" +@@ -13,6 +13,7 @@ #include "ToolChains/Clang.h" #include "clang/Basic/ObjCRuntime.h" + #include "clang/Basic/Sanitizers.h" +#include "clang/Basic/Version.h" #include "clang/Basic/VirtualFileSystem.h" #include "clang/Config/config.h" #include "clang/Driver/Action.h" -@@ -324,7 +325,10 @@ static StringRef getArchNameForCompilerRTLib(const ToolChain &TC, +@@ -343,7 +344,10 @@ StringRef ToolChain::getOSLibName() const { } std::string ToolChain::getCompilerRTPath() const { @@ -40,5 +40,5 @@ index f96a1182e3..d286622f8d 100644 llvm::sys::path::append(Path, "lib"); } else { -- -2.17.0 +2.18.0 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 @@ -From 9a91d0b82ba48a9e2f634197809a1323298ef285 Mon Sep 17 00:00:00 2001 +From e6232d22df73b80ced3784fd85166ebe24e6c31b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 21 May 2017 15:38:25 -0700 -Subject: [PATCH 6/7] clang: Define / releative gcc installation dir +Subject: [PATCH 6/8] clang: Define / releative gcc installation dir This is required for OE gcc installation to work. Without this its not able to find the paths for libgcc @@ -10,21 +10,23 @@ installation in OE Signed-off-by: Khem Raj --- - lib/Driver/ToolChains/Gnu.cpp | 1 + - 1 file changed, 1 insertion(+) + lib/Driver/ToolChains/Gnu.cpp | 3 +++ + 1 file changed, 3 insertions(+) diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp -index bbe7845765..692385ff27 100644 +index 766c650b3c..777526e063 100644 --- a/lib/Driver/ToolChains/Gnu.cpp +++ b/lib/Driver/ToolChains/Gnu.cpp -@@ -2070,6 +2070,7 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2190,6 +2190,9 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( + {"gcc-cross/" + CandidateTriple.str(), "../..", + TargetTriple.getOS() != llvm::Triple::Solaris}, - // Debian puts cross-compilers in gcc-cross. - {"gcc-cross/" + CandidateTriple.str(), "../..", true}, -+ {"/" + CandidateTriple.str(), "..", true}, - - // The Freescale PPC SDK has the gcc libraries in - // /usr/lib//x.y.z so have a look there as well. Only do ++ // OE cross-compilers path structures ++ {"/" + CandidateTriple.str(), "..", true}, ++ + // The Freescale PPC SDK has the gcc libraries in + // /usr/lib//x.y.z so have a look there as well. Only do + // this on Freescale triples, though, since some systems put a *lot* of -- -2.17.0 +2.18.0 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 @@ -From e847b02f05519e1f93d26c1c7985dca9a111f091 Mon Sep 17 00:00:00 2001 +From 5840f5a6756f8f67dbba1b47015e75c8c3264b2b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 16 Aug 2017 15:16:15 -0700 -Subject: [PATCH 7/7] clang: Fix ldso for musl on x86 and x32 architectures +Subject: [PATCH 7/8] clang: Fix ldso for musl on x86 and x32 architectures x32 linker is called ld-musl-x32.so.1 and x86 linker is called ld-musl-i386.so.1, Currently, linker for @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 1 file changed, 8 insertions(+) diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp -index 624953b17f..69624f8432 100644 +index 5bca972cc2..2ca285679c 100644 --- a/lib/Driver/ToolChains/Linux.cpp +++ b/lib/Driver/ToolChains/Linux.cpp -@@ -427,6 +427,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -492,6 +492,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { if (Triple.isMusl()) { std::string ArchName; bool IsArm = false; @@ -25,7 +25,7 @@ index 624953b17f..69624f8432 100644 switch (Arch) { case llvm::Triple::arm: -@@ -439,6 +440,13 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -504,6 +505,13 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { ArchName = "armeb"; IsArm = true; break; @@ -40,5 +40,5 @@ index 624953b17f..69624f8432 100644 ArchName = Triple.getArchName().str(); } -- -2.17.0 +2.18.0 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 @@ -From 38ea94d7476866d1ba337414e6834c5432140de8 Mon Sep 17 00:00:00 2001 +From 846e59787ec12b6cd817640151d1f23d3b78d6b5 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 15 May 2018 10:28:43 -0700 Subject: [PATCH 8/8] clang: scan-view needs python 2.x @@ -23,5 +23,5 @@ index 1b6e8ba90d..7c5867d1be 100755 """The clang static analyzer results viewer. """ -- -2.17.0 +2.18.0 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 @@ -From 19c832f5017f796012812414705f8d57e77b28ce Mon Sep 17 00:00:00 2001 -From: Serge Pavlov -Date: Mon, 19 Mar 2018 16:13:43 +0000 -Subject: [PATCH 9/9] clang: [Driver] Avoid invalidated iterator in - insertTargetAndModeArgs - -Doing an .insert() can potentially invalidate iterators by reallocating the -vector's storage. When all the stars align just right, this causes segfaults -or glibc aborts. - -Gentoo Linux bug (crashes while building Chromium): https://bugs.gentoo.org/650082. - -Patch by Hector Martin! - -Differential Revision: https://reviews.llvm.org/D44607 - -git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327863 91177308-0d34-0410-b5e6-96231b3b80d8 ---- -Upstream-Status: Backport - - tools/driver/driver.cpp | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp -index fa757da953..1b614accb2 100644 ---- a/tools/driver/driver.cpp -+++ b/tools/driver/driver.cpp -@@ -212,20 +212,21 @@ static void insertTargetAndModeArgs(const ParsedClangName &NameParts, - // Put target and mode arguments at the start of argument list so that - // arguments specified in command line could override them. Avoid putting - // them at index 0, as an option like '-cc1' must remain the first. -- auto InsertionPoint = ArgVector.begin(); -- if (InsertionPoint != ArgVector.end()) -+ int InsertionPoint = 0; -+ if (ArgVector.size() > 0) - ++InsertionPoint; - - if (NameParts.DriverMode) { - // Add the mode flag to the arguments. -- ArgVector.insert(InsertionPoint, -+ ArgVector.insert(ArgVector.begin() + InsertionPoint, - GetStableCStr(SavedStrings, NameParts.DriverMode)); - } - - if (NameParts.TargetIsValid) { - const char *arr[] = {"-target", GetStableCStr(SavedStrings, - NameParts.TargetPrefix)}; -- ArgVector.insert(InsertionPoint, std::begin(arr), std::end(arr)); -+ ArgVector.insert(ArgVector.begin() + InsertionPoint, -+ std::begin(arr), std::end(arr)); - } - } - --- -2.17.0 - 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" FILES_${PN} += "\ ${libdir}/BugpointPasses.so \ ${libdir}/LLVMHello.so \ + ${libdir}/TestPlugin.so \ ${datadir}/scan-* \ ${datadir}/opt-viewer/ \ " FILES_${PN}-libllvm += "\ ${libdir}/libLLVM-${MAJOR_VER}.${MINOR_VER}.so \ + ${libdir}/libLLVM-${MAJOR_VER}.so \ ${libdir}/libLLVM-${MAJOR_VER}.${MINOR_VER}svn.so \ " 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:" LLVMPATCHES = "\ file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ file://0002-llvm-allow-env-override-of-exe-path.patch \ + file://0003-llvm-Disable-calls-to-_finite-and-other-glibc-only-f.patch \ " # Fallback to no-PIE if not set GCCPIE ??= "" @@ -19,7 +20,6 @@ CLANGPATCHES = "\ file://0006-clang-Define-releative-gcc-installation-dir.patch;patchdir=tools/clang \ file://0007-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch;patchdir=tools/clang \ file://0008-clang-scan-view-needs-python-2.x.patch;patchdir=tools/clang \ - file://0009-clang-Driver-Avoid-invalidated-iterator-in-insertTar.patch;patchdir=tools/clang \ " #CLANGPATCHES += "${@'file://0007-clang-Enable-SSP-and-PIE-by-default.patch;patchdir=tools/clang' if '${GCCPIE}' else ''}" 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 @@ -From 1a82e4a75ef6bf24597e886446ca06aa063a0c7f Mon Sep 17 00:00:00 2001 +From 0bff81915ecc52416e20b7226dddf6d7f3df29c9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 19 Apr 2015 15:16:23 -0700 Subject: [PATCH 1/5] support a new embedded linux target Signed-off-by: Khem Raj --- - lib/builtins/int_util.c | 3 +- - make/platform/clang_linux_embedded.mk | 286 ++++++++++++++++++++++++ - make/platform/clang_linux_embedded_test_input.c | 0 + lib/builtins/int_util.c | 3 +- + make/platform/clang_linux_embedded.mk | 286 ++++++++++++++++++ + .../clang_linux_embedded_test_input.c | 0 3 files changed, 287 insertions(+), 2 deletions(-) create mode 100644 make/platform/clang_linux_embedded.mk 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 new file mode 100644 index 000000000..e69de29bb -- -2.16.1 +2.18.0 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 @@ -From 6bfcd697851219f35688299c32e7068fad50c6f5 Mon Sep 17 00:00:00 2001 +From b1b791a330d6399c85fd304f4af12fd01c5b58b2 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 19 May 2016 23:11:45 -0700 Subject: [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. Signed-off-by: Greg Fitzgerald Signed-off-by: Khem Raj --- - CMakeLists.txt | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) + CMakeLists.txt | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4b953b212..571aee7ea 100644 +index 86ca2b3ef..07d894c8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -62,7 +62,15 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN +@@ -63,7 +63,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN "Build for a bare-metal target.") if (COMPILER_RT_STANDALONE_BUILD) @@ -37,9 +37,10 @@ index 4b953b212..571aee7ea 100644 + + set(LLVM_LIBRARY_OUTPUT_INTDIR + ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) - - # Find Python interpreter. - set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5) ++ + if (TARGET intrinsics_gen) + # Loading the llvm config causes this target to be imported so place it + # under the appropriate folder in an IDE. -- -2.16.1 +2.18.0 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 @@ -From 2e8c6df7fe6e120063c3bdb87fb95e1326cf8434 Mon Sep 17 00:00:00 2001 +From c90304ffca9c886443e5736ae312e32415651dfe Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 18 Jul 2016 08:05:02 +0000 Subject: [PATCH 3/5] Disable tsan on OE/glibc @@ -13,10 +13,10 @@ Signed-off-by: Khem Raj 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake -index 9e0c47748..227d661ae 100644 +index f3935ffd6..2c651b756 100644 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake -@@ -549,7 +549,7 @@ else() +@@ -564,7 +564,7 @@ else() endif() if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND @@ -26,17 +26,17 @@ index 9e0c47748..227d661ae 100644 else() set(COMPILER_RT_HAS_TSAN FALSE) diff --git a/test/sanitizer_common/CMakeLists.txt b/test/sanitizer_common/CMakeLists.txt -index 8b210a08a..50b6f7166 100644 +index 4e2c80390..990315f11 100644 --- a/test/sanitizer_common/CMakeLists.txt +++ b/test/sanitizer_common/CMakeLists.txt -@@ -8,7 +8,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD") +@@ -8,7 +8,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD|SunOS") list(APPEND SUPPORTED_TOOLS asan) endif() - if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID) + if(CMAKE_SYSTEM_NAME MATCHES "NetBSD" OR (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID)) - list(APPEND SUPPORTED_TOOLS tsan) list(APPEND SUPPORTED_TOOLS msan) - list(APPEND SUPPORTED_TOOLS lsan) list(APPEND SUPPORTED_TOOLS ubsan) + endif() -- -2.16.1 +2.18.0 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 @@ -From 39e3271f270f75a4d65128f79be1dd3e455f5c85 Mon Sep 17 00:00:00 2001 +From 4c3f384a73a545183b0210f20ab84e7a5075b209 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 11 Feb 2017 17:54:33 +0000 Subject: [PATCH 4/5] cmake/mips: Do not specify --target with OE @@ -20,10 +20,10 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake -index b208f0852..2555b5e5b 100644 +index 91fe2494b..789b80628 100644 --- a/cmake/base-config-ix.cmake +++ b/cmake/base-config-ix.cmake -@@ -169,11 +169,11 @@ macro(test_targets) +@@ -191,11 +191,11 @@ macro(test_targets) # clang's default CPU's. In the 64-bit case, we must also specify the ABI # since the default ABI differs between gcc and clang. # FIXME: Ideally, we would build the N32 library too. @@ -40,5 +40,5 @@ index b208f0852..2555b5e5b 100644 if(WIN32) test_target_arch(arm "" "" "") -- -2.16.1 +2.18.0 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" PV .= "+git${SRCPV}" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=bf24bca27049b52e9738451aa55771d4; \ +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=92bfbe70fc44c6e5efc6403a31180ed7; \ " SRC_URI = "\ ${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_ PROVIDES = "${@bb.utils.contains('PACKAGECONFIG', 'unwind', 'libunwind', '', d)}" LIC_FILES_CHKSUM = "file://projects/libcxx/LICENSE.TXT;md5=7b3a0e1b99822669d630011defe9bfd9; \ + file://projects/libcxxabi/LICENSE.TXT;md5=3600117b7c18121ab04c53e4615dc36e \ + file://projects/libunwind/LICENSE.TXT;md5=7ea986af7f70eaea5a297dd2744c79a5 \ " SRC_URI = "\ ${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 @@ -From d630a82a405c44843bae28286a09ac5f9fa202bd Mon Sep 17 00:00:00 2001 +From d1b12ce65b563ed5eb0fdd6460d592d829fabc75 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 18 May 2017 23:12:34 -0700 Subject: [PATCH 1/2] Include limits.h for PATH_MAX definition @@ -11,10 +11,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Utility/FileSpec.cpp b/source/Utility/FileSpec.cpp -index 72f86917b..965ac744f 100644 +index b6952f7e3..2cedf5d90 100644 --- a/source/Utility/FileSpec.cpp +++ b/source/Utility/FileSpec.cpp -@@ -31,7 +31,7 @@ +@@ -29,7 +29,7 @@ #include // for assert #include // for size_t, NULL, snpr... #include // for strcmp @@ -24,5 +24,5 @@ index 72f86917b..965ac744f 100644 using namespace lldb_private; -- -2.16.1 +2.18.0 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 @@ -From 397a9e7dc35a7b360bb8466996ae7755574dc04c Mon Sep 17 00:00:00 2001 +From 479c943c3b87887d2b93c711220894e94d49979d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 22 May 2017 17:36:16 -0700 Subject: [PATCH 2/2] lldb: Add -lxml2 to linker cmdline of xml is found @@ -19,24 +19,22 @@ Fixes Signed-off-by: Khem Raj --- - source/Host/CMakeLists.txt | 4 ++++ - 1 file changed, 4 insertions(+) + source/Host/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Host/CMakeLists.txt b/source/Host/CMakeLists.txt -index 2b6f0e48a..1a910a9af 100644 +index 5a92447ed..22ce6eee4 100644 --- a/source/Host/CMakeLists.txt +++ b/source/Host/CMakeLists.txt -@@ -175,6 +175,10 @@ if (NOT LLDB_DISABLE_LIBEDIT) - list(APPEND EXTRA_LIBS edit) - endif() - -+if (LIBXML2_FOUND) -+ list(APPEND EXTRA_LIBS xml2) -+endif () -+ - add_lldb_library(lldbHost - ${HOST_SOURCES} - +@@ -149,7 +149,7 @@ if (APPLE) + list(APPEND EXTRA_LIBS xml2) + else () + if (LIBXML2_FOUND) +- list(APPEND EXTRA_LIBS ${LIBXML2_LIBRARIES}) ++ list(APPEND EXTRA_LIBS xml2) + endif() + endif () + if (HAVE_LIBDL) -- -2.16.1 +2.18.0 -- cgit v1.2.3-54-g00ecf