From c28faf337a3a8b15115bdab46c640b3ad6ce9ef8 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 24 Feb 2025 21:29:16 -0800 Subject: clang: Upgrade to 20.x release Release Notes clang-extra-tools [4] lld [3] clang [2] llvm [1] [1] https://releases.llvm.org/20.1.0/docs/ReleaseNotes.html [2] https://releases.llvm.org/20.1.0/tools/clang/docs/ReleaseNotes.html [3] https://releases.llvm.org/20.1.0/tools/lld/docs/ReleaseNotes.html [4] https://releases.llvm.org/20.1.0/tools/clang/tools/extra/docs/ReleaseNotes.html Signed-off-by: Khem Raj --- recipes-devtools/clang/clang.inc | 4 +-- ...ind-libunwind-headers-when-LIBCXXABI_LIBU.patch | 8 +++--- ...er-rt-support-a-new-embedded-linux-target.patch | 2 +- ...-Simplify-cross-compilation.-Don-t-use-na.patch | 6 ++--- ...LibraryInfo-Undefine-libc-functions-if-th.patch | 18 ++++++------- ...allow-env-override-of-exe-and-libdir-path.patch | 2 +- ...-clang-driver-Check-sysroot-for-ldso-path.patch | 12 ++++----- ...iver-tools.cpp-Add-lssp_nonshared-on-musl.patch | 6 ++--- .../0008-clang-Prepend-trailing-to-sysroot.patch | 6 ++--- ...inside-the-target-sysroot-for-compiler-ru.patch | 8 +++--- ...ang-Define-releative-gcc-installation-dir.patch | 6 ++--- ...pthread-and-ldl-along-with-lunwind-for-st.patch | 6 ++--- ..._EXECUTABLE-when-cross-compiling-for-nati.patch | 6 ++--- .../0013-Check-for-atomic-double-intrinsics.patch | 2 +- ...configure-for-packages-using-find_package.patch | 30 ++++++++++++---------- ...esource-dir-location-for-cross-toolchains.patch | 26 ++++++++++++------- ...r-Add-dyld-prefix-when-checking-sysroot-f.patch | 14 +++++----- .../0017-clang-Use-python3-in-python-scripts.patch | 2 +- ...4-set-Yocto-based-GCC-install-search-path.patch | 6 ++--- ...-anchor-for-adding-OE-distro-vendor-names.patch | 18 ++++++------- ...-Do-not-use-backtrace-APIs-on-non-glibc-l.patch | 2 +- ...86-triple-for-non-debian-multiarch-linux-.patch | 6 ++--- ...0022-libunwind-Added-unw_backtrace-method.patch | 2 +- ...-Do-not-use-install-relative-libc-headers.patch | 6 ++--- .../0024-Fix-lib-paths-for-OpenEmbedded-Host.patch | 8 +++--- ...library-search-path-for-OpenEmbedded-Host.patch | 12 ++++----- .../0026-lldb-Link-with-libatomic-on-x86.patch | 4 +-- ...027-compiler-rt-Enable-__int128-for-ppc32.patch | 12 ++++----- ...-Do-not-use-cmake-infra-to-detect-libzstd.patch | 8 +++--- ...ler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch | 16 +++++++----- ...-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch | 2 +- ...s-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch | 10 ++++---- ...vm-Add-OE-specific-ABI-triple-for-N32-ABI.patch | 20 +++++++-------- ...d-libunwind.pc.in-and-llvm-config-scripts.patch | 2 +- ...py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch | 2 +- ...r-rt-Do-not-pass-target-to-clang-compiler.patch | 29 +++++++++++++++++++++ recipes-devtools/clang/common.inc | 7 ++--- 37 files changed, 189 insertions(+), 147 deletions(-) create mode 100644 recipes-devtools/clang/clang/0035-compiler-rt-Do-not-pass-target-to-clang-compiler.patch diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 9723488..49245d3 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -3,9 +3,9 @@ LLVM_DIR = "llvm${LLVM_RELEASE}" LLVM_HTTP ?= "https://github.com/llvm" -MAJOR_VER = "19" +MAJOR_VER = "20" MINOR_VER = "1" -PATCH_VER = "7" +PATCH_VER = "0" # could be 'rcX' or 'git' or empty ( for release ) VER_SUFFIX = "" 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 f2cc81e..9c8baa9 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 1ae8003c398cb280038301697860ef5769687648 Mon Sep 17 00:00:00 2001 +From dfb3bf25e32b44efedf3ded9f6511e83a93a8f6e 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 @@ -18,10 +18,10 @@ Signed-off-by: Khem Raj 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index 43400c6e8d9a..cc0841112c0c 100644 +index 6dcfc51e5532..32478a62a058 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt -@@ -423,7 +423,7 @@ set(LIBCXXABI_LIBUNWIND_PATH "${LIBCXXABI_LIBUNWIND_PATH}" CACHE PATH +@@ -465,7 +465,7 @@ set(LIBCXXABI_LIBUNWIND_PATH "${LIBCXXABI_LIBUNWIND_PATH}" CACHE PATH "Specify path to libunwind source." FORCE) if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) @@ -30,7 +30,7 @@ index 43400c6e8d9a..cc0841112c0c 100644 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} ${LIBCXXABI_LIBUNWIND_PATH}/include ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES} -@@ -434,18 +434,23 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) +@@ -476,18 +476,23 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) NO_CMAKE_FIND_ROOT_PATH ) diff --git a/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch index e8981b8..6082b80 100644 --- a/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch +++ b/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch @@ -1,4 +1,4 @@ -From c0462b384da7a882ea924ea47476c3cb49feae46 Mon Sep 17 00:00:00 2001 +From 2fe113db0952e97d85b2c3ce92a1c2145f542801 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 19 Apr 2015 15:16:23 -0700 Subject: [PATCH] compiler-rt: support a new embedded linux target diff --git a/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch index 0cf0a89..96003c7 100644 --- a/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch +++ b/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch @@ -1,4 +1,4 @@ -From 4f2e69944e8a42da9bd1f7d49399dc3d0fad4859 Mon Sep 17 00:00:00 2001 +From 2513eec8805008ff474f4ffcb0c579b9225535f9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 19 May 2016 23:11:45 -0700 Subject: [PATCH] compiler-rt: Simplify cross-compilation. Don't use @@ -21,10 +21,10 @@ Signed-off-by: Khem Raj 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt -index 2207555b03a0..c28106378bdd 100644 +index 2c52788de56a..fe409704acc3 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt -@@ -86,7 +86,16 @@ if (COMPILER_RT_STANDALONE_BUILD) +@@ -107,7 +107,16 @@ if (COMPILER_RT_STANDALONE_BUILD) set(CMAKE_CXX_EXTENSIONS NO) if (NOT LLVM_RUNTIMES_BUILD) diff --git a/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index 8d8995b..2bac9c1 100644 --- a/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch @@ -1,4 +1,4 @@ -From 0d94f6e299bfa76da9be6451d9e759bc3f6d08a7 Mon Sep 17 00:00:00 2001 +From 54247325f65f7f8b97f73910548660402d64583b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 21 May 2016 00:33:20 +0000 Subject: [PATCH] llvm: TargetLibraryInfo: Undefine libc functions if they are @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def -index 623cdb4b6e0b..18bb48beb702 100644 +index db566b8ee610..578161f9c978 100644 --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def +++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def -@@ -1368,6 +1368,9 @@ TLI_DEFINE_STRING_INTERNAL("fopen") +@@ -1467,6 +1467,9 @@ TLI_DEFINE_STRING_INTERNAL("fopen") TLI_DEFINE_SIG_INTERNAL(Ptr, Ptr, Ptr) /// FILE *fopen64(const char *filename, const char *opentype) @@ -27,7 +27,7 @@ index 623cdb4b6e0b..18bb48beb702 100644 TLI_DEFINE_ENUM_INTERNAL(fopen64) TLI_DEFINE_STRING_INTERNAL("fopen64") TLI_DEFINE_SIG_INTERNAL(Ptr, Ptr, Ptr) -@@ -1446,7 +1449,9 @@ TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Long, Int) +@@ -1545,7 +1548,9 @@ TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Long, Int) TLI_DEFINE_ENUM_INTERNAL(fseeko) TLI_DEFINE_STRING_INTERNAL("fseeko") TLI_DEFINE_SIG_INTERNAL(Int, Ptr, IntX, Int) @@ -38,7 +38,7 @@ index 623cdb4b6e0b..18bb48beb702 100644 /// int fseeko64(FILE *stream, off64_t offset, int whence) TLI_DEFINE_ENUM_INTERNAL(fseeko64) TLI_DEFINE_STRING_INTERNAL("fseeko64") -@@ -1463,6 +1468,9 @@ TLI_DEFINE_STRING_INTERNAL("fstat") +@@ -1562,6 +1567,9 @@ TLI_DEFINE_STRING_INTERNAL("fstat") TLI_DEFINE_SIG_INTERNAL(Int, Int, Ptr) /// int fstat64(int filedes, struct stat64 *buf) @@ -48,7 +48,7 @@ index 623cdb4b6e0b..18bb48beb702 100644 TLI_DEFINE_ENUM_INTERNAL(fstat64) TLI_DEFINE_STRING_INTERNAL("fstat64") TLI_DEFINE_SIG_INTERNAL(Int, Int, Ptr) -@@ -1488,6 +1496,9 @@ TLI_DEFINE_STRING_INTERNAL("ftello") +@@ -1587,6 +1595,9 @@ TLI_DEFINE_STRING_INTERNAL("ftello") TLI_DEFINE_SIG_INTERNAL(IntPlus, Ptr) /// off64_t ftello64(FILE *stream) @@ -58,7 +58,7 @@ index 623cdb4b6e0b..18bb48beb702 100644 TLI_DEFINE_ENUM_INTERNAL(ftello64) TLI_DEFINE_STRING_INTERNAL("ftello64") TLI_DEFINE_SIG_INTERNAL(Int64, Ptr) -@@ -1698,6 +1709,9 @@ TLI_DEFINE_STRING_INTERNAL("lstat") +@@ -1827,6 +1838,9 @@ TLI_DEFINE_STRING_INTERNAL("lstat") TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Ptr) /// int lstat64(const char *path, struct stat64 *buf); @@ -68,7 +68,7 @@ index 623cdb4b6e0b..18bb48beb702 100644 TLI_DEFINE_ENUM_INTERNAL(lstat64) TLI_DEFINE_STRING_INTERNAL("lstat64") TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Ptr) -@@ -2125,6 +2139,9 @@ TLI_DEFINE_STRING_INTERNAL("stat") +@@ -2334,6 +2348,9 @@ TLI_DEFINE_STRING_INTERNAL("stat") TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Ptr) /// int stat64(const char *path, struct stat64 *buf); @@ -78,7 +78,7 @@ index 623cdb4b6e0b..18bb48beb702 100644 TLI_DEFINE_ENUM_INTERNAL(stat64) TLI_DEFINE_STRING_INTERNAL("stat64") TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Ptr) -@@ -2350,6 +2367,9 @@ TLI_DEFINE_STRING_INTERNAL("tmpfile") +@@ -2559,6 +2576,9 @@ TLI_DEFINE_STRING_INTERNAL("tmpfile") TLI_DEFINE_SIG_INTERNAL(Ptr) /// FILE *tmpfile64(void) diff --git a/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch b/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch index f767780..642e8f0 100644 --- a/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch +++ b/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch @@ -1,4 +1,4 @@ -From 754c5869819c2dd008786a191f06385e6b97e19b Mon Sep 17 00:00:00 2001 +From ca2f7d327c1c7f63d0c438c5ad404e97c3f80428 Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Fri, 19 May 2017 00:22:57 -0700 Subject: [PATCH] llvm: allow env override of exe and libdir path diff --git a/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch index 9a4621b..3079f38 100644 --- a/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch +++ b/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch @@ -1,4 +1,4 @@ -From df4c35c458e7f0b752e76500316ce3ab7583dd5b Mon Sep 17 00:00:00 2001 +From 9767cb6318047148affd5217ffaa27519a3cf921 Mon Sep 17 00:00:00 2001 From: Dan McGregor Date: Wed, 26 Apr 2017 20:29:41 -0600 Subject: [PATCH] clang: driver: Check sysroot for ldso path @@ -15,10 +15,10 @@ Signed-off-by: Khem Raj 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 35bf39069605..e4f593e462d6 100644 +index 0767fe6c5879..4d0c7e63c68e 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -511,7 +511,11 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -523,7 +523,11 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { Triple.getEnvironment() == llvm::Triple::GNUEABIHFT64 || tools::arm::getARMFloatABI(*this, Args) == tools::arm::FloatABI::Hard; @@ -31,7 +31,7 @@ index 35bf39069605..e4f593e462d6 100644 Loader = HF ? "ld-linux-armhf.so.3" : "ld-linux.so.3"; break; } -@@ -566,11 +570,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -578,11 +582,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = "lib64"; Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; @@ -51,7 +51,7 @@ index 35bf39069605..e4f593e462d6 100644 break; case llvm::Triple::riscv32: case llvm::Triple::riscv64: { -@@ -588,6 +600,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -600,6 +612,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { case llvm::Triple::sparcv9: LibDir = "lib64"; Loader = "ld-linux.so.2"; @@ -62,7 +62,7 @@ index 35bf39069605..e4f593e462d6 100644 break; case llvm::Triple::systemz: LibDir = "lib"; -@@ -602,6 +618,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -614,6 +630,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = X32 ? "libx32" : "lib64"; Loader = X32 ? "ld-linux-x32.so.2" : "ld-linux-x86-64.so.2"; diff --git a/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index fc46b3c..68abd21 100644 --- a/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch +++ b/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch @@ -1,4 +1,4 @@ -From 7875b568926bbec5b7e3312c55991723c917493e Mon Sep 17 00:00:00 2001 +From 223fe5ca4f6e2b8e22aa8e900a6e35c34dc68c1f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 19 May 2016 21:11:06 -0700 Subject: [PATCH] clang: Driver/tools.cpp: Add -lssp_nonshared on musl @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 1 file changed, 6 insertions(+) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 5e9a655eaf82..3e301f2e1d95 100644 +index f56eeda3cb5f..9f7b9e8d42a8 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -632,6 +632,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, +@@ -631,6 +631,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (IsIAMCU) CmdArgs.push_back("-lgloss"); diff --git a/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch index f21be08..6d8f47c 100644 --- a/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From 84c1650cac223a4578eb43c905fdfb30b617274e Mon Sep 17 00:00:00 2001 +From 17aa070ae827e6cd1bba48a655c8e896bda41da0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 16 Mar 2017 09:02:13 -0700 Subject: [PATCH] clang: Prepend trailing '/' to sysroot @@ -25,10 +25,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index e4f593e462d6..720bc136528b 100644 +index 4d0c7e63c68e..6c28c8408605 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -222,7 +222,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) +@@ -216,7 +216,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) Multilibs = GCCInstallation.getMultilibs(); SelectedMultilibs.assign({GCCInstallation.getMultilib()}); llvm::Triple::ArchType Arch = Triple.getArch(); diff --git a/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index 2ee776b..620a5f0 100644 --- a/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From 4584c7048d003b239593ad66162437ffd669c220 Mon Sep 17 00:00:00 2001 +From 2fbce9b799992f1efa3f4b9e72a6de22c69f6a6b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 16 Mar 2017 19:06:26 -0700 Subject: [PATCH] clang: Look inside the target sysroot for compiler runtime @@ -16,10 +16,10 @@ Signed-off-by: Khem Raj 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp -index 20a555afb809..e6d285795337 100644 +index acf9d264d631..3e46c88e95cb 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp -@@ -15,6 +15,7 @@ +@@ -16,6 +16,7 @@ #include "ToolChains/InterfaceStubs.h" #include "clang/Basic/ObjCRuntime.h" #include "clang/Basic/Sanitizers.h" @@ -27,7 +27,7 @@ index 20a555afb809..e6d285795337 100644 #include "clang/Config/config.h" #include "clang/Driver/Action.h" #include "clang/Driver/Driver.h" -@@ -619,7 +620,10 @@ StringRef ToolChain::getOSLibName() const { +@@ -708,7 +709,10 @@ StringRef ToolChain::getOSLibName() const { } std::string ToolChain::getCompilerRTPath() const { diff --git a/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch index c897808..63678fd 100644 --- a/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch @@ -1,4 +1,4 @@ -From c86ed165440802158757582df52f848cad3c0e57 Mon Sep 17 00:00:00 2001 +From 5f4f290d77ebc712996acb0a67b5132216020472 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 20 Mar 2021 16:09:16 -0700 Subject: [PATCH] clang: Define / releative gcc installation dir @@ -15,10 +15,10 @@ Signed-off-by: Khem Raj 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 3e301f2e1d95..89ffc429d059 100644 +index 9f7b9e8d42a8..4f177aa8771e 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2918,19 +2918,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2871,19 +2871,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( // Whether this library suffix is relevant for the triple. bool Active; } Suffixes[] = { diff --git a/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index b5712d6..66f4886 100644 --- a/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From 08b05e4e835b6cb73c844e300dcc4eb4919d8154 Mon Sep 17 00:00:00 2001 +From 146e389fec4739e562eb0a8fe7aeb3f6861ae6e8 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 31 Jul 2019 22:51:39 -0700 Subject: [PATCH] clang: Add -lpthread and -ldl along with -lunwind for static @@ -21,10 +21,10 @@ Signed-off-by: Khem Raj 1 file changed, 2 insertions(+) diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp -index 019df16a909f..00d608c0c095 100644 +index ae635fb6a180..255e7e0b7150 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -2183,6 +2183,8 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, +@@ -2254,6 +2254,8 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, CmdArgs.push_back("-lunwind"); } else if (LGT == LibGccType::StaticLibGcc) { CmdArgs.push_back("-l:libunwind.a"); diff --git a/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index 2086e0a..a029d7d 100644 --- a/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From 322385b4a6109f3f53c3679d7a276ec0084dd7b6 Mon Sep 17 00:00:00 2001 +From 9f4b973e7cab243991856be1f162a7e38517b611 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Thu, 26 Dec 2019 12:56:16 -0800 Subject: [PATCH] Pass PYTHON_EXECUTABLE when cross compiling for native build @@ -11,10 +11,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+) diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake -index 39b4abaa0d93..a47afde7f85d 100644 +index 3b31d3e218a3..a07ab45878fd 100644 --- a/llvm/cmake/modules/CrossCompile.cmake +++ b/llvm/cmake/modules/CrossCompile.cmake -@@ -92,6 +92,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) +@@ -100,6 +100,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}" -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_TESTS=OFF diff --git a/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch index 6db24a9..14145e7 100644 --- a/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From 2f41e0721f964677e8876b2c2f540836f426c83f Mon Sep 17 00:00:00 2001 +From 3cea4e8ef2f789e6988cb9caf6b28dbc240d93bd Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 18 Nov 2019 17:00:29 -0800 Subject: [PATCH] Check for atomic intrinsics diff --git a/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch b/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch index 5e9eb01..94c056a 100644 --- a/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch +++ b/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch @@ -1,4 +1,4 @@ -From 6c4f71af6a8c5c0e9261cd20522ecf8d1cdb9e48 Mon Sep 17 00:00:00 2001 +From 93141cee493022d9f39dbd1f5f0bb0a1110ac829 Mon Sep 17 00:00:00 2001 From: Ovidiu Panait Date: Fri, 31 Jan 2020 10:56:11 +0200 Subject: [PATCH] cmake: Fix configure for packages using find_package() @@ -26,15 +26,15 @@ Upstream-Status: Inappropriate [oe-specific] Signed-off-by: Ovidiu Panait --- clang/cmake/modules/AddClang.cmake | 2 -- - llvm/cmake/modules/AddLLVM.cmake | 7 +------ + llvm/cmake/modules/AddLLVM.cmake | 9 ++------- llvm/cmake/modules/TableGen.cmake | 6 ------ - 3 files changed, 1 insertion(+), 14 deletions(-) + 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake -index 9d09be193684..d6123b834337 100644 +index cdc8bd5cd503..5faa9117a30f 100644 --- a/clang/cmake/modules/AddClang.cmake +++ b/clang/cmake/modules/AddClang.cmake -@@ -169,7 +169,6 @@ macro(add_clang_tool name) +@@ -182,7 +182,6 @@ macro(add_clang_tool name) if (CLANG_BUILD_TOOLS) get_target_export_arg(${name} Clang export_to_clangtargets) install(TARGETS ${name} @@ -42,38 +42,40 @@ index 9d09be193684..d6123b834337 100644 RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name}) -@@ -178,7 +177,6 @@ macro(add_clang_tool name) +@@ -191,7 +190,6 @@ macro(add_clang_tool name) DEPENDS ${name} COMPONENT ${name}) endif() - set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name}) endif() endif() - endmacro() + set_target_properties(${name} PROPERTIES XCODE_GENERATE_SCHEME ON) diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index 03f4e1f190fd..6335ab262d19 100644 +index d3e9377c8d2f..fe22d6f2b35a 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -1435,7 +1435,6 @@ macro(llvm_add_tool project name) +@@ -1492,7 +1492,6 @@ macro(llvm_add_tool project name) if( LLVM_BUILD_TOOLS ) - get_target_export_arg(${name} LLVM export_to_llvmexports) + get_target_export_arg(${name} ${project} export_to_llvmexports) install(TARGETS ${name} - ${export_to_llvmexports} RUNTIME DESTINATION ${${project}_TOOLS_INSTALL_DIR} COMPONENT ${name}) -@@ -1446,9 +1445,7 @@ macro(llvm_add_tool project name) +@@ -1503,10 +1502,8 @@ macro(llvm_add_tool project name) endif() endif() endif() - if( LLVM_BUILD_TOOLS ) -- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) +- string(TOUPPER "${project}" project_upper) +- set_property(GLOBAL APPEND PROPERTY ${project_upper}_EXPORTS ${name}) - endif() ++ string(TOUPPER "${project}" project_upper) + set_target_properties(${name} PROPERTIES FOLDER "Tools") endif() get_subproject_title(subproject_title) set_target_properties(${name} PROPERTIES FOLDER "${subproject_title}/Tools") -@@ -1497,7 +1494,6 @@ macro(add_llvm_utility name) +@@ -1556,7 +1553,6 @@ macro(add_llvm_utility name) if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS) get_target_export_arg(${name} LLVM export_to_llvmexports) install(TARGETS ${name} @@ -81,7 +83,7 @@ index 03f4e1f190fd..6335ab262d19 100644 RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} COMPONENT ${name}) -@@ -1506,7 +1502,6 @@ macro(add_llvm_utility name) +@@ -1565,7 +1561,6 @@ macro(add_llvm_utility name) DEPENDS ${name} COMPONENT ${name}) endif() diff --git a/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch index 74ddbef..8605db0 100644 --- a/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From 11fce59f48e7d15d9b16509146484d60a04f25e9 Mon Sep 17 00:00:00 2001 +From 7c6cb0a5d35f1a757165a44aa5d2d1d16af32205 Mon Sep 17 00:00:00 2001 From: Jim Broadus Date: Thu, 26 Mar 2020 16:05:53 -0700 Subject: [PATCH] clang: Fix resource dir location for cross toolchains @@ -16,27 +16,35 @@ Upstream-Status: Pending Signed-off-by: Jim Broadus Signed-off-by: Khem Raj --- - clang/lib/Driver/Driver.cpp | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) + clang/lib/Driver/Driver.cpp | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp -index ecae475f75da..ca6c8c98961f 100644 +index 87855fdb7997..036c9d09df26 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp -@@ -189,9 +189,15 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath, +@@ -176,6 +176,7 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath) { + + // Dir is bin/ or lib/, depending on where BinaryPath is. + StringRef Dir = llvm::sys::path::parent_path(BinaryPath); ++ StringRef LastDirName = llvm::sys::path::filename(Dir); + SmallString<128> P(Dir); + + StringRef ConfiguredResourceDir(CLANG_RESOURCE_DIR); +@@ -187,9 +188,15 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath) { // With a static-library build of libclang, LibClangPath will contain the // path of the embedding binary, which for LLVM binaries will be in bin/. // ../lib gets us to lib/ in both cases. - P = llvm::sys::path::parent_path(Dir); -+ Dir = std::string(llvm::sys::path::parent_path(Dir)); // This search path is also created in the COFF driver of lld, so any // changes here also needs to happen in lld/COFF/Driver.cpp + + // OE cross toolchains are installed, by default, in a subdir of bin. -+ if (llvm::sys::path::filename(Dir) == "bin") { -+ Dir = std::string(llvm::sys::path::parent_path(Dir)); ++ if (LastDirName == "bin") { ++ P = llvm::sys::path::parent_path(Dir); ++ } else { ++ P = llvm::sys::path::parent_path(llvm::sys::path::parent_path(Dir)); + } -+ P = Dir; llvm::sys::path::append(P, CLANG_INSTALL_LIBDIR_BASENAME, "clang", CLANG_VERSION_MAJOR_STRING); } diff --git a/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index 7b130e9..084f39d 100644 --- a/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From ed293c1fb5888f6ffe091f7276a7897e1a239c01 Mon Sep 17 00:00:00 2001 +From a80ccd52d2230ec4df68506910d6c836f02af591 Mon Sep 17 00:00:00 2001 From: Oleksandr Ocheretnyi Date: Wed, 15 Apr 2020 00:08:39 +0300 Subject: [PATCH] clang: driver: Add dyld-prefix when checking sysroot for ldso @@ -19,10 +19,10 @@ Signed-off-by: Khem Raj 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 720bc136528b..b3a399187ec3 100644 +index 6c28c8408605..32414810b6d7 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -512,8 +512,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -524,8 +524,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { tools::arm::getARMFloatABI(*this, Args) == tools::arm::FloatABI::Hard; LibDir = "lib32"; @@ -33,7 +33,7 @@ index 720bc136528b..b3a399187ec3 100644 LibDir = "lib"; } Loader = HF ? "ld-linux-armhf.so.3" : "ld-linux.so.3"; -@@ -570,8 +570,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -582,8 +582,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = "lib64"; Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; @@ -44,7 +44,7 @@ index 720bc136528b..b3a399187ec3 100644 LibDir = "lib"; } break; -@@ -579,8 +579,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -591,8 +591,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = "lib64"; Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; @@ -55,7 +55,7 @@ index 720bc136528b..b3a399187ec3 100644 LibDir = "lib"; } break; -@@ -600,8 +600,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -612,8 +612,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { case llvm::Triple::sparcv9: LibDir = "lib64"; Loader = "ld-linux.so.2"; @@ -66,7 +66,7 @@ index 720bc136528b..b3a399187ec3 100644 LibDir = "lib"; } break; -@@ -618,8 +618,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -630,8 +630,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = X32 ? "libx32" : "lib64"; Loader = X32 ? "ld-linux-x32.so.2" : "ld-linux-x86-64.so.2"; diff --git a/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch index 2631ba7..0d5d240 100644 --- a/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From 42acc8d6b252851b3f3cdae08bd9e1ed5a9c8935 Mon Sep 17 00:00:00 2001 +From 34f43ca6a4757a6a80f92c56be340ca4de3b2a31 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 14 Oct 2020 22:19:57 -0700 Subject: [PATCH] clang: Use python3 in python scripts diff --git a/recipes-devtools/clang/clang/0018-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0018-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index 5970565..a928d6e 100644 --- a/recipes-devtools/clang/clang/0018-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0018-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From 1acea10c68785c42d625618d5cf120e4f19138f2 Mon Sep 17 00:00:00 2001 +From b0a3357f0e3a38a2aa5eebfc73fa9cc531e9a9e1 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Mon, 25 Jan 2021 16:14:35 +0800 Subject: [PATCH] For x86_64, set Yocto based GCC install search path @@ -57,10 +57,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 89ffc429d059..e05dd30c3f89 100644 +index 4f177aa8771e..6873892372ea 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2498,6 +2498,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( +@@ -2451,6 +2451,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E", "x86_64-redhat-linux", "x86_64-suse-linux", "x86_64-manbo-linux-gnu", "x86_64-slackware-linux", diff --git a/recipes-devtools/clang/clang/0019-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0019-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index 06b8ffd..e7f16f6 100644 --- a/recipes-devtools/clang/clang/0019-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0019-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From a1ae883e90cb9554e10d24277a955fb0660e85a1 Mon Sep 17 00:00:00 2001 +From a4723752be1e9398d5697741ca0be721d90f814e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 11 Feb 2021 16:42:49 -0800 Subject: [PATCH] llvm: Insert anchor for adding OE distro vendor names @@ -18,15 +18,15 @@ Signed-off-by: Martin Jansa 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp -index 21d6c74b5956..32adf92c47bf 100644 +index e9e6f130f757..97f426dd863b 100644 --- a/llvm/lib/TargetParser/Triple.cpp +++ b/llvm/lib/TargetParser/Triple.cpp -@@ -639,7 +639,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) { - .Case("amd", Triple::AMD) - .Case("mesa", Triple::Mesa) - .Case("suse", Triple::SUSE) -- .Case("oe", Triple::OpenEmbedded) -+ .Case("oe", Triple::OpenEmbedded)//CLANG_EXTRA_OE_VENDORS_CASES - .Default(Triple::UnknownVendor); +@@ -663,7 +663,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) { + .Case("mesa", Triple::Mesa) + .Case("suse", Triple::SUSE) + .Case("oe", Triple::OpenEmbedded) +- .Case("intel", Triple::Intel) ++ .Case("intel", Triple::Intel) //CLANG_EXTRA_OE_VENDORS_CASES + .Default(Triple::UnknownVendor); } diff --git a/recipes-devtools/clang/clang/0020-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0020-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 5b17a7a..bb7b01b 100644 --- a/recipes-devtools/clang/clang/0020-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0020-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From 11ef637da77e0fd115211f42665c2ed533f921a5 Mon Sep 17 00:00:00 2001 +From 71f429239846d67c331aee98d84d37f2c7c07c6c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 17:32:13 -0700 Subject: [PATCH] compiler-rt: Do not use backtrace APIs on non-glibc linux diff --git a/recipes-devtools/clang/clang/0021-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0021-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index b33a9f4..6c7daff 100644 --- a/recipes-devtools/clang/clang/0021-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0021-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From 9a336eeaa8f8d62057802a98e249df695befa6b6 Mon Sep 17 00:00:00 2001 +From 98d888c1f966d7758690b2a3b3a7fa7b47c58ebf Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 17:56:03 -0700 Subject: [PATCH] clang: Fix x86 triple for non-debian multiarch linux distros @@ -13,10 +13,10 @@ Signed-off-by: Khem Raj 1 file changed, 3 insertions(+) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index b3a399187ec3..f39c771798a8 100644 +index 32414810b6d7..a9ee2b671f2e 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -715,6 +715,9 @@ void Linux::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, +@@ -727,6 +727,9 @@ void Linux::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, GCCInstallation.getTriple().getArch() == llvm::Triple::x86 ? "i386-linux-gnu" : TripleStr; diff --git a/recipes-devtools/clang/clang/0022-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0022-libunwind-Added-unw_backtrace-method.patch index 77cbc1c..be788b7 100644 --- a/recipes-devtools/clang/clang/0022-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0022-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 01500348e14ae9fa8272f00c2a99ac6e153f5f8e Mon Sep 17 00:00:00 2001 +From bb3cadafda39177d2a36598e1430bc2ff97a3d37 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 23 May 2021 10:27:29 +0000 Subject: [PATCH] libunwind: Added unw_backtrace method diff --git a/recipes-devtools/clang/clang/0023-clang-Do-not-use-install-relative-libc-headers.patch b/recipes-devtools/clang/clang/0023-clang-Do-not-use-install-relative-libc-headers.patch index bac9d10..25dec75 100644 --- a/recipes-devtools/clang/clang/0023-clang-Do-not-use-install-relative-libc-headers.patch +++ b/recipes-devtools/clang/clang/0023-clang-Do-not-use-install-relative-libc-headers.patch @@ -1,4 +1,4 @@ -From 081655795d08178e20bcfbaef5dab4a97230f095 Mon Sep 17 00:00:00 2001 +From 89348e6c2cf3f65eb244c5b01145309355573ade Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 11 Aug 2021 18:37:11 -0700 Subject: [PATCH] clang: Do not use install relative libc++ headers @@ -16,10 +16,10 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index e05dd30c3f89..d9efd09d9da6 100644 +index 6873892372ea..b5485970a0c5 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -3316,8 +3316,11 @@ Generic_GCC::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, +@@ -3275,8 +3275,11 @@ Generic_GCC::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, // incompatible with the NDK libraries. SmallString<128> DriverIncludeDir(getDriver().Dir); llvm::sys::path::append(DriverIncludeDir, "..", "include"); diff --git a/recipes-devtools/clang/clang/0024-Fix-lib-paths-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0024-Fix-lib-paths-for-OpenEmbedded-Host.patch index 617113d..d450576 100644 --- a/recipes-devtools/clang/clang/0024-Fix-lib-paths-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0024-Fix-lib-paths-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From 68007800df2e080d799670378c7ec9d667c7e782 Mon Sep 17 00:00:00 2001 +From a3f6769e9da81aa359b2f013b88639dc0c8ca5ea Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Tue, 7 Dec 2021 04:08:22 +0000 Subject: [PATCH] Fix lib paths for OpenEmbedded Host @@ -48,7 +48,7 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index d9efd09d9da6..4ec4976a6a0c 100644 +index b5485970a0c5..868d32f501e8 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -19,6 +19,7 @@ @@ -59,7 +59,7 @@ index d9efd09d9da6..4ec4976a6a0c 100644 #include "clang/Driver/Driver.h" #include "clang/Driver/DriverDiagnostic.h" #include "clang/Driver/MultilibBuilder.h" -@@ -2908,6 +2909,7 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2861,6 +2862,7 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( const llvm::Triple &TargetTriple, const ArgList &Args, const std::string &LibDir, StringRef CandidateTriple, bool NeedsBiarchSuffix, bool GCCDirExists, bool GCCCrossDirExists) { @@ -67,7 +67,7 @@ index d9efd09d9da6..4ec4976a6a0c 100644 // Locations relative to the system lib directory where GCC's triple-specific // directories might reside. struct GCCLibSuffix { -@@ -2925,7 +2927,8 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2878,7 +2880,8 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( // files in that location, not just GCC installation data. {CandidateTriple.str(), "..", TargetTriple.getVendor() == llvm::Triple::Freescale || diff --git a/recipes-devtools/clang/clang/0025-Correct-library-search-path-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0025-Correct-library-search-path-for-OpenEmbedded-Host.patch index 11dc196..94f9c2c 100644 --- a/recipes-devtools/clang/clang/0025-Correct-library-search-path-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0025-Correct-library-search-path-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From 65e12e7671888531d657e0484aa0397e7e98b134 Mon Sep 17 00:00:00 2001 +From 3bf683abe028c13dfdb4156eefb210741e43986a Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Tue, 7 Dec 2021 04:55:48 +0000 Subject: [PATCH] Correct library search path for OpenEmbedded Host @@ -39,7 +39,7 @@ Signed-off-by: Khem Raj 3 files changed, 4 insertions(+) diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h -index 1404e1686848..90940e4a0bac 100644 +index b4d485dac8a2..ac0bf25b7c63 100644 --- a/clang/include/clang/Driver/Distro.h +++ b/clang/include/clang/Driver/Distro.h @@ -45,6 +45,7 @@ public: @@ -50,7 +50,7 @@ index 1404e1686848..90940e4a0bac 100644 OpenSUSE, UbuntuHardy, UbuntuIntrepid, -@@ -138,6 +139,7 @@ public: +@@ -139,6 +140,7 @@ public: bool IsGentoo() const { return DistroVal == Gentoo; } @@ -59,10 +59,10 @@ index 1404e1686848..90940e4a0bac 100644 }; diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp -index 6f49e641104c..63b9ff30f0b6 100644 +index 3cc79535de8d..595656179bdc 100644 --- a/clang/lib/Driver/Distro.cpp +++ b/clang/lib/Driver/Distro.cpp -@@ -44,6 +44,7 @@ static Distro::DistroType DetectOsRelease(llvm::vfs::FileSystem &VFS) { +@@ -43,6 +43,7 @@ static Distro::DistroType DetectOsRelease(llvm::vfs::FileSystem &VFS) { .Case("sles", Distro::OpenSUSE) .Case("opensuse", Distro::OpenSUSE) .Case("exherbo", Distro::Exherbo) @@ -71,7 +71,7 @@ index 6f49e641104c..63b9ff30f0b6 100644 return Version; } diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index f39c771798a8..9af52769b09a 100644 +index a9ee2b671f2e..ec1705af3cbd 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp @@ -82,6 +82,7 @@ std::string Linux::getMultiarchTriple(const Driver &D, diff --git a/recipes-devtools/clang/clang/0026-lldb-Link-with-libatomic-on-x86.patch b/recipes-devtools/clang/clang/0026-lldb-Link-with-libatomic-on-x86.patch index 275a7c6..6b5998c 100644 --- a/recipes-devtools/clang/clang/0026-lldb-Link-with-libatomic-on-x86.patch +++ b/recipes-devtools/clang/clang/0026-lldb-Link-with-libatomic-on-x86.patch @@ -1,4 +1,4 @@ -From d395cc2696d62d7d3448bc9a90f7697cf60e6273 Mon Sep 17 00:00:00 2001 +From 8b73ff82e4eec89090bd34d3fb0732321b418dcc Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 8 Feb 2022 01:31:26 -0800 Subject: [PATCH] lldb: Link with libatomic on x86 @@ -17,7 +17,7 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+) diff --git a/lldb/source/Utility/CMakeLists.txt b/lldb/source/Utility/CMakeLists.txt -index e9954d66cd1a..f36f1c9e9d28 100644 +index 6954a2508ffe..b8bf8c07fefb 100644 --- a/lldb/source/Utility/CMakeLists.txt +++ b/lldb/source/Utility/CMakeLists.txt @@ -19,6 +19,10 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows") diff --git a/recipes-devtools/clang/clang/0027-compiler-rt-Enable-__int128-for-ppc32.patch b/recipes-devtools/clang/clang/0027-compiler-rt-Enable-__int128-for-ppc32.patch index bbccb8a..1dafc0a 100644 --- a/recipes-devtools/clang/clang/0027-compiler-rt-Enable-__int128-for-ppc32.patch +++ b/recipes-devtools/clang/clang/0027-compiler-rt-Enable-__int128-for-ppc32.patch @@ -1,4 +1,4 @@ -From a92ea48f1959a20ab58b88091127f80a90d5870a Mon Sep 17 00:00:00 2001 +From 945c633b604d72ec307307a498cc6b206f810f4b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 9 Mar 2022 16:28:16 -0800 Subject: [PATCH] compiler-rt: Enable __int128 for ppc32 @@ -11,10 +11,10 @@ Signed-off-by: Khem Raj 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt -index e0b2d08c2077..1b245fd5deeb 100644 +index 19316c52d12c..cb276311b290 100644 --- a/compiler-rt/lib/builtins/CMakeLists.txt +++ b/compiler-rt/lib/builtins/CMakeLists.txt -@@ -710,11 +710,9 @@ set(mips64el_SOURCES ${GENERIC_TF_SOURCES} +@@ -720,11 +720,9 @@ set(mips64el_SOURCES ${GENERIC_TF_SOURCES} set(nvptx64_SOURCES ${GENERIC_SOURCES}) @@ -27,7 +27,7 @@ index e0b2d08c2077..1b245fd5deeb 100644 ppc/divtc3.c ppc/fixtfdi.c ppc/fixunstfdi.c -@@ -729,14 +727,15 @@ set(powerpc64_SOURCES +@@ -739,14 +737,15 @@ set(powerpc64_SOURCES ) # These routines require __int128, which isn't supported on AIX. if (NOT OS_NAME MATCHES "AIX") @@ -45,8 +45,8 @@ index e0b2d08c2077..1b245fd5deeb 100644 +set(powerpc64_SOURCES ${powerpc_SOURCES}) set(riscv_SOURCES - riscv/fp_mode.c -@@ -888,9 +887,9 @@ else () + cpu_model/riscv.c +@@ -904,9 +903,9 @@ else () list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET) endif() diff --git a/recipes-devtools/clang/clang/0028-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch b/recipes-devtools/clang/clang/0028-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch index 8c56c1d..1afdf92 100644 --- a/recipes-devtools/clang/clang/0028-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch +++ b/recipes-devtools/clang/clang/0028-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch @@ -1,4 +1,4 @@ -From e06415c9d95a4830b61a21d2a9b159145c0a46f3 Mon Sep 17 00:00:00 2001 +From 4ff4be1d645e3390431435f82d7bb567bd8d890f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 12 Aug 2022 11:50:57 -0700 Subject: [PATCH] llvm: Do not use cmake infra to detect libzstd @@ -21,7 +21,7 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt -index f653379e3033..6456caff9dff 100644 +index a6d8a2581886..5b461547bdde 100644 --- a/llvm/lib/Support/CMakeLists.txt +++ b/llvm/lib/Support/CMakeLists.txt @@ -22,7 +22,7 @@ if (HAS_WERROR_GLOBAL_CTORS) @@ -42,7 +42,7 @@ index f653379e3033..6456caff9dff 100644 endif() if( WIN32 ) -@@ -310,7 +310,7 @@ if(LLVM_ENABLE_ZLIB) +@@ -325,7 +325,7 @@ if(LLVM_ENABLE_ZLIB) get_property(zlib_library TARGET ZLIB::ZLIB PROPERTY LOCATION) endif() get_library_name(${zlib_library} zlib_library) @@ -51,7 +51,7 @@ index f653379e3033..6456caff9dff 100644 endif() if(LLVM_ENABLE_ZSTD) -@@ -324,7 +324,7 @@ if(LLVM_ENABLE_ZSTD) +@@ -339,7 +339,7 @@ if(LLVM_ENABLE_ZSTD) endif() if (zstd_target STREQUAL zstd::libzstd_shared) get_library_name(${zstd_library} zstd_library) diff --git a/recipes-devtools/clang/clang/0029-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch b/recipes-devtools/clang/clang/0029-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch index 674cbe5..52260bc 100644 --- a/recipes-devtools/clang/clang/0029-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch +++ b/recipes-devtools/clang/clang/0029-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch @@ -1,4 +1,4 @@ -From a1729e842b825919a8efe0389aa2b0f0c16a2924 Mon Sep 17 00:00:00 2001 +From f097441a66563be067016760706e0266494db800 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 3 Jan 2023 18:44:34 -0800 Subject: [PATCH] compiler-rt: Fix stat struct's size for O32 ABI @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 1 file changed, 13 insertions(+) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h -index 34bfef1f7ef4..0ba5451c1ccf 100644 +index 1a7d9e64048e..854a87e17236 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h -@@ -98,11 +98,24 @@ const unsigned struct_kernel_stat64_sz = 104; +@@ -98,6 +98,18 @@ const unsigned struct_kernel_stat64_sz = 104; const unsigned struct_kernel_stat_sz = 144; const unsigned struct_kernel_stat64_sz = 104; #elif defined(__mips__) @@ -33,10 +33,12 @@ index 34bfef1f7ef4..0ba5451c1ccf 100644 +const unsigned struct_kernel_stat64_sz = 160; +#endif +#else // __mips_o32 - const unsigned struct_kernel_stat_sz = - SANITIZER_ANDROID - ? FIRST_32_SECOND_64(104, 128) - : FIRST_32_SECOND_64((_MIPS_SIM == _ABIN32) ? 176 : 160, 216); + const unsigned struct_kernel_stat_sz = SANITIZER_ANDROID + ? FIRST_32_SECOND_64(104, 128) + # if defined(_ABIN32) && _MIPS_SIM == _ABIN32 +@@ -106,6 +118,7 @@ const unsigned struct_kernel_stat_sz = SANITIZER_ANDROID + : FIRST_32_SECOND_64(160, 216); + # endif const unsigned struct_kernel_stat64_sz = 104; +#endif #elif defined(__s390__) && !defined(__s390x__) diff --git a/recipes-devtools/clang/clang/0030-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch b/recipes-devtools/clang/clang/0030-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch index 1c5e1ad..8e36538 100644 --- a/recipes-devtools/clang/clang/0030-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch +++ b/recipes-devtools/clang/clang/0030-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch @@ -1,4 +1,4 @@ -From dbf32edb06caeed5324edfb13bc42bf8fc1406a5 Mon Sep 17 00:00:00 2001 +From ae2ad23eefd3b8645f7b77431d621f918faea48a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 21 Feb 2023 12:46:10 -0800 Subject: [PATCH] compiler-rt: Undef _TIME_BITS along with _FILE_OFFSET_BITS in diff --git a/recipes-devtools/clang/clang/0031-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch b/recipes-devtools/clang/clang/0031-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch index 48e3d7a..764cf6e 100644 --- a/recipes-devtools/clang/clang/0031-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch +++ b/recipes-devtools/clang/clang/0031-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch @@ -1,4 +1,4 @@ -From ac240fbfa07115791271abdbfde256ea0f0c64c6 Mon Sep 17 00:00:00 2001 +From 7d99373f68757b17fe88bcf24b978c2721bf181e Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Thu, 31 Aug 2023 18:14:47 +0200 Subject: [PATCH] ToolChains/Gnu.cpp: ARMLibDirs search also in lib32 @@ -55,10 +55,10 @@ Signed-off-by: Martin Jansa 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 4ec4976a6a0c..d5cfb99686d1 100644 +index 868d32f501e8..beed8d34a127 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2475,7 +2475,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( +@@ -2428,7 +2428,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( static const char *const AArch64beLibDirs[] = {"/lib"}; static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu"}; @@ -68,10 +68,10 @@ index 4ec4976a6a0c..d5cfb99686d1 100644 static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf", "armv7hl-redhat-linux-gnueabi", diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 9af52769b09a..33e8ae99ba1d 100644 +index ec1705af3cbd..75b32624b778 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -205,6 +205,7 @@ static StringRef getOSLibDir(const llvm::Triple &Triple, const ArgList &Args) { +@@ -199,6 +199,7 @@ static StringRef getOSLibDir(const llvm::Triple &Triple, const ArgList &Args) { // reasoning about oslibdir spellings with the lib dir spellings in the // GCCInstallationDetector, but that is a more significant refactoring. if (Triple.getArch() == llvm::Triple::x86 || Triple.isPPC32() || diff --git a/recipes-devtools/clang/clang/0032-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch b/recipes-devtools/clang/clang/0032-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch index 019ed3d..27b4652 100644 --- a/recipes-devtools/clang/clang/0032-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch +++ b/recipes-devtools/clang/clang/0032-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch @@ -1,4 +1,4 @@ -From 05d5bc0e32b8275f91421b24fc86494b9e81815d Mon Sep 17 00:00:00 2001 +From 28f2573afd688996d73476e50f61dda416236bda Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 3 Feb 2024 16:47:10 -0800 Subject: [PATCH] clang/llvm: Add OE specific ABI triple for N32 ABI @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index d5cfb99686d1..926455ac6680 100644 +index beed8d34a127..c47b93a4e142 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2538,6 +2538,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( +@@ -2491,6 +2491,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( static const char *const MIPSN32LibDirs[] = {"/lib32"}; static const char *const MIPSN32Triples[] = {"mips64-linux-gnuabin32", @@ -26,10 +26,10 @@ index d5cfb99686d1..926455ac6680 100644 static const char *const MIPSN32ELLibDirs[] = {"/lib32"}; static const char *const MIPSN32ELTriples[] = { diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 33e8ae99ba1d..58badf20d1b3 100644 +index 75b32624b778..b1d9c171df81 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -136,7 +136,7 @@ std::string Linux::getMultiarchTriple(const Driver &D, +@@ -139,7 +139,7 @@ std::string Linux::getMultiarchTriple(const Driver &D, return IsMipsR6 ? "mipsisa32r6el-linux-gnu" : "mipsel-linux-gnu"; case llvm::Triple::mips64: { std::string MT = std::string(IsMipsR6 ? "mipsisa64r6" : "mips64") + @@ -38,7 +38,7 @@ index 33e8ae99ba1d..58badf20d1b3 100644 if (D.getVFS().exists(concat(SysRoot, "/lib", MT))) return MT; if (D.getVFS().exists(concat(SysRoot, "/lib/mips64-linux-gnu"))) -@@ -145,7 +145,7 @@ std::string Linux::getMultiarchTriple(const Driver &D, +@@ -148,7 +148,7 @@ std::string Linux::getMultiarchTriple(const Driver &D, } case llvm::Triple::mips64el: { std::string MT = std::string(IsMipsR6 ? "mipsisa64r6el" : "mips64el") + @@ -48,10 +48,10 @@ index 33e8ae99ba1d..58badf20d1b3 100644 return MT; if (D.getVFS().exists(concat(SysRoot, "/lib/mips64el-linux-gnu"))) diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp -index 32adf92c47bf..3411e3c968a2 100644 +index 97f426dd863b..dc57d5ff2d4a 100644 --- a/llvm/lib/TargetParser/Triple.cpp +++ b/llvm/lib/TargetParser/Triple.cpp -@@ -319,7 +319,7 @@ StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) { +@@ -336,7 +336,7 @@ StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) { case GNU: return "gnu"; case GNUT64: return "gnut64"; case GNUABI64: return "gnuabi64"; @@ -60,7 +60,7 @@ index 32adf92c47bf..3411e3c968a2 100644 case GNUEABI: return "gnueabi"; case GNUEABIT64: return "gnueabit64"; case GNUEABIHF: return "gnueabihf"; -@@ -695,6 +695,7 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) { +@@ -719,6 +719,7 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) { .StartsWith("eabihf", Triple::EABIHF) .StartsWith("eabi", Triple::EABI) .StartsWith("gnuabin32", Triple::GNUABIN32) @@ -68,7 +68,7 @@ index 32adf92c47bf..3411e3c968a2 100644 .StartsWith("gnuabi64", Triple::GNUABI64) .StartsWith("gnueabihft64", Triple::GNUEABIHFT64) .StartsWith("gnueabihf", Triple::GNUEABIHF) -@@ -1002,6 +1003,7 @@ Triple::Triple(const Twine &Str) +@@ -1035,6 +1036,7 @@ Triple::Triple(const Twine &Str) Environment = StringSwitch(Components[0]) .StartsWith("mipsn32", Triple::GNUABIN32) diff --git a/recipes-devtools/clang/clang/0033-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch b/recipes-devtools/clang/clang/0033-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch index 97554cb..4ca259b 100644 --- a/recipes-devtools/clang/clang/0033-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch +++ b/recipes-devtools/clang/clang/0033-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch @@ -1,4 +1,4 @@ -From a1b090d189ebc5ccda088f222a927fb6e225588d Mon Sep 17 00:00:00 2001 +From c826b0d4aff98d44672ded6be2f6b04b15554e3f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 14 May 2024 22:04:43 -0700 Subject: [PATCH] llvm: Add libunwind.pc.in and llvm-config scripts diff --git a/recipes-devtools/clang/clang/0034-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch b/recipes-devtools/clang/clang/0034-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch index 0eebe63..da32f37 100644 --- a/recipes-devtools/clang/clang/0034-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch +++ b/recipes-devtools/clang/clang/0034-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch @@ -1,4 +1,4 @@ -From 47a9749e0dcd1c7dd85922610434ce63d5fe8bd6 Mon Sep 17 00:00:00 2001 +From eab8305134f5b43204ac2c7976c90741d93da70f Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Fri, 13 Sep 2024 13:38:08 +0200 Subject: [PATCH] scan-build-py: respect LLVM_LIBDIR_SUFFIX like other tools do diff --git a/recipes-devtools/clang/clang/0035-compiler-rt-Do-not-pass-target-to-clang-compiler.patch b/recipes-devtools/clang/clang/0035-compiler-rt-Do-not-pass-target-to-clang-compiler.patch new file mode 100644 index 0000000..c454327 --- /dev/null +++ b/recipes-devtools/clang/clang/0035-compiler-rt-Do-not-pass-target-to-clang-compiler.patch @@ -0,0 +1,29 @@ +From 7e387310a4904eaf2c83b781b95c8cf60243c332 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 13 Mar 2025 00:30:38 -0700 +Subject: [PATCH] compiler-rt: Do not pass --target to clang compiler + +In OE we use -clang and -clang++ which +should resolve the --target correctly. + +Upstream-Status: Inappropriate [ OE-Specific ] +Signed-off-by: Khem Raj +--- + compiler-rt/lib/fuzzer/CMakeLists.txt | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/compiler-rt/lib/fuzzer/CMakeLists.txt b/compiler-rt/lib/fuzzer/CMakeLists.txt +index 6db24610df1f..692e194c2a98 100644 +--- a/compiler-rt/lib/fuzzer/CMakeLists.txt ++++ b/compiler-rt/lib/fuzzer/CMakeLists.txt +@@ -140,10 +140,6 @@ if(OS_NAME MATCHES "Android|Linux|Fuchsia" AND + COMPILER_RT_LIBCXXABI_PATH) + macro(partially_link_libcxx name dir arch) + get_target_flags_for_arch(${arch} target_cflags) +- if(CMAKE_CXX_COMPILER_ID MATCHES Clang) +- get_compiler_rt_target(${arch} target) +- set(target_cflags --target=${target} ${target_cflags}) +- endif() + set(cxx_${arch}_merge_dir "${CMAKE_CURRENT_BINARY_DIR}/cxx_${arch}_merge.dir") + file(MAKE_DIRECTORY ${cxx_${arch}_merge_dir}) + add_custom_command(TARGET clang_rt.${name}-${arch} POST_BUILD diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 582820d..a6d9c4a 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -6,16 +6,16 @@ LIC_FILES_CHKSUM = "file://llvm/LICENSE.TXT;md5=${LLVMMD5SUM} \ LICENSE = "Apache-2.0-with-LLVM-exception" # Snapshot -#RELEASE ?= "7ba7d8e2f7b6445b60679da826210cdde29eaf8b" +#RELEASE ?= "a69568efe6c4972e71af295c6577b3412dd57c22" #BASEURI ?= "https://api.github.com/repos/llvm/llvm-project/tarball/${RELEASE};downloadfilename=llvm-${PV}-${RELEASE}.tar.gz" #SOURCEDIR ?= "llvm-llvm-project-${@'${RELEASE}'[0:7]}" -#SRC_URI[sha256sum] = "cca3fa1c6efb72bd8bc22b926a2c5551e6b8560d95828452bc62b9140cb87a90" +#SRC_URI[sha256sum] = "aed4f66cd72867b36cc55a0588436933c3d58d3e61ca782b6bf57605d3fdcb09" # GA Release RELEASE ?= "${PV}" BASEURI ?= "${LLVM_HTTP}/llvm-project/releases/download/llvmorg-${PV}/llvm-project-${PV}.src.tar.xz" SOURCEDIR ?= "llvm-project-${PV}.src" -SRC_URI[sha256sum] = "82401fea7b79d0078043f7598b835284d6650a75b93e64b6f761ea7b63097501" +SRC_URI[sha256sum] = "4579051e3c255fb4bb795d54324f5a7f3ef79bd9181e44293d7ee9a7f62aad9a" SRC_URI = "\ ${BASEURI} \ @@ -53,6 +53,7 @@ SRC_URI = "\ file://0032-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch \ file://0033-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch \ file://0034-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch \ + file://0035-compiler-rt-Do-not-pass-target-to-clang-compiler.patch \ " # Fallback to no-PIE if not set GCCPIE ??= "" -- cgit v1.2.3-54-g00ecf