From d52f203a6bd9e8715cd6fff255e4d2a5a5f78b52 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 22 Jun 2023 17:15:54 -0700 Subject: clang: Update to 17.0.1 release branch Drop riscv multilib patch it does not work with clang 17.0 Release Notes are below https://releases.llvm.org/17.0.1/docs/ReleaseNotes.html https://releases.llvm.org/17.0.1/tools/clang/docs/ReleaseNotes.html https://releases.llvm.org/17.0.1/tools/lld/docs/ReleaseNotes.html https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/ReleaseNotes.html https://releases.llvm.org/17.0.1/projects/libcxx/docs/ReleaseNotes.html Signed-off-by: Khem Raj --- conf/layer.conf | 2 +- recipes-devtools/clang/clang.inc | 9 ++- ...ind-libunwind-headers-when-LIBCXXABI_LIBU.patch | 18 ++--- ...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 | 4 +- ...-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 | 8 +-- ...inside-the-target-sysroot-for-compiler-ru.patch | 10 +-- ...ang-Define-releative-gcc-installation-dir.patch | 7 +- ...pthread-and-ldl-along-with-lunwind-for-st.patch | 6 +- ..._EXECUTABLE-when-cross-compiling-for-nati.patch | 4 +- .../0013-Check-for-atomic-double-intrinsics.patch | 2 +- ...compiler-runtime-library-to-link-step-for.patch | 8 +-- ...cmake-Fix-configure-for-packages-using-fi.patch | 18 ++--- ...esource-dir-location-for-cross-toolchains.patch | 8 ++- ...r-Add-dyld-prefix-when-checking-sysroot-f.patch | 14 ++-- .../0018-clang-Use-python3-in-python-scripts.patch | 21 ++---- ...4-set-Yocto-based-GCC-install-search-path.patch | 8 +-- ...-llvm-Do-not-use-find_library-for-ncurses.patch | 6 +- ...-anchor-for-adding-OE-distro-vendor-names.patch | 8 +-- ...-Do-not-use-backtrace-APIs-on-non-glibc-l.patch | 2 +- ...86-triple-for-non-debian-multiarch-linux-.patch | 6 +- ...0024-libunwind-Added-unw_backtrace-method.patch | 19 ++--- ...-Do-not-use-install-relative-libc-headers.patch | 6 +- ...ow-driver-finds-GCC-installation-path-on-.patch | 72 +++++++++++-------- .../0027-Fix-lib-paths-for-OpenEmbedded-Host.patch | 12 ++-- ...library-search-path-for-OpenEmbedded-Host.patch | 10 +-- .../0029-lldb-Link-with-libatomic-on-x86.patch | 4 +- ...de-openembedded-distributions-from-settin.patch | 35 --------- ...030-compiler-rt-Enable-__int128-for-ppc32.patch | 73 +++++++++++++++++++ ...031-compiler-rt-Enable-__int128-for-ppc32.patch | 73 ------------------- ...-Do-not-use-cmake-infra-to-detect-libzstd.patch | 62 ++++++++++++++++ ...ler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch | 44 ++++++++++++ ...-Do-not-use-cmake-infra-to-detect-libzstd.patch | 62 ---------------- ...Enable-64bit-off_t-on-32bit-glibc-systems.patch | 53 -------------- ...-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch | 43 +++++++++++ ...s-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch | 81 +++++++++++++++++++++ ...-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch | 36 ---------- ...ler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch | 44 ------------ ...-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch | 43 ----------- .../0037-Call-printName-to-get-name-of-Decl.patch | 71 ------------------ ...o-prefix-map-to-anonymous-tags-in-templat.patch | 84 ---------------------- ...andle-relaxation-reductions-of-more-than-.patch | 78 -------------------- ...s-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch | 80 --------------------- recipes-devtools/clang/common.inc | 17 ++--- 48 files changed, 479 insertions(+), 836 deletions(-) delete mode 100644 recipes-devtools/clang/clang/0030-clang-exclude-openembedded-distributions-from-settin.patch create mode 100644 recipes-devtools/clang/clang/0030-compiler-rt-Enable-__int128-for-ppc32.patch delete mode 100644 recipes-devtools/clang/clang/0031-compiler-rt-Enable-__int128-for-ppc32.patch create mode 100644 recipes-devtools/clang/clang/0031-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch create mode 100644 recipes-devtools/clang/clang/0032-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch delete mode 100644 recipes-devtools/clang/clang/0032-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch delete mode 100644 recipes-devtools/clang/clang/0033-build-Enable-64bit-off_t-on-32bit-glibc-systems.patch create mode 100644 recipes-devtools/clang/clang/0033-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch create mode 100644 recipes-devtools/clang/clang/0034-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch delete mode 100644 recipes-devtools/clang/clang/0034-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch delete mode 100644 recipes-devtools/clang/clang/0035-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch delete mode 100644 recipes-devtools/clang/clang/0036-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch delete mode 100644 recipes-devtools/clang/clang/0037-Call-printName-to-get-name-of-Decl.patch delete mode 100644 recipes-devtools/clang/clang/0038-Apply-fmacro-prefix-map-to-anonymous-tags-in-templat.patch delete mode 100644 recipes-devtools/clang/clang/0039-lld-RISCV-Handle-relaxation-reductions-of-more-than-.patch delete mode 100644 recipes-devtools/clang/clang/0040-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch diff --git a/conf/layer.conf b/conf/layer.conf index f1138b8..db08303 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -33,7 +33,7 @@ INHERIT += "clang" # Do not include clang in SDK unless user wants to CLANGSDK ??= "0" -LLVMVERSION = "16.0.6" +LLVMVERSION = "17.0.1" require conf/nonclangable.conf require conf/nonscanable.conf diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 2340aec..ec0c22a 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -4,15 +4,14 @@ LLVM_DIR = "llvm${LLVM_RELEASE}" LLVM_GIT ?= "git://github.com/llvm" LLVM_GIT_PROTOCOL ?= "https" -MAJOR_VER = "16" +MAJOR_VER = "17" MINOR_VER = "0" -PATCH_VER = "6" +PATCH_VER = "1" -SRCREV ?= "7cbf1a2591520c2491aa35339f227775f4d3adf6" +SRCREV ?= "e19b7dc36bc047b9eb72078d034596be766da350" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" -#BRANCH = "release/15.x" -BRANCH = "release/16.x" +BRANCH = "release/17.x" LLVMMD5SUM = "8a15a0759ef07f2682d2ba4b893c9afe" CLANGMD5SUM = "ff42885ed2ab98f1ecb8c1fc41205343" 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 cc62160..6721a2b 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 bfea0b41ba225254c159194e911e2238103f70e4 Mon Sep 17 00:00:00 2001 +From 6a743f488230aa025016396208d1760835495264 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, 11 insertions(+), 5 deletions(-) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index 8f48d402bc22..c2470267d8e3 100644 +index f380fe6b6b92..145cb9d7ee88 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt -@@ -483,7 +483,7 @@ set(LIBCXXABI_LIBUNWIND_PATH "${LIBCXXABI_LIBUNWIND_PATH}" CACHE PATH +@@ -426,7 +426,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 8f48d402bc22..c2470267d8e3 100644 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} ${LIBCXXABI_LIBUNWIND_PATH}/include ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES} -@@ -494,15 +494,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) +@@ -437,15 +437,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) NO_CMAKE_FIND_ROOT_PATH ) @@ -39,12 +39,12 @@ index 8f48d402bc22..c2470267d8e3 100644 + if (LIBCXXABI_LIBUNWIND_INCLUDES STREQUAL "LIBCXXABI_LIBUNWIND_INCLUDES-NOTFOUND") + set(LIBCXXABI_LIBUNWIND_INCLUDES "") endif() + endif() -- if (NOT LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL STREQUAL "") -- include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL}") -+ if (NOT LIBCXXABI_LIBUNWIND_INCLUDES STREQUAL "") -+ include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES}") - endif() +-if (NOT "${LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL}" STREQUAL "") +- include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL}") ++if (NOT "${LIBCXXABI_LIBUNWIND_INCLUDES}" STREQUAL "") ++ include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES}") endif() +set(LIBCXXABI_LIBUNWIND_INCLUDES "${LIBCXXABI_LIBUNWIND_INCLUDES}" CACHE 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 047280e..df4d620 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 4aa8c16b7caed1924e7ddafff7dd0c719cac3d7e Mon Sep 17 00:00:00 2001 +From 25b8166b829bc987832a7c7b41581f193a4fabe9 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 12432d0..0262008 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 4c8897954c3a49fd215e7bb1b1777a814c911e60 Mon Sep 17 00:00:00 2001 +From fb844bcda4ed86c4f7246b4249d217dca534bc25 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 8a13508fcb98..2c2bda5befa5 100644 +index 1545340aa8a8..73fad3284810 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt -@@ -89,7 +89,16 @@ if (COMPILER_RT_STANDALONE_BUILD) +@@ -80,7 +80,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 6927ebd..4d13016 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 d333a8f789767d1aad9288861dbde840fc9de14a Mon Sep 17 00:00:00 2001 +From f258983025dd6a1d8a72f244ac97893c895e5b21 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 5f6af3514fc2..9ac2e912590f 100644 +index 03ac422d3e6b..3080b4758894 100644 --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def +++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def -@@ -1303,6 +1303,9 @@ TLI_DEFINE_STRING_INTERNAL("fopen") +@@ -1348,6 +1348,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 5f6af3514fc2..9ac2e912590f 100644 TLI_DEFINE_ENUM_INTERNAL(fopen64) TLI_DEFINE_STRING_INTERNAL("fopen64") TLI_DEFINE_SIG_INTERNAL(Ptr, Ptr, Ptr) -@@ -1381,7 +1384,9 @@ TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Long, Int) +@@ -1426,7 +1429,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 5f6af3514fc2..9ac2e912590f 100644 /// int fseeko64(FILE *stream, off64_t offset, int whence) TLI_DEFINE_ENUM_INTERNAL(fseeko64) TLI_DEFINE_STRING_INTERNAL("fseeko64") -@@ -1398,6 +1403,9 @@ TLI_DEFINE_STRING_INTERNAL("fstat") +@@ -1443,6 +1448,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 5f6af3514fc2..9ac2e912590f 100644 TLI_DEFINE_ENUM_INTERNAL(fstat64) TLI_DEFINE_STRING_INTERNAL("fstat64") TLI_DEFINE_SIG_INTERNAL(Int, Int, Ptr) -@@ -1423,6 +1431,9 @@ TLI_DEFINE_STRING_INTERNAL("ftello") +@@ -1468,6 +1476,9 @@ TLI_DEFINE_STRING_INTERNAL("ftello") TLI_DEFINE_SIG_INTERNAL(IntPlus, Ptr) /// off64_t ftello64(FILE *stream) @@ -58,7 +58,7 @@ index 5f6af3514fc2..9ac2e912590f 100644 TLI_DEFINE_ENUM_INTERNAL(ftello64) TLI_DEFINE_STRING_INTERNAL("ftello64") TLI_DEFINE_SIG_INTERNAL(Int64, Ptr) -@@ -1633,6 +1644,9 @@ TLI_DEFINE_STRING_INTERNAL("lstat") +@@ -1678,6 +1689,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 5f6af3514fc2..9ac2e912590f 100644 TLI_DEFINE_ENUM_INTERNAL(lstat64) TLI_DEFINE_STRING_INTERNAL("lstat64") TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Ptr) -@@ -2045,6 +2059,9 @@ TLI_DEFINE_STRING_INTERNAL("stat") +@@ -2090,6 +2104,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 5f6af3514fc2..9ac2e912590f 100644 TLI_DEFINE_ENUM_INTERNAL(stat64) TLI_DEFINE_STRING_INTERNAL("stat64") TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Ptr) -@@ -2270,6 +2287,9 @@ TLI_DEFINE_STRING_INTERNAL("tmpfile") +@@ -2315,6 +2332,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 b2cece8..4447c94 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 67c2f3e7f44144a98ce0fb09809d5759405874eb Mon Sep 17 00:00:00 2001 +From 588a8694c6540e31140c7e242bfb5e279d6ca08c 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 @@ -19,7 +19,7 @@ Signed-off-by: Khem Raj 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp -index b1d795a0a349..dbeddeb2152e 100644 +index e86eb2b44b10..7b2abf318dbe 100644 --- a/llvm/tools/llvm-config/llvm-config.cpp +++ b/llvm/tools/llvm-config/llvm-config.cpp @@ -246,6 +246,13 @@ Typical components:\n\ 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 6f61a3c..c3e7086 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 4e8e066b60a00eb10c70ef9523c55cfc7ab536f8 Mon Sep 17 00:00:00 2001 +From f033c3e6da2f09e627cf8cf8fbd753e07e0ebacd 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 c6fb290ffdb4..897a2da73d54 100644 +index 1ba222bf83b1..b2ed29621879 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -463,7 +463,11 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -495,7 +495,11 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { Triple.getEnvironment() == llvm::Triple::GNUEABIHF || tools::arm::getARMFloatABI(*this, Args) == tools::arm::FloatABI::Hard; @@ -31,7 +31,7 @@ index c6fb290ffdb4..897a2da73d54 100644 Loader = HF ? "ld-linux-armhf.so.3" : "ld-linux.so.3"; break; } -@@ -518,11 +522,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -550,11 +554,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 c6fb290ffdb4..897a2da73d54 100644 break; case llvm::Triple::riscv32: { StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple); -@@ -544,6 +556,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -576,6 +588,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 c6fb290ffdb4..897a2da73d54 100644 break; case llvm::Triple::systemz: LibDir = "lib"; -@@ -558,6 +574,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -590,6 +606,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 afbe3be..48af473 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 c6e80e71adaddab21bccc15ff827078d58010a65 Mon Sep 17 00:00:00 2001 +From b497f95862cfe82aa2d581798182d2c2112796ae 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 4f2340316654..cc9ed4f6b8ac 100644 +index 40038dce47d8..c642946c5cfb 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -653,6 +653,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, +@@ -636,6 +636,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 f0e54ff..ee75cbc 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 4cf32ee02831483cc999d1e60d401cb301f85bfc Mon Sep 17 00:00:00 2001 +From acfefc5462044827ba3b7d0ac7512a9d9461a833 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,12 +25,12 @@ 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 2a58f876a68d..c68a842b45e0 100644 +index b2ed29621879..d2fa4b2f11cf 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -184,7 +184,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) +@@ -215,7 +215,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) Multilibs = GCCInstallation.getMultilibs(); - SelectedMultilib = GCCInstallation.getMultilib(); + SelectedMultilibs.assign({GCCInstallation.getMultilib()}); llvm::Triple::ArchType Arch = Triple.getArch(); - std::string SysRoot = computeSysRoot(); + std::string SysRoot = computeSysRoot() + "/"; 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 90b286a..2e83358 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 c865d5064247bfc985bc92409869cd21ca5c74e9 Mon Sep 17 00:00:00 2001 +From 9069a7f709cdb5392c9e0ecd863d62176d080a91 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 bc70205a6c01..527efd421e01 100644 +index 8dafc3d481c2..3e0f7b64b0db 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp -@@ -13,6 +13,7 @@ +@@ -15,6 +15,7 @@ #include "ToolChains/InterfaceStubs.h" #include "clang/Basic/ObjCRuntime.h" #include "clang/Basic/Sanitizers.h" @@ -27,7 +27,7 @@ index bc70205a6c01..527efd421e01 100644 #include "clang/Config/config.h" #include "clang/Driver/Action.h" #include "clang/Driver/Driver.h" -@@ -488,7 +489,10 @@ StringRef ToolChain::getOSLibName() const { +@@ -595,7 +596,10 @@ StringRef ToolChain::getOSLibName() const { } std::string ToolChain::getCompilerRTPath() const { @@ -38,4 +38,4 @@ index bc70205a6c01..527efd421e01 100644 + CLANG_VERSION_STRING); if (isBareMetal()) { llvm::sys::path::append(Path, "lib", getOSLibName()); - Path += SelectedMultilib.gccSuffix(); + if (!SelectedMultilibs.empty()) { 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 761e1b1..39f4044 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 cd12100c9acd1b9d57d6386d1e9d4b9baa775866 Mon Sep 17 00:00:00 2001 +From fcc667e02238ad83e5db2ecc1f060af6dcc618f1 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 @@ -9,17 +9,16 @@ and other standard headers and libraries from gcc installation in OE Upstream-Status: Pending - Signed-off-by: Khem Raj --- clang/lib/Driver/ToolChains/Gnu.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index cc9ed4f6b8ac..846163329d92 100644 +index c642946c5cfb..e1c2cdc0e93b 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2681,19 +2681,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2744,19 +2744,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 7e765fe..6ccc25d 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 c16c0db65b24497a27fcc89012bfb37000a6e937 Mon Sep 17 00:00:00 2001 +From 85230d89fc000068097599df6c8750d75cf84c72 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 34640b3c450d..580d326935c0 100644 +index 0d6907b8e5c7..778da2b7b4a5 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -1725,6 +1725,8 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, +@@ -1820,6 +1820,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 3f6c158..3f5c9ab 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 4cfb62329c5b2ef54b7e0db4597fbb188948be65 Mon Sep 17 00:00:00 2001 +From 84a2bee19c577eb56c381903959c77271a4368e5 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,7 +11,7 @@ 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 a46a0fd630b0..55f6dba2901a 100644 +index 6af47b51d4c6..bf9adea6814a 100644 --- a/llvm/cmake/modules/CrossCompile.cmake +++ b/llvm/cmake/modules/CrossCompile.cmake @@ -86,6 +86,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) 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 ca539b3..855d544 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 9fc922e61ce39a12e99b4ff66475443b1dc61ab2 Mon Sep 17 00:00:00 2001 +From 129d994b584cab112d39916075eef8c833813677 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-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0014-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index 8518c06..b9d88f8 100644 --- a/recipes-devtools/clang/clang/0014-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0014-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -1,4 +1,4 @@ -From 4c2d34597815c045615725b185f2e08461a68432 Mon Sep 17 00:00:00 2001 +From c646fe1dd7b9fcb80de27c8b4da916bd9e0adb7f Mon Sep 17 00:00:00 2001 From: Jeremy Puhlman Date: Thu, 16 Jan 2020 21:16:10 +0000 Subject: [PATCH] libcxx: Add compiler runtime library to link step for libcxx @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt -index 9ff2a62e9394..e76625d5a5ac 100644 +index 35b466527096..f261c1def1ca 100644 --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt -@@ -200,7 +200,7 @@ if (LIBCXX_ENABLE_SHARED) +@@ -189,7 +189,7 @@ if (LIBCXX_ENABLE_SHARED) add_library(cxx_shared SHARED ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS}) target_include_directories(cxx_shared PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(cxx_shared PUBLIC cxx-headers @@ -26,7 +26,7 @@ index 9ff2a62e9394..e76625d5a5ac 100644 set_target_properties(cxx_shared PROPERTIES COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}" -@@ -294,7 +294,7 @@ if (LIBCXX_ENABLE_STATIC) +@@ -282,7 +282,7 @@ if (LIBCXX_ENABLE_STATIC) add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS}) target_include_directories(cxx_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(cxx_static PUBLIC cxx-headers diff --git a/recipes-devtools/clang/clang/0015-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0015-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index 07c8935..a421c6c 100644 --- a/recipes-devtools/clang/clang/0015-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0015-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -1,4 +1,4 @@ -From aafbba9f341d5e6d5293371fad130472bee85c5c Mon Sep 17 00:00:00 2001 +From ae428248f697ccf8b98c0da5a9983a1f0ff89bd5 Mon Sep 17 00:00:00 2001 From: Ovidiu Panait Date: Fri, 31 Jan 2020 10:56:11 +0200 Subject: [PATCH] clang,llvm: cmake: Fix configure for packages using @@ -52,10 +52,10 @@ index 75b0080f6715..ddf446a13eca 100644 endif() endmacro() diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index 93e6d67551de..d8123389957b 100644 +index 230620c37027..cb5a9bd41ee8 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -1335,7 +1335,6 @@ macro(llvm_add_tool project name) +@@ -1353,7 +1353,6 @@ macro(llvm_add_tool project name) if( LLVM_BUILD_TOOLS ) get_target_export_arg(${name} LLVM export_to_llvmexports) install(TARGETS ${name} @@ -63,7 +63,7 @@ index 93e6d67551de..d8123389957b 100644 RUNTIME DESTINATION ${${project}_TOOLS_INSTALL_DIR} COMPONENT ${name}) -@@ -1346,9 +1345,6 @@ macro(llvm_add_tool project name) +@@ -1364,9 +1363,6 @@ macro(llvm_add_tool project name) endif() endif() endif() @@ -73,7 +73,7 @@ index 93e6d67551de..d8123389957b 100644 set_target_properties(${name} PROPERTIES FOLDER "Tools") endif() endmacro(llvm_add_tool project name) -@@ -1393,7 +1389,6 @@ macro(add_llvm_utility name) +@@ -1411,7 +1407,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 +81,7 @@ index 93e6d67551de..d8123389957b 100644 RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} COMPONENT ${name}) -@@ -1402,7 +1397,6 @@ macro(add_llvm_utility name) +@@ -1420,7 +1415,6 @@ macro(add_llvm_utility name) DEPENDS ${name} COMPONENT ${name}) endif() @@ -90,10 +90,10 @@ index 93e6d67551de..d8123389957b 100644 set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name}) endif() diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake -index 70c2edb8c833..e012fea08982 100644 +index 7fd6628ef55d..57a996d03755 100644 --- a/llvm/cmake/modules/TableGen.cmake +++ b/llvm/cmake/modules/TableGen.cmake -@@ -189,12 +189,7 @@ macro(add_tablegen target project) +@@ -195,12 +195,7 @@ macro(add_tablegen target project) if (ADD_TABLEGEN_DESTINATION AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND (LLVM_BUILD_UTILS OR ${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS)) @@ -106,7 +106,7 @@ index 70c2edb8c833..e012fea08982 100644 COMPONENT ${target} RUNTIME DESTINATION "${ADD_TABLEGEN_DESTINATION}") if(NOT LLVM_ENABLE_IDE) -@@ -205,6 +200,5 @@ macro(add_tablegen target project) +@@ -211,6 +206,5 @@ macro(add_tablegen target project) endif() if(ADD_TABLEGEN_EXPORT) string(TOUPPER ${ADD_TABLEGEN_EXPORT} export_upper) diff --git a/recipes-devtools/clang/clang/0016-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0016-clang-Fix-resource-dir-location-for-cross-toolchains.patch index ddfc76f..8e57922 100644 --- a/recipes-devtools/clang/clang/0016-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0016-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From 4afad7aec9a18b35e934d50b2f99dc464d6ead0e Mon Sep 17 00:00:00 2001 +From f45ef34d9d5a3ff049c39dd2d3d6aed72eb5b0bc 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 @@ -20,15 +20,17 @@ Signed-off-by: Khem Raj 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp -index a268f2fa8fc5..ab813044dc8c 100644 +index bdbdad9362e1..a0d4a04b42bb 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp -@@ -181,7 +181,13 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath, +@@ -183,9 +183,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") { diff --git a/recipes-devtools/clang/clang/0017-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0017-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index ac311a0..cd111bd 100644 --- a/recipes-devtools/clang/clang/0017-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0017-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From a85573b9e7e939b0ab1738dd3b3cc999b7de1547 Mon Sep 17 00:00:00 2001 +From 53138d6a7fe341821a73719f776ee5535d759c3b 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 de0d5950d2ee..c6acfc8924c9 100644 +index d2fa4b2f11cf..42b88e76a9d5 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -464,8 +464,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -496,8 +496,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 de0d5950d2ee..c6acfc8924c9 100644 LibDir = "lib"; } Loader = HF ? "ld-linux-armhf.so.3" : "ld-linux.so.3"; -@@ -522,8 +522,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -554,8 +554,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 de0d5950d2ee..c6acfc8924c9 100644 LibDir = "lib"; } break; -@@ -531,8 +531,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -563,8 +563,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 de0d5950d2ee..c6acfc8924c9 100644 LibDir = "lib"; } break; -@@ -556,8 +556,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -588,8 +588,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 de0d5950d2ee..c6acfc8924c9 100644 LibDir = "lib"; } break; -@@ -574,8 +574,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -606,8 +606,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/0018-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0018-clang-Use-python3-in-python-scripts.patch index 7c9c0c7..6de7a36 100644 --- a/recipes-devtools/clang/clang/0018-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0018-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From 9c415718a3b38bd19d82b624fa0f564ad0f7a1fa Mon Sep 17 00:00:00 2001 +From 61de53f94868705c7a0379c3f20e6b9de76c6198 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 @@ -10,32 +10,21 @@ Upstream-Status: Pending Signed-off-by: Khem Raj --- .../find-all-symbols/tool/run-find-all-symbols.py | 2 +- - clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py | 2 +- clang/tools/scan-view/bin/scan-view | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py -index a0fa64592e62..27aa97a35571 100755 +index 471dbf8c110b..f98385dc6651 100755 --- a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py +++ b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # - #=- run-find-all-symbols.py - Parallel find-all-symbols runner -*- python -*-=# - # -diff --git a/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py b/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py -index a26d2144b7f9..396a201b667e 100755 ---- a/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py -+++ b/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # - #===- clang-tidy-diff.py - ClangTidy Diff Checker -----------*- python -*--===# + # =- run-find-all-symbols.py - Parallel find-all-symbols runner -*- python -*-=# # diff --git a/clang/tools/scan-view/bin/scan-view b/clang/tools/scan-view/bin/scan-view -index 6165432e7af8..07effbca5969 100755 +index d01aebb4029a..f3375804654d 100755 --- a/clang/tools/scan-view/bin/scan-view +++ b/clang/tools/scan-view/bin/scan-view @@ -1,4 +1,4 @@ diff --git a/recipes-devtools/clang/clang/0019-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0019-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index bf5b48d..412b1c5 100644 --- a/recipes-devtools/clang/clang/0019-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0019-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From 4498ef187dd9a9fc83fb433110c2af7b94f3aac0 Mon Sep 17 00:00:00 2001 +From 83fc70ac26c2412382341be61978e51bbd2e6c4f 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 @@ -45,7 +45,7 @@ is different between clang and clang-native The //CLANG_EXTRA_OE_VENDORS_TRIPLES string is replaced with list of additional triples based on CLANG_EXTRA_OE_VENDORS variable in -recipes-devtools/clang/llvm-project-source.inc:add_more_target_vendors() +recipes-devtools/clang/llvm-project-source.inc:add_distro_vendor() Upstream-Status: Inappropriate [oe specific] @@ -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 846163329d92..0db37c6ef1a8 100644 +index e1c2cdc0e93b..0b355d9a3f4b 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2254,6 +2254,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( +@@ -2334,6 +2334,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( "x86_64-redhat-linux", "x86_64-suse-linux", "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux", "x86_64-unknown-linux", diff --git a/recipes-devtools/clang/clang/0020-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0020-llvm-Do-not-use-find_library-for-ncurses.patch index d461614..db94867 100644 --- a/recipes-devtools/clang/clang/0020-llvm-Do-not-use-find_library-for-ncurses.patch +++ b/recipes-devtools/clang/clang/0020-llvm-Do-not-use-find_library-for-ncurses.patch @@ -1,4 +1,4 @@ -From 72388158dd0791b597fdc7ffd6913de0401f4b43 Mon Sep 17 00:00:00 2001 +From 45a0c6817175c12aac685b4d45badf761bd7f4fc Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 7 Feb 2021 23:58:41 -0800 Subject: [PATCH] llvm: Do not use find_library for ncurses @@ -18,10 +18,10 @@ Signed-off-by: Khem Raj 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake -index 5f51befc1973..55c04b76908e 100644 +index 8d3dc8d208b2..14dfbe147bdd 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake -@@ -179,7 +179,7 @@ else() +@@ -177,7 +177,7 @@ else() set(MAYBE_REQUIRED) endif() if(LLVM_ENABLE_TERMINFO) diff --git a/recipes-devtools/clang/clang/0021-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0021-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index 17c83eb..480163e 100644 --- a/recipes-devtools/clang/clang/0021-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0021-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From 9ac3b933821e3cb3fa71985c8a4f6291d1810d92 Mon Sep 17 00:00:00 2001 +From 3ee6071f459375e0534db3bd84b1a71a5694daef 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 @@ -7,7 +7,7 @@ This helps in making right detection for OE built gcc toolchains The //CLANG_EXTRA_OE_VENDORS_CASES string is replaced with list of additional Ceses based on CLANG_EXTRA_OE_VENDORS variable in -recipes-devtools/clang/llvm-project-source.inc:add_more_target_vendors() +recipes-devtools/clang/llvm-project-source.inc:add_distro_vendor() Upstream-Status: Inappropriate [OE-specific] @@ -18,10 +18,10 @@ 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 a68035989a93..ab1fef23d6fc 100644 +index a3d6a06af976..953132c543cd 100644 --- a/llvm/lib/TargetParser/Triple.cpp +++ b/llvm/lib/TargetParser/Triple.cpp -@@ -551,7 +551,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) { +@@ -569,7 +569,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) { .Case("amd", Triple::AMD) .Case("mesa", Triple::Mesa) .Case("suse", Triple::SUSE) diff --git a/recipes-devtools/clang/clang/0022-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0022-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 4dea592..3813446 100644 --- a/recipes-devtools/clang/clang/0022-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0022-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From 671ccc83d1e5da6a08ca8bcec2a70df57a955bf8 Mon Sep 17 00:00:00 2001 +From 073a80b1f50e27c88c931bedea516effcff0945e 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/0023-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0023-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index 1cc785e..349c1f8 100644 --- a/recipes-devtools/clang/clang/0023-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0023-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From b51eef97a31d797941c88bc228e220fef13f8e7e Mon Sep 17 00:00:00 2001 +From 64bf8ed61750e9139851c866d9cfbed9a3fb5bb9 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 ca9f5f2e4f74..20c7c7a745be 100644 +index 42b88e76a9d5..ef8435385130 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -667,6 +667,9 @@ void Linux::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, +@@ -703,6 +703,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/0024-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0024-libunwind-Added-unw_backtrace-method.patch index 55d9714..170999b 100644 --- a/recipes-devtools/clang/clang/0024-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0024-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 841592392822de2d39c0a208b0a2f9fc7e9b184d Mon Sep 17 00:00:00 2001 +From 755f0c575bb3efa82703eda87df3c37aeb6f96b0 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 @@ -8,8 +8,8 @@ Upstream-Status: Pending Signed-off-by: Khem Raj --- libunwind/include/libunwind.h | 1 + - libunwind/src/libunwind.cpp | 18 ++++++++++++++++++ - 2 files changed, 19 insertions(+) + libunwind/src/libunwind.cpp | 20 ++++++++++++++++++++ + 2 files changed, 21 insertions(+) diff --git a/libunwind/include/libunwind.h b/libunwind/include/libunwind.h index d2ad5ab87122..d735d955aee2 100644 @@ -24,12 +24,12 @@ index d2ad5ab87122..d735d955aee2 100644 extern unw_addr_space_t unw_local_addr_space; diff --git a/libunwind/src/libunwind.cpp b/libunwind/src/libunwind.cpp -index 0faea2b78570..14bf07d8f470 100644 +index 1bd18659b786..64819826cfea 100644 --- a/libunwind/src/libunwind.cpp +++ b/libunwind/src/libunwind.cpp -@@ -349,7 +349,25 @@ void __unw_remove_dynamic_eh_frame_section(unw_word_t eh_frame_start) { - #endif // defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) - #endif // !defined(__USING_SJLJ_EXCEPTIONS__) +@@ -431,6 +431,26 @@ int __unw_remove_find_dynamic_unwind_sections( + + #endif // __APPLE__ +int unw_backtrace(void **buffer, int size) { + unw_context_t context; @@ -44,12 +44,13 @@ index 0faea2b78570..14bf07d8f470 100644 + if (current >= size || unw_get_reg(&cursor, UNW_REG_IP, &ip)) { + break; + } - ++ + buffer[current++] = reinterpret_cast(static_cast(ip)); + } + + return current; +} - ++ // Add logging hooks in Debug builds only #ifndef NDEBUG + #include diff --git a/recipes-devtools/clang/clang/0025-clang-Do-not-use-install-relative-libc-headers.patch b/recipes-devtools/clang/clang/0025-clang-Do-not-use-install-relative-libc-headers.patch index 4e5832a..8d35b41 100644 --- a/recipes-devtools/clang/clang/0025-clang-Do-not-use-install-relative-libc-headers.patch +++ b/recipes-devtools/clang/clang/0025-clang-Do-not-use-install-relative-libc-headers.patch @@ -1,4 +1,4 @@ -From 8b052f0c29a83176e4b17e9890e1aa279da9a7cf Mon Sep 17 00:00:00 2001 +From 6fd8342c1b41a5d3f2aad1e8b215d1d9c70df800 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, 3 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 0db37c6ef1a8..80a21d58c86c 100644 +index 0b355d9a3f4b..f228bd14e8a8 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -3093,7 +3093,9 @@ Generic_GCC::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, +@@ -3128,7 +3128,9 @@ Generic_GCC::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, // Android never uses the libc++ headers installed alongside the toolchain, // which are generally incompatible with the NDK libraries anyway. diff --git a/recipes-devtools/clang/clang/0026-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch b/recipes-devtools/clang/clang/0026-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch index 402fc11..90783bb 100644 --- a/recipes-devtools/clang/clang/0026-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch +++ b/recipes-devtools/clang/clang/0026-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch @@ -1,4 +1,4 @@ -From 96a3194262a641ac20e1bf19f9db7f657e03785f Mon Sep 17 00:00:00 2001 +From b00d9692a5337fdbbb5635cc9077061c47c7b741 Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Wed, 20 Oct 2021 17:30:36 -0700 Subject: [PATCH] clang: Fix how driver finds GCC installation path on @@ -27,54 +27,70 @@ Upstream-Status: Pending Signed-off-by: David Abdurachmanov Signed-off-by: Khem Raj --- - clang/lib/Driver/ToolChains/Gnu.cpp | 39 +++++++++++++++++++++-------- - 1 file changed, 28 insertions(+), 11 deletions(-) + clang/lib/Driver/ToolChains/Gnu.cpp | 57 ++++++++++++++++++++--------- + 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 80a21d58c86c..77f5c3f58a8b 100644 +index f228bd14e8a8..d746db487e1f 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -1748,18 +1748,29 @@ static void findRISCVMultilibs(const Driver &D, +@@ -1793,23 +1793,38 @@ static void findRISCVMultilibs(const Driver &D, return findRISCVBareMetalMultilibs(D, TargetTriple, Path, Args, Result); FilterNonExistent NonExistent(Path, "/crtbegin.o", D.getVFS()); -- Multilib Ilp32 = makeMultilib("lib32/ilp32").flag("+m32").flag("+mabi=ilp32"); -- Multilib Ilp32f = +- MultilibBuilder Ilp32 = +- MultilibBuilder("lib32/ilp32").flag("-m32").flag("-mabi=ilp32"); +- MultilibBuilder Ilp32f = +- MultilibBuilder("lib32/ilp32f").flag("-m32").flag("-mabi=ilp32f"); +- MultilibBuilder Ilp32d = +- MultilibBuilder("lib32/ilp32d").flag("-m32").flag("-mabi=ilp32d"); +- MultilibBuilder Lp64 = +- MultilibBuilder("lib64/lp64").flag("-m64").flag("-mabi=lp64"); +- MultilibBuilder Lp64f = +- MultilibBuilder("lib64/lp64f").flag("-m64").flag("-mabi=lp64f"); +- MultilibBuilder Lp64d = +- MultilibBuilder("lib64/lp64d").flag("-m64").flag("-mabi=lp64d"); +- MultilibSet RISCVMultilibs = +- MultilibSetBuilder() +- .Either({Ilp32, Ilp32f, Ilp32d, Lp64, Lp64f, Lp64d}) +- .makeMultilibSet() +- .FilterOut(NonExistent); ++ + MultilibSet RISCVMultilibs; + + if (TargetTriple.getVendor() == llvm::Triple::OpenEmbedded) { -+ Multilib OpenEmbeddedIlp32d = makeMultilib("").flag("+m32").flag("+mabi=ilp32d"); -+ Multilib OpenEmbeddedLp64d = makeMultilib("").flag("+m64").flag("+mabi=lp64d"); ++ MultilibBuilder OpenEmbeddedIlp32d = ++ MultilibBuilder("").flag("+m32").flag("+mabi=ilp32d"); ++ MultilibBuilder OpenEmbeddedLp64d = ++ MultilibBuilder("").flag("+m64").flag("+mabi=lp64d"); + RISCVMultilibs = -+ MultilibSet() ++ MultilibSetBuilder() + .Either({OpenEmbeddedIlp32d, OpenEmbeddedLp64d}) ++ .makeMultilibSet() + .FilterOut(NonExistent); + } else { -+ Multilib Ilp32 = makeMultilib("lib32/ilp32").flag("+m32").flag("+mabi=ilp32"); -+ Multilib Ilp32f = - makeMultilib("lib32/ilp32f").flag("+m32").flag("+mabi=ilp32f"); -- Multilib Ilp32d = -+ Multilib Ilp32d = - makeMultilib("lib32/ilp32d").flag("+m32").flag("+mabi=ilp32d"); -- Multilib Lp64 = makeMultilib("lib64/lp64").flag("+m64").flag("+mabi=lp64"); -- Multilib Lp64f = makeMultilib("lib64/lp64f").flag("+m64").flag("+mabi=lp64f"); -- Multilib Lp64d = makeMultilib("lib64/lp64d").flag("+m64").flag("+mabi=lp64d"); -- MultilibSet RISCVMultilibs = -- MultilibSet() -- .Either({Ilp32, Ilp32f, Ilp32d, Lp64, Lp64f, Lp64d}) -- .FilterOut(NonExistent); -+ Multilib Lp64 = makeMultilib("lib64/lp64").flag("+m64").flag("+mabi=lp64"); -+ Multilib Lp64f = makeMultilib("lib64/lp64f").flag("+m64").flag("+mabi=lp64f"); -+ Multilib Lp64d = makeMultilib("lib64/lp64d").flag("+m64").flag("+mabi=lp64d"); ++ MultilibBuilder Ilp32 = ++ MultilibBuilder("lib32/ilp32").flag("-m32").flag("-mabi=ilp32"); ++ MultilibBuilder Ilp32f = ++ MultilibBuilder("lib32/ilp32f").flag("-m32").flag("-mabi=ilp32f"); ++ MultilibBuilder Ilp32d = ++ MultilibBuilder("lib32/ilp32d").flag("-m32").flag("-mabi=ilp32d"); ++ MultilibBuilder Lp64 = ++ MultilibBuilder("lib64/lp64").flag("-m64").flag("-mabi=lp64"); ++ MultilibBuilder Lp64f = ++ MultilibBuilder("lib64/lp64f").flag("-m64").flag("-mabi=lp64f"); ++ MultilibBuilder Lp64d = ++ MultilibBuilder("lib64/lp64d").flag("-m64").flag("-mabi=lp64d"); + RISCVMultilibs = -+ MultilibSet() ++ MultilibSetBuilder() + .Either({Ilp32, Ilp32f, Ilp32d, Lp64, Lp64f, Lp64d}) ++ .makeMultilibSet() + .FilterOut(NonExistent); + } Multilib::flags_list Flags; bool IsRV64 = TargetTriple.getArch() == llvm::Triple::riscv64; -@@ -2713,13 +2724,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2776,13 +2791,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( continue; // Saw this path before; no need to look at it again. if (CandidateVersion.isOlderThan(4, 1, 1)) continue; diff --git a/recipes-devtools/clang/clang/0027-Fix-lib-paths-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0027-Fix-lib-paths-for-OpenEmbedded-Host.patch index 3bac5b5..59f3af1 100644 --- a/recipes-devtools/clang/clang/0027-Fix-lib-paths-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0027-Fix-lib-paths-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From a7b8523a9f649ca3bdc2759e2bb500bc7f957b48 Mon Sep 17 00:00:00 2001 +From f910a403e898d42d589b694bc9856f052386136e 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,18 +48,18 @@ 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 77f5c3f58a8b..0ec2dadafc05 100644 +index d746db487e1f..020fd106a629 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -18,6 +18,7 @@ +@@ -19,6 +19,7 @@ #include "Linux.h" #include "clang/Config/config.h" // for GCC_INSTALL_PREFIX #include "clang/Driver/Compilation.h" +#include "clang/Driver/Distro.h" #include "clang/Driver/Driver.h" #include "clang/Driver/DriverDiagnostic.h" - #include "clang/Driver/Options.h" -@@ -2682,6 +2683,7 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( + #include "clang/Driver/MultilibBuilder.h" +@@ -2749,6 +2750,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 77f5c3f58a8b..0ec2dadafc05 100644 // Locations relative to the system lib directory where GCC's triple-specific // directories might reside. struct GCCLibSuffix { -@@ -2699,7 +2701,8 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2766,7 +2768,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/0028-Correct-library-search-path-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0028-Correct-library-search-path-for-OpenEmbedded-Host.patch index fc45054..9fc5223 100644 --- a/recipes-devtools/clang/clang/0028-Correct-library-search-path-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0028-Correct-library-search-path-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From 18cf3957bb9a0021059c64dc8e640028be821bc3 Mon Sep 17 00:00:00 2001 +From 9ed567b3fcce1759947621765199f13261c615a4 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 1aaf93ddb7c4..31f03e327b78 100644 +index 8291f6575a71..7ce64b9a2c25 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 1aaf93ddb7c4..31f03e327b78 100644 OpenSUSE, UbuntuHardy, UbuntuIntrepid, -@@ -135,6 +136,7 @@ public: +@@ -136,6 +137,7 @@ public: bool IsGentoo() const { return DistroVal == Gentoo; } @@ -59,7 +59,7 @@ index 1aaf93ddb7c4..31f03e327b78 100644 }; diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp -index 87a0c5a58511..b607a3f18d1e 100644 +index 6e0087565941..13e45b1ea088 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) { @@ -71,7 +71,7 @@ index 87a0c5a58511..b607a3f18d1e 100644 return Version; } diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 20c7c7a745be..f5d9b3187cf5 100644 +index ef8435385130..8bd21eebfed3 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp @@ -78,6 +78,7 @@ std::string Linux::getMultiarchTriple(const Driver &D, diff --git a/recipes-devtools/clang/clang/0029-lldb-Link-with-libatomic-on-x86.patch b/recipes-devtools/clang/clang/0029-lldb-Link-with-libatomic-on-x86.patch index 666e14d..6d71f75 100644 --- a/recipes-devtools/clang/clang/0029-lldb-Link-with-libatomic-on-x86.patch +++ b/recipes-devtools/clang/clang/0029-lldb-Link-with-libatomic-on-x86.patch @@ -1,4 +1,4 @@ -From 5a16f3cf25bfa15ddccb72f16d296648d6512ede Mon Sep 17 00:00:00 2001 +From 374f62b718dbb04a88764cdfa747cd42ebf57829 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 89acd7cd2eaf..6aa84f9d284d 100644 +index b376ace0ebe3..b9bb39220524 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/0030-clang-exclude-openembedded-distributions-from-settin.patch b/recipes-devtools/clang/clang/0030-clang-exclude-openembedded-distributions-from-settin.patch deleted file mode 100644 index d1a9fd5..0000000 --- a/recipes-devtools/clang/clang/0030-clang-exclude-openembedded-distributions-from-settin.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 43418cfdfc19953e43c5e1f62fd0720f160de1a2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 11 Feb 2022 12:29:14 -0800 -Subject: [PATCH] clang: exclude openembedded distributions from setting rpath - on openmp executables - -OpenEmbedded based SDKs stage toolchains outsides the target rootfs and -libomp.so is part of the target rootfs and not part of compiler -toolchain install or relative to it. It finds the libraries via ---sysroot during compile. This ensures that -rpath is not added for such -systems, since it is adding cross-compile paths to rpath which is not -correct when the binaries are run on real targets. - -Upstream-Status: Submitted [https://reviews.llvm.org/D119590] -Signed-off-by: Khem Raj ---- - clang/lib/Driver/ToolChains/CommonArgs.cpp | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp -index 580d326935c0..412218f04df5 100644 ---- a/clang/lib/Driver/ToolChains/CommonArgs.cpp -+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -801,6 +801,11 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, - void tools::addOpenMPRuntimeSpecificRPath(const ToolChain &TC, - const ArgList &Args, - ArgStringList &CmdArgs) { -+ // OpenEmbedded/Yocto installs libomp.so into /usr/lib -+ // therefore using -rpath is not needed, on the contrary it adds -+ // paths from cross compiler install location which is not correct -+ if (TC.getTriple().getVendor() == llvm::Triple::OpenEmbedded) -+ return; - - if (Args.hasFlag(options::OPT_fopenmp_implicit_rpath, - options::OPT_fno_openmp_implicit_rpath, true)) { diff --git a/recipes-devtools/clang/clang/0030-compiler-rt-Enable-__int128-for-ppc32.patch b/recipes-devtools/clang/clang/0030-compiler-rt-Enable-__int128-for-ppc32.patch new file mode 100644 index 0000000..9eb42e5 --- /dev/null +++ b/recipes-devtools/clang/clang/0030-compiler-rt-Enable-__int128-for-ppc32.patch @@ -0,0 +1,73 @@ +From b907dbdce5520eaf841ae041fcca6941a8529456 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 + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + compiler-rt/lib/builtins/CMakeLists.txt | 15 +++++++-------- + compiler-rt/lib/builtins/int_types.h | 2 +- + 2 files changed, 8 insertions(+), 9 deletions(-) + +diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt +index d62fa0432e2a..126505bd8921 100644 +--- a/compiler-rt/lib/builtins/CMakeLists.txt ++++ b/compiler-rt/lib/builtins/CMakeLists.txt +@@ -669,11 +669,9 @@ set(mips64_SOURCES ${GENERIC_TF_SOURCES} + set(mips64el_SOURCES ${GENERIC_TF_SOURCES} + ${mips_SOURCES}) + +-set(powerpc_SOURCES ${GENERIC_SOURCES}) +- + set(powerpcspe_SOURCES ${GENERIC_SOURCES}) + +-set(powerpc64_SOURCES ++set(powerpc_SOURCES + ppc/divtc3.c + ppc/fixtfdi.c + ppc/fixunstfdi.c +@@ -688,14 +686,15 @@ set(powerpc64_SOURCES + ) + # These routines require __int128, which isn't supported on AIX. + if (NOT OS_NAME MATCHES "AIX") +- set(powerpc64_SOURCES ++ set(powerpc_SOURCES + ppc/floattitf.c + ppc/fixtfti.c + ppc/fixunstfti.c +- ${powerpc64_SOURCES} ++ ${powerpc_SOURCES} + ) + endif() +-set(powerpc64le_SOURCES ${powerpc64_SOURCES}) ++set(powerpc64le_SOURCES ${powerpc_SOURCES}) ++set(powerpc64_SOURCES ${powerpc_SOURCES}) + + set(riscv_SOURCES + riscv/fp_mode.c +@@ -823,9 +822,9 @@ else () + list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET) + endif() + +- # For RISCV32, we must force enable int128 for compiling long ++ # For RISCV32/PPC32, we must force enable int128 for compiling long + # double routines. +- if(COMPILER_RT_ENABLE_SOFTWARE_INT128 OR "${arch}" STREQUAL "riscv32") ++ if(COMPILER_RT_ENABLE_SOFTWARE_INT128 OR "${arch}" STREQUAL "riscv32" OR "${arch}" STREQUAL "powerpc") + list(APPEND BUILTIN_CFLAGS_${arch} -fforce-enable-int128) + endif() + +diff --git a/compiler-rt/lib/builtins/int_types.h b/compiler-rt/lib/builtins/int_types.h +index e94d3154c6d4..37b2cb43f932 100644 +--- a/compiler-rt/lib/builtins/int_types.h ++++ b/compiler-rt/lib/builtins/int_types.h +@@ -64,7 +64,7 @@ typedef union { + } udwords; + + #if defined(__LP64__) || defined(__wasm__) || defined(__mips64) || \ +- defined(__SIZEOF_INT128__) || defined(_WIN64) ++ defined(__SIZEOF_INT128__) || defined(_WIN64) || defined(__powerpc__) + #define CRT_HAS_128BIT + #endif + diff --git a/recipes-devtools/clang/clang/0031-compiler-rt-Enable-__int128-for-ppc32.patch b/recipes-devtools/clang/clang/0031-compiler-rt-Enable-__int128-for-ppc32.patch deleted file mode 100644 index 9ebc57e..0000000 --- a/recipes-devtools/clang/clang/0031-compiler-rt-Enable-__int128-for-ppc32.patch +++ /dev/null @@ -1,73 +0,0 @@ -From cd16176a1b45061623ec0219a12a0a7a407fa738 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 - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - compiler-rt/lib/builtins/CMakeLists.txt | 15 +++++++-------- - compiler-rt/lib/builtins/int_types.h | 2 +- - 2 files changed, 8 insertions(+), 9 deletions(-) - -diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt -index 2fc70522895f..55f0ecb20a1f 100644 ---- a/compiler-rt/lib/builtins/CMakeLists.txt -+++ b/compiler-rt/lib/builtins/CMakeLists.txt -@@ -668,11 +668,9 @@ set(mips64_SOURCES ${GENERIC_TF_SOURCES} - set(mips64el_SOURCES ${GENERIC_TF_SOURCES} - ${mips_SOURCES}) - --set(powerpc_SOURCES ${GENERIC_SOURCES}) -- - set(powerpcspe_SOURCES ${GENERIC_SOURCES}) - --set(powerpc64_SOURCES -+set(powerpc_SOURCES - ppc/divtc3.c - ppc/fixtfdi.c - ppc/fixunstfdi.c -@@ -687,14 +685,15 @@ set(powerpc64_SOURCES - ) - # These routines require __int128, which isn't supported on AIX. - if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "AIX") -- set(powerpc64_SOURCES -+ set(powerpc_SOURCES - ppc/floattitf.c - ppc/fixtfti.c - ppc/fixunstfti.c -- ${powerpc64_SOURCES} -+ ${powerpc_SOURCES} - ) - endif() --set(powerpc64le_SOURCES ${powerpc64_SOURCES}) -+set(powerpc64le_SOURCES ${powerpc_SOURCES}) -+set(powerpc64_SOURCES ${powerpc_SOURCES}) - - set(riscv_SOURCES - riscv/fp_mode.c -@@ -818,9 +817,9 @@ else () - list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET) - endif() - -- # For RISCV32, we must force enable int128 for compiling long -+ # For RISCV32/PPC32, we must force enable int128 for compiling long - # double routines. -- if("${arch}" STREQUAL "riscv32") -+ if("${arch}" STREQUAL "riscv32" OR "${arch}" STREQUAL "powerpc" ) - list(APPEND BUILTIN_CFLAGS_${arch} -fforce-enable-int128) - endif() - -diff --git a/compiler-rt/lib/builtins/int_types.h b/compiler-rt/lib/builtins/int_types.h -index e94d3154c6d4..37b2cb43f932 100644 ---- a/compiler-rt/lib/builtins/int_types.h -+++ b/compiler-rt/lib/builtins/int_types.h -@@ -64,7 +64,7 @@ typedef union { - } udwords; - - #if defined(__LP64__) || defined(__wasm__) || defined(__mips64) || \ -- defined(__SIZEOF_INT128__) || defined(_WIN64) -+ defined(__SIZEOF_INT128__) || defined(_WIN64) || defined(__powerpc__) - #define CRT_HAS_128BIT - #endif - diff --git a/recipes-devtools/clang/clang/0031-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch b/recipes-devtools/clang/clang/0031-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch new file mode 100644 index 0000000..37c93de --- /dev/null +++ b/recipes-devtools/clang/clang/0031-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch @@ -0,0 +1,62 @@ +From fc268457a7ef1a8481a1d563550cc8e9a8a5afcb 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 + +OE's version is build using plain make not cmake as a result we do not +have the cmake support files and this probing method can get this info +from build host and force linking with libzstd from /usr/lib which is +not what we want when cross building. + +Fixes errors building llvm-config like +/usr/lib/libzstd.so.1.5.2: error adding symbols: file in wrong +format +| clang-15: error: linker command failed with exit code 1 (use -v to see invocation) +| ninja: build stopped: subcommand failed. + +Upstream-Status: Inappropriate [OE-Specific] +Signed-off-by: Khem Raj +--- + llvm/lib/Support/CMakeLists.txt | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt +index 87fe7bebf688..e12e292fdfbf 100644 +--- a/llvm/lib/Support/CMakeLists.txt ++++ b/llvm/lib/Support/CMakeLists.txt +@@ -22,7 +22,7 @@ if (HAS_WERROR_GLOBAL_CTORS) + endif() + + if(LLVM_ENABLE_ZLIB) +- list(APPEND imported_libs ZLIB::ZLIB) ++ list(APPEND imported_libs z) + endif() + + if(LLVM_ENABLE_ZSTD) +@@ -34,7 +34,7 @@ if(LLVM_ENABLE_ZSTD) + endif() + + if(LLVM_ENABLE_ZSTD) +- list(APPEND imported_libs ${zstd_target}) ++ list(APPEND imported_libs zstd) + endif() + + if( MSVC OR MINGW ) +@@ -292,7 +292,7 @@ if(LLVM_ENABLE_ZLIB) + get_property(zlib_library TARGET ZLIB::ZLIB PROPERTY LOCATION) + endif() + get_library_name(${zlib_library} zlib_library) +- set(llvm_system_libs ${llvm_system_libs} "${zlib_library}") ++ set(llvm_system_libs ${llvm_system_libs} z) + endif() + + if(LLVM_ENABLE_ZSTD) +@@ -305,7 +305,7 @@ if(LLVM_ENABLE_ZSTD) + get_property(zstd_library TARGET ${zstd_target} PROPERTY LOCATION) + endif() + get_library_name(${zstd_library} zstd_library) +- set(llvm_system_libs ${llvm_system_libs} "${zstd_library}") ++ set(llvm_system_libs ${llvm_system_libs} zstd) + endif() + + if(LLVM_ENABLE_TERMINFO) diff --git a/recipes-devtools/clang/clang/0032-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch b/recipes-devtools/clang/clang/0032-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch new file mode 100644 index 0000000..9d462b0 --- /dev/null +++ b/recipes-devtools/clang/clang/0032-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch @@ -0,0 +1,44 @@ +From b5be1155dbe4d82fef53960f5df8a25770cd8bfc 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 + +stat struct size differs on glibc based on ABI choices e.g. 64bit off_t +and/or 64bit time_t will make this size different. Therefore separate +out the O32 case out, makes it more readable. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + .../sanitizer_platform_limits_posix.h | 13 +++++++++++++ + 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 58244c9944a0..70daaf279f4a 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; + const unsigned struct_kernel_stat_sz = 144; + const unsigned struct_kernel_stat64_sz = 104; + #elif defined(__mips__) ++#if defined(__mips_o32) // O32 ABI ++#if _TIME_BITS == 64 ++const unsigned struct_kernel_stat_sz = 112; ++const unsigned struct_kernel_stat64_sz = 112; ++#elif _FILE_OFFSET_BITS == 64 ++const unsigned struct_kernel_stat_sz = 160; ++const unsigned struct_kernel_stat64_sz = 160; ++#else ++const unsigned struct_kernel_stat_sz = 144; ++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_stat64_sz = 104; ++#endif + #elif defined(__s390__) && !defined(__s390x__) + const unsigned struct_kernel_stat_sz = 64; + const unsigned struct_kernel_stat64_sz = 104; diff --git a/recipes-devtools/clang/clang/0032-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch b/recipes-devtools/clang/clang/0032-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch deleted file mode 100644 index c52aa55..0000000 --- a/recipes-devtools/clang/clang/0032-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 6f1ddaf3cfca94d3c3d00d0e7e9486eaf98f8b44 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 - -OE's version is build using plain make not cmake as a result we do not -have the cmake support files and this probing method can get this info -from build host and force linking with libzstd from /usr/lib which is -not what we want when cross building. - -Fixes errors building llvm-config like -/usr/lib/libzstd.so.1.5.2: error adding symbols: file in wrong -format -| clang-15: error: linker command failed with exit code 1 (use -v to see invocation) -| ninja: build stopped: subcommand failed. - -Upstream-Status: Inappropriate [OE-Specific] -Signed-off-by: Khem Raj ---- - llvm/lib/Support/CMakeLists.txt | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt -index 4cbc3b79f3bb..08c4bfd5efc1 100644 ---- a/llvm/lib/Support/CMakeLists.txt -+++ b/llvm/lib/Support/CMakeLists.txt -@@ -22,7 +22,7 @@ if (HAS_WERROR_GLOBAL_CTORS) - endif() - - if(LLVM_ENABLE_ZLIB) -- list(APPEND imported_libs ZLIB::ZLIB) -+ list(APPEND imported_libs z) - endif() - - if(LLVM_ENABLE_ZSTD) -@@ -34,7 +34,7 @@ if(LLVM_ENABLE_ZSTD) - endif() - - if(LLVM_ENABLE_ZSTD) -- list(APPEND imported_libs ${zstd_target}) -+ list(APPEND imported_libs zstd) - endif() - - if( MSVC OR MINGW ) -@@ -292,7 +292,7 @@ if(LLVM_ENABLE_ZLIB) - get_property(zlib_library TARGET ZLIB::ZLIB PROPERTY LOCATION) - endif() - get_library_name(${zlib_library} zlib_library) -- set(llvm_system_libs ${llvm_system_libs} "${zlib_library}") -+ set(llvm_system_libs ${llvm_system_libs} z) - endif() - - if(LLVM_ENABLE_ZSTD) -@@ -305,7 +305,7 @@ if(LLVM_ENABLE_ZSTD) - get_property(zstd_library TARGET ${zstd_target} PROPERTY LOCATION) - endif() - get_library_name(${zstd_library} zstd_library) -- set(llvm_system_libs ${llvm_system_libs} "${zstd_library}") -+ set(llvm_system_libs ${llvm_system_libs} zstd) - endif() - - if(LLVM_ENABLE_TERMINFO) diff --git a/recipes-devtools/clang/clang/0033-build-Enable-64bit-off_t-on-32bit-glibc-systems.patch b/recipes-devtools/clang/clang/0033-build-Enable-64bit-off_t-on-32bit-glibc-systems.patch deleted file mode 100644 index 85a0a0d..0000000 --- a/recipes-devtools/clang/clang/0033-build-Enable-64bit-off_t-on-32bit-glibc-systems.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 81298058cd344f695fe22da4a367db08709a85e1 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 25 Dec 2022 15:13:41 -0800 -Subject: [PATCH] build: Enable 64bit off_t on 32bit glibc systems - -Pass -D_FILE_OFFSET_BITS=64 to compiler flags on 32bit glibc based -systems. This will make sure that 64bit versions of LFS functions are -used e.g. lseek will behave same as lseek64. Also revert [1] partially -because this added a cmake test to detect lseek64 but then forgot to -pass the needed macro during actual compile, this test was incomplete too -since libc implementations like musl has 64-bit off_t by default on 32-bit -systems and does not bundle -D_LARGEFILE64_SOURCE [2] under -D_GNU_SOURCE -like glibc, which means the compile now fails on musl because the cmake -check passes but we do not have _LARGEFILE64_SOURCE defined. Moreover, -Using the *64 function was transitional anyways so use --D_FILE_OFFSET_BITS=64 instead - -[1] https://github.com/llvm/llvm-project/commit/8db7e5e4eed4c4e697dc3164f2c9351d8c3e942b -[2] https://git.musl-libc.org/cgit/musl/commit/?id=25e6fee27f4a293728dd15b659170e7b9c7db9bc - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - utils/bazel/llvm-project-overlay/llvm/config.bzl | 1 - - .../llvm-project-overlay/llvm/include/llvm/Config/config.h | 3 --- - 2 files changed, 4 deletions(-) - -diff --git a/utils/bazel/llvm-project-overlay/llvm/config.bzl b/utils/bazel/llvm-project-overlay/llvm/config.bzl -index 5507f80efa0b..b15ec9e1bb39 100644 ---- a/utils/bazel/llvm-project-overlay/llvm/config.bzl -+++ b/utils/bazel/llvm-project-overlay/llvm/config.bzl -@@ -48,7 +48,6 @@ posix_defines = [ - linux_defines = posix_defines + [ - "_GNU_SOURCE", - "HAVE_LINK_H=1", -- "HAVE_LSEEK64=1", - "HAVE_MALLINFO=1", - "HAVE_SBRK=1", - "HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=1", -diff --git a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h -index 8a30957b6120..6a68ac040bb8 100644 ---- a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h -+++ b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h -@@ -144,9 +144,6 @@ - /* Define to 1 if you have the header file. */ - /* HAVE_LINK_H defined in Bazel */ - --/* Define to 1 if you have the `lseek64' function. */ --/* HAVE_LSEEK64 defined in Bazel */ -- - /* Define to 1 if you have the header file. */ - /* HAVE_MACH_MACH_H defined in Bazel */ - diff --git a/recipes-devtools/clang/clang/0033-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch b/recipes-devtools/clang/clang/0033-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch new file mode 100644 index 0000000..dde742a --- /dev/null +++ b/recipes-devtools/clang/clang/0033-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch @@ -0,0 +1,43 @@ +From e8ecd192495c092dcee4fdb1ee5514222a8aa0c1 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 + sanitizers + +On 32bit systems using 64bit time_t build fails because +_FILE_OFFSET_BITS is undefined here but _TIME_BITS is still set to 64 + +Fixes +In file included from compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp:17: +In file included from compiler-rt/lib/sanitizer_common/sanitizer_platform.h:25: +In file included from /usr/include/features.h:393: +/usr/include/features-time64.h:26:5: error: "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" + ^ +1 error generated. + +Upstream-Status: Submitted [https://reviews.llvm.org/D144514] +Signed-off-by: Khem Raj +--- + compiler-rt/lib/sanitizer_common/sanitizer_platform.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h +index 764996e57355..99024169f925 100644 +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h +@@ -22,6 +22,15 @@ + // function declarations into a .S file which doesn't compile. + // https://crbug.com/1162741 + #if __has_include() && !defined(__ANDROID__) ++// Some sources undefine _FILE_OFFSET_BITS deliberately e.g. ++// sanitizer_procmaps_solaris.cpp. This is problematic on glibc systems with ++// 32-bit architectures using 64-bit time_t and users passing _TIME_BITS=64 ++// from build environment, therefore both _FILE_OFFSET_BITS and _TIME_BITS ++// need to be undefined together since features.h will check for both being 64 ++// if one is set to 64. ++# if !defined(_FILE_OFFSET_BITS) ++# undef _TIME_BITS ++# endif + # include + #endif + diff --git a/recipes-devtools/clang/clang/0034-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch b/recipes-devtools/clang/clang/0034-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch new file mode 100644 index 0000000..5a6b184 --- /dev/null +++ b/recipes-devtools/clang/clang/0034-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch @@ -0,0 +1,81 @@ +From 9fa41e535f7b95005e4aa2c764aebe674feeea69 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 + +* in some strange multilib configs we build lib32-image where + 32bit libs are in /usr/lib32 and 64bit in /usr/lib64 but in such + setup the clang search for GCC candidate installation doesn't + check lib32 directory in sysroot and fails to find the installation + + X86LibDirs was already searching in lib32 for very long time: + https://github.com/llvm/llvm-project/commit/621fed5f5a051a0333415aaed75b8f2ed2350dbd + but ARMLibDirs didn't include it for some reason. + +* if we don't add lib32 for arm in getOSLibDir(), then it will + find -lgcc, crtbeginS.o, crtendS.o, but still fail to find + -lgcc_s, -lc, Scrt1.o, crti.o, crtn.o + +* fixes lib32-compiler-rt build failure: + +-- Configuring incomplete, errors occurred! +CMake Error at TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native/usr/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:67 (message): + The C compiler + + "TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native/usr/bin/arm-oemllib32-linux-gnueabi/arm-oemllib32-linux-gnueabi-clang" + + is not able to compile a simple test program. + + It fails with the following output: + + Change Dir: TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build/CMakeFiles/CMakeScratch/TryCompile-rWXyQZ + + Run Build Command(s):ninja -v cmTC_84d18 && [1/2] TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native/usr/bin/arm-oemllib32-linux-gnueabi/arm-oemllib32-linux-gnueabi-clang --target=arm-oemllib32-linux-gnueabi --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -target arm-oemllib32-linux-gnueabi -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=softfp -mlittle-endian --dyld-prefix=/usr -Qunused-arguments -funwind-tables -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -fPIE -MD -MT CMakeFiles/cmTC_84d18.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_84d18.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_84d18.dir/testCCompiler.c.o -c TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build/CMakeFiles/CMakeScratch/TryCompile-rWXyQZ/testCCompiler.c + [2/2] : && TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native/usr/bin/arm-oemllib32-linux-gnueabi/arm-oemllib32-linux-gnueabi-clang --target=arm-oemllib32-linux-gnueabi --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -target arm-oemllib32-linux-gnueabi -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=softfp -mlittle-endian --dyld-prefix=/usr -Qunused-arguments -funwind-tables -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -target arm-oemllib32-linux-gnueabi -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=softfp -mlittle-endian --dyld-prefix=/usr -Qunused-arguments -funwind-tables -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -Wl,-z,relro,-z,now -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++ -fuse-ld=lld -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -Wl,-z,relro,-z,now -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++ -fuse-ld=lld CMakeFiles/cmTC_84d18.dir/testCCompiler.c.o -o cmTC_84d18 && : + FAILED: cmTC_84d18 + : && TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native/usr/bin/arm-oemllib32-linux-gnueabi/arm-oemllib32-linux-gnueabi-clang --target=arm-oemllib32-linux-gnueabi --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -target arm-oemllib32-linux-gnueabi -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=softfp -mlittle-endian --dyld-prefix=/usr -Qunused-arguments -funwind-tables -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -target arm-oemllib32-linux-gnueabi -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=softfp -mlittle-endian --dyld-prefix=/usr -Qunused-arguments -funwind-tables -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -Wl,-z,relro,-z,now -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++ -fuse-ld=lld -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -Wl,-z,relro,-z,now -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++ -fuse-ld=lld CMakeFiles/cmTC_84d18.dir/testCCompiler.c.o -o cmTC_84d18 && : + arm-oemllib32-linux-gnueabi-ld.lld: error: cannot open Scrt1.o: No such file or directory + arm-oemllib32-linux-gnueabi-ld.lld: error: cannot open crti.o: No such file or directory + arm-oemllib32-linux-gnueabi-ld.lld: error: cannot open crtbeginS.o: No such file or directory + arm-oemllib32-linux-gnueabi-ld.lld: error: unable to find library -lgcc + arm-oemllib32-linux-gnueabi-ld.lld: error: unable to find library -lgcc_s + arm-oemllib32-linux-gnueabi-ld.lld: error: unable to find library -lc + arm-oemllib32-linux-gnueabi-ld.lld: error: unable to find library -lgcc + arm-oemllib32-linux-gnueabi-ld.lld: error: unable to find library -lgcc_s + arm-oemllib32-linux-gnueabi-ld.lld: error: cannot open crtendS.o: No such file or directory + arm-oemllib32-linux-gnueabi-ld.lld: error: cannot open crtn.o: No such file or directory + clang-16: error: linker command failed with exit code 1 (use -v to see invocation) + ninja: build stopped: subcommand failed. + +Upstream-Status: Pending +Signed-off-by: Martin Jansa +--- + clang/lib/Driver/ToolChains/Gnu.cpp | 2 +- + clang/lib/Driver/ToolChains/Linux.cpp | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp +index 020fd106a629..358c0ade7b27 100644 +--- a/clang/lib/Driver/ToolChains/Gnu.cpp ++++ b/clang/lib/Driver/ToolChains/Gnu.cpp +@@ -2325,7 +2325,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( + static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu", + "aarch64_be-linux-gnu"}; + +- static const char *const ARMLibDirs[] = {"/lib"}; ++ static const char *const ARMLibDirs[] = {"/lib", "/lib32"}; + static const char *const ARMTriples[] = {"arm-linux-gnueabi"}; + 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 8bd21eebfed3..2492db058cf9 100644 +--- a/clang/lib/Driver/ToolChains/Linux.cpp ++++ b/clang/lib/Driver/ToolChains/Linux.cpp +@@ -198,6 +198,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() || ++ Triple.getArch() == llvm::Triple::arm || Triple.getArch() == llvm::Triple::thumb || + Triple.getArch() == llvm::Triple::sparc) + return "lib32"; + diff --git a/recipes-devtools/clang/clang/0034-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch b/recipes-devtools/clang/clang/0034-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch deleted file mode 100644 index ab35769..0000000 --- a/recipes-devtools/clang/clang/0034-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 6c4db3884b0271d80725fc8912083c48e9f3112c Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 31 Dec 2022 15:03:24 -0800 -Subject: [PATCH] compiler-rt: Undef _TIME_BITS along with _FILE_OFFSET_BITS on - linux - -On 32bit systems using 64bit time_t build fails because -_FILE_OFFSET_BITS is undefined here but _TIME_BITS is still set to 64 - -Fixes -/usr/include/features-time64.h:26:5: error: "_TIME_BITS=64 is allowed - only with _FILE_OFFSET_BITS=64" -| # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" -| ^ -| 1 error generated. - -Also avoid LFS64 functions on musl - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - .../lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp -index fc01498aa228..eb2ee78c2f45 100644 ---- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp -+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp -@@ -18,6 +18,7 @@ - // depends on _FILE_OFFSET_BITS setting. - // To get this "true" dirent definition, we undefine _FILE_OFFSET_BITS below. - #undef _FILE_OFFSET_BITS -+#undef _TIME_BITS - #endif - - // Must go after undef _FILE_OFFSET_BITS. diff --git a/recipes-devtools/clang/clang/0035-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch b/recipes-devtools/clang/clang/0035-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch deleted file mode 100644 index afdb6bc..0000000 --- a/recipes-devtools/clang/clang/0035-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch +++ /dev/null @@ -1,44 +0,0 @@ -From eb6c2fe33206567b6a658d74bfd2a906f61893ed 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 - -stat struct size differs on glibc based on ABI choices e.g. 64bit off_t -and/or 64bit time_t will make this size different. Therefore separate -out the O32 case out, makes it more readable. - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - .../sanitizer_platform_limits_posix.h | 13 +++++++++++++ - 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 fdc69b8a5fba..d2246893f8a5 100644 ---- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h -+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h -@@ -97,11 +97,24 @@ const unsigned struct_kernel_stat64_sz = 104; - const unsigned struct_kernel_stat_sz = 144; - const unsigned struct_kernel_stat64_sz = 104; - #elif defined(__mips__) -+#if defined(__mips_o32) // O32 ABI -+#if _TIME_BITS == 64 -+const unsigned struct_kernel_stat_sz = 112; -+const unsigned struct_kernel_stat64_sz = 112; -+#elif _FILE_OFFSET_BITS == 64 -+const unsigned struct_kernel_stat_sz = 160; -+const unsigned struct_kernel_stat64_sz = 160; -+#else -+const unsigned struct_kernel_stat_sz = 144; -+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_stat64_sz = 104; -+#endif - #elif defined(__s390__) && !defined(__s390x__) - const unsigned struct_kernel_stat_sz = 64; - const unsigned struct_kernel_stat64_sz = 104; diff --git a/recipes-devtools/clang/clang/0036-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch b/recipes-devtools/clang/clang/0036-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch deleted file mode 100644 index b30b475..0000000 --- a/recipes-devtools/clang/clang/0036-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 46643a33c0889bc6cb4034337b02962c673e0ac4 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 - sanitizers - -On 32bit systems using 64bit time_t build fails because -_FILE_OFFSET_BITS is undefined here but _TIME_BITS is still set to 64 - -Fixes -In file included from compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp:17: -In file included from compiler-rt/lib/sanitizer_common/sanitizer_platform.h:25: -In file included from /usr/include/features.h:393: -/usr/include/features-time64.h:26:5: error: "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" - ^ -1 error generated. - -Upstream-Status: Submitted [https://reviews.llvm.org/D144514] -Signed-off-by: Khem Raj ---- - compiler-rt/lib/sanitizer_common/sanitizer_platform.h | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h -index 764996e57355..df3d165ecdb6 100644 ---- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h -+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h -@@ -22,6 +22,15 @@ - // function declarations into a .S file which doesn't compile. - // https://crbug.com/1162741 - #if __has_include() && !defined(__ANDROID__) -+// Some sources undefine _FILE_OFFSET_BITS deliberately e.g. -+// sanitizer_procmaps_solaris.cpp. This is problematic on glibc systems with -+// 32-bit architectures using 64-bit time_t and users passing _TIME_BITS=64 -+// from build environment, therefore both _FILE_OFFSET_BITS and _TIME_BITS -+// need to be undefined together since features.h will check for both being 64 -+// if one is set to 64 -+# if !defined(_FILE_OFFSET_BITS) -+# undef _TIME_BITS -+# endif - # include - #endif - diff --git a/recipes-devtools/clang/clang/0037-Call-printName-to-get-name-of-Decl.patch b/recipes-devtools/clang/clang/0037-Call-printName-to-get-name-of-Decl.patch deleted file mode 100644 index 8ede20b..0000000 --- a/recipes-devtools/clang/clang/0037-Call-printName-to-get-name-of-Decl.patch +++ /dev/null @@ -1,71 +0,0 @@ -From ab8b6331592fb92a2dc1c689483a4772d51aed8b Mon Sep 17 00:00:00 2001 -From: Dan McGregor -Date: Tue, 21 Mar 2023 13:04:51 -0600 -Subject: [PATCH] Call printName to get name of Decl - -Rather than sending a name directly to the stream, use printName -to preserve any PrintingPolicy. This ensures that names are properly -affected by path remapping. - -Differential Revision: https://reviews.llvm.org/D149272 - -Upstream-Status: Pending -Signed-off-by: Dan McGregor ---- - clang/lib/AST/Decl.cpp | 4 ++-- - clang/lib/AST/DeclarationName.cpp | 4 ++-- - clang/test/CodeGen/debug-prefix-map.cpp | 11 +++++++++++ - 3 files changed, 15 insertions(+), 4 deletions(-) - create mode 100644 clang/test/CodeGen/debug-prefix-map.cpp - -diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp -index e60cc28f6e0f..24de6156c0f5 100644 ---- a/clang/lib/AST/Decl.cpp -+++ b/clang/lib/AST/Decl.cpp -@@ -1626,8 +1626,8 @@ Module *Decl::getOwningModuleForLinkage(bool IgnoreLinkage) const { - llvm_unreachable("unknown module kind"); - } - --void NamedDecl::printName(raw_ostream &OS, const PrintingPolicy&) const { -- OS << Name; -+void NamedDecl::printName(raw_ostream &OS, const PrintingPolicy &Policy) const { -+ Name.print(OS, Policy); - } - - void NamedDecl::printName(raw_ostream &OS) const { -diff --git a/clang/lib/AST/DeclarationName.cpp b/clang/lib/AST/DeclarationName.cpp -index c1219041a466..da8b3886c340 100644 ---- a/clang/lib/AST/DeclarationName.cpp -+++ b/clang/lib/AST/DeclarationName.cpp -@@ -117,12 +117,12 @@ static void printCXXConstructorDestructorName(QualType ClassType, - Policy.adjustForCPlusPlus(); - - if (const RecordType *ClassRec = ClassType->getAs()) { -- OS << *ClassRec->getDecl(); -+ ClassRec->getDecl()->printName(OS, Policy); - return; - } - if (Policy.SuppressTemplateArgsInCXXConstructors) { - if (auto *InjTy = ClassType->getAs()) { -- OS << *InjTy->getDecl(); -+ InjTy->getDecl()->printName(OS, Policy); - return; - } - } -diff --git a/clang/test/CodeGen/debug-prefix-map.cpp b/clang/test/CodeGen/debug-prefix-map.cpp -new file mode 100644 -index 000000000000..5e90aedd8ed7 ---- /dev/null -+++ b/clang/test/CodeGen/debug-prefix-map.cpp -@@ -0,0 +1,11 @@ -+// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-prefix-map=%p=./UNLIKELY_PATH/empty -S %s -emit-llvm -o - | FileCheck %s -+ -+struct alignas(64) an { -+ struct { -+ unsigned char x{0}; -+ } arr[64]; -+}; -+ -+struct an *pan = new an; -+ -+// CHECK: !DISubprogram(name: "(unnamed struct at ./UNLIKELY_PATH/empty{{/|\\\\}}{{.*}}", diff --git a/recipes-devtools/clang/clang/0038-Apply-fmacro-prefix-map-to-anonymous-tags-in-templat.patch b/recipes-devtools/clang/clang/0038-Apply-fmacro-prefix-map-to-anonymous-tags-in-templat.patch deleted file mode 100644 index 12c8d73..0000000 --- a/recipes-devtools/clang/clang/0038-Apply-fmacro-prefix-map-to-anonymous-tags-in-templat.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 648ef1a807d27d51b7cddbf2df7499984c857ba4 Mon Sep 17 00:00:00 2001 -From: Dan McGregor -Date: Fri, 16 Jun 2023 08:47:00 -0700 -Subject: [PATCH] Apply -fmacro-prefix-map to anonymous tags in template - arguments - -When expanding template arguments for pretty function printing, -such as for __PRETTY_FUNCTION__, make TypePrinter apply -macro-prefix-map remapping to anonymous tags such as lambdas. - -Fixes https://github.com/llvm/llvm-project/issues/63219 - -Reviewed By: MaskRay, aaron.ballman - -Differential Revision: https://reviews.llvm.org/D152570 - -Upstream-Status: Backport [https://reviews.llvm.org/D152570] -Signed-off-by: Khem Raj ---- - clang/docs/ReleaseNotes.rst | 2 ++ - clang/lib/AST/Expr.cpp | 14 ++++++++++++++ - clang/test/CodeGenCXX/macro-prefix-map-lambda.cpp | 14 ++++++++++++++ - 3 files changed, 30 insertions(+) - create mode 100644 clang/test/CodeGenCXX/macro-prefix-map-lambda.cpp - -diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst -index 8d67ff904469..bf3ea4a54d01 100644 ---- a/clang/docs/ReleaseNotes.rst -+++ b/clang/docs/ReleaseNotes.rst -@@ -724,6 +724,8 @@ Bug Fixes in This Version - - Fix crash when passing a braced initializer list to a parentehsized aggregate - initialization expression. - (`#63008 `_). -+- Apply ``-fmacro-prefix-map`` to anonymous tags in template arguments -+ (`#63219 `_). - - Bug Fixes to Compiler Builtins - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp -index e45ae68cd5fe..a65678f5998c 100644 ---- a/clang/lib/AST/Expr.cpp -+++ b/clang/lib/AST/Expr.cpp -@@ -783,7 +783,21 @@ std::string PredefinedExpr::ComputeName(IdentKind IK, const Decl *CurrentDecl) { - Out << "static "; - } - -+ class PrettyCallbacks final : public PrintingCallbacks { -+ public: -+ PrettyCallbacks(const LangOptions &LO) : LO(LO) {} -+ std::string remapPath(StringRef Path) const override { -+ SmallString<128> p(Path); -+ LO.remapPathPrefix(p); -+ return std::string(p); -+ } -+ -+ private: -+ const LangOptions &LO; -+ }; - PrintingPolicy Policy(Context.getLangOpts()); -+ PrettyCallbacks PrettyCB(Context.getLangOpts()); -+ Policy.Callbacks = &PrettyCB; - std::string Proto; - llvm::raw_string_ostream POut(Proto); - -diff --git a/clang/test/CodeGenCXX/macro-prefix-map-lambda.cpp b/clang/test/CodeGenCXX/macro-prefix-map-lambda.cpp -new file mode 100644 -index 000000000000..e87f0ab484dc ---- /dev/null -+++ b/clang/test/CodeGenCXX/macro-prefix-map-lambda.cpp -@@ -0,0 +1,14 @@ -+// RUN: %clang_cc1 -triple %itanium_abi_triple -fmacro-prefix-map=%p=./UNLIKELY_PATH/empty %s -emit-llvm -o - | FileCheck %s -+ -+template -+auto lambdatest(f&& cb) { -+ const char *s = __PRETTY_FUNCTION__; -+ return s; -+} -+ -+int main() { -+ auto *s = lambdatest([](){}); -+// CHECK: @"__PRETTY_FUNCTION__._Z10lambdatestIZ4mainE3$_0EDaOT_" = private unnamed_addr constant [{{[0-9]+}} x i8] c"auto lambdatest(f &&) [f = (lambda at ./UNLIKELY_PATH/empty{{/|\\\\}}{{.*}}.cpp:[[#@LINE-1]]:24)]\00", align 1 -+ -+ return 0; -+} diff --git a/recipes-devtools/clang/clang/0039-lld-RISCV-Handle-relaxation-reductions-of-more-than-.patch b/recipes-devtools/clang/clang/0039-lld-RISCV-Handle-relaxation-reductions-of-more-than-.patch deleted file mode 100644 index 713cd3a..0000000 --- a/recipes-devtools/clang/clang/0039-lld-RISCV-Handle-relaxation-reductions-of-more-than-.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 1405446343007159cdbef39b37427b3cc2e94266 Mon Sep 17 00:00:00 2001 -From: Roland McGrath -Date: Tue, 16 May 2023 13:35:35 -0700 -Subject: [PATCH] [lld][RISCV] Handle relaxation reductions of more than 65536 - bytes - -In a real-world case with functions that have many, many -R_RISCV_CALL_PLT relocations due to asan and ubsan -instrumentation, all these can be relaxed by an instruction and -the net result is more than 65536 bytes of reduction in the -output .text section that totals about 1.2MiB in final size. - -This changes InputSection to use a 32-bit field for bytesDropped. -The RISCV relaxation keeps track in a 64-bit field and detects -32-bit overflow as it previously detected 16-bit overflow. It -doesn't seem likely that 32-bit overflow will arise, but it's not -inconceivable and it's cheap enough to detect it. - -This unfortunately increases the size of InputSection on 64-bit -hosts by a word, but that seems hard to avoid. - -Reviewed By: MaskRay - -Differential Revision: https://reviews.llvm.org/D150722 - -Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/9d37ea95df1b84cca9b5e954d8964c976a5e303e] -Signed-off-by: Khem Raj ---- - lld/ELF/Arch/RISCV.cpp | 6 +++--- - lld/ELF/InputSection.h | 4 ++-- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/lld/ELF/Arch/RISCV.cpp b/lld/ELF/Arch/RISCV.cpp -index 87887b314a5a..80754e37d3ed 100644 ---- a/lld/ELF/Arch/RISCV.cpp -+++ b/lld/ELF/Arch/RISCV.cpp -@@ -621,7 +621,7 @@ static bool relax(InputSection &sec) { - // iteration. - DenseMap valueDelta; - ArrayRef sa = ArrayRef(aux.anchors); -- uint32_t delta = 0; -+ uint64_t delta = 0; - for (auto [i, r] : llvm::enumerate(sec.relocs())) { - for (; sa.size() && sa[0].offset <= r.offset; sa = sa.slice(1)) - if (!sa[0].end) -@@ -688,8 +688,8 @@ static bool relax(InputSection &sec) { - a.d->value -= delta - valueDelta.find(a.d)->second; - } - // Inform assignAddresses that the size has changed. -- if (!isUInt<16>(delta)) -- fatal("section size decrease is too large"); -+ if (!isUInt<32>(delta)) -+ fatal("section size decrease is too large: " + Twine(delta)); - sec.bytesDropped = delta; - return changed; - } -diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h -index 356ccda2d743..143384b3ba7b 100644 ---- a/lld/ELF/InputSection.h -+++ b/lld/ELF/InputSection.h -@@ -137,7 +137,7 @@ public: - // Used by --optimize-bb-jumps and RISC-V linker relaxation temporarily to - // indicate the number of bytes which is not counted in the size. This should - // be reset to zero after uses. -- uint16_t bytesDropped = 0; -+ uint32_t bytesDropped = 0; - - mutable bool compressed = false; - -@@ -401,7 +401,7 @@ private: - template void copyShtGroup(uint8_t *buf); - }; - --static_assert(sizeof(InputSection) <= 152, "InputSection is too big"); -+static_assert(sizeof(InputSection) <= 160, "InputSection is too big"); - - class SyntheticSection : public InputSection { - public: diff --git a/recipes-devtools/clang/clang/0040-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch b/recipes-devtools/clang/clang/0040-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch deleted file mode 100644 index 0929024..0000000 --- a/recipes-devtools/clang/clang/0040-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 0f5f2e8e84d37e94aad0a6bf90bb3406e289b5e5 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 - -* in some strange multilib configs we build lib32-image where - 32bit libs are in /usr/lib32 and 64bit in /usr/lib64 but in such - setup the clang search for GCC candidate installation doesn't - check lib32 directory in sysroot and fails to find the installation - - X86LibDirs was already searching in lib32 for very long time: - https://github.com/llvm/llvm-project/commit/621fed5f5a051a0333415aaed75b8f2ed2350dbd - but ARMLibDirs didn't include it for some reason. - -* if we don't add lib32 for arm in getOSLibDir(), then it will - find -lgcc, crtbeginS.o, crtendS.o, but still fail to find - -lgcc_s, -lc, Scrt1.o, crti.o, crtn.o - -* fixes lib32-compiler-rt build failure: - --- Configuring incomplete, errors occurred! -CMake Error at TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native/usr/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:67 (message): - The C compiler - - "TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native/usr/bin/arm-oemllib32-linux-gnueabi/arm-oemllib32-linux-gnueabi-clang" - - is not able to compile a simple test program. - - It fails with the following output: - - Change Dir: TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build/CMakeFiles/CMakeScratch/TryCompile-rWXyQZ - - Run Build Command(s):ninja -v cmTC_84d18 && [1/2] TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native/usr/bin/arm-oemllib32-linux-gnueabi/arm-oemllib32-linux-gnueabi-clang --target=arm-oemllib32-linux-gnueabi --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -target arm-oemllib32-linux-gnueabi -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=softfp -mlittle-endian --dyld-prefix=/usr -Qunused-arguments -funwind-tables -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -fPIE -MD -MT CMakeFiles/cmTC_84d18.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_84d18.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_84d18.dir/testCCompiler.c.o -c TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build/CMakeFiles/CMakeScratch/TryCompile-rWXyQZ/testCCompiler.c - [2/2] : && TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native/usr/bin/arm-oemllib32-linux-gnueabi/arm-oemllib32-linux-gnueabi-clang --target=arm-oemllib32-linux-gnueabi --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -target arm-oemllib32-linux-gnueabi -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=softfp -mlittle-endian --dyld-prefix=/usr -Qunused-arguments -funwind-tables -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -target arm-oemllib32-linux-gnueabi -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=softfp -mlittle-endian --dyld-prefix=/usr -Qunused-arguments -funwind-tables -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -Wl,-z,relro,-z,now -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++ -fuse-ld=lld -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -Wl,-z,relro,-z,now -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++ -fuse-ld=lld CMakeFiles/cmTC_84d18.dir/testCCompiler.c.o -o cmTC_84d18 && : - FAILED: cmTC_84d18 - : && TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native/usr/bin/arm-oemllib32-linux-gnueabi/arm-oemllib32-linux-gnueabi-clang --target=arm-oemllib32-linux-gnueabi --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -target arm-oemllib32-linux-gnueabi -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=softfp -mlittle-endian --dyld-prefix=/usr -Qunused-arguments -funwind-tables -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -target arm-oemllib32-linux-gnueabi -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=softfp -mlittle-endian --dyld-prefix=/usr -Qunused-arguments -funwind-tables -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -Wl,-z,relro,-z,now -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++ -fuse-ld=lld -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work-shared/llvm-project-source-16.0.6-r0/git=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/build=/usr/src/debug/lib32-compiler-rt/16.0.6-r0 -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fmacro-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/lib32-recipe-sysroot= -fdebug-prefix-map=TOPDIR/BUILD/work/raspberrypi4_64-oemllib32-linux-gnueabi/lib32-compiler-rt/16.0.6/recipe-sysroot-native= -Wl,-z,relro,-z,now -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++ -fuse-ld=lld CMakeFiles/cmTC_84d18.dir/testCCompiler.c.o -o cmTC_84d18 && : - arm-oemllib32-linux-gnueabi-ld.lld: error: cannot open Scrt1.o: No such file or directory - arm-oemllib32-linux-gnueabi-ld.lld: error: cannot open crti.o: No such file or directory - arm-oemllib32-linux-gnueabi-ld.lld: error: cannot open crtbeginS.o: No such file or directory - arm-oemllib32-linux-gnueabi-ld.lld: error: unable to find library -lgcc - arm-oemllib32-linux-gnueabi-ld.lld: error: unable to find library -lgcc_s - arm-oemllib32-linux-gnueabi-ld.lld: error: unable to find library -lc - arm-oemllib32-linux-gnueabi-ld.lld: error: unable to find library -lgcc - arm-oemllib32-linux-gnueabi-ld.lld: error: unable to find library -lgcc_s - arm-oemllib32-linux-gnueabi-ld.lld: error: cannot open crtendS.o: No such file or directory - arm-oemllib32-linux-gnueabi-ld.lld: error: cannot open crtn.o: No such file or directory - clang-16: error: linker command failed with exit code 1 (use -v to see invocation) - ninja: build stopped: subcommand failed. - -Upstream-Status: Pending -Signed-off-by: Martin Jansa ---- - clang/lib/Driver/ToolChains/Gnu.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 0ec2dadafc05..a67e87365a7a 100644 ---- a/clang/lib/Driver/ToolChains/Gnu.cpp -+++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2241,7 +2241,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu", - "aarch64_be-linux-gnu"}; - -- static const char *const ARMLibDirs[] = {"/lib"}; -+ static const char *const ARMLibDirs[] = {"/lib", "/lib32"}; - static const char *const ARMTriples[] = {"arm-linux-gnueabi"}; - 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 c6fb290ffdb4..82acaf8a4bfd 100644 ---- a/clang/lib/Driver/ToolChains/Linux.cpp -+++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -166,6 +166,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() || -+ Triple.getArch() == llvm::Triple::arm || Triple.getArch() == llvm::Triple::thumb || - Triple.getArch() == llvm::Triple::sparc) - return "lib32"; - diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index cb16e5a..aaf7e7d 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -35,21 +35,14 @@ SRC_URI = "\ file://0023-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch \ file://0024-libunwind-Added-unw_backtrace-method.patch \ file://0025-clang-Do-not-use-install-relative-libc-headers.patch \ - file://0026-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch \ file://0027-Fix-lib-paths-for-OpenEmbedded-Host.patch \ file://0028-Correct-library-search-path-for-OpenEmbedded-Host.patch \ file://0029-lldb-Link-with-libatomic-on-x86.patch \ - file://0030-clang-exclude-openembedded-distributions-from-settin.patch \ - file://0031-compiler-rt-Enable-__int128-for-ppc32.patch \ - file://0032-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch \ - file://0033-build-Enable-64bit-off_t-on-32bit-glibc-systems.patch \ - file://0034-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch \ - file://0035-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch \ - file://0036-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch \ - file://0037-Call-printName-to-get-name-of-Decl.patch \ - file://0038-Apply-fmacro-prefix-map-to-anonymous-tags-in-templat.patch \ - file://0039-lld-RISCV-Handle-relaxation-reductions-of-more-than-.patch \ - file://0040-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch \ + file://0030-compiler-rt-Enable-__int128-for-ppc32.patch \ + file://0031-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch \ + file://0032-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch \ + file://0033-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch \ + file://0034-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch \ " # Fallback to no-PIE if not set GCCPIE ??= "" -- cgit v1.2.3-54-g00ecf