From 6f9caa632ca7086e2458b0dbc030221478bd8726 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 16 Jan 2024 13:56:19 -0800 Subject: clang: Upgrade to clang 18.1 major release LLVM - https://github.com/llvm/llvm-project/blob/release/18.x/llvm/docs/ReleaseNotes.rst Clang - https://github.com/llvm/llvm-project/blob/release/18.x/clang/docs/ReleaseNotes.rst libc++ - https://github.com/llvm/llvm-project/blob/release/18.x/libcxx/docs/ReleaseNotes/18.rst lld - https://github.com/llvm/llvm-project/blob/release/18.x/lld/docs/ReleaseNotes.rst extra - https://github.com/llvm/llvm-project/blob/release/18.x/clang-tools-extra/docs/ReleaseNotes.rst Signed-off-by: Khem Raj --- conf/layer.conf | 2 +- recipes-devtools/clang/clang.inc | 17 +- ...ind-libunwind-headers-when-LIBCXXABI_LIBU.patch | 8 +- ...er-rt-support-a-new-embedded-linux-target.patch | 2 +- ...-Simplify-cross-compilation.-Don-t-use-na.patch | 6 +- ...LibraryInfo-Undefine-libc-functions-if-th.patch | 4 +- ...allow-env-override-of-exe-and-libdir-path.patch | 8 +- ...-clang-driver-Check-sysroot-for-ldso-path.patch | 12 +- ...iver-tools.cpp-Add-lssp_nonshared-on-musl.patch | 6 +- .../0008-clang-Prepend-trailing-to-sysroot.patch | 6 +- ...inside-the-target-sysroot-for-compiler-ru.patch | 4 +- ...ang-Define-releative-gcc-installation-dir.patch | 6 +- ...pthread-and-ldl-along-with-lunwind-for-st.patch | 6 +- ..._EXECUTABLE-when-cross-compiling-for-nati.patch | 8 +- .../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 | 6 +- ...r-Add-dyld-prefix-when-checking-sysroot-f.patch | 14 +- .../0018-clang-Use-python3-in-python-scripts.patch | 2 +- ...4-set-Yocto-based-GCC-install-search-path.patch | 6 +- ...-llvm-Do-not-use-find_library-for-ncurses.patch | 8 +- ...-anchor-for-adding-OE-distro-vendor-names.patch | 6 +- ...-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 | 8 +- ...-Do-not-use-install-relative-libc-headers.patch | 30 +- ...ow-driver-finds-GCC-installation-path-on-.patch | 8 +- .../0027-Fix-lib-paths-for-OpenEmbedded-Host.patch | 8 +- ...library-search-path-for-OpenEmbedded-Host.patch | 12 +- .../0029-lldb-Link-with-libatomic-on-x86.patch | 4 +- ...030-compiler-rt-Enable-__int128-for-ppc32.patch | 12 +- ...-Do-not-use-cmake-infra-to-detect-libzstd.patch | 8 +- ...ler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch | 4 +- ...-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch | 4 +- ...s-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch | 10 +- ...t-Fix-cmake-check-for-_Float16-and-__bf16.patch | 42 ++ ...ent-LWG3545-std-pointer_traits-should-be-.patch | 660 --------------------- recipes-devtools/clang/clang_git.bb | 1 + recipes-devtools/clang/common.inc | 2 +- 40 files changed, 186 insertions(+), 800 deletions(-) create mode 100644 recipes-devtools/clang/clang/0035-compiler-rt-Fix-cmake-check-for-_Float16-and-__bf16.patch delete mode 100644 recipes-devtools/clang/clang/0035-libcxx-Implement-LWG3545-std-pointer_traits-should-be-.patch diff --git a/conf/layer.conf b/conf/layer.conf index 0a71cb1..1bbdae3 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 = "17.0.6" +LLVMVERSION = "18.1.0" require conf/nonclangable.conf require conf/nonscanable.conf diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 84185a0..6cde0b0 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -4,14 +4,15 @@ LLVM_DIR = "llvm${LLVM_RELEASE}" LLVM_GIT ?= "git://github.com/llvm" LLVM_GIT_PROTOCOL ?= "https" -MAJOR_VER = "17" -MINOR_VER = "0" -PATCH_VER = "6" - -SRCREV ?= "6009708b4367171ccdbf4b5905cb6a803753fe18" - -PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" -BRANCH = "release/17.x" +MAJOR_VER = "18" +MINOR_VER = "1" +PATCH_VER = "0" +# could be 'rcX' or 'git' or empty ( for release ) +VER_SUFFIX = "" +SRCREV ?= "461274b81d8641eab64d494accddc81d7db8a09e" + +PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}${VER_SUFFIX}" +BRANCH = "release/18.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 6721a2b..bb6fdbe 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 6a743f488230aa025016396208d1760835495264 Mon Sep 17 00:00:00 2001 +From 7065ef64c066b9dadf7e751f72e85232d729e225 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 f380fe6b6b92..145cb9d7ee88 100644 +index da998d2221dc..936b78e4d6dd 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt -@@ -426,7 +426,7 @@ set(LIBCXXABI_LIBUNWIND_PATH "${LIBCXXABI_LIBUNWIND_PATH}" CACHE PATH +@@ -422,7 +422,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 f380fe6b6b92..145cb9d7ee88 100644 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} ${LIBCXXABI_LIBUNWIND_PATH}/include ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES} -@@ -437,15 +437,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) +@@ -433,15 +433,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) NO_CMAKE_FIND_ROOT_PATH ) diff --git a/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch index df4d620..684d94d 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 25b8166b829bc987832a7c7b41581f193a4fabe9 Mon Sep 17 00:00:00 2001 +From 7ca2a8c8590e99cb9edb36e378db39df21c3b0ed 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 0262008..9f7bf0f 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 fb844bcda4ed86c4f7246b4249d217dca534bc25 Mon Sep 17 00:00:00 2001 +From f69ce2c951a5346127517715681e2dd47d33cf65 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 1545340aa8a8..73fad3284810 100644 +index bbb4e8d7c333..583e5630b03c 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt -@@ -80,7 +80,16 @@ if (COMPILER_RT_STANDALONE_BUILD) +@@ -82,7 +82,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 4d13016..c6189ae 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 f258983025dd6a1d8a72f244ac97893c895e5b21 Mon Sep 17 00:00:00 2001 +From f01b464943203b0094bc8b76794e93afc35d912a 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,7 +14,7 @@ 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 03ac422d3e6b..3080b4758894 100644 +index 6bd922eed89e..9e15466f963a 100644 --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def +++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def @@ -1348,6 +1348,9 @@ TLI_DEFINE_STRING_INTERNAL("fopen") 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 4447c94..15916a8 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 588a8694c6540e31140c7e242bfb5e279d6ca08c Mon Sep 17 00:00:00 2001 +From 6543b333f413bc906c8a3577266f1ff6561b2e05 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 e86eb2b44b10..7b2abf318dbe 100644 +index d5b76b1bb6c1..a739f0d8dbea 100644 --- a/llvm/tools/llvm-config/llvm-config.cpp +++ b/llvm/tools/llvm-config/llvm-config.cpp @@ -246,6 +246,13 @@ Typical components:\n\ @@ -47,13 +47,13 @@ index e86eb2b44b10..7b2abf318dbe 100644 ActiveIncludeDir = std::string(LLVM_SRC_ROOT) + "/include"; @@ -366,12 +373,18 @@ int main(int argc, char **argv) { sys::fs::make_absolute(ActivePrefix, Path); - ActiveBinDir = std::string(Path.str()); + ActiveBinDir = std::string(Path); } - ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; - { - SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR); - sys::fs::make_absolute(ActivePrefix, Path); -- ActiveCMakeDir = std::string(Path.str()); +- ActiveCMakeDir = std::string(Path); + // Hack for Yocto: we need to override the lib path when we are using + // llvm-config from within a target sysroot since LLVM_LIBDIR_SUFFIX + // maybe different for host llvm vs target e.g. ppc64 Libdir=lib64 but 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 c3e7086..7d83a1e 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 f033c3e6da2f09e627cf8cf8fbd753e07e0ebacd Mon Sep 17 00:00:00 2001 +From ac8010d0f42375b862be8d020b39862dde2d3739 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 1ba222bf83b1..b2ed29621879 100644 +index 4300a2bdff17..fe1bea2bde9d 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -495,7 +495,11 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -499,7 +499,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 1ba222bf83b1..b2ed29621879 100644 Loader = HF ? "ld-linux-armhf.so.3" : "ld-linux.so.3"; break; } -@@ -550,11 +554,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -554,11 +558,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 1ba222bf83b1..b2ed29621879 100644 break; case llvm::Triple::riscv32: { StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple); -@@ -576,6 +588,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -580,6 +592,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 1ba222bf83b1..b2ed29621879 100644 break; case llvm::Triple::systemz: LibDir = "lib"; -@@ -590,6 +606,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -594,6 +610,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 48af473..c6207c6 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 b497f95862cfe82aa2d581798182d2c2112796ae Mon Sep 17 00:00:00 2001 +From fbf2696149ab70f296b6a36e1867ee487bb5b3d4 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 40038dce47d8..c642946c5cfb 100644 +index e5e1b1d77269..7b43cde6b884 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -636,6 +636,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, +@@ -628,6 +628,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 ee75cbc..bcdfa75 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 acfefc5462044827ba3b7d0ac7512a9d9461a833 Mon Sep 17 00:00:00 2001 +From 32028d3635b5f5f00a538e60d7fc89a3576d1d1f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 16 Mar 2017 09:02:13 -0700 Subject: [PATCH] clang: Prepend trailing '/' to sysroot @@ -25,10 +25,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index b2ed29621879..d2fa4b2f11cf 100644 +index fe1bea2bde9d..9cfc135ed2c0 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -215,7 +215,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) +@@ -219,7 +219,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) Multilibs = GCCInstallation.getMultilibs(); SelectedMultilibs.assign({GCCInstallation.getMultilib()}); llvm::Triple::ArchType Arch = Triple.getArch(); diff --git a/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index 2e83358..2a96090 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 9069a7f709cdb5392c9e0ecd863d62176d080a91 Mon Sep 17 00:00:00 2001 +From 5a2e2c7600e855782be747d28b16377f7d3354a8 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,7 +16,7 @@ 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 8dafc3d481c2..3e0f7b64b0db 100644 +index 388030592b48..c59700b4a7ab 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -15,6 +15,7 @@ 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 39f4044..85f0c81 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 fcc667e02238ad83e5db2ecc1f060af6dcc618f1 Mon Sep 17 00:00:00 2001 +From 840960c4a146a90a1e9b8d381b1bab64701650a2 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 20 Mar 2021 16:09:16 -0700 Subject: [PATCH] clang: Define / releative gcc installation dir @@ -15,10 +15,10 @@ Signed-off-by: Khem Raj 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index c642946c5cfb..e1c2cdc0e93b 100644 +index 7b43cde6b884..1ea6927d06f3 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2744,19 +2744,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2913,19 +2913,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 6ccc25d..0db75c7 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 85230d89fc000068097599df6c8750d75cf84c72 Mon Sep 17 00:00:00 2001 +From 702335a68f81dfa1ac89b759846faa8a479bdec7 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 0d6907b8e5c7..778da2b7b4a5 100644 +index 2b916f000336..de823347a527 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -1820,6 +1820,8 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, +@@ -2179,6 +2179,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 3f5c9ab..e929194 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 84a2bee19c577eb56c381903959c77271a4368e5 Mon Sep 17 00:00:00 2001 +From b0132d5b8f5b92f66087fe11713885d8916554c2 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,14 +11,14 @@ 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 6af47b51d4c6..bf9adea6814a 100644 +index 55bf3be75642..71b09ec05b68 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) +@@ -90,6 +90,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}" -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_TESTS=OFF + -DPYTHON_EXECUTABLE="${PYTHON_EXECUTABLE}" - ${build_type_flags} ${linker_flag} ${external_clang_dir} + ${build_type_flags} ${linker_flag} ${external_clang_dir} ${libc_flags} ${ARGN} WORKING_DIRECTORY ${${project_name}_${target_name}_BUILD} 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 855d544..4c333a0 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 129d994b584cab112d39916075eef8c833813677 Mon Sep 17 00:00:00 2001 +From b2ed6b57edd6afd6f2a5376a0bdea36d017fc95f 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 b9d88f8..df22737 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 c646fe1dd7b9fcb80de27c8b4da916bd9e0adb7f Mon Sep 17 00:00:00 2001 +From 762c7af55064261f061fcd5ce0bd2eb93cbd425b 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 35b466527096..f261c1def1ca 100644 +index 44a088663463..2a8546165f44 100644 --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt -@@ -189,7 +189,7 @@ if (LIBCXX_ENABLE_SHARED) +@@ -198,7 +198,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 35b466527096..f261c1def1ca 100644 set_target_properties(cxx_shared PROPERTIES COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}" -@@ -282,7 +282,7 @@ if (LIBCXX_ENABLE_STATIC) +@@ -291,7 +291,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 a421c6c..1e8aedc 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 ae428248f697ccf8b98c0da5a9983a1f0ff89bd5 Mon Sep 17 00:00:00 2001 +From e6592691f3f5b13785adfa7cfca938742a35fb29 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 230620c37027..cb5a9bd41ee8 100644 +index 3bc78b0dc935..bc492ceb90db 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -1353,7 +1353,6 @@ macro(llvm_add_tool project name) +@@ -1368,7 +1368,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 230620c37027..cb5a9bd41ee8 100644 RUNTIME DESTINATION ${${project}_TOOLS_INSTALL_DIR} COMPONENT ${name}) -@@ -1364,9 +1363,6 @@ macro(llvm_add_tool project name) +@@ -1379,9 +1378,6 @@ macro(llvm_add_tool project name) endif() endif() endif() @@ -73,7 +73,7 @@ index 230620c37027..cb5a9bd41ee8 100644 set_target_properties(${name} PROPERTIES FOLDER "Tools") endif() endmacro(llvm_add_tool project name) -@@ -1411,7 +1407,6 @@ macro(add_llvm_utility name) +@@ -1426,7 +1422,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 230620c37027..cb5a9bd41ee8 100644 RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} COMPONENT ${name}) -@@ -1420,7 +1415,6 @@ macro(add_llvm_utility name) +@@ -1435,7 +1430,6 @@ macro(add_llvm_utility name) DEPENDS ${name} COMPONENT ${name}) endif() @@ -90,10 +90,10 @@ index 230620c37027..cb5a9bd41ee8 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 7fd6628ef55d..57a996d03755 100644 +index 1d18fdde2bb9..c9363ffb3376 100644 --- a/llvm/cmake/modules/TableGen.cmake +++ b/llvm/cmake/modules/TableGen.cmake -@@ -195,12 +195,7 @@ macro(add_tablegen target project) +@@ -222,12 +222,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 7fd6628ef55d..57a996d03755 100644 COMPONENT ${target} RUNTIME DESTINATION "${ADD_TABLEGEN_DESTINATION}") if(NOT LLVM_ENABLE_IDE) -@@ -211,6 +206,5 @@ macro(add_tablegen target project) +@@ -238,6 +233,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 8e57922..c5c413f 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 f45ef34d9d5a3ff049c39dd2d3d6aed72eb5b0bc Mon Sep 17 00:00:00 2001 +From cc868200402deee5203b498d72dc26f944f10a55 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,10 +20,10 @@ 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 bdbdad9362e1..a0d4a04b42bb 100644 +index 93cddf742d52..88291dd125d3 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp -@@ -183,9 +183,15 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath, +@@ -179,9 +179,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. 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 cd111bd..f812fcd 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 53138d6a7fe341821a73719f776ee5535d759c3b Mon Sep 17 00:00:00 2001 +From c6d4b091b470d6a6cff90f19416c990be8b08319 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 d2fa4b2f11cf..42b88e76a9d5 100644 +index 9cfc135ed2c0..6df8c58076c9 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -496,8 +496,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -500,8 +500,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 d2fa4b2f11cf..42b88e76a9d5 100644 LibDir = "lib"; } Loader = HF ? "ld-linux-armhf.so.3" : "ld-linux.so.3"; -@@ -554,8 +554,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -558,8 +558,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 d2fa4b2f11cf..42b88e76a9d5 100644 LibDir = "lib"; } break; -@@ -563,8 +563,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -567,8 +567,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 d2fa4b2f11cf..42b88e76a9d5 100644 LibDir = "lib"; } break; -@@ -588,8 +588,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -592,8 +592,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 d2fa4b2f11cf..42b88e76a9d5 100644 LibDir = "lib"; } break; -@@ -606,8 +606,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -610,8 +610,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 6de7a36..f9a7e73 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 61de53f94868705c7a0379c3f20e6b9de76c6198 Mon Sep 17 00:00:00 2001 +From 376554f8f40211f36444a23011e80ad950274723 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 14 Oct 2020 22:19:57 -0700 Subject: [PATCH] clang: Use python3 in python scripts diff --git a/recipes-devtools/clang/clang/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 412b1c5..988bbd1 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 83fc70ac26c2412382341be61978e51bbd2e6c4f Mon Sep 17 00:00:00 2001 +From fc730bc3b01378f457f43d5c684bc4cee818abc3 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Mon, 25 Jan 2021 16:14:35 +0800 Subject: [PATCH] For x86_64, set Yocto based GCC install search path @@ -57,10 +57,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index e1c2cdc0e93b..0b355d9a3f4b 100644 +index 1ea6927d06f3..185ea3df16f5 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2334,6 +2334,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( +@@ -2488,6 +2488,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 db94867..a31be84 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 45a0c6817175c12aac685b4d45badf761bd7f4fc Mon Sep 17 00:00:00 2001 +From ce223c530a076c7e41b1ea23c747d12dde9e1120 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 8d3dc8d208b2..14dfbe147bdd 100644 +index 2ca18ebb4ad4..51c56f1e0b8b 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake -@@ -177,7 +177,7 @@ else() +@@ -188,7 +188,7 @@ else() set(MAYBE_REQUIRED) endif() if(LLVM_ENABLE_TERMINFO) @@ -31,7 +31,7 @@ index 8d3dc8d208b2..14dfbe147bdd 100644 if(COMPILER_RT_TERMINFO_LIB) set(LLVM_ENABLE_TERMINFO 1) diff --git a/llvm/cmake/modules/FindTerminfo.cmake b/llvm/cmake/modules/FindTerminfo.cmake -index eef1f95853eb..b3b330dd3d59 100644 +index 163af6697067..bf2e760bed8a 100644 --- a/llvm/cmake/modules/FindTerminfo.cmake +++ b/llvm/cmake/modules/FindTerminfo.cmake @@ -11,7 +11,7 @@ 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 480163e..0856410 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 3ee6071f459375e0534db3bd84b1a71a5694daef Mon Sep 17 00:00:00 2001 +From 1cf1458650a3cfed4bab56ca0fb026d091ab725b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 11 Feb 2021 16:42:49 -0800 Subject: [PATCH] llvm: Insert anchor for adding OE distro vendor names @@ -18,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 a3d6a06af976..953132c543cd 100644 +index 0bbe8a3cedfd..dbc1240703a0 100644 --- a/llvm/lib/TargetParser/Triple.cpp +++ b/llvm/lib/TargetParser/Triple.cpp -@@ -569,7 +569,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) { +@@ -601,7 +601,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 3813446..2e2233e 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 073a80b1f50e27c88c931bedea516effcff0945e Mon Sep 17 00:00:00 2001 +From 30bc9fac3220d919a3e94b14b47250247e5686e4 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 349c1f8..2ccdf64 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 64bf8ed61750e9139851c866d9cfbed9a3fb5bb9 Mon Sep 17 00:00:00 2001 +From 1cca5d6c319fb2ebff798882d6f7cf55ae225d8e 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 42b88e76a9d5..ef8435385130 100644 +index 6df8c58076c9..cf549331d255 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -703,6 +703,9 @@ void Linux::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, +@@ -707,6 +707,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 170999b..9578fe6 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 755f0c575bb3efa82703eda87df3c37aeb6f96b0 Mon Sep 17 00:00:00 2001 +From 391c312f710887305d6b91c2c5e8d26536ff1328 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 @@ -12,7 +12,7 @@ Signed-off-by: Khem Raj 2 files changed, 21 insertions(+) diff --git a/libunwind/include/libunwind.h b/libunwind/include/libunwind.h -index d2ad5ab87122..d735d955aee2 100644 +index b2dae8feed9a..0ab974c9bfa4 100644 --- a/libunwind/include/libunwind.h +++ b/libunwind/include/libunwind.h @@ -130,6 +130,7 @@ extern int unw_is_fpreg(unw_cursor_t *, unw_regnum_t) LIBUNWIND_AVAIL; @@ -24,10 +24,10 @@ 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 1bd18659b786..64819826cfea 100644 +index 217dde909863..5797c806c084 100644 --- a/libunwind/src/libunwind.cpp +++ b/libunwind/src/libunwind.cpp -@@ -431,6 +431,26 @@ int __unw_remove_find_dynamic_unwind_sections( +@@ -432,6 +432,26 @@ int __unw_remove_find_dynamic_unwind_sections( #endif // __APPLE__ 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 8d35b41..539045d 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 6fd8342c1b41a5d3f2aad1e8b215d1d9c70df800 Mon Sep 17 00:00:00 2001 +From 75fba7350f0b161254994279d26ba720dde270ee 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 @@ -12,21 +12,23 @@ libcxx e.g. chromium Upstream-Status: Pending Signed-off-by: Khem Raj --- - clang/lib/Driver/ToolChains/Gnu.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + clang/lib/Driver/ToolChains/Gnu.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 0b355d9a3f4b..f228bd14e8a8 100644 +index 185ea3df16f5..d883dc3e7558 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -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. -- if (!getTriple().isAndroid()) -+ // And also do not add it when --sysroot is specified, since it would expect -+ // libc++ headers from sysroot -+ if (!getTriple().isAndroid() && SysRoot.empty()) - if (AddIncludePath(getDriver().Dir + "/../include")) - return; +@@ -3313,8 +3313,11 @@ Generic_GCC::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, + // incompatible with the NDK libraries. + SmallString<128> DriverIncludeDir(getDriver().Dir); + llvm::sys::path::append(DriverIncludeDir, "..", "include"); ++ ++ // do not add it when --sysroot is specified, since it would expect ++ // libc++ headers from sysroot and not relative to compiler install location + if (AddIncludePath(DriverIncludeDir, +- /*TargetDirRequired=*/getTriple().isAndroid())) ++ /*TargetDirRequired=*/getTriple().isAndroid() | !computeSysRoot().empty())) + return; // If this is a development, non-installed, clang, libcxx will + // not be found at ../include/c++ but it likely to be found at 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 90783bb..26e81f9 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 b00d9692a5337fdbbb5635cc9077061c47c7b741 Mon Sep 17 00:00:00 2001 +From 9a0b3da700e6e7b4045e310555de9cc55a8fdb98 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 @@ -31,10 +31,10 @@ Signed-off-by: Khem Raj 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index f228bd14e8a8..d746db487e1f 100644 +index d883dc3e7558..c627602827c3 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -1793,23 +1793,38 @@ static void findRISCVMultilibs(const Driver &D, +@@ -1909,23 +1909,38 @@ static void findRISCVMultilibs(const Driver &D, return findRISCVBareMetalMultilibs(D, TargetTriple, Path, Args, Result); FilterNonExistent NonExistent(Path, "/crtbegin.o", D.getVFS()); @@ -90,7 +90,7 @@ index f228bd14e8a8..d746db487e1f 100644 Multilib::flags_list Flags; bool IsRV64 = TargetTriple.getArch() == llvm::Triple::riscv64; -@@ -2776,13 +2791,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2945,13 +2960,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 59f3af1..b9e99bf 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 f910a403e898d42d589b694bc9856f052386136e Mon Sep 17 00:00:00 2001 +From f9eb5c0b5e69cba7aea90d7bb84f3cb39f889329 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Tue, 7 Dec 2021 04:08:22 +0000 Subject: [PATCH] Fix lib paths for OpenEmbedded Host @@ -48,7 +48,7 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index d746db487e1f..020fd106a629 100644 +index c627602827c3..98d979ace17b 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -19,6 +19,7 @@ @@ -59,7 +59,7 @@ index d746db487e1f..020fd106a629 100644 #include "clang/Driver/Driver.h" #include "clang/Driver/DriverDiagnostic.h" #include "clang/Driver/MultilibBuilder.h" -@@ -2749,6 +2750,7 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2918,6 +2919,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 d746db487e1f..020fd106a629 100644 // Locations relative to the system lib directory where GCC's triple-specific // directories might reside. struct GCCLibSuffix { -@@ -2766,7 +2768,8 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2935,7 +2937,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 9fc5223..1f2abb5 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 9ed567b3fcce1759947621765199f13261c615a4 Mon Sep 17 00:00:00 2001 +From aeb8e9d7234b6aca328ed9666a139bb1f5d00bdc 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 8291f6575a71..7ce64b9a2c25 100644 +index a8de94163e8b..847d6a3f9d1a 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 8291f6575a71..7ce64b9a2c25 100644 OpenSUSE, UbuntuHardy, UbuntuIntrepid, -@@ -136,6 +137,7 @@ public: +@@ -137,6 +138,7 @@ public: bool IsGentoo() const { return DistroVal == Gentoo; } @@ -59,7 +59,7 @@ index 8291f6575a71..7ce64b9a2c25 100644 }; diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp -index 6e0087565941..13e45b1ea088 100644 +index a7e7f169dc14..48d4e15196da 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,10 +71,10 @@ index 6e0087565941..13e45b1ea088 100644 return Version; } diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index ef8435385130..8bd21eebfed3 100644 +index cf549331d255..699ff18b1240 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, +@@ -82,6 +82,7 @@ std::string Linux::getMultiarchTriple(const Driver &D, return "x86_64-linux-android"; if (TargetEnvironment == llvm::Triple::GNUX32) return "x86_64-linux-gnux32"; 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 6d71f75..0e155ef 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 374f62b718dbb04a88764cdfa747cd42ebf57829 Mon Sep 17 00:00:00 2001 +From 9132301a280a8c60e18ab4299bd55f9beb869fac 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 b376ace0ebe3..b9bb39220524 100644 +index a3b0a405b413..a68cfb503dfa 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-compiler-rt-Enable-__int128-for-ppc32.patch b/recipes-devtools/clang/clang/0030-compiler-rt-Enable-__int128-for-ppc32.patch index 9eb42e5..bcb64dd 100644 --- 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 @@ -1,4 +1,4 @@ -From b907dbdce5520eaf841ae041fcca6941a8529456 Mon Sep 17 00:00:00 2001 +From 9decd876cd8352fac84aafe740a142f20b0f78fa Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 9 Mar 2022 16:28:16 -0800 Subject: [PATCH] compiler-rt: Enable __int128 for ppc32 @@ -11,10 +11,10 @@ Signed-off-by: Khem Raj 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt -index d62fa0432e2a..126505bd8921 100644 +index 28ded8766f25..08495c491f08 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} +@@ -686,11 +686,9 @@ set(mips64_SOURCES ${GENERIC_TF_SOURCES} set(mips64el_SOURCES ${GENERIC_TF_SOURCES} ${mips_SOURCES}) @@ -27,7 +27,7 @@ index d62fa0432e2a..126505bd8921 100644 ppc/divtc3.c ppc/fixtfdi.c ppc/fixunstfdi.c -@@ -688,14 +686,15 @@ set(powerpc64_SOURCES +@@ -705,14 +703,15 @@ set(powerpc64_SOURCES ) # These routines require __int128, which isn't supported on AIX. if (NOT OS_NAME MATCHES "AIX") @@ -46,7 +46,7 @@ index d62fa0432e2a..126505bd8921 100644 set(riscv_SOURCES riscv/fp_mode.c -@@ -823,9 +822,9 @@ else () +@@ -847,9 +846,9 @@ else () list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET) endif() @@ -59,7 +59,7 @@ index d62fa0432e2a..126505bd8921 100644 endif() diff --git a/compiler-rt/lib/builtins/int_types.h b/compiler-rt/lib/builtins/int_types.h -index e94d3154c6d4..37b2cb43f932 100644 +index 7624c7280615..a45bf13f770e 100644 --- a/compiler-rt/lib/builtins/int_types.h +++ b/compiler-rt/lib/builtins/int_types.h @@ -64,7 +64,7 @@ typedef union { 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 index 37c93de..ec92a86 100644 --- 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 @@ -1,4 +1,4 @@ -From fc268457a7ef1a8481a1d563550cc8e9a8a5afcb Mon Sep 17 00:00:00 2001 +From bfadfbccf990c2768d18dc8d7fc756aa59e4964c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 12 Aug 2022 11:50:57 -0700 Subject: [PATCH] llvm: Do not use cmake infra to detect libzstd @@ -21,7 +21,7 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt -index 87fe7bebf688..e12e292fdfbf 100644 +index e19223fdef4f..9c8af2404545 100644 --- a/llvm/lib/Support/CMakeLists.txt +++ b/llvm/lib/Support/CMakeLists.txt @@ -22,7 +22,7 @@ if (HAS_WERROR_GLOBAL_CTORS) @@ -42,7 +42,7 @@ index 87fe7bebf688..e12e292fdfbf 100644 endif() if( MSVC OR MINGW ) -@@ -292,7 +292,7 @@ if(LLVM_ENABLE_ZLIB) +@@ -306,7 +306,7 @@ if(LLVM_ENABLE_ZLIB) get_property(zlib_library TARGET ZLIB::ZLIB PROPERTY LOCATION) endif() get_library_name(${zlib_library} zlib_library) @@ -51,7 +51,7 @@ index 87fe7bebf688..e12e292fdfbf 100644 endif() if(LLVM_ENABLE_ZSTD) -@@ -305,7 +305,7 @@ if(LLVM_ENABLE_ZSTD) +@@ -319,7 +319,7 @@ if(LLVM_ENABLE_ZSTD) get_property(zstd_library TARGET ${zstd_target} PROPERTY LOCATION) endif() get_library_name(${zstd_library} zstd_library) 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 index 9d462b0..ce8f527 100644 --- 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 @@ -1,4 +1,4 @@ -From b5be1155dbe4d82fef53960f5df8a25770cd8bfc Mon Sep 17 00:00:00 2001 +From f42372b9a89b494573bcc8a9c2dd05c168ccdd54 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 3 Jan 2023 18:44:34 -0800 Subject: [PATCH] compiler-rt: Fix stat struct's size for O32 ABI @@ -14,7 +14,7 @@ Signed-off-by: Khem Raj 1 file changed, 13 insertions(+) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h -index 58244c9944a0..70daaf279f4a 100644 +index 34bfef1f7ef4..0ba5451c1ccf 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; 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 index dde742a..359131c 100644 --- 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 @@ -1,4 +1,4 @@ -From e8ecd192495c092dcee4fdb1ee5514222a8aa0c1 Mon Sep 17 00:00:00 2001 +From a6132924c06b4662eaed9820a13b63131ff8d4ff 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 @@ -22,7 +22,7 @@ Signed-off-by: Khem Raj 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 +index 596528155505..8f54ad70999c 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h @@ -22,6 +22,15 @@ 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 index 5a6b184..88b0440 100644 --- 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 @@ -1,4 +1,4 @@ -From 9fa41e535f7b95005e4aa2c764aebe674feeea69 Mon Sep 17 00:00:00 2001 +From 6021f23b2ce3166b2eb63fe48db71e6c593e1ac5 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Thu, 31 Aug 2023 18:14:47 +0200 Subject: [PATCH] ToolChains/Gnu.cpp: ARMLibDirs search also in lib32 @@ -55,10 +55,10 @@ Signed-off-by: Martin Jansa 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 020fd106a629..358c0ade7b27 100644 +index 98d979ace17b..c5aed9b47123 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2325,7 +2325,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( +@@ -2479,7 +2479,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu", "aarch64_be-linux-gnu"}; @@ -68,10 +68,10 @@ index 020fd106a629..358c0ade7b27 100644 static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf", "armv7hl-redhat-linux-gnueabi", diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 8bd21eebfed3..2492db058cf9 100644 +index 699ff18b1240..4ed91b852562 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) { +@@ -202,6 +202,7 @@ static StringRef getOSLibDir(const llvm::Triple &Triple, const ArgList &Args) { // reasoning about oslibdir spellings with the lib dir spellings in the // GCCInstallationDetector, but that is a more significant refactoring. if (Triple.getArch() == llvm::Triple::x86 || Triple.isPPC32() || diff --git a/recipes-devtools/clang/clang/0035-compiler-rt-Fix-cmake-check-for-_Float16-and-__bf16.patch b/recipes-devtools/clang/clang/0035-compiler-rt-Fix-cmake-check-for-_Float16-and-__bf16.patch new file mode 100644 index 0000000..ee7c260 --- /dev/null +++ b/recipes-devtools/clang/clang/0035-compiler-rt-Fix-cmake-check-for-_Float16-and-__bf16.patch @@ -0,0 +1,42 @@ +From b44db6645cb65d060970b2535d372d6380d633f3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 1 Mar 2024 16:47:46 -0800 +Subject: [PATCH] compiler-rt: Fix cmake check for _Float16 and __bf16 + +When using check_c_source_compiles cmake function, main has to be +provided, otherwise while compile step will be fine but linking step +will fail as there will be no main function and test will fail and +disable building HF builtins into compiler-rt + +Fixes configure errors like below + +aarch64-yoe-linux-ld.lld: error: undefined symbol: main + referenced by start.S:81 (../sysdeps/aarch64/start.S:81) + /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/compiler-rt/18.1.0/recipe-sysroot/usr/lib/Scrt1.o:(_start) + referenced by start.S:82 (../sysdeps/aarch64/start.S:82) + /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/compiler-rt/18.1.0/recipe-sysroot/usr/lib/Scrt1.o:(_start) + aarch64-yoe-linux-clang: error: linker command failed with exit code 1 (use -v to see invocation) + +Upstream-Status: Submitted [https://github.com/kraj/llvm-project/pull/new/kraj/compiler-rt-float16] +Signed-off-by: Khem Raj +--- + compiler-rt/lib/builtins/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt +index 08495c491f08..bff96ba10bcd 100644 +--- a/compiler-rt/lib/builtins/CMakeLists.txt ++++ b/compiler-rt/lib/builtins/CMakeLists.txt +@@ -827,10 +827,10 @@ else () + endif() + endif() + endif() +- check_c_source_compiles("_Float16 foo(_Float16 x) { return x; }" ++ check_c_source_compiles("_Float16 foo(_Float16 x) { return x; } int main(void) { return foo(1.0); }" + COMPILER_RT_HAS_${arch}_FLOAT16) + append_list_if(COMPILER_RT_HAS_${arch}_FLOAT16 -DCOMPILER_RT_HAS_FLOAT16 BUILTIN_CFLAGS_${arch}) +- check_c_source_compiles("__bf16 foo(__bf16 x) { return x; }" ++ check_c_source_compiles("__bf16 foo(__bf16 x) { return x; } int main(void) { return foo(1.0); }" + COMPILER_RT_HAS_${arch}_BFLOAT16) + # Build BF16 files only when "__bf16" is available. + if(COMPILER_RT_HAS_${arch}_BFLOAT16) diff --git a/recipes-devtools/clang/clang/0035-libcxx-Implement-LWG3545-std-pointer_traits-should-be-.patch b/recipes-devtools/clang/clang/0035-libcxx-Implement-LWG3545-std-pointer_traits-should-be-.patch deleted file mode 100644 index af86540..0000000 --- a/recipes-devtools/clang/clang/0035-libcxx-Implement-LWG3545-std-pointer_traits-should-be-.patch +++ /dev/null @@ -1,660 +0,0 @@ -From 4d11d353656c5c848ddb2c13112cf1c2f8c041c0 Mon Sep 17 00:00:00 2001 -From: Daniel Cheng -Date: Mon, 18 Sep 2023 05:46:59 -0700 -Subject: [PATCH] [libc++] Implement LWG3545: std::pointer_traits should be - SFINAE-friendly. (#65177) - -See https://wg21.link/LWG3545 for background and details. - -Differential Revision: https://reviews.llvm.org/D158922 - -Upstream-Status: Backport [https://github.com/llvm/llvm-project/pull/65177] ---- - libcxx/docs/Status/Cxx23Issues.csv | 2 +- - libcxx/include/__memory/pointer_traits.h | 17 +- - .../contiguous_iterator.verify.cpp | 54 ---- - ...to_address_without_pointer_traits.pass.cpp | 66 ++++ - .../pointer.traits/difference_type.pass.cpp | 28 -- - .../pointer.traits/element_type.pass.cpp | 28 -- - .../memory/pointer.traits/pointer.pass.cpp | 35 --- - .../memory/pointer.traits/rebind.pass.cpp | 32 -- - .../pointer.traits/types.compile.pass.cpp | 289 ++++++++++++++++++ - 9 files changed, 367 insertions(+), 184 deletions(-) - delete mode 100644 libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.verify.cpp - create mode 100644 libcxx/test/std/utilities/memory/pointer.conversion/to_address_without_pointer_traits.pass.cpp - delete mode 100644 libcxx/test/std/utilities/memory/pointer.traits/difference_type.pass.cpp - delete mode 100644 libcxx/test/std/utilities/memory/pointer.traits/element_type.pass.cpp - delete mode 100644 libcxx/test/std/utilities/memory/pointer.traits/pointer.pass.cpp - delete mode 100644 libcxx/test/std/utilities/memory/pointer.traits/rebind.pass.cpp - create mode 100644 libcxx/test/std/utilities/memory/pointer.traits/types.compile.pass.cpp - -diff --git a/libcxx/docs/Status/Cxx23Issues.csv b/libcxx/docs/Status/Cxx23Issues.csv -index 0cc06674bda3..dc96fb2e0b50 100644 ---- a/libcxx/docs/Status/Cxx23Issues.csv -+++ b/libcxx/docs/Status/Cxx23Issues.csv -@@ -190,7 +190,7 @@ - "`3118 `__","``fpos`` equality comparison unspecified", "November 2022","","","" - "`3177 `__","Limit permission to specialize variable templates to program-defined types", "November 2022","|Nothing to do|","","" - "`3515 `__","§[stacktrace.basic.nonmem]: ``operator<<`` should be less templatized", "November 2022","","","" --"`3545 `__","``std::pointer_traits`` should be SFINAE-friendly", "November 2022","","","" -+"`3545 `__","``std::pointer_traits`` should be SFINAE-friendly", "November 2022","|Complete|","18.0","" - "`3569 `__","``join_view`` fails to support ranges of ranges with non-default_initializable iterators", "November 2022","","","|ranges|" - "`3594 `__","``inout_ptr`` — inconsistent ``release()`` in destructor", "November 2022","","","" - "`3597 `__","Unsigned integer types don't model advanceable", "November 2022","","","|ranges|" -diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h -index c33e7bd43f29..7617948ed76b 100644 ---- a/libcxx/include/__memory/pointer_traits.h -+++ b/libcxx/include/__memory/pointer_traits.h -@@ -35,7 +35,7 @@ template - struct __has_element_type<_Tp, __void_t > : true_type {}; - - template ::value> --struct __pointer_traits_element_type; -+struct __pointer_traits_element_type {}; - - template - struct __pointer_traits_element_type<_Ptr, true> -@@ -111,12 +111,14 @@ struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, false> - typedef _Sp<_Up, _Args...> type; - }; - -+template -+struct __pointer_traits_impl {}; -+ - template --struct _LIBCPP_TEMPLATE_VIS pointer_traits --{ -- typedef _Ptr pointer; -- typedef typename __pointer_traits_element_type::type element_type; -- typedef typename __pointer_traits_difference_type::type difference_type; -+struct __pointer_traits_impl<_Ptr, __void_t::type> > { -+ typedef _Ptr pointer; -+ typedef typename __pointer_traits_element_type::type element_type; -+ typedef typename __pointer_traits_difference_type::type difference_type; - - #ifndef _LIBCPP_CXX03_LANG - template using rebind = typename __pointer_traits_rebind::type; -@@ -133,6 +135,9 @@ public: - {return pointer::pointer_to(__r);} - }; - -+template -+struct _LIBCPP_TEMPLATE_VIS pointer_traits : __pointer_traits_impl<_Ptr> {}; -+ - template - struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*> - { -diff --git a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.verify.cpp b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.verify.cpp -deleted file mode 100644 -index 37c5ad9610a6..000000000000 ---- a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.verify.cpp -+++ /dev/null -@@ -1,54 +0,0 @@ --//===----------------------------------------------------------------------===// --// --// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. --// See https://llvm.org/LICENSE.txt for license information. --// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception --// --//===----------------------------------------------------------------------===// -- --// UNSUPPORTED: c++03, c++11, c++14, c++17 -- --// This test checks that std::contiguous_iterator uses std::to_address, which is not SFINAE-friendly --// when the type is missing the `T::element_type` typedef. -- --#include -- --#include --#include -- --struct no_element_type { -- typedef std::contiguous_iterator_tag iterator_category; -- typedef int value_type; -- typedef std::ptrdiff_t difference_type; -- typedef int* pointer; -- typedef int& reference; -- typedef no_element_type self; -- -- no_element_type(); -- -- reference operator*() const; -- pointer operator->() const; -- auto operator<=>(const self&) const = default; -- -- self& operator++(); -- self operator++(int); -- -- self& operator--(); -- self operator--(int); -- -- self& operator+=(difference_type n); -- self operator+(difference_type n) const; -- friend self operator+(difference_type n, self x); -- -- self& operator-=(difference_type n); -- self operator-(difference_type n) const; -- difference_type operator-(const self& n) const; -- -- reference operator[](difference_type n) const; --}; -- --void test() { -- (void) std::contiguous_iterator; -- // expected-error@*:* {{implicit instantiation of undefined template}} -- // expected-note@*:* {{to_address}} --} -diff --git a/libcxx/test/std/utilities/memory/pointer.conversion/to_address_without_pointer_traits.pass.cpp b/libcxx/test/std/utilities/memory/pointer.conversion/to_address_without_pointer_traits.pass.cpp -new file mode 100644 -index 000000000000..4d05c10e0fbd ---- /dev/null -+++ b/libcxx/test/std/utilities/memory/pointer.conversion/to_address_without_pointer_traits.pass.cpp -@@ -0,0 +1,66 @@ -+//===----------------------------------------------------------------------===// -+// -+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -+// See https://llvm.org/LICENSE.txt for license information. -+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -+// -+//===----------------------------------------------------------------------===// -+ -+// -+ -+// UNSUPPORTED: c++03, c++11, c++14, c++17 -+ -+// template constexpr auto to_address(const Ptr& p) noexcept; -+// Should not require a specialization of pointer_traits for Ptr. -+ -+#include -+#include -+#include -+ -+struct IntPtr { -+ constexpr int* operator->() const { return ptr; } -+ -+ int* ptr; -+}; -+ -+template -+struct TemplatedPtr { -+ constexpr T* operator->() const { return ptr; } -+ -+ T* ptr; -+}; -+ -+template