From a13f0bc591132f6ac45d528ab36e127b3528a31a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 27 May 2021 01:13:59 -0700 Subject: [PATCH 001/166] ghostscript: Fix build when using libc++ RUNTIME=llvm means we use libc++ instead of libstdc++ among other things Signed-off-by: Khem Raj (cherry picked from commit 933795217f9142c246c359f92e8320516e5c66a5) --- recipes-extended/ghostscript/ghostscript_%.bbappend | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 recipes-extended/ghostscript/ghostscript_%.bbappend diff --git a/recipes-extended/ghostscript/ghostscript_%.bbappend b/recipes-extended/ghostscript/ghostscript_%.bbappend new file mode 100644 index 00000000..fe22e341 --- /dev/null +++ b/recipes-extended/ghostscript/ghostscript_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +do_configure_prepend_toolchain-clang () { + if ${@bb.utils.contains('RUNTIME', 'llvm', 'true', 'false', d)}; then + sed -i -e "s|-stdlib=libstdc++|-stdlib=libc++|g" ${S}/configure.ac + fi +} From ff67324a7ef7d79e2112574662a221f5e950782f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 11 Jun 2021 20:26:39 -0700 Subject: [PATCH 002/166] mesa: Do not StackAlignmentOverride on llvm >= 13 This has been removed see https://reviews.llvm.org/D103048 Signed-off-by: Khem Raj (cherry picked from commit c37942613e70c49c9fce3247c1427d0a1c10ad21) --- recipes-graphics/mesa/mesa/clang13.patch | 15 +++++++++++++++ recipes-graphics/mesa/mesa_%.bbappend | 8 +++++--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 recipes-graphics/mesa/mesa/clang13.patch diff --git a/recipes-graphics/mesa/mesa/clang13.patch b/recipes-graphics/mesa/mesa/clang13.patch new file mode 100644 index 00000000..8387b344 --- /dev/null +++ b/recipes-graphics/mesa/mesa/clang13.patch @@ -0,0 +1,15 @@ +--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp ++++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +@@ -351,8 +351,12 @@ lp_build_create_jit_compiler_for_module( + */ + TargetOptions options; + #if defined(PIPE_ARCH_X86) ++#if LLVM_VERSION_MAJOR >= 13 ++ // do nothing ++#else + options.StackAlignmentOverride = 4; + #endif ++#endif + + builder.setEngineKind(EngineKind::JIT) + .setErrorStr(&Error) diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend index 8af7a0eb..c08a9ff3 100644 --- a/recipes-graphics/mesa/mesa_%.bbappend +++ b/recipes-graphics/mesa/mesa_%.bbappend @@ -1,3 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_toolchain-clang = " file://clang13.patch " + LDFLAGS_append_toolchain-clang = " -latomic -lm" DEPENDS_append_toolchain-clang = " libatomic-ops" @@ -6,12 +10,10 @@ EXTRA_OEMASON_append_toolchain-clang_x86-64 = " -Dasm=false" export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-config" -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" - SRC_URI += "file://0001-gallium-add-missing-header-for-powf.patch \ file://0001-gallivm-fix-build-on-llvm-12-due-to-LLVMAddConstantPropagationPass-removal.patch \ file://0001-gallivm-add-InstSimplify-pass.patch \ file://0001-gallium-gallivm-remove-unused-header-include-for-newer-LLVM.patch \ " -PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, clang clang-native elfutils" +PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true -Ddraw-use-llvm=true,-Dllvm=false,clang clang-native elfutils" From 951917dc95e7ad05987dde041ff1839558b85550 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 28 May 2021 18:20:20 -0700 Subject: [PATCH 003/166] libunwind: Hide when llvm runtime is used We want to use llvm libunwind implementation when RUNTIME = "llvm" Signed-off-by: Khem Raj (cherry picked from commit a3604860941ffa9c5ef9a254717651fe9f8c586e) --- recipes-support/libunwind/libunwind_%.bbappend | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 recipes-support/libunwind/libunwind_%.bbappend diff --git a/recipes-support/libunwind/libunwind_%.bbappend b/recipes-support/libunwind/libunwind_%.bbappend new file mode 100644 index 00000000..6c9057cb --- /dev/null +++ b/recipes-support/libunwind/libunwind_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +COMPATIBLE_HOST_runtime-llvm = "null" From 1edfa9a2e7ef415794ca95ee09ff8ea467b5a6c4 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 14 May 2021 17:17:32 -0700 Subject: [PATCH 004/166] clang: Upgrade to trunk/13.0 future series Signed-off-by: Khem Raj (cherry picked from commit 76e37fafa29e9b2097eb823537b17d6cc638c1d5) Conflicts: - recipes-devtools/clang/common.inc: caused by 3880a395f870ecd8da73d2de1e2b88a855df2ef0, the patches have been kept. The patch introduced in fdb936e80b30f40cbf7ef9a8e124b58eec95f45c is part of LLVM 13 so it has been removed. --- conf/layer.conf | 2 +- recipes-devtools/clang/clang.inc | 6 +- ...l2-to-linker-cmdline-of-xml-is-found.patch | 6 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 8 +- ...-support-a-new-embedded-linux-target.patch | 2 +- ...lify-cross-compilation.-Don-t-use-na.patch | 6 +- ...yInfo-Undefine-libc-functions-if-th.patch} | 2 +- ...llvm-allow-env-override-of-exe-path.patch} | 2 +- ...-driver-Check-sysroot-for-ldso-path.patch} | 10 +- ...ools.cpp-Add-lssp_nonshared-on-musl.patch} | 6 +- ...oes-not-support-128-bit-long-double.patch} | 6 +- ...0-clang-Prepend-trailing-to-sysroot.patch} | 6 +- ...-the-target-sysroot-for-compiler-ru.patch} | 6 +- ...fine-releative-gcc-installation-dir.patch} | 29 +- ...d-and-ldl-along-with-lunwind-for-st.patch} | 32 +- ...TABLE-when-cross-compiling-for-nati.patch} | 2 +- ...or-musl-on-x86-and-x32-architectures.patch | 41 -- ...-Check-for-atomic-double-intrinsics.patch} | 2 +- ...015-clang-scan-view-needs-python-2.x.patch | 24 -- ...clang-Enable-SSP-and-PIE-by-default.patch} | 82 ++-- ...er-runtime-library-to-link-step-for.patch} | 10 +- ...Fix-configure-for-packages-using-fi.patch} | 56 +-- ...e-dir-location-for-cross-toolchains.patch} | 6 +- ...fi.patch => 0020-fix-path-to-libffi.patch} | 2 +- ...dyld-prefix-when-checking-sysroot-f.patch} | 12 +- ...clang-Use-python3-in-python-scripts.patch} | 23 +- ...Yocto-based-GCC-install-search-path.patch} | 10 +- ...> 0024-compiler-rt-Include-stddef.h.patch} | 10 +- ...Do-not-use-find_library-for-ncurses.patch} | 6 +- ...r-for-adding-OE-distro-vendor-names.patch} | 6 +- ...r-rt-Use-mcr-based-barrier-on-armv6.patch} | 6 +- ...ults-to-dwarf-5-debug-info-on-Linux.patch} | 6 +- ...r-sort-ClassInfo-lists-by-name-as-we.patch | 32 -- ...e-find-modules-for-terminfo-and-libf.patch | 19 +- ...eference_wrapper-T-conversion-from-U.patch | 379 ------------------ recipes-devtools/clang/clang_git.bb | 7 +- recipes-devtools/clang/common.inc | 52 ++- 37 files changed, 206 insertions(+), 716 deletions(-) rename recipes-devtools/clang/clang/{0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch => 0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch} (97%) rename recipes-devtools/clang/clang/{0007-llvm-allow-env-override-of-exe-path.patch => 0006-llvm-allow-env-override-of-exe-path.patch} (95%) rename recipes-devtools/clang/clang/{0008-clang-driver-Check-sysroot-for-ldso-path.patch => 0007-clang-driver-Check-sysroot-for-ldso-path.patch} (87%) rename recipes-devtools/clang/clang/{0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch => 0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch} (86%) rename recipes-devtools/clang/clang/{0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch => 0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch} (84%) rename recipes-devtools/clang/clang/{0011-clang-Prepend-trailing-to-sysroot.patch => 0010-clang-Prepend-trailing-to-sysroot.patch} (88%) rename recipes-devtools/clang/clang/{0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch => 0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch} (89%) rename recipes-devtools/clang/clang/{0013-clang-Define-releative-gcc-installation-dir.patch => 0012-clang-Define-releative-gcc-installation-dir.patch} (66%) rename recipes-devtools/clang/clang/{0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch => 0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch} (53%) rename recipes-devtools/clang/clang/{0017-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch => 0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch} (94%) delete mode 100644 recipes-devtools/clang/clang/0014-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch rename recipes-devtools/clang/clang/{0018-Check-for-atomic-double-intrinsics.patch => 0015-Check-for-atomic-double-intrinsics.patch} (94%) delete mode 100644 recipes-devtools/clang/clang/0015-clang-scan-view-needs-python-2.x.patch rename recipes-devtools/clang/clang/{0019-clang-Enable-SSP-and-PIE-by-default.patch => 0016-clang-Enable-SSP-and-PIE-by-default.patch} (87%) rename recipes-devtools/clang/clang/{0020-libcxx-Add-compiler-runtime-library-to-link-step-for.patch => 0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch} (84%) rename recipes-devtools/clang/clang/{0021-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch => 0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch} (68%) rename recipes-devtools/clang/clang/{0022-clang-Fix-resource-dir-location-for-cross-toolchains.patch => 0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch} (90%) rename recipes-devtools/clang/clang/{0023-fix-path-to-libffi.patch => 0020-fix-path-to-libffi.patch} (94%) rename recipes-devtools/clang/clang/{0024-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch => 0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch} (89%) rename recipes-devtools/clang/clang/{0025-clang-Use-python3-in-python-scripts.patch => 0022-clang-Use-python3-in-python-scripts.patch} (85%) rename recipes-devtools/clang/clang/{0026-For-x86_64-set-Yocto-based-GCC-install-search-path.patch => 0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch} (90%) rename recipes-devtools/clang/clang/{0027-compiler-rt-Include-stddef.h.patch => 0024-compiler-rt-Include-stddef.h.patch} (80%) rename recipes-devtools/clang/clang/{0028-llvm-Do-not-use-find_library-for-ncurses.patch => 0025-llvm-Do-not-use-find_library-for-ncurses.patch} (92%) rename recipes-devtools/clang/clang/{0029-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch => 0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch} (86%) rename recipes-devtools/clang/clang/{0031-compiler-rt-Use-mcr-based-barrier-on-armv6.patch => 0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch} (96%) rename recipes-devtools/clang/clang/{0032-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch => 0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch} (87%) delete mode 100644 recipes-devtools/clang/clang/0030-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch delete mode 100644 recipes-devtools/clang/clang/0036-libc-LWG2993-reference_wrapper-T-conversion-from-U.patch diff --git a/conf/layer.conf b/conf/layer.conf index 19e348ba..6fa70add 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 = "12.0.0" +LLVMVERSION = "13.0.0" require conf/nonclangable.conf require conf/nonscanable.conf diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 6a080462..86e937f2 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -4,14 +4,14 @@ LLVM_DIR = "llvm${LLVM_RELEASE}" LLVM_GIT ?= "git://github.com/llvm" LLVM_GIT_PROTOCOL ?= "https" -MAJOR_VER = "12" +MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "fa0971b87fb2c9d14d1bba2551e61f02f18f329b" +SRCREV ?= "08d31ff4f45f795afb6648bc00257d60ff2f8204" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" -BRANCH = "release/${MAJOR_VER}.x" +BRANCH = "main" LLVMMD5SUM = "8a15a0759ef07f2682d2ba4b893c9afe" CLANGMD5SUM = "ff42885ed2ab98f1ecb8c1fc41205343" diff --git a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch index c1ba4325..5a0c33d2 100644 --- a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch +++ b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch @@ -1,4 +1,4 @@ -From 42e6673563ca1d0e433e16c3eefa20b98e280ebd Mon Sep 17 00:00:00 2001 +From b737bad67076c8c5a3f19f0808f7b5e4da616a5b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 22 May 2017 17:36:16 -0700 Subject: [PATCH] lldb: Add -lxml2 to linker cmdline of xml is found @@ -23,10 +23,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt -index 7456cb98bfa1..1a732ec5cb89 100644 +index a018fd6c183d..936bdd461350 100644 --- a/lldb/source/Host/CMakeLists.txt +++ b/lldb/source/Host/CMakeLists.txt -@@ -138,7 +138,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "NetBSD") +@@ -137,7 +137,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "NetBSD") list(APPEND EXTRA_LIBS kvm) endif() if (LLDB_ENABLE_LIBXML2) diff --git a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch index f101e772..da33f563 100644 --- a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch +++ b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch @@ -1,4 +1,4 @@ -From da63df8f02b3a767b68d6de730bb63bba6c3ce33 Mon Sep 17 00:00:00 2001 +From 854f2bcd9770dd31641c89be6fa2603ac339d818 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 27 Aug 2017 10:37:49 -0700 Subject: [PATCH] libcxxabi: Find libunwind headers when @@ -17,10 +17,10 @@ Signed-off-by: Khem Raj 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index 426c855288fc..06a62c642898 100644 +index d4eb01ce3888..5fe5b54371d1 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt -@@ -478,14 +478,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") +@@ -516,14 +516,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") # Setup Source Code #=============================================================================== @@ -36,7 +36,7 @@ index 426c855288fc..06a62c642898 100644 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} ${LIBCXXABI_LIBUNWIND_PATH}/include ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES} -@@ -496,15 +491,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) +@@ -534,15 +529,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) NO_CMAKE_FIND_ROOT_PATH ) diff --git a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch index e8536d37..589833ef 100644 --- a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch +++ b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch @@ -1,4 +1,4 @@ -From cfeba7ac05c96abddfad1eeb827ba8d0c968ec94 Mon Sep 17 00:00:00 2001 +From c4fa88657785e8ca179e39c6ec819960fd95c0f9 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/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch index 8b8edd80..ab6679ac 100644 --- a/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch +++ b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch @@ -1,4 +1,4 @@ -From 6c786d55d560abca076b7c1b718cdcb31ef5b388 Mon Sep 17 00:00:00 2001 +From 4b29b554ef9bfcbbcadd70f355df2f1eca55fade 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 @@ -20,10 +20,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 b44ad2c2118e..ed8f4bd80e93 100644 +index c9939acfd710..57fe7bc635ed 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt -@@ -72,7 +72,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOL +@@ -74,7 +74,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOL "Build for a bare-metal target.") if (COMPILER_RT_STANDALONE_BUILD) diff --git a/recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch similarity index 97% rename from recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch rename to recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index 4e1120a1..a22c6dd2 100644 --- a/recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch @@ -1,4 +1,4 @@ -From 4afcffd0c4b3317b5b5e08e3372b2923ab471e4b Mon Sep 17 00:00:00 2001 +From 91de17d8a3b8efa9758c7f393ae8647eb159657f 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 diff --git a/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch similarity index 95% rename from recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch rename to recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch index 4df2d622..29010452 100644 --- a/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From 4ed6b8848edbe1c453ce0d23d33551ff023f4fb2 Mon Sep 17 00:00:00 2001 +From b1c948df03ae8784f0078b9a23d78dff5cdb7175 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 path diff --git a/recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch similarity index 87% rename from recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch rename to recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch index ea28de04..ba1466e7 100644 --- a/recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch +++ b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch @@ -1,4 +1,4 @@ -From 15008103e23b5e1cd65bcc32746aa41579583dc5 Mon Sep 17 00:00:00 2001 +From 3a53f9b0fba8586c531db93fee524a4e4ca2017c 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 @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 1 file changed, 16 insertions(+) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 9663a7390ada..06b92cc0bf5b 100644 +index e855d337ae64..95d88e0c6d79 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -507,11 +507,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -479,11 +479,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = "lib64"; Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; @@ -37,7 +37,7 @@ index 9663a7390ada..06b92cc0bf5b 100644 break; case llvm::Triple::riscv32: { StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple); -@@ -533,6 +541,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -505,6 +513,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { case llvm::Triple::sparcv9: LibDir = "lib64"; Loader = "ld-linux.so.2"; @@ -48,7 +48,7 @@ index 9663a7390ada..06b92cc0bf5b 100644 break; case llvm::Triple::systemz: LibDir = "lib"; -@@ -547,6 +559,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -519,6 +531,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/0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch similarity index 86% rename from recipes-devtools/clang/clang/0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch rename to recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index a0d116b0..3a7da762 100644 --- a/recipes-devtools/clang/clang/0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch +++ b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch @@ -1,4 +1,4 @@ -From 1b2f69bc1938d4d65dd88c2e43e1bd160312d074 Mon Sep 17 00:00:00 2001 +From f4aa83e324b98622e1174d00d51852289ae1349d 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 @@ -13,10 +13,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 1d8a3cdce92a..195a302c8771 100644 +index a27841dc5985..e0be5e43a10b 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -628,6 +628,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, +@@ -630,6 +630,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (IsIAMCU) CmdArgs.push_back("-lgloss"); diff --git a/recipes-devtools/clang/clang/0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch similarity index 84% rename from recipes-devtools/clang/clang/0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch rename to recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch index 8c2ddeb9..30404070 100644 --- a/recipes-devtools/clang/clang/0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch @@ -1,4 +1,4 @@ -From 7ab52935bc6bd89529a2478af1ea2cdf192eb0d9 Mon Sep 17 00:00:00 2001 +From 081f27d53afe592fb8d7b3c4e8a0e2e8be4ee439 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 02:00:11 -0700 Subject: [PATCH] clang: musl/ppc does not support 128-bit long double @@ -9,10 +9,10 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+) diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h -index 56c8f33ef221..b7e7edf270be 100644 +index 554f2174fee0..18bcfd173ede 100644 --- a/clang/lib/Basic/Targets/PPC.h +++ b/clang/lib/Basic/Targets/PPC.h -@@ -386,6 +386,10 @@ public: +@@ -389,6 +389,10 @@ public: LongDoubleFormat = &llvm::APFloat::IEEEdouble(); } diff --git a/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch similarity index 88% rename from recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch rename to recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch index 88d1868c..45ec740e 100644 --- a/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From af7639bf4db497300060a22f2cc94b37145b8db5 Mon Sep 17 00:00:00 2001 +From bf9255d8abec8f8589e8700fff96dace5c986ad5 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 @@ -24,10 +24,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 06b92cc0bf5b..726308413dc9 100644 +index 95d88e0c6d79..d2ccbe635208 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -218,7 +218,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) +@@ -182,7 +182,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) Multilibs = GCCInstallation.getMultilibs(); SelectedMultilib = GCCInstallation.getMultilib(); llvm::Triple::ArchType Arch = Triple.getArch(); diff --git a/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch similarity index 89% rename from recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch rename to recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index 1e9d395d..bde7bf19 100644 --- a/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From f946307a70619c45919ac06fa37c267fd25c3ec8 Mon Sep 17 00:00:00 2001 +From 322063cbeb3de0719183b38ec3aab5334de28641 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 @@ -15,7 +15,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 b2ddef141a75..784a946b453f 100644 +index 3342de85fc30..671d308e2efc 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -14,6 +14,7 @@ @@ -26,7 +26,7 @@ index b2ddef141a75..784a946b453f 100644 #include "clang/Config/config.h" #include "clang/Driver/Action.h" #include "clang/Driver/Driver.h" -@@ -404,7 +405,10 @@ StringRef ToolChain::getOSLibName() const { +@@ -407,7 +408,10 @@ StringRef ToolChain::getOSLibName() const { } std::string ToolChain::getCompilerRTPath() const { diff --git a/recipes-devtools/clang/clang/0013-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch similarity index 66% rename from recipes-devtools/clang/clang/0013-clang-Define-releative-gcc-installation-dir.patch rename to recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch index 1b07e5a0..1acce6c1 100644 --- a/recipes-devtools/clang/clang/0013-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch @@ -1,6 +1,6 @@ -From 9c61a33cec25c8f2e0a90d5109808131d2e51c2d Mon Sep 17 00:00:00 2001 +From 017ff83dee2dce1a0940abdab1e32780cb86bc30 Mon Sep 17 00:00:00 2001 From: Khem Raj -Date: Sun, 21 May 2017 15:38:25 -0700 +Date: Sat, 20 Mar 2021 16:09:16 -0700 Subject: [PATCH] clang: Define / releative gcc installation dir This is required for OE gcc installation to work. @@ -10,14 +10,14 @@ installation in OE Signed-off-by: Khem Raj --- - clang/lib/Driver/ToolChains/Gnu.cpp | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) + 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 195a302c8771..05d1d3003881 100644 +index e0be5e43a10b..19c13afe048d 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2514,12 +2514,6 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2529,19 +2529,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( // Whether this library suffix is relevant for the triple. bool Active; } Suffixes[] = { @@ -30,16 +30,17 @@ index 195a302c8771..05d1d3003881 100644 // The Freescale PPC SDK has the gcc libraries in // /usr/lib//x.y.z so have a look there as well. Only do // this on Freescale triples, though, since some systems put a *lot* of -@@ -2528,6 +2522,12 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( + // files in that location, not just GCC installation data. + {CandidateTriple.str(), "..", TargetTriple.getVendor() == llvm::Triple::Freescale || - TargetTriple.getVendor() == llvm::Triple::OpenEmbedded}, - +- TargetTriple.getVendor() == llvm::Triple::OpenEmbedded}}; ++ TargetTriple.getVendor() == llvm::Triple::OpenEmbedded}, ++ + // This is the normal place. + {"gcc/" + CandidateTriple.str(), "../..", GCCDirExists}, + + // Debian puts cross-compilers in gcc-cross. -+ {"gcc-cross/" + CandidateTriple.str(), "../..", GCCCrossDirExists}, -+ - // Natively multiarch systems sometimes put the GCC triple-specific - // directory within their multiarch lib directory, resulting in the - // triple appearing twice. ++ {"gcc-cross/" + CandidateTriple.str(), "../..", GCCCrossDirExists}}; + + for (auto &Suffix : Suffixes) { + if (!Suffix.Active) diff --git a/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch similarity index 53% rename from recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch rename to recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index a785bdac..3584d70a 100644 --- a/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From c309e121d6aca050119084e3e98371cd8e44ecca Mon Sep 17 00:00:00 2001 +From b40a8752cea684e392a25f45028493711352e1e2 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 @@ -16,25 +16,23 @@ therefore we need to link in libpthread and libdl to fill these symbols Signed-off-by: Khem Raj --- - clang/lib/Driver/ToolChains/CommonArgs.cpp | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) + clang/lib/Driver/ToolChains/CommonArgs.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp -index bcaea71dca94..95b806e29ef2 100644 +index b74a9fe3eb92..4c7a2ec15a2e 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -1423,8 +1423,13 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, - // Let the linker choose between libunwind.dll.a and libunwind.a - // depending on what's available, and depending on the -static flag - CmdArgs.push_back("-lunwind"); -- } else -+ } else { - CmdArgs.push_back("-l:libunwind.so"); -+ if (Args.hasArg(options::OPT_static)) { -+ CmdArgs.push_back("-lpthread"); -+ CmdArgs.push_back("-ldl"); -+ } -+ } +@@ -1444,8 +1444,11 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, break; } - + case ToolChain::UNW_CompilerRT: +- if (LGT == LibGccType::StaticLibGcc) ++ if (LGT == LibGccType::StaticLibGcc) { + CmdArgs.push_back("-l:libunwind.a"); ++ CmdArgs.push_back("-lpthread"); ++ CmdArgs.push_back("-ldl"); ++ } + else if (TC.getTriple().isOSCygMing()) { + if (LGT == LibGccType::SharedLibGcc) + CmdArgs.push_back("-l:libunwind.dll.a"); diff --git a/recipes-devtools/clang/clang/0017-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch similarity index 94% rename from recipes-devtools/clang/clang/0017-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch rename to recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index 3f2e16ba..3b373710 100644 --- a/recipes-devtools/clang/clang/0017-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From 00449fb89e8ab3b34f03d3a09a4d859e5d0a8245 Mon Sep 17 00:00:00 2001 +From 6cdc2ea0f1d738e8fd03c6f5d29bc1a22d46aeac 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 diff --git a/recipes-devtools/clang/clang/0014-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch b/recipes-devtools/clang/clang/0014-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch deleted file mode 100644 index 67cc8deb..00000000 --- a/recipes-devtools/clang/clang/0014-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 3166a3b59f406de57f04a0b6fd0f3f1eabfaaa37 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 16 Aug 2017 15:16:15 -0700 -Subject: [PATCH] clang: Fix ldso for musl on x86 and x32 architectures - -x32 linker is called ld-musl-x32.so.1 and x86 linker -is called ld-musl-i386.so.1, Currently, linker for -x86 is returned as ld-musl-i586.so.1, when default -arch is i586, which is not the right thing - -Signed-off-by: Khem Raj ---- - clang/lib/Driver/ToolChains/Linux.cpp | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 726308413dc9..b64396647882 100644 ---- a/clang/lib/Driver/ToolChains/Linux.cpp -+++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -426,6 +426,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { - if (Triple.isMusl()) { - std::string ArchName; - bool IsArm = false; -+ bool isX32 = false; - - switch (Arch) { - case llvm::Triple::arm: -@@ -438,6 +439,13 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { - ArchName = "armeb"; - IsArm = true; - break; -+ case llvm::Triple::x86: -+ ArchName = "i386"; -+ break; -+ case llvm::Triple::x86_64: -+ isX32 = Triple.getEnvironment() == llvm::Triple::GNUX32; -+ ArchName = isX32 ? "x32" : Triple.getArchName().str(); -+ break; - default: - ArchName = Triple.getArchName().str(); - } diff --git a/recipes-devtools/clang/clang/0018-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch similarity index 94% rename from recipes-devtools/clang/clang/0018-Check-for-atomic-double-intrinsics.patch rename to recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch index 800b58e3..baa2fa48 100644 --- a/recipes-devtools/clang/clang/0018-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From 761be2d8d20d9ebe93fa33719bdd0d25396d812d Mon Sep 17 00:00:00 2001 +From 1a89fa157e92e70a9ca33fecd12fd12743c32b0b 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/0015-clang-scan-view-needs-python-2.x.patch b/recipes-devtools/clang/clang/0015-clang-scan-view-needs-python-2.x.patch deleted file mode 100644 index 46b6995c..00000000 --- a/recipes-devtools/clang/clang/0015-clang-scan-view-needs-python-2.x.patch +++ /dev/null @@ -1,24 +0,0 @@ -From bd42395fa181d5821f0d756d12c534f2cda525c0 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 15 May 2018 10:28:43 -0700 -Subject: [PATCH] clang: scan-view needs python 2.x - -Some distributions e.g. archlinux have switched to pointing -python to python3, therefore its better to be specific about -python version needed. - -Signed-off-by: Khem Raj ---- - clang/tools/scan-view/bin/scan-view | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/clang/tools/scan-view/bin/scan-view b/clang/tools/scan-view/bin/scan-view -index 6165432e7af8..04ad518a60cd 100755 ---- a/clang/tools/scan-view/bin/scan-view -+++ b/clang/tools/scan-view/bin/scan-view -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - from __future__ import print_function - diff --git a/recipes-devtools/clang/clang/0019-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch similarity index 87% rename from recipes-devtools/clang/clang/0019-clang-Enable-SSP-and-PIE-by-default.patch rename to recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch index 164503fe..1b554dfa 100644 --- a/recipes-devtools/clang/clang/0019-clang-Enable-SSP-and-PIE-by-default.patch +++ b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch @@ -1,4 +1,4 @@ -From d0f788c1fb3d00350c51e88302ecbcf3506e4b53 Mon Sep 17 00:00:00 2001 +From f44a8afe89238ba008d3452c295868aea221ba4b Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Thu, 26 Dec 2019 15:46:19 -0800 Subject: [PATCH] clang: Enable SSP and PIE by default @@ -37,10 +37,10 @@ Signed-off-by: Khem Raj 13 files changed, 42 insertions(+), 30 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index b64396647882..604024bb3df4 100644 +index d2ccbe635208..5bd2e5061f3c 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -856,8 +856,14 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs, +@@ -671,8 +671,14 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs, } bool Linux::isPIEDefault() const { @@ -56,12 +56,12 @@ index b64396647882..604024bb3df4 100644 + return true; } - bool Linux::isNoExecStackDefault() const { + bool Linux::IsAArch64OutlineAtomicsDefault(const ArgList &Args) const { diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h -index 6b16b0e64990..582d4bef81df 100644 +index 169a37c44072..b3544a0c7681 100644 --- a/clang/lib/Driver/ToolChains/Linux.h +++ b/clang/lib/Driver/ToolChains/Linux.h -@@ -39,6 +39,10 @@ public: +@@ -46,6 +46,10 @@ public: bool isPIEDefault() const override; bool isNoExecStackDefault() const override; bool IsMathErrnoDefault() const override; @@ -73,68 +73,68 @@ index 6b16b0e64990..582d4bef81df 100644 void addProfileRTLibs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override; diff --git a/clang/test/Driver/cross-linux.c b/clang/test/Driver/cross-linux.c -index 6c2dab260695..c28c5653e348 100644 +index 59f5a97d2d9d..8d0e9e724aa0 100644 --- a/clang/test/Driver/cross-linux.c +++ b/clang/test/Driver/cross-linux.c -@@ -42,8 +42,8 @@ - // CHECK-MULTI32-I386: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\\\}}ld" +@@ -43,8 +43,8 @@ + // CHECK-MULTI32-I386: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/10.2.0/../../../../i386-unknown-linux/bin{{/|\\\\}}ld" // CHECK-MULTI32-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" // CHECK-MULTI32-I386: "-m" "elf_i386" --// CHECK-MULTI32-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]{{/|\\\\}}crtbegin.o" +-// CHECK-MULTI32-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/10.2.0]]{{/|\\\\}}crtbegin.o" -// CHECK-MULTI32-I386: "-L[[gcc_install]]" +// CHECK-MULTI32-I386: "crti.o" "crtbeginS.o" -+// CHECK-MULTI32-I386: "-L[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]" ++// CHECK-MULTI32-I386: "-L[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/10.2.0]]" // CHECK-MULTI32-I386: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib/../lib32" // CHECK-MULTI32-I386: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib" // CHECK-MULTI32-I386: "-L[[sysroot]]/lib" -@@ -60,8 +60,8 @@ - // CHECK-MULTI32-X86-64: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\\\}}ld" +@@ -61,8 +61,8 @@ + // CHECK-MULTI32-X86-64: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/10.2.0/../../../../i386-unknown-linux/bin{{/|\\\\}}ld" // CHECK-MULTI32-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" // CHECK-MULTI32-X86-64: "-m" "elf_x86_64" --// CHECK-MULTI32-X86-64: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]/64{{/|\\\\}}crtbegin.o" +-// CHECK-MULTI32-X86-64: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/10.2.0]]/64{{/|\\\\}}crtbegin.o" -// CHECK-MULTI32-X86-64: "-L[[gcc_install]]/64" +// CHECK-MULTI32-X86-64: "crti.o" "crtbeginS.o" -+// CHECK-MULTI32-X86-64: "-L[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]/64" ++// CHECK-MULTI32-X86-64: "-L[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/10.2.0]]/64" // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib/../lib64" - // CHECK-MULTI32-X86-64: "-L[[gcc_install]]" // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib" + // CHECK-MULTI32-X86-64: "-L[[sysroot]]/lib" @@ -79,8 +79,8 @@ - // CHECK-MULTI64-I386: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}ld" + // CHECK-MULTI64-I386: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}ld" // CHECK-MULTI64-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" // CHECK-MULTI64-I386: "-m" "elf_i386" --// CHECK-MULTI64-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]/32{{/|\\\\}}crtbegin.o" +-// CHECK-MULTI64-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0]]/32{{/|\\\\}}crtbegin.o" -// CHECK-MULTI64-I386: "-L[[gcc_install]]/32" +// CHECK-MULTI64-I386: "crti.o" "crtbeginS.o" -+// CHECK-MULTI64-I386: "-L[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]/32" ++// CHECK-MULTI64-I386: "-L[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0]]/32" // CHECK-MULTI64-I386: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib32" - // CHECK-MULTI64-I386: "-L[[gcc_install]]" // CHECK-MULTI64-I386: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib" -@@ -98,8 +98,8 @@ - // CHECK-MULTI64-X86-64: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}ld" + // CHECK-MULTI64-I386: "-L[[sysroot]]/lib" +@@ -97,8 +97,8 @@ + // CHECK-MULTI64-X86-64: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}ld" // CHECK-MULTI64-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" // CHECK-MULTI64-X86-64: "-m" "elf_x86_64" --// CHECK-MULTI64-X86-64: "crti.o" "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]{{/|\\\\}}crtbegin.o" +-// CHECK-MULTI64-X86-64: "crti.o" "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0]]{{/|\\\\}}crtbegin.o" -// CHECK-MULTI64-X86-64: "-L[[gcc_install]]" +// CHECK-MULTI64-X86-64: "crti.o" "crtbeginS.o" -+// CHECK-MULTI64-X86-64: "-L[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]" ++// CHECK-MULTI64-X86-64: "-L[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0]]" // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib64" // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib" // CHECK-MULTI64-X86-64: "-L[[sysroot]]/lib" diff --git a/clang/test/Driver/env.c b/clang/test/Driver/env.c -index 0371bc91c4a3..ea89f5251217 100644 +index e9b86cbcf428..47f304c0420d 100644 --- a/clang/test/Driver/env.c +++ b/clang/test/Driver/env.c -@@ -20,7 +20,7 @@ +@@ -22,7 +22,7 @@ // // CHECK-LD-32-NOT: warning: // CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" --// CHECK-LD-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o" +-// CHECK-LD-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/10.2.0{{/|\\\\}}crtbegin.o" +// CHECK-LD-32: "crtbeginS.o" - // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0" - // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib" - // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.." + // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/10.2.0" + // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/10.2.0/../../../../i386-unknown-linux/lib" + // CHECK-LD-32: "-L[[SYSROOT]]/lib" diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c -index 8926d55a0cf4..40f628ccae45 100644 +index 7febfd02a1ad..1381d9018e32 100644 --- a/clang/test/Driver/fsanitize.c +++ b/clang/test/Driver/fsanitize.c @@ -330,15 +330,15 @@ @@ -157,7 +157,7 @@ index 8926d55a0cf4..40f628ccae45 100644 // CHECK-NO-PIE-NOT: "-pie" // CHECK-NO-PIE: "-mrelocation-model" "static" -@@ -667,12 +667,12 @@ +@@ -673,12 +673,12 @@ // RUN: %clang -fno-sanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NOSP // NOSP-NOT: "-fsanitize=safe-stack" @@ -174,17 +174,18 @@ index 8926d55a0cf4..40f628ccae45 100644 // NO-SP-NOT: stack-protector // NO-SP: "-fsanitize=safe-stack" diff --git a/clang/test/Driver/gcc-toolchain.cpp b/clang/test/Driver/gcc-toolchain.cpp -index 6c872f4255c3..f5006d1dd9ab 100644 +index 7cdba0841b8c..e2b3c6b04f08 100644 --- a/clang/test/Driver/gcc-toolchain.cpp +++ b/clang/test/Driver/gcc-toolchain.cpp -@@ -26,6 +26,6 @@ +@@ -23,7 +23,7 @@ // the same precise formatting of the path as the '-internal-system' flags // above, so we just blanket wildcard match the 'crtbegin.o'. // CHECK: "{{[^"]*}}ld{{(.exe)?}}" --// CHECK: "{{[^"]*}}/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5{{/|\\\\}}crtbegin.o" -+// CHECK: "crtbeginS.o" - // CHECK: "-L[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5" - // CHECK: "-L[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../.." +-// CHECK-SAME: "{{[^"]*}}/usr/lib/gcc/x86_64-linux-gnu/4.8{{/|\\\\}}crtbegin.o" ++// CHECK-SAME: "crtbeginS.o" + // CHECK-SAME: "-L[[TOOLCHAIN]]/usr/lib/gcc/x86_64-linux-gnu/4.8" + /// On x86_64, there is an extra usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu but we should not test it. + diff --git a/clang/test/Driver/hexagon-toolchain-elf.c b/clang/test/Driver/hexagon-toolchain-elf.c index cc11f9fcba9e..1fe8b5db587b 100644 --- a/clang/test/Driver/hexagon-toolchain-elf.c @@ -221,10 +222,11 @@ index 0959bd7ba0a1..4056a672b6f9 100644 // CHECK-SPARCV9PIC: as // CHECK-SPARCV9PIC: -64 diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c -index 24d3c78643f8..9ea22e6e0f64 100644 +index cc505588331b..c7f81d2c5e49 100644 --- a/clang/test/Driver/linux-ld.c +++ b/clang/test/Driver/linux-ld.c -@@ -1,3 +1,5 @@ +@@ -1,4 +1,6 @@ + // UNSUPPORTED: system-windows +// XFAIL: linux + // General tests that ld invocations on Linux targets sane. Note that we use diff --git a/recipes-devtools/clang/clang/0020-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch similarity index 84% rename from recipes-devtools/clang/clang/0020-libcxx-Add-compiler-runtime-library-to-link-step-for.patch rename to recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index 1500fc91..d5a4e5a5 100644 --- a/recipes-devtools/clang/clang/0020-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -1,4 +1,4 @@ -From 5c0a4264ad87c880ade430022e0f128da86bbf6d Mon Sep 17 00:00:00 2001 +From 405d32adeeba5b003649c75c49db1194d9bd86ba 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 9965104cb5b2..bee4d80bc67a 100644 +index 87b71f7ba334..412374e8820e 100644 --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt -@@ -177,7 +177,7 @@ split_list(LIBCXX_LINK_FLAGS) +@@ -189,7 +189,7 @@ split_list(LIBCXX_LINK_FLAGS) if (LIBCXX_ENABLE_SHARED) add_library(cxx_shared SHARED ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS}) target_link_libraries(cxx_shared PUBLIC cxx-headers @@ -26,12 +26,12 @@ index 9965104cb5b2..bee4d80bc67a 100644 set_target_properties(cxx_shared PROPERTIES COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}" -@@ -252,7 +252,7 @@ endif() +@@ -266,7 +266,7 @@ set(CMAKE_STATIC_LIBRARY_PREFIX "lib") if (LIBCXX_ENABLE_STATIC) add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS}) target_link_libraries(cxx_static PUBLIC cxx-headers - PRIVATE ${LIBCXX_LIBRARIES}) + PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)") - set(CMAKE_STATIC_LIBRARY_PREFIX "lib") set_target_properties(cxx_static PROPERTIES + COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}" diff --git a/recipes-devtools/clang/clang/0021-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch similarity index 68% rename from recipes-devtools/clang/clang/0021-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch rename to recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index a9cd7a7d..e6877427 100644 --- a/recipes-devtools/clang/clang/0021-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -1,4 +1,4 @@ -From 12fe6e45d18add7da95fe637f9e21425330666f9 Mon Sep 17 00:00:00 2001 +From 863e525e1ee6621f198ee1602702263f803f3ecd 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 @@ -26,32 +26,24 @@ Upstream-Status: Innapropriate [oe-specific] Signed-off-by: Ovidiu Panait --- - clang/cmake/modules/AddClang.cmake | 8 -------- - llvm/cmake/modules/AddLLVM.cmake | 18 ------------------ - llvm/cmake/modules/TableGen.cmake | 7 ------- - 3 files changed, 33 deletions(-) + clang/cmake/modules/AddClang.cmake | 2 -- + llvm/cmake/modules/AddLLVM.cmake | 6 ------ + llvm/cmake/modules/TableGen.cmake | 7 ------- + 3 files changed, 15 deletions(-) diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake -index 704278a0e93b..6ea99c90772c 100644 +index 5752f4277444..f40ea35faf46 100644 --- a/clang/cmake/modules/AddClang.cmake +++ b/clang/cmake/modules/AddClang.cmake -@@ -161,15 +161,8 @@ macro(add_clang_tool name) - add_dependencies(${name} clang-resource-headers) - +@@ -158,7 +158,6 @@ macro(add_clang_tool name) if (CLANG_BUILD_TOOLS) -- set(export_to_clangtargets) -- if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR -- NOT LLVM_DISTRIBUTION_COMPONENTS) -- set(export_to_clangtargets EXPORT ClangTargets) -- set_property(GLOBAL PROPERTY CLANG_HAS_EXPORTS True) -- endif() - + get_target_export_arg(${name} Clang export_to_clangtargets) install(TARGETS ${name} - ${export_to_clangtargets} RUNTIME DESTINATION bin COMPONENT ${name}) -@@ -178,7 +171,6 @@ macro(add_clang_tool name) +@@ -167,7 +166,6 @@ macro(add_clang_tool name) DEPENDS ${name} COMPONENT ${name}) endif() @@ -60,26 +52,18 @@ index 704278a0e93b..6ea99c90772c 100644 endmacro() diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index 97c9980c7de3..2cb2ead31ba0 100644 +index f3b27937fd8e..a48040a45275 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -1210,15 +1210,8 @@ macro(add_llvm_tool name) - - if ( ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) +@@ -1209,7 +1209,6 @@ macro(add_llvm_tool name) if( LLVM_BUILD_TOOLS ) -- set(export_to_llvmexports) -- if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR -- NOT LLVM_DISTRIBUTION_COMPONENTS) -- set(export_to_llvmexports EXPORT LLVMExports) -- set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True) -- endif() - + get_target_export_arg(${name} LLVM export_to_llvmexports) install(TARGETS ${name} - ${export_to_llvmexports} RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR} COMPONENT ${name}) -@@ -1229,9 +1222,6 @@ macro(add_llvm_tool name) +@@ -1220,9 +1219,6 @@ macro(add_llvm_tool name) endif() endif() endif() @@ -89,23 +73,15 @@ index 97c9980c7de3..2cb2ead31ba0 100644 set_target_properties(${name} PROPERTIES FOLDER "Tools") endmacro(add_llvm_tool name) -@@ -1269,15 +1259,8 @@ macro(add_llvm_utility name) - set_target_properties(${name} PROPERTIES FOLDER "Utils") - if ( ${name} IN_LIST LLVM_TOOLCHAIN_UTILITIES OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) +@@ -1262,7 +1258,6 @@ macro(add_llvm_utility name) if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS) -- set(export_to_llvmexports) -- if (${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR -- NOT LLVM_DISTRIBUTION_COMPONENTS) -- set(export_to_llvmexports EXPORT LLVMExports) -- set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True) -- endif() - + get_target_export_arg(${name} LLVM export_to_llvmexports) install(TARGETS ${name} - ${export_to_llvmexports} RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} COMPONENT ${name}) -@@ -1286,7 +1269,6 @@ macro(add_llvm_utility name) +@@ -1271,7 +1266,6 @@ macro(add_llvm_utility name) DEPENDS ${name} COMPONENT ${name}) endif() diff --git a/recipes-devtools/clang/clang/0022-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch similarity index 90% rename from recipes-devtools/clang/clang/0022-clang-Fix-resource-dir-location-for-cross-toolchains.patch rename to recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch index da4e3fee..545cd1f8 100644 --- a/recipes-devtools/clang/clang/0022-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From 6ad331a0e464ee28eac7d0a1c658cd007e831297 Mon Sep 17 00:00:00 2001 +From e12f10a878d1ddb797204f07b4aee3ac52a10591 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 @@ -19,10 +19,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 418e1d3e8ec9..44c9f6e59d3f 100644 +index 25af909d9bd2..87dd4a74c99c 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp -@@ -119,7 +119,13 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath, +@@ -121,7 +121,13 @@ 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/0023-fix-path-to-libffi.patch b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch similarity index 94% rename from recipes-devtools/clang/clang/0023-fix-path-to-libffi.patch rename to recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch index e22c0bdc..95b1c362 100644 --- a/recipes-devtools/clang/clang/0023-fix-path-to-libffi.patch +++ b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch @@ -1,4 +1,4 @@ -From cbcfe7d13dfc5644c9b8a48e951b43bc15d9f4cf Mon Sep 17 00:00:00 2001 +From 0407ee030cf435da660461f3a3cc1c8c7909b8b8 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Fri, 3 Apr 2020 15:10:37 +0800 Subject: [PATCH] fix path to libffi diff --git a/recipes-devtools/clang/clang/0024-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch similarity index 89% rename from recipes-devtools/clang/clang/0024-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch rename to recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index 521f06d4..a36f1179 100644 --- a/recipes-devtools/clang/clang/0024-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From 5f3d1b71c3e87017dfa471f1561f6c28f34a77f8 Mon Sep 17 00:00:00 2001 +From 673c58b89a0ca84a33aa760809c7cc6754928af4 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 @@ -18,10 +18,10 @@ Signed-off-by: Khem Raj 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 604024bb3df4..812599cdaf84 100644 +index 5bd2e5061f3c..8a63dd8c0e60 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -515,8 +515,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -479,8 +479,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = "lib64"; Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; @@ -32,7 +32,7 @@ index 604024bb3df4..812599cdaf84 100644 LibDir = "lib"; } break; -@@ -524,8 +524,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -488,8 +488,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = "lib64"; Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; @@ -43,7 +43,7 @@ index 604024bb3df4..812599cdaf84 100644 LibDir = "lib"; } break; -@@ -549,8 +549,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -513,8 +513,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { case llvm::Triple::sparcv9: LibDir = "lib64"; Loader = "ld-linux.so.2"; @@ -54,7 +54,7 @@ index 604024bb3df4..812599cdaf84 100644 LibDir = "lib"; } break; -@@ -567,8 +567,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -531,8 +531,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/0025-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch similarity index 85% rename from recipes-devtools/clang/clang/0025-clang-Use-python3-in-python-scripts.patch rename to recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch index defbc8d9..8c204f08 100644 --- a/recipes-devtools/clang/clang/0025-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From fd3696213eed77e8c217be0ded0e220c0b597f1e Mon Sep 17 00:00:00 2001 +From 00cda4dc84261e3cae5d484d5b6bc0059880852f 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 @@ -14,11 +14,10 @@ Signed-off-by: Khem Raj clang-tools-extra/clang-tidy/rename_check.py | 2 +- clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py | 2 +- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | 2 +- - clang/tools/clang-format/clang-format-diff.py | 2 +- clang/tools/clang-format/git-clang-format | 2 +- clang/tools/scan-view/bin/scan-view | 2 +- clang/utils/hmaptool/hmaptool | 2 +- - 9 files changed, 9 insertions(+), 9 deletions(-) + 8 files changed, 8 insertions(+), 8 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 8655af137bb2..e95ba59a421c 100755 @@ -51,7 +50,7 @@ index 2410041fd5d2..976a02100cd6 100755 #===- rename_check.py - clang-tidy check renamer ------------*- 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 17086d15053e..a20b1f1f46b2 100755 +index 6bd05531333b..9e134123ef44 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 @@ @@ -70,18 +69,8 @@ index 313ecd2f9571..a298e38b1a45 100755 # #===- run-clang-tidy.py - Parallel clang-tidy runner --------*- python -*--===# # -diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py -index 6e653a134289..1c31192a4562 100755 ---- a/clang/tools/clang-format/clang-format-diff.py -+++ b/clang/tools/clang-format/clang-format-diff.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # - #===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===# - # diff --git a/clang/tools/clang-format/git-clang-format b/clang/tools/clang-format/git-clang-format -index ccd2f50fa4ad..cfcfb9fcbaef 100755 +index 3646b4ff41d7..a6a7393448c9 100755 --- a/clang/tools/clang-format/git-clang-format +++ b/clang/tools/clang-format/git-clang-format @@ -1,4 +1,4 @@ @@ -91,11 +80,11 @@ index ccd2f50fa4ad..cfcfb9fcbaef 100755 #===- git-clang-format - ClangFormat Git Integration ---------*- python -*--===# # diff --git a/clang/tools/scan-view/bin/scan-view b/clang/tools/scan-view/bin/scan-view -index 04ad518a60cd..07effbca5969 100755 +index 6165432e7af8..07effbca5969 100755 --- a/clang/tools/scan-view/bin/scan-view +++ b/clang/tools/scan-view/bin/scan-view @@ -1,4 +1,4 @@ --#!/usr/bin/env python2 +-#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/recipes-devtools/clang/clang/0026-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch similarity index 90% rename from recipes-devtools/clang/clang/0026-For-x86_64-set-Yocto-based-GCC-install-search-path.patch rename to recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index 801696e8..5b23945e 100644 --- a/recipes-devtools/clang/clang/0026-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From 13dedb0bbf780f7d66ddad8b1b33b3a1e0de2d25 Mon Sep 17 00:00:00 2001 +From 9601dddb6366e90725b364be6a21ddaa584557e2 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,14 +57,14 @@ 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 05d1d3003881..33b1d7fb7061 100644 +index 19c13afe048d..458acb47a45d 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2109,6 +2109,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( +@@ -2111,6 +2111,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", + "x86_64-oe-linux",//CLANG_EXTRA_OE_VENDORS_TRIPLES "x86_64-amazon-linux", "x86_64-linux-android"}; - static const char *const X32LibDirs[] = {"/libx32"}; - static const char *const X86LibDirs[] = {"/lib32", "/lib"}; + static const char *const X32Triples[] = {"x86_64-linux-gnux32", + "x86_64-pc-linux-gnux32"}; diff --git a/recipes-devtools/clang/clang/0027-compiler-rt-Include-stddef.h.patch b/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch similarity index 80% rename from recipes-devtools/clang/clang/0027-compiler-rt-Include-stddef.h.patch rename to recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch index 3bd41ea6..773911b3 100644 --- a/recipes-devtools/clang/clang/0027-compiler-rt-Include-stddef.h.patch +++ b/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch @@ -1,4 +1,4 @@ -From f5367ee64b6e74039c0957e1f7d81dc8d597804d Mon Sep 17 00:00:00 2001 +From 574ba321d2e58b8aa791b32a4bdbc3110e0978e0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 6 Feb 2021 12:44:30 -0800 Subject: [PATCH] compiler-rt: Include stddef.h @@ -14,14 +14,14 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+) diff --git a/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp b/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp -index b87798603fda..34e11727d77b 100644 +index b87798603fda..d5b0a42fd3fb 100644 --- a/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp -@@ -26,6 +26,7 @@ +@@ -25,6 +25,7 @@ + } #include - #include +#include // for size_t + #include #include // for dlsym() - static void *getFuncAddr(const char *name, uintptr_t wrapper_addr) { diff --git a/recipes-devtools/clang/clang/0028-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch similarity index 92% rename from recipes-devtools/clang/clang/0028-llvm-Do-not-use-find_library-for-ncurses.patch rename to recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch index ef9b2ed5..4c2d54cb 100644 --- a/recipes-devtools/clang/clang/0028-llvm-Do-not-use-find_library-for-ncurses.patch +++ b/recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch @@ -1,4 +1,4 @@ -From 6660c7d48601df4276fb3f51156c96fff103fb79 Mon Sep 17 00:00:00 2001 +From 6db98ec43e4dab2d4638a97caa81e5ef4b3f7310 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 @@ -17,7 +17,7 @@ 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 196aa62fd01c..49bbbd257d97 100644 +index 0b5b81259492..d9e6fd1083d8 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -140,7 +140,7 @@ else() @@ -30,7 +30,7 @@ index 196aa62fd01c..49bbbd257d97 100644 if(COMPILER_RT_TERMINFO_LIB) set(LLVM_ENABLE_TERMINFO 1) diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake -index 818fafbce148..2f8ad6652334 100644 +index d4cbf37d19a2..a320cf97b306 100644 --- a/llvm/cmake/config-ix.cmake +++ b/llvm/cmake/config-ix.cmake @@ -175,7 +175,7 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") diff --git a/recipes-devtools/clang/clang/0029-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch similarity index 86% rename from recipes-devtools/clang/clang/0029-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch rename to recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index a9658b37..00daa04d 100644 --- a/recipes-devtools/clang/clang/0029-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From 7bc8252aff944f2efeaad92c431b1f1c5cf606b1 Mon Sep 17 00:00:00 2001 +From 09a9c6735b682a4c622930cff3e0d549e9d638d2 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/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp -index 4f483c965282..ffd20d223133 100644 +index 88311546354b..8b2745deae88 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/lib/Support/Triple.cpp -@@ -489,7 +489,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) { +@@ -496,7 +496,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/0031-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch similarity index 96% rename from recipes-devtools/clang/clang/0031-compiler-rt-Use-mcr-based-barrier-on-armv6.patch rename to recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index 1f3af25d..f0153089 100644 --- a/recipes-devtools/clang/clang/0031-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From 4f45514fb8841a08d8d3bb68d9cb84b607e652f2 Mon Sep 17 00:00:00 2001 +From 16ee97fc3d678472f761e7ab8254ffef12ad6502 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 @@ -51,10 +51,10 @@ index c9623249e5d2..7a26170741ad 100644 #define MINMAX_4(rD, rN, rM, cmp_kind) \ diff --git a/compiler-rt/lib/builtins/assembly.h b/compiler-rt/lib/builtins/assembly.h -index f6ce6a9fccff..5c6cd9376ac4 100644 +index 9c015059af5a..aec4ff59beb7 100644 --- a/compiler-rt/lib/builtins/assembly.h +++ b/compiler-rt/lib/builtins/assembly.h -@@ -181,6 +181,14 @@ +@@ -183,6 +183,14 @@ JMP(ip) #endif diff --git a/recipes-devtools/clang/clang/0032-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch b/recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch similarity index 87% rename from recipes-devtools/clang/clang/0032-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch rename to recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch index a022a714..d52eb942 100644 --- a/recipes-devtools/clang/clang/0032-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch +++ b/recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch @@ -1,4 +1,4 @@ -From 1d07b3e71bf073da0a25b30efb135adaa876e3df Mon Sep 17 00:00:00 2001 +From 43733c59ee8fb7a4867f6f51fda1f449d6ce9013 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 15 Apr 2021 18:58:07 -0700 Subject: [PATCH] clang: Switch defaults to dwarf-5 debug info on Linux @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 1 file changed, 2 insertions(+) diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h -index 582d4bef81df..82c9494c744e 100644 +index b3544a0c7681..ae421580a017 100644 --- a/clang/lib/Driver/ToolChains/Linux.h +++ b/clang/lib/Driver/ToolChains/Linux.h -@@ -58,6 +58,8 @@ public: +@@ -65,6 +65,8 @@ public: const llvm::opt::ArgList &DriverArgs, const JobAction &JA, const llvm::fltSemantics *FPType = nullptr) const override; diff --git a/recipes-devtools/clang/clang/0030-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch b/recipes-devtools/clang/clang/0030-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch deleted file mode 100644 index 8093de0e..00000000 --- a/recipes-devtools/clang/clang/0030-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 4d51447a11ee6796594fd55718ea62575ecebc78 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 27 Nov 2020 10:11:08 +0000 -Subject: [PATCH] AsmMatcherEmitter: sort ClassInfo lists by name as well - -Otherwise, there are instances which are identical in -every other field and therefore sort non-reproducibly -(which breaks binary and source reproducibiliy). - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin -Signed-off-by: Khem Raj ---- - llvm/utils/TableGen/AsmMatcherEmitter.cpp | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp -index 9d304910ba4e..d1b50b04fc71 100644 ---- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp -+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp -@@ -359,7 +359,10 @@ public: - // name of a class shouldn't be significant. However, some of the backends - // accidentally rely on this behaviour, so it will have to stay like this - // until they are fixed. -- return ValueName < RHS.ValueName; -+ if (ValueName != RHS.ValueName) -+ return ValueName < RHS.ValueName; -+ // All else being equal, we should sort by name, for source and binary reproducibility -+ return Name < RHS.Name; - } - }; - diff --git a/recipes-devtools/clang/clang/0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch b/recipes-devtools/clang/clang/0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch index cefbf02a..68b8e44d 100644 --- a/recipes-devtools/clang/clang/0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch +++ b/recipes-devtools/clang/clang/0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch @@ -1,7 +1,7 @@ -From 9583baa3f6787236a2452937bbf962a2418f6423 Mon Sep 17 00:00:00 2001 +From 81360dd267eae6c34c4ab1000a1343b6488d84d5 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 5 Dec 2021 14:45:33 -0500 -Subject: [PATCH] [CMake] Installable find modules for terminfo and libffi +Subject: [PATCH] Installable find modules for terminfo and libffi Improves cross-distro portability of LLVM cmake package by resolving paths for terminfo and libffi via import targets. @@ -16,6 +16,7 @@ environment of the LLVM package importer. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D114327 + --- llvm/cmake/config-ix.cmake | 50 +++--------- llvm/cmake/modules/FindFFI.cmake | 81 +++++++++++++++++++ @@ -28,7 +29,7 @@ Differential Revision: https://reviews.llvm.org/D114327 create mode 100644 llvm/cmake/modules/FindTerminfo.cmake diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake -index 2f8ad6652334..ea0cd107a783 100644 +index a320cf97b306..21cadf1893c6 100644 --- a/llvm/cmake/config-ix.cmake +++ b/llvm/cmake/config-ix.cmake @@ -169,18 +169,13 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") @@ -56,7 +57,7 @@ index 2f8ad6652334..ea0cd107a783 100644 endif() else() set(LLVM_ENABLE_TERMINFO 0) -@@ -318,38 +313,19 @@ if (LLVM_ENABLE_DOXYGEN) +@@ -325,38 +320,19 @@ if (LLVM_ENABLE_DOXYGEN) llvm_find_program(dot) endif () @@ -100,8 +101,8 @@ index 2f8ad6652334..ea0cd107a783 100644 -endif( LLVM_ENABLE_FFI ) +endif() - # Whether we can use std::is_trivially_copyable to verify llvm::is_trivially_copyable. - CHECK_CXX_SOURCE_COMPILES(" + check_symbol_exists(proc_pid_rusage "libproc.h" HAVE_PROC_PID_RUSAGE) + diff --git a/llvm/cmake/modules/FindFFI.cmake b/llvm/cmake/modules/FindFFI.cmake new file mode 100644 index 000000000000..b0d859af8959 @@ -239,7 +240,7 @@ index 000000000000..65edb80fa69a + endif() +endif() diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in -index ac053141b008..42c1ea819717 100644 +index a71bef19fd0c..5a2fea5be399 100644 --- a/llvm/cmake/modules/LLVMConfig.cmake.in +++ b/llvm/cmake/modules/LLVMConfig.cmake.in @@ -2,6 +2,9 @@ @@ -294,7 +295,7 @@ index 9930e01559e9..14522ba2a1bf 100644 + target_link_libraries( LLVMInterpreter PRIVATE FFI::ffi ) endif() diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt -index cdee11412eb5..5909eeef056a 100644 +index 2242b0ec60ab..5cf80c1bb59d 100644 --- a/llvm/lib/Support/CMakeLists.txt +++ b/llvm/lib/Support/CMakeLists.txt @@ -24,7 +24,7 @@ elseif( CMAKE_HOST_UNIX ) @@ -306,7 +307,7 @@ index cdee11412eb5..5909eeef056a 100644 endif() if( LLVM_ENABLE_THREADS AND (HAVE_LIBATOMIC OR HAVE_CXX_LIBATOMICS64) ) set(system_libs ${system_libs} atomic) -@@ -249,7 +249,10 @@ if(LLVM_ENABLE_ZLIB) +@@ -256,7 +256,10 @@ if(LLVM_ENABLE_ZLIB) endif() if(LLVM_ENABLE_TERMINFO) diff --git a/recipes-devtools/clang/clang/0036-libc-LWG2993-reference_wrapper-T-conversion-from-U.patch b/recipes-devtools/clang/clang/0036-libc-LWG2993-reference_wrapper-T-conversion-from-U.patch deleted file mode 100644 index aa9b2e79..00000000 --- a/recipes-devtools/clang/clang/0036-libc-LWG2993-reference_wrapper-T-conversion-from-U.patch +++ /dev/null @@ -1,379 +0,0 @@ -From eec04092d67b94f47439a9065b6bd4cd60165be2 Mon Sep 17 00:00:00 2001 -From: Arthur O'Dwyer -Date: Sat, 5 Dec 2020 19:37:41 -0500 -Subject: [PATCH] [libc++] [LWG2993] reference_wrapper conversion from U&& -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Implement the resolution of LWG2993. Replace a deleted constructor -with a constructor that SFINAEs away in appropriate circumstances. -Also, now that the constructor is templated, we must have an -explicit deduction guide to make CTAD work. - -Some tests have been merged in from Agustín Bergé's D40259. - -Differential Revision: https://reviews.llvm.org/D92725 - -Upstream-Status: Backport - ---- - libcxx/docs/Cxx2aStatusIssuesStatus.csv | 2 +- - libcxx/include/__functional_base | 21 ++++- - libcxx/include/functional | 7 +- - .../refwrap.assign/copy_assign.pass.cpp | 20 +++++ - .../refwrap/refwrap.const/deduct.pass.cpp | 31 +++++++ - .../refwrap.const/type_conv_ctor.pass.cpp | 81 +++++++++++++++++++ - .../refwrap.const/type_conv_ctor2.pass.cpp | 61 ++++++++++++++ - .../refwrap/refwrap.const/type_ctor.pass.cpp | 17 ++++ - 8 files changed, 234 insertions(+), 6 deletions(-) - create mode 100644 libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/deduct.pass.cpp - create mode 100644 libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp - create mode 100644 libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp - -diff --git a/libcxx/docs/Cxx2aStatusIssuesStatus.csv b/libcxx/docs/Cxx2aStatusIssuesStatus.csv -index d2adde69d9d2..b411f12d0ce3 100644 ---- a/libcxx/docs/Cxx2aStatusIssuesStatus.csv -+++ b/libcxx/docs/Cxx2aStatusIssuesStatus.csv -@@ -35,7 +35,7 @@ - "`2981 `__","Remove redundant deduction guides from standard library","Albuquerque","","" - "`2982 `__","Making size_type consistent in associative container deduction guides","Albuquerque","","" - "`2988 `__","Clause 32 cleanup missed one typename","Albuquerque","","" --"`2993 `__","reference_wrapper conversion from T&&","Albuquerque","","" -+"`2993 `__","reference_wrapper conversion from T&&","Albuquerque","|Complete|","13.0" - "`2998 `__","Requirements on function objects passed to {``forward_``,}list-specific algorithms","Albuquerque","|Nothing To Do|","" - "`3001 `__","weak_ptr::element_type needs remove_extent_t","Albuquerque","","" - "`3024 `__","variant's copies must be deleted instead of disabled via SFINAE","Albuquerque","|Complete|","" -diff --git a/libcxx/include/__functional_base b/libcxx/include/__functional_base -index 1c02e960d5f0..caa746036bf5 100644 ---- a/libcxx/include/__functional_base -+++ b/libcxx/include/__functional_base -@@ -380,13 +380,24 @@ public: - private: - type* __f_; - -+#ifndef _LIBCPP_CXX03_LANG -+ static void __fun(_Tp&) _NOEXCEPT; -+ static void __fun(_Tp&&) = delete; -+#endif -+ - public: - // construct/copy/destroy -- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 -+#ifdef _LIBCPP_CXX03_LANG -+ _LIBCPP_INLINE_VISIBILITY - reference_wrapper(type& __f) _NOEXCEPT - : __f_(_VSTD::addressof(__f)) {} --#ifndef _LIBCPP_CXX03_LANG -- private: reference_wrapper(type&&); public: // = delete; // do not bind to temps -+#else -+ template ::value, decltype(__fun(_VSTD::declval<_Up>())) >> -+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 -+ reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(_VSTD::declval<_Up>()))) { -+ type& __f = static_cast<_Up&&>(__u); -+ __f_ = _VSTD::addressof(__f); -+ } - #endif - - // access -@@ -511,6 +522,10 @@ public: - #endif // _LIBCPP_CXX03_LANG - }; - -+#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES -+template -+reference_wrapper(_Tp&) -> reference_wrapper<_Tp>; -+#endif - - template - inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 -diff --git a/libcxx/include/functional b/libcxx/include/functional -index 67baa5bd4b77..f8565e7e6e67 100644 ---- a/libcxx/include/functional -+++ b/libcxx/include/functional -@@ -42,8 +42,8 @@ public: - typedef see below result_type; // Not always defined - - // construct/copy/destroy -- reference_wrapper(T&) noexcept; -- reference_wrapper(T&&) = delete; // do not bind to temps -+ template -+ reference_wrapper(U&&); - reference_wrapper(const reference_wrapper& x) noexcept; - - // assignment -@@ -59,6 +59,9 @@ public: - operator() (ArgTypes&&...) const; - }; - -+template -+ reference_wrapper(T&) -> reference_wrapper; -+ - template reference_wrapper ref(T& t) noexcept; - template void ref(const T&& t) = delete; - template reference_wrapper ref(reference_wrappert) noexcept; -diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp -index f82ee72de915..5058a7477581 100644 ---- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp -+++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp -@@ -21,6 +21,12 @@ class functor1 - { - }; - -+struct convertible_to_int_ref { -+ int val = 0; -+ operator int&() { return val; } -+ operator int const&() const { return val; } -+}; -+ - template - void - test(T& t) -@@ -56,5 +62,19 @@ int main(int, char**) - const int j = 0; - test(j); - -+#if TEST_STD_VER >= 11 -+ convertible_to_int_ref convi; -+ test(convi); -+ convertible_to_int_ref const convic; -+ test(convic); -+ -+ { -+ using Ref = std::reference_wrapper; -+ static_assert((std::is_assignable::value), ""); -+ static_assert((!std::is_assignable::value), ""); -+ static_assert((!std::is_assignable::value), ""); -+ } -+#endif -+ - return 0; - } -diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/deduct.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/deduct.pass.cpp -new file mode 100644 -index 000000000000..4e197e8fc3f3 ---- /dev/null -+++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/deduct.pass.cpp -@@ -0,0 +1,31 @@ -+//===----------------------------------------------------------------------===// -+// -+// 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 -+// UNSUPPORTED: libcpp-no-deduction-guides -+ -+// -+ -+// template -+// reference_wrapper(T&) -> reference_wrapper; -+ -+#include -+ -+int main() -+{ -+ int i = 0; -+ std::reference_wrapper ri(i); -+ static_assert(std::is_same_v>); -+ std::reference_wrapper ri2(ri); -+ static_assert(std::is_same_v>); -+ const int j = 0; -+ std::reference_wrapper rj(j); -+ static_assert(std::is_same_v>); -+ std::reference_wrapper rj2(rj); -+ static_assert(std::is_same_v>); -+} -diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp -new file mode 100644 -index 000000000000..d8ad18215fb7 ---- /dev/null -+++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp -@@ -0,0 +1,81 @@ -+//===----------------------------------------------------------------------===// -+// -+// 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 -+ -+// -+// -+// reference_wrapper -+// -+// template -+// reference_wrapper(U&&) noexcept(see below); -+ -+#include -+#include -+ -+struct convertible_to_int_ref { -+ int val = 0; -+ operator int&() { return val; } -+ operator int const&() const { return val; } -+}; -+ -+template -+struct nothrow_convertible { -+ int val = 0; -+ operator int&() noexcept(IsNothrow) { return val; } -+}; -+ -+struct convertible_from_int { -+ convertible_from_int(int) {} -+}; -+ -+void meow(std::reference_wrapper) {} -+void meow(convertible_from_int) {} -+ -+int gi; -+std::reference_wrapper purr() { return gi; }; -+ -+template -+void -+test(T& t) -+{ -+ std::reference_wrapper r(t); -+ assert(&r.get() == &t); -+} -+ -+void f() {} -+ -+int main() -+{ -+ convertible_to_int_ref convi; -+ test(convi); -+ convertible_to_int_ref const convic; -+ test(convic); -+ -+ { -+ using Ref = std::reference_wrapper; -+ static_assert((std::is_nothrow_constructible>::value), ""); -+ static_assert((!std::is_nothrow_constructible>::value), ""); -+ } -+ -+ { -+ meow(0); -+ (true) ? purr() : 0; -+ } -+ -+#ifdef __cpp_deduction_guides -+ { -+ int i = 0; -+ std::reference_wrapper ri(i); -+ static_assert((std::is_same>::value), "" ); -+ const int j = 0; -+ std::reference_wrapper rj(j); -+ static_assert((std::is_same>::value), "" ); -+ } -+#endif -+} -diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp -new file mode 100644 -index 000000000000..debdc12c8588 ---- /dev/null -+++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp -@@ -0,0 +1,61 @@ -+//===----------------------------------------------------------------------===// -+// -+// 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 -+ -+// -+// -+// reference_wrapper -+// -+// template -+// reference_wrapper(U&&); -+ -+#include -+#include -+ -+struct B {} b; -+ -+struct A1 { -+ operator B& () const { return b; } -+}; -+struct A2 { -+ operator B& () const noexcept { return b; } -+}; -+ -+int main() -+{ -+ { -+ std::reference_wrapper b1 = A1(); -+ assert(&b1.get() == &b); -+ b1 = A1(); -+ assert(&b1.get() == &b); -+ -+ static_assert(std::is_convertible>::value, ""); -+ static_assert(!std::is_nothrow_constructible, A1>::value, ""); -+#if TEST_STD_VER >= 20 -+ static_assert(!std::is_nothrow_convertible_v>); -+#endif -+ static_assert(std::is_assignable, A1>::value, ""); -+ static_assert(!std::is_nothrow_assignable, A1>::value, ""); -+ } -+ -+ { -+ std::reference_wrapper b2 = A2(); -+ assert(&b2.get() == &b); -+ b2 = A2(); -+ assert(&b2.get() == &b); -+ -+ static_assert(std::is_convertible>::value, ""); -+ static_assert(std::is_nothrow_constructible, A2>::value, ""); -+#if TEST_STD_VER >= 20 -+ static_assert(std::is_nothrow_convertible_v>); -+#endif -+ static_assert(std::is_assignable, A2>::value, ""); -+ static_assert(std::is_nothrow_assignable, A2>::value, ""); -+ } -+} -diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp -index 4d536a20411d..af2273452612 100644 ---- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp -+++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp -@@ -14,6 +14,7 @@ - - #include - #include -+#include - - #include "test_macros.h" - -@@ -43,5 +44,21 @@ int main(int, char**) - const int j = 0; - test(j); - -+ { -+ using Ref = std::reference_wrapper; -+ static_assert((std::is_constructible::value), ""); -+ static_assert((!std::is_constructible::value), ""); -+ static_assert((!std::is_constructible::value), ""); -+ } -+ -+#if TEST_STD_VER >= 11 -+ { -+ using Ref = std::reference_wrapper; -+ static_assert((std::is_nothrow_constructible::value), ""); -+ static_assert((!std::is_nothrow_constructible::value), ""); -+ static_assert((!std::is_nothrow_constructible::value), ""); -+ } -+#endif -+ - return 0; - } --- -2.34.1 - diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index b0c81f1e..a7a9822e 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -86,7 +86,7 @@ LLVM_ENABLE_RTTI;LLVM_ENABLE_EH;LLVM_BUILD_EXTERNAL_COMPILER_RT;CMAKE_SYSTEM_NAM CMAKE_BUILD_TYPE;BUILD_SHARED_LIBS;LLVM_ENABLE_PROJECTS;LLVM_BINUTILS_INCDIR;\ LLVM_TARGETS_TO_BUILD;LLVM_EXPERIMENTAL_TARGETS_TO_BUILD;PYTHON_EXECUTABLE;\ PYTHON_LIBRARY;PYTHON_INCLUDE_DIR;LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN;LLDB_EDITLINE_USE_WCHAR;\ -LLVM_ENABLE_LIBEDIT;LLDB_ENABLE_LIBEDIT; \ +LLVM_ENABLE_LIBEDIT;LLDB_ENABLE_LIBEDIT;LLDB_PYTHON_RELATIVE_PATH;\ CMAKE_C_FLAGS_RELEASE;CMAKE_CXX_FLAGS_RELEASE;CMAKE_ASM_FLAGS_RELEASE;\ " # @@ -134,7 +134,7 @@ EXTRA_OECMAKE_append_class-native = "\ " EXTRA_OECMAKE_append_class-nativesdk = "\ -DCMAKE_CROSSCOMPILING:BOOL=ON \ - -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \ + -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR} -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \ -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ @@ -143,11 +143,13 @@ EXTRA_OECMAKE_append_class-nativesdk = "\ -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ -DLLDB_TABLEGEN=${STAGING_BINDIR_NATIVE}/lldb-tblgen \ -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \ + -DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR} \ -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ -DPYTHON_EXECUTABLE='${PYTHON}' \ " EXTRA_OECMAKE_append_class-target = "\ -DCMAKE_CROSSCOMPILING:BOOL=ON \ + -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR}' \ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ -DLLDB_TABLEGEN=${STAGING_BINDIR_NATIVE}/lldb-tblgen \ @@ -158,6 +160,7 @@ EXTRA_OECMAKE_append_class-target = "\ -DLLVM_TARGET_ARCH=${@get_clang_target_arch(bb, d)} \ -DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_SYS}${HF} \ -DLLVM_HOST_TRIPLE=${TARGET_SYS}${HF} \ + -DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR} \ -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \ -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ -DLLVM_LIBDIR_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index ed3c2c05..06a5ecb4 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -13,37 +13,33 @@ SRC_URI = "\ file://0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \ file://0003-compiler-rt-support-a-new-embedded-linux-target.patch \ file://0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch \ - file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ - file://0007-llvm-allow-env-override-of-exe-path.patch \ - file://0008-clang-driver-Check-sysroot-for-ldso-path.patch \ - file://0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch \ - file://0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch \ - file://0011-clang-Prepend-trailing-to-sysroot.patch \ - file://0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch \ - file://0013-clang-Define-releative-gcc-installation-dir.patch \ - file://0014-clang-Fix-ldso-for-musl-on-x86-and-x32-architectures.patch \ - file://0015-clang-scan-view-needs-python-2.x.patch \ - file://0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch \ - file://0017-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch \ - file://0018-Check-for-atomic-double-intrinsics.patch \ - file://0019-clang-Enable-SSP-and-PIE-by-default.patch \ - file://0020-libcxx-Add-compiler-runtime-library-to-link-step-for.patch \ - file://0021-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch \ - file://0022-clang-Fix-resource-dir-location-for-cross-toolchains.patch \ - file://0023-fix-path-to-libffi.patch \ - file://0024-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch \ - file://0025-clang-Use-python3-in-python-scripts.patch \ - file://0026-For-x86_64-set-Yocto-based-GCC-install-search-path.patch \ - file://0027-compiler-rt-Include-stddef.h.patch \ - file://0028-llvm-Do-not-use-find_library-for-ncurses.patch \ - file://0029-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch \ - file://0030-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch \ - file://0031-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \ - file://0032-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch \ + file://0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ + file://0006-llvm-allow-env-override-of-exe-path.patch \ + file://0007-clang-driver-Check-sysroot-for-ldso-path.patch \ + file://0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch \ + file://0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch \ + file://0010-clang-Prepend-trailing-to-sysroot.patch \ + file://0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch \ + file://0012-clang-Define-releative-gcc-installation-dir.patch \ + file://0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch \ + file://0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch \ + file://0015-Check-for-atomic-double-intrinsics.patch \ + file://0016-clang-Enable-SSP-and-PIE-by-default.patch \ + file://0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch \ + file://0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch \ + file://0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch \ + file://0020-fix-path-to-libffi.patch \ + file://0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch \ + file://0022-clang-Use-python3-in-python-scripts.patch \ + file://0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch \ + file://0024-compiler-rt-Include-stddef.h.patch \ + file://0025-llvm-Do-not-use-find_library-for-ncurses.patch \ + file://0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch \ + file://0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \ + file://0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch \ file://0033-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ - file://0036-libc-LWG2993-reference_wrapper-T-conversion-from-U.patch \ " # Fallback to no-PIE if not set GCCPIE ??= "" From 0e90a7156b66f3dfc097c5e807bf2990f62f7bca Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 15 May 2021 07:58:39 -0700 Subject: [PATCH 005/166] openmp: Fix building amdgcn files License name should be LICENSE.TXT not LICENSE.txt Signed-off-by: Khem Raj (cherry picked from commit 07357fd3372866445aa9dd07654849b9b3d0c3d1) --- recipes-devtools/clang/openmp_git.bb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/recipes-devtools/clang/openmp_git.bb b/recipes-devtools/clang/openmp_git.bb index a1fa3b1b..95b3a9ec 100644 --- a/recipes-devtools/clang/openmp_git.bb +++ b/recipes-devtools/clang/openmp_git.bb @@ -10,13 +10,18 @@ require common-source.inc TOOLCHAIN = "clang" -LIC_FILES_CHKSUM = "file://openmp/LICENSE.txt;md5=d75288d1ce0450b28b8d58a284c09c79" +LIC_FILES_CHKSUM = "file://openmp/LICENSE.TXT;md5=d75288d1ce0450b28b8d58a284c09c79" inherit cmake pkgconfig perlnative -DEPENDS += "elfutils libffi" +DEPENDS += "elfutils libffi clang" -EXTRA_OECMAKE += "-DOPENMP_LIBDIR_SUFFIX=${@d.getVar('baselib').replace('lib', '')}" +EXTRA_OECMAKE += "-DOPENMP_LIBDIR_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ + -DOPENMP_STANDALONE_BUILD=ON \ + -DCLANG_TOOL=${STAGING_BINDIR_NATIVE}/clang \ + -DLINK_TOOL=${STAGING_BINDIR_NATIVE}/llvm-link \ + -DOPT_TOOL=${STAGING_BINDIR_NATIVE}/opt \ + " OECMAKE_SOURCEPATH = "${S}/openmp" @@ -30,8 +35,10 @@ PACKAGECONFIG[ompt-tools] = "-DOPENMP_ENABLE_OMPT_TOOLS=ON,-DOPENMP_ENABLE_OMPT_ PACKAGECONFIG[aliases] = "-DLIBOMP_INSTALL_ALIASES=ON,-DLIBOMP_INSTALL_ALIASES=OFF," PACKAGECONFIG[offloading-plugin] = ",,elfutils libffi,libelf libffi" +PACKAGES += "${PN}-libomptarget-amdgcn" FILES_SOLIBSDEV = "" FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}" +FILES_${PN}-libomptarget-amdgcn = "${libdir}/libomptarget-amdgcn-*.bc" INSANE_SKIP_${PN} = "dev-so" COMPATIBLE_HOST_mips64 = "null" From 834efb73db016bcb36d5c39c2d7d074a4959937d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 15 May 2021 08:41:06 -0700 Subject: [PATCH 006/166] spirv-llvm-translator: Upgrade to 13.0.0/trunk This is in sync with clang trunk (upcoming 13.0.0) release Signed-off-by: Khem Raj (cherry picked from commit 79dc9a07e919bbcadb137a9d4cb0f857a672d67e) --- ...001-Use-12.0.0-for-base-llvm-version.patch | 26 --------------- ...cmake-allow-to-enable-disable-ccache.patch | 32 ------------------- .../spirv-llvm-translator_git.bb | 8 ++--- 3 files changed, 3 insertions(+), 63 deletions(-) delete mode 100644 recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-Use-12.0.0-for-base-llvm-version.patch delete mode 100644 recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-cmake-allow-to-enable-disable-ccache.patch diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-Use-12.0.0-for-base-llvm-version.patch b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-Use-12.0.0-for-base-llvm-version.patch deleted file mode 100644 index b52d97ba..00000000 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-Use-12.0.0-for-base-llvm-version.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 1e38777c321605d13f9ad254880e73459877d7da Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 14 Feb 2021 18:43:21 -0800 -Subject: [PATCH] Use 12.0.0 for base llvm version - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0ddb55ce..a9cd1978 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,6 +1,6 @@ - cmake_minimum_required(VERSION 3.3) - --set (BASE_LLVM_VERSION 13.0.0) -+set (BASE_LLVM_VERSION 12.0.0) - set(LLVM_SPIRV_VERSION ${BASE_LLVM_VERSION}.0) - - option(LLVM_SPIRV_INCLUDE_TESTS --- -2.30.1 - diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-cmake-allow-to-enable-disable-ccache.patch b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-cmake-allow-to-enable-disable-ccache.patch deleted file mode 100644 index 68cdda4f..00000000 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-cmake-allow-to-enable-disable-ccache.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 13b679eb76e6877b40fd41b91e71cb172bcf7b26 Mon Sep 17 00:00:00 2001 -From: Naveen Saini -Date: Thu, 4 Mar 2021 11:23:20 +0800 -Subject: [PATCH] cmake: allow to enable/disable ccache - -By default ccache is enabled. - -Upstream-Status: Submitted [https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/930] - -Signed-off-by: Naveen Saini ---- - CMakeLists.txt | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0ddb55c..c7d0498 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -50,8 +50,9 @@ if(LLVM_SPIRV_BUILD_EXTERNAL) - - message(STATUS "Found LLVM: ${LLVM_VERSION}") - -+ option(CCACHE_ALLOWED "allow use of ccache" TRUE) - find_program(CCACHE_EXE_FOUND ccache) -- if(CCACHE_EXE_FOUND) -+ if(CCACHE_EXE_FOUND AND CCACHE_ALLOWED) - message(STATUS "Found ccache: ${CCACHE_EXE_FOUND}") - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) --- -2.17.1 - diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb index 171d54fd..d6da4e82 100644 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb @@ -1,14 +1,12 @@ LICENSE = "NCSA" LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=47e311aa9caedd1b3abf098bd7814d1d" -BRANCH = "llvm_release_120" +BRANCH = "master" SRC_URI = "git://github.com/KhronosGroup/SPIRV-LLVM-Translator/;protocol=https;branch=${BRANCH} \ - file://0001-Use-12.0.0-for-base-llvm-version.patch \ - file://0001-cmake-allow-to-enable-disable-ccache.patch \ " -PV = "12.0.0" -SRCREV = "c65388fcd4eac9ce070fc330d5fe263ba2c72d66" +PV = "13.0.0" +SRCREV = "76c76efeb8bcb3414dcd26ef938de43eb1beb516" S = "${WORKDIR}/git" From d1a5742575146fab9494b0fbb050a86299cb13a9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 16 May 2021 19:56:55 -0700 Subject: [PATCH 007/166] libclc: Pass -cl-no-stdinc to compiler and assembler libclc uses clang CLC preprocessor on .ll files, llvm/clang-13 started including clc declarations by default (clang cf3ef15a6ec5e5b45c6c54e8fbe3769255e815ce), thus corrupting any .ll assembly files that are used by libclc. Inclusion of the default declarations can be turned off using a cmdline switch but that remains to be implemented in the libclc build system. manually adding '-cl-no-stdinc' should work as a workaround. Signed-off-by: Khem Raj (cherry picked from commit d692c0338fe60cdbb3025dcedbb05ca466335650) --- recipes-devtools/clang/libclc_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-devtools/clang/libclc_git.bb b/recipes-devtools/clang/libclc_git.bb index 9525b257..4edd4bf0 100644 --- a/recipes-devtools/clang/libclc_git.bb +++ b/recipes-devtools/clang/libclc_git.bb @@ -19,6 +19,7 @@ EXTRA_OECMAKE += " \ -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ -Dclc_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeCLCCompiler.cmake.in \ -Dll_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeLLAsmCompiler.cmake.in \ + -DCMAKE_LLAsm_FLAGS=-cl-no-stdinc -DCMAKE_CLC_FLAGS=-cl-no-stdinc \ " do_configure_prepend () { From f375d0eab9bb6ba2104d988e7d23ba3f3aa6f4fd Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 17:38:45 -0700 Subject: [PATCH 008/166] compiler-rt: Fix sanitizer build on musl/x86_64 backtrace APIs are glibc specific so do not use them Signed-off-by: Khem Raj (cherry picked from commit 0f3c6b54bf61ec9aabcb2e6ef52ee78e795194c5) --- ...ot-use-backtrace-APIs-on-non-glibc-l.patch | 68 +++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 2 files changed, 69 insertions(+) create mode 100644 recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch diff --git a/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch new file mode 100644 index 00000000..372ac738 --- /dev/null +++ b/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -0,0 +1,68 @@ +From c2413de81c383407f6447edd41d9b3539641ff4f 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 + +musl e.g. does not provide backtrace APIs + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + .../lib/gwp_asan/optional/backtrace_linux_libc.cpp | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/compiler-rt/lib/gwp_asan/optional/backtrace_linux_libc.cpp b/compiler-rt/lib/gwp_asan/optional/backtrace_linux_libc.cpp +index ea8e72be287d..0344074dd254 100644 +--- a/compiler-rt/lib/gwp_asan/optional/backtrace_linux_libc.cpp ++++ b/compiler-rt/lib/gwp_asan/optional/backtrace_linux_libc.cpp +@@ -7,7 +7,9 @@ + //===----------------------------------------------------------------------===// + + #include ++#ifdef __GLIBC__ + #include ++#endif + #include + #include + #include +@@ -21,8 +23,11 @@ + namespace { + size_t Backtrace(uintptr_t *TraceBuffer, size_t Size) { + static_assert(sizeof(uintptr_t) == sizeof(void *), "uintptr_t is not void*"); +- ++#ifdef __GLIBC__ + return backtrace(reinterpret_cast(TraceBuffer), Size); ++#else ++ return -1; ++#endif + } + + // We don't need any custom handling for the Segv backtrace - the libc unwinder +@@ -30,7 +35,11 @@ size_t Backtrace(uintptr_t *TraceBuffer, size_t Size) { + // to avoid the additional frame. + GWP_ASAN_ALWAYS_INLINE size_t SegvBacktrace(uintptr_t *TraceBuffer, size_t Size, + void * /*Context*/) { ++#ifdef __GLIBC__ + return Backtrace(TraceBuffer, Size); ++#else ++ return -1; ++#endif + } + + static void PrintBacktrace(uintptr_t *Trace, size_t TraceLength, +@@ -40,6 +49,7 @@ static void PrintBacktrace(uintptr_t *Trace, size_t TraceLength, + return; + } + ++#ifdef __GLIBC__ + char **BacktraceSymbols = + backtrace_symbols(reinterpret_cast(Trace), TraceLength); + +@@ -53,6 +63,7 @@ static void PrintBacktrace(uintptr_t *Trace, size_t TraceLength, + Printf("\n"); + if (BacktraceSymbols) + free(BacktraceSymbols); ++#endif + } + } // anonymous namespace + diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 06a5ecb4..69bb40a2 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -37,6 +37,7 @@ SRC_URI = "\ file://0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch \ file://0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \ file://0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch \ + file://0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch \ file://0033-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ From 1be8c74964965dead93d254ca0d1c688fd946aba Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 17:59:09 -0700 Subject: [PATCH 009/166] clang: Fix x86 tuple for include search paths This ensures that search path for c++ headers is using right directory structure as per Openembedded gcc and sysroot install e.g. ignoring nonexistent directory "/mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux-musl/compiler-rt/13.0.0-r0/recipe-sysroot/usr/lib/i686-yoe-linux-musl/11.1.0/../../../include/ c++/11.1.0/i386-linux-gnu" Signed-off-by: Khem Raj (cherry picked from commit 6ecc0989f152811b8e042d0eb0c94db24c023543) --- ...iple-for-non-debian-multiarch-linux-.patch | 25 +++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 2 files changed, 26 insertions(+) create mode 100644 recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch diff --git a/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch new file mode 100644 index 00000000..2e6527f5 --- /dev/null +++ b/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -0,0 +1,25 @@ +From 923e1a9142f88b4970a3a860b6e41bf74dea4091 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 + +OpenEmbedded does not hardcode mutli-arch like debian therefore ensure +that it still uses the proper tuple + +Signed-off-by: Khem Raj +--- + clang/lib/Driver/ToolChains/Linux.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/clang/lib/Driver/ToolChains/Linux.cpp ++++ b/clang/lib/Driver/ToolChains/Linux.cpp +@@ -622,6 +622,9 @@ void Linux::addLibStdCxxIncludePaths(con + GCCInstallation.getTriple().getArch() == llvm::Triple::x86 + ? "i386-linux-gnu" + : TripleStr; ++ // OpenEmbedded does not hardcode the triple to i386-linux-gnu like debian ++ if (GCCInstallation.getTriple().getVendor() == llvm::Triple::OpenEmbedded) ++ DebianMultiarch = TripleStr; + + // Try generic GCC detection first. + if (Generic_GCC::addGCCLibStdCxxIncludePaths(DriverArgs, CC1Args, diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 69bb40a2..e37c459c 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -38,6 +38,7 @@ SRC_URI = "\ file://0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \ file://0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch \ file://0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch \ + file://0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch \ file://0033-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ From 3b40eed2df7279a3af5099032d515a1cce44c7b0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:53:25 -0700 Subject: [PATCH 010/166] compiler-rt-sanitizers: Link with static C++ runtime when available This fixes build on ARM Signed-off-by: Khem Raj (cherry picked from commit 241e7e50d394795822beb04869fa540026ebf0cd) --- ...ompiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch} | 4 ++-- recipes-devtools/clang/common.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename recipes-devtools/clang/clang/{0033-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch => 0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch} (92%) diff --git a/recipes-devtools/clang/clang/0033-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch similarity index 92% rename from recipes-devtools/clang/clang/0033-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch rename to recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index e95b4189..7da132a2 100644 --- a/recipes-devtools/clang/clang/0033-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From 08c592b1850c9b0c17a9f4163e93682a9f83d7f7 Mon Sep 17 00:00:00 2001 +From 24ce3255ade936fee508d83c7f2551c8f2142bac Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES @@ -15,7 +15,7 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+) diff --git a/compiler-rt/lib/scudo/CMakeLists.txt b/compiler-rt/lib/scudo/CMakeLists.txt -index c50ea0233fae..ddc1128b8ed8 100644 +index e580d6d1408b..c14d7636e291 100644 --- a/compiler-rt/lib/scudo/CMakeLists.txt +++ b/compiler-rt/lib/scudo/CMakeLists.txt @@ -12,6 +12,7 @@ append_list_if(COMPILER_RT_HAS_LIBDL dl SCUDO_MINIMAL_DYNAMIC_LIBS) diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index e37c459c..e69acff2 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -39,7 +39,7 @@ SRC_URI = "\ file://0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch \ file://0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch \ file://0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch \ - file://0033-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ + file://0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From 8d025d580b2b671561a05994f143907d3959c224 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 23:37:46 -0700 Subject: [PATCH 011/166] compiler-rt-sanitizers: Limit to buildable arch/libc combinations Signed-off-by: Khem Raj (cherry picked from commit 6a442a8a3b6b898c90ae1e25216810cf0022e8ad) --- recipes-devtools/clang/compiler-rt-sanitizers_git.bb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb index aa3a9ac9..50fc865b 100644 --- a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb @@ -95,3 +95,9 @@ ALLOW_EMPTY_${PN}-dev = "1" TOOLCHAIN_forcevariable = "clang" SYSROOT_DIRS_append_class-target = " ${nonarch_libdir}" + +# riscv and x86_64 Sanitizers work on musl too +COMPATIBLE_HOST_libc-musl_x86-64 = "(.*)" +COMPATIBLE_HOST_libc-musl_riscv64 = "(.*)" +COMPATIBLE_HOST_libc-musl_riscv32 = "(.*)" +COMPATIBLE_HOST_libc-musl = "null" From cc878f95e9bddfe4fcccf253705e93256b917e06 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:21:09 -0700 Subject: [PATCH 012/166] compiler-rt-sanitizers: Fix build on mips Signed-off-by: Khem Raj (cherry picked from commit 85c1247d641e8f3286151cf77c8a888955a4fbb1) --- ...-scudo-standalone-with-libatomic-on-.patch | 29 +++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 2 files changed, 30 insertions(+) create mode 100644 recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch diff --git a/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch new file mode 100644 index 00000000..6289e8bc --- /dev/null +++ b/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -0,0 +1,29 @@ +From b7247e617cef1ed277c17bf0970104ccf55c5d92 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 21 May 2021 08:14:29 -0700 +Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips + +clang on mips generate atomic built-ins which should be provided by +libatomic + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + compiler-rt/lib/scudo/standalone/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/compiler-rt/lib/scudo/standalone/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/CMakeLists.txt +index 572ad078423f..8e5c0eaad211 100644 +--- a/compiler-rt/lib/scudo/standalone/CMakeLists.txt ++++ b/compiler-rt/lib/scudo/standalone/CMakeLists.txt +@@ -131,6 +131,10 @@ append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread SCUDO_LINK_FLAGS) + + append_list_if(FUCHSIA zircon SCUDO_LINK_LIBS) + ++if (CMAKE_SYSTEM_PROCESSOR MATCHES "mips" AND CMAKE_SYSTEM_NAME MATCHES "Linux") ++ list(APPEND SCUDO_LINK_LIBS atomic) ++endif() ++ + if(COMPILER_RT_HAS_SCUDO_STANDALONE) + add_compiler_rt_object_libraries(RTScudoStandalone + ARCHS ${SCUDO_STANDALONE_SUPPORTED_ARCH} diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index e69acff2..8046c357 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -40,6 +40,7 @@ SRC_URI = "\ file://0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch \ file://0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch \ file://0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ + file://0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From fafa9bd65c5b8d880c281232edcbbe4db08e3bcf Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:56:50 -0700 Subject: [PATCH 013/166] lldb: Do not build for mips as well lldb-server is not fully ported for mips yet see https://reviews.llvm.org/D102872 Signed-off-by: Khem Raj (cherry picked from commit 1a90a808e913003ccbbd5ab9b1fcb0a0995d620c) --- recipes-devtools/clang/clang_git.bb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index a7a9822e..74f69833 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -102,10 +102,13 @@ LLVM_EXPERIMENTAL_TARGETS_TO_BUILD_append = ";${@get_clang_experimental_target_a HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" HF[vardepvalue] = "${HF}" -LLVM_PROJECTS ?= "clang;clang-tools-extra;lld;lldb" -# There is no LLDB support for RISCV -LLVM_PROJECTS_riscv32 ?= "clang;clang-tools-extra;lld" -LLVM_PROJECTS_riscv64 ?= "clang;clang-tools-extra;lld" +LLVM_PROJECTS ?= "clang;clang-tools-extra;lld${LLDB}" +LLDB ?= ";lldb" +# LLDB support for RISCV/Mips32 does not work yet +LLDB_riscv32 = "" +LLDB_riscv64 = "" +LLDB_mips = "" +LLDB_mipsel = "" #CMAKE_VERBOSE = "VERBOSE=1" From df23a4ce1ddd9e90ac9cdb9f79adb031f50b122e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 22 May 2021 09:34:30 -0700 Subject: [PATCH 014/166] compiler-rt-sanitizers: Do not package orc support lib Its already shipped with compile-rt recipe Signed-off-by: Khem Raj (cherry picked from commit c5c59a9a6a80bb54067ed1400f814fcfc3f428aa) --- recipes-devtools/clang/compiler-rt-sanitizers_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb index 50fc865b..f1327dec 100644 --- a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb @@ -62,6 +62,8 @@ do_install_append () { mv ${D}${libdir}/clang ${D}${nonarch_libdir}/clang rmdir --ignore-fail-on-non-empty ${D}${libdir} fi + # Already shipped with compile-rt Orc support + rm -rf ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.orc-x86_64.a } FILES_SOLIBSDEV = "" From 980c8bac6b00c172a333c698b819d6115337e2d5 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 23 May 2021 13:22:05 -0700 Subject: [PATCH 015/166] libcxx: Build libunwind shared lib when enabled Use compile-rt consistently across when building libc++ and libc++abi and libunwind Signed-off-by: Khem Raj (cherry picked from commit 78acb4ae02352d543b0343b2dba411dc521acd0a) --- recipes-devtools/clang/libcxx_git.bb | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index 280f8de1..d19839de 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb @@ -10,20 +10,20 @@ require common-source.inc inherit cmake python3native -PACKAGECONFIG ??= "compiler-rt exceptions ${@bb.utils.contains("RUNTIME", "llvm", "unwind", "", d)}" +PACKAGECONFIG ??= "compiler-rt exceptions ${@bb.utils.contains("RUNTIME", "llvm", "unwind unwind-shared", "", d)}" PACKAGECONFIG_append_armv5 = " no-atomics" -PACKAGECONFIG[unwind] = "-DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=ON -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON,-DLIBCXXABI_USE_LLVM_UNWINDER=OFF,," +PACKAGECONFIG[unwind] = "-DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON,-DLIBCXXABI_USE_LLVM_UNWINDER=OFF,," PACKAGECONFIG[exceptions] = "-DLIBCXXABI_ENABLE_EXCEPTIONS=ON -DDLIBCXX_ENABLE_EXCEPTIONS=ON,-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF -DLIBCXX_ENABLE_EXCEPTIONS=OFF -DCMAKE_REQUIRED_FLAGS='-fno-exceptions'," PACKAGECONFIG[no-atomics] = "-D_LIBCXXABI_HAS_ATOMIC_BUILTINS=OFF -DCMAKE_SHARED_LINKER_FLAGS='-latomic',," -PACKAGECONFIG[compiler-rt] = ",,compiler-rt" +PACKAGECONFIG[compiler-rt] = "-DLIBCXX_USE_COMPILER_RT=ON -DLIBCXXABI_USE_COMPILER_RT=ON -DLIBUNWIND_USE_COMPILER_RT=ON,,compiler-rt" +PACKAGECONFIG[unwind-shared] = "-DLIBUNWIND_ENABLE_SHARED=ON,-DLIBUNWIND_ENABLE_SHARED=OFF,," DEPENDS += "ninja-native" DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" LIBCPLUSPLUS = "" -COMPILER_RT ?= "${@bb.utils.contains("PACKAGECONFIG", "compiler-rt", "-rtlib=compiler-rt", "", d)} ${UNWINDLIB}" -UNWINDLIB ?= "${@bb.utils.contains("RUNTIME", "gnu", "--unwindlib=libgcc", "", d)}" +COMPILER_RT ?= "-rtlib=compiler-rt" INHIBIT_DEFAULT_DEPS = "1" @@ -35,15 +35,13 @@ LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da39 LLVM_LIBDIR_SUFFIX_powerpc64 = "64" OECMAKE_TARGET_COMPILE = "cxxabi cxx" -OECMAKE_TARGET_INSTALL = "install-cxx install-cxxabi" +OECMAKE_TARGET_INSTALL = "install-cxx install-cxxabi ${@bb.utils.contains("RUNTIME", "llvm", "install-unwind", "", d)}" + OECMAKE_SOURCEPATH = "${S}/llvm" EXTRA_OECMAKE += "\ -DCMAKE_CROSSCOMPILING=ON \ -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \ -DLLVM_ENABLE_RTTI=ON \ - -DLIBUNWIND_ENABLE_SHARED=OFF \ - -DLIBUNWIND_ENABLE_THREADS=OFF \ - -DLIBUNWIND_WEAK_PTHREAD_LIB=ON \ -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON \ -DLIBCXXABI_INCLUDE_TESTS=OFF \ -DLIBCXXABI_ENABLE_SHARED=ON \ @@ -77,4 +75,3 @@ ALLOW_EMPTY_${PN} = "1" BBCLASSEXTEND = "native nativesdk" TOOLCHAIN = "clang" - From e9d1bee6cf8e05d5eced683382d5af8ee8947e35 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 23 May 2021 19:40:33 -0700 Subject: [PATCH 016/166] scan-build.bbclass: Fix typo Signed-off-by: Khem Raj (cherry picked from commit da92b363e8b57c506250cd677436d1a44b163c98) --- classes/scan-build.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/scan-build.bbclass b/classes/scan-build.bbclass index 6d3fe652..9c0c742e 100644 --- a/classes/scan-build.bbclass +++ b/classes/scan-build.bbclass @@ -26,7 +26,7 @@ do_scanbuild() { do_scanview() { bbplain "================================================================" - bbplain "Stating scan-view server at: http://${CLANG_SCAN_SERVER_IP}:${CLANG_SCAN_PORT}" + bbplain "Starting scan-view server at: http://${CLANG_SCAN_SERVER_IP}:${CLANG_SCAN_PORT}" bbplain "Use Ctrl-C to exit" bbplain "================================================================" scan-view --host ${CLANG_SCAN_SERVER_IP} --port ${CLANG_SCAN_PORT} --allow-all-hosts ${SCAN_RESULTS_DIR}/*/ From 3d0d917ab9ec1d07edd40b3b684b3392f3153fd0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 26 May 2021 11:28:32 -0700 Subject: [PATCH 017/166] clang: Default to compiler-rt/libcxx/libunwind when RUNTIME = "llvm" This ensures that compiler defaults are defaulting to llvm provided c/c++ runtimes which includes c-runtime, c++runtime, unwinder and omp runtime, current approach is to inject commandline options but it does not get passed in all cases and a lot of smaller/big patches are used to make such package recipes behave If RUNTIME = "gnu" then defaults stay to use gcc runtime as it is Signed-off-by: Khem Raj (cherry picked from commit e4edc914cd17d31c1c55733db942e3d5da3b0b56) --- recipes-devtools/clang/clang_git.bb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 74f69833..47fdd698 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -52,14 +52,16 @@ def get_clang_experimental_target_arch(bb, d): PACKAGECONFIG ??= "compiler-rt libcplusplus shared-libs lldb-wchar \ ${@bb.utils.filter('DISTRO_FEATURES', 'thin-lto lto', d)} \ + ${@bb.utils.contains('RUNTIME', 'llvm', 'compiler-rt libcplusplus unwindlib libomp', '', d)} \ rtti eh libedit terminfo \ " -PACKAGECONFIG_class-native = "rtti eh libedit shared-libs" -PACKAGECONFIG_class-nativesdk = "rtti eh libedit shared-libs ${@bb.utils.filter('DISTRO_FEATURES', 'thin-lto lto', d)}" +PACKAGECONFIG_class-native = "rtti eh libedit shared-libs ${@bb.utils.contains('RUNTIME', 'llvm', 'compiler-rt libcplusplus unwindlib libomp', '', d)}" +PACKAGECONFIG_class-nativesdk = "rtti eh libedit shared-libs ${@bb.utils.filter('DISTRO_FEATURES', 'thin-lto lto', d)} ${@bb.utils.contains('RUNTIME', 'llvm', 'compiler-rt libcplusplus unwindlib libomp', '', d)}" -PACKAGECONFIG[compiler-rt] = "-DCLANG_DEFAULT_RTLIB=compiler-rt,,libcxx,compiler-rt" -PACKAGECONFIG[libcplusplus] = "-DCLANG_DEFAULT_CXX_STDLIB=libc++,,libcxx" -PACKAGECONFIG[unwindlib] = "-DCLANG_DEFAULT_UNWINDLIB=libunwind,-DCLANG_DEFAULT_UNWINDLIB=libgcc,libcxx" +PACKAGECONFIG[compiler-rt] = "-DCLANG_DEFAULT_RTLIB=compiler-rt,," +PACKAGECONFIG[libcplusplus] = "-DCLANG_DEFAULT_CXX_STDLIB=libc++,," +PACKAGECONFIG[unwindlib] = "-DCLANG_DEFAULT_UNWINDLIB=libunwind,-DCLANG_DEFAULT_UNWINDLIB=libgcc,," +PACKAGECONFIG[libomp] = "-DCLANG_DEFAULT_OPENMP_RUNTIME=libomp,," PACKAGECONFIG[thin-lto] = "-DLLVM_ENABLE_LTO=Thin -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR},,binutils," PACKAGECONFIG[lto] = "-DLLVM_ENABLE_LTO=Full -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR},,binutils," PACKAGECONFIG[shared-libs] = "-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON,,," @@ -88,6 +90,8 @@ LLVM_TARGETS_TO_BUILD;LLVM_EXPERIMENTAL_TARGETS_TO_BUILD;PYTHON_EXECUTABLE;\ PYTHON_LIBRARY;PYTHON_INCLUDE_DIR;LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN;LLDB_EDITLINE_USE_WCHAR;\ LLVM_ENABLE_LIBEDIT;LLDB_ENABLE_LIBEDIT;LLDB_PYTHON_RELATIVE_PATH;\ CMAKE_C_FLAGS_RELEASE;CMAKE_CXX_FLAGS_RELEASE;CMAKE_ASM_FLAGS_RELEASE;\ +CLANG_DEFAULT_CXX_STDLIB;CLANG_DEFAULT_RTLIB;CLANG_DEFAULT_UNWINDLIB;\ +CLANG_DEFAULT_OPENMP_RUNTIME;\ " # # Default to build all OE-Core supported target arches (user overridable). From d9e5a591db75eb9cbc0b0fb72efbc426b19db18b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 26 May 2021 11:33:28 -0700 Subject: [PATCH 018/166] compiler-rt: Use gcc runtime to bootstrap while compiler-rt may not use any of these libraries, but the cmake environment pokes for working compiler, linker and other tools, this ensures that it can build when RUNTIME = "llvm" and also RUNTIME = "gnu" Signed-off-by: Khem Raj (cherry picked from commit 7f431875e4edc2a11a9881714e4845efeee54f77) Conflicts: - recipes-devtools/clang/compiler-rt_git.bb: Commit 93552c79eed5daa44a24bf4b7a063a2ade739e97 had already backported parts of this commit. --- recipes-devtools/clang/compiler-rt_git.bb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index b61ede01..49566e7e 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb @@ -8,22 +8,26 @@ SECTION = "base" require clang.inc require common-source.inc -inherit cmake pkgconfig python3native +inherit cmake cmake-native pkgconfig python3native LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee54e877a" LIBCPLUSPLUS = "" COMPILER_RT = "" + TUNE_CCARGS_remove = "-no-integrated-as" INHIBIT_DEFAULT_DEPS = "1" -DEPENDS += "ninja-native" -DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" +DEPENDS += "ninja-native libgcc" +DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc gcc-runtime" DEPENDS_append_class-nativesdk = " clang-native" DEPENDS_append_class-native = " clang-native" +CXXFLAGS += "-stdlib=libstdc++" +LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" + PACKAGECONFIG ??= "" PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" From 2ab4ebbebbd3457ab29a0f52c0c8c07e5c50a422 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 26 May 2021 11:35:02 -0700 Subject: [PATCH 019/166] compiler-rt-sanitizers: Use packageconfig to use static libcxx sanitizers can link libc++/libc++abi statically or dynamically, we default to use dynamic version but leave the option to enable static linking if so needed Use virtual/crypt to represent crypt implementation which becomes libc independent Fix dependencies for native recipes Signed-off-by: Khem Raj (cherry picked from commit f4bb299c409128801e68c30187381fadeb0a451d) --- recipes-devtools/clang/compiler-rt-sanitizers_git.bb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb index f1327dec..38558d76 100644 --- a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb @@ -15,14 +15,13 @@ LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee TUNE_CCARGS_remove = "-no-integrated-as" -RUNTIME = "llvm" - -DEPENDS += "ninja-native clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" -DEPENDS_append_libc-glibc = " libxcrypt" +DEPENDS += "ninja-native virtual/crypt" +DEPENDS_append_class-native = " clang-native libxcrypt-native" DEPENDS_append_class-nativesdk = " clang-native nativesdk-libxcrypt" PACKAGECONFIG ??= "" PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" +PACKAGECONFIG[static-libcxx] = "-DSANITIZER_USE_STATIC_CXX_ABI=ON -DSANITIZER_USE_STATIC_LLVM_UNWINDER=ON,," HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" HF[vardepvalue] = "${HF}" @@ -34,8 +33,6 @@ EXTRA_OECMAKE += "-DCOMPILER_RT_STANDALONE_BUILD=OFF \ -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=${HOST_ARCH}${HF}${HOST_VENDOR}-${HOST_OS} \ -DCOMPILER_RT_BUILD_BUILTINS=OFF \ -DSANITIZER_CXX_ABI_LIBNAME=${@bb.utils.contains("RUNTIME", "llvm", "libc++", "libstdc++", d)} \ - -DSANITIZER_USE_STATIC_CXX_ABI=ON \ - -DSANITIZER_USE_STATIC_LLVM_UNWINDER=ON \ -DCOMPILER_RT_BUILD_XRAY=ON \ -DCOMPILER_RT_BUILD_SANITIZERS=ON \ -DCOMPILER_RT_BUILD_LIBFUZZER=ON \ From 64c0a42ef7d7389e801acc7ad8ae90e4d99062bf Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 26 May 2021 11:37:31 -0700 Subject: [PATCH 020/166] libcxx: Build undwinder when RUNTIME = "llvm" ensure that libcxx can be built when RUNTIME = "llvm" as it might need to pass some cmake compiler tests Signed-off-by: Khem Raj (cherry picked from commit a0a318157ca0555b0d6e20028dcb7e3e3f3c08c6) --- recipes-devtools/clang/libcxx_git.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index d19839de..c1790061 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb @@ -8,7 +8,7 @@ SECTION = "base" require clang.inc require common-source.inc -inherit cmake python3native +inherit cmake cmake-native python3native PACKAGECONFIG ??= "compiler-rt exceptions ${@bb.utils.contains("RUNTIME", "llvm", "unwind unwind-shared", "", d)}" PACKAGECONFIG_append_armv5 = " no-atomics" @@ -25,6 +25,8 @@ DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}li LIBCPLUSPLUS = "" COMPILER_RT ?= "-rtlib=compiler-rt" +CXXFLAGS += "-stdlib=libstdc++" +LDFLAGS += "-unwindlib=libgcc -stdlib=libstdc++" INHIBIT_DEFAULT_DEPS = "1" LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da3953 \ @@ -73,5 +75,7 @@ CXXFLAGS_append_armv5 = " -mfpu=vfp2" ALLOW_EMPTY_${PN} = "1" +PROVIDES += "${@bb.utils.contains("RUNTIME", "llvm", "libunwind", "", d)}" + BBCLASSEXTEND = "native nativesdk" TOOLCHAIN = "clang" From 9aa02d5751be10e0ba439ca201479d0a28dfde76 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 26 May 2021 11:38:51 -0700 Subject: [PATCH 021/166] clang.bbclass: Adjust for clang default changes Now that clang can pass right options automatically when RUNTIME = "llvm", adjust the variables e.g. COMPILER_RT/UNWINDLIB/LIBCPLUSPLUS are no more required to be defaulted Disable enforcing gcc runtime for packages using gcc as its no longer needed here but is taken care by RUNTIME variable as an aside it also helps in building native and nativesdk llvm runtimes Compute right dependencies based on selected RUNTIME along with COMPILER_RT/UNWINDLIB/LIBCPLUSPLUS variables Signed-off-by: Khem Raj (cherry picked from commit dc5e04e5819a5e7384ae48f1740ac82970a80b8f) --- classes/clang.bbclass | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index e6090612..b53eace5 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -12,17 +12,17 @@ NM_toolchain-clang = "${HOST_PREFIX}llvm-nm" LTO_toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'thin-lto', '-flto=thin', '-flto -fuse-ld=lld', d)}" PACKAGE_DEBUG_SPLIT_STYLE_toolchain-clang = "debug-without-src" -COMPILER_RT ??= "${@bb.utils.contains("RUNTIME", "llvm", "-rtlib=compiler-rt ${UNWINDLIB}", "", d)}" +COMPILER_RT ??= "" COMPILER_RT_powerpc = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT_armeb = "-rtlib=libgcc ${UNWINDLIB}" -UNWINDLIB ??= "${@bb.utils.contains("RUNTIME", "llvm", "--unwindlib=libgcc", "", d)}" +UNWINDLIB ??= "" UNWINDLIB_riscv64 = "--unwindlib=libgcc" UNWINDLIB_riscv32 = "--unwindlib=libgcc" UNWINDLIB_powerpc = "--unwindlib=libgcc" UNWINDLIB_armeb = "--unwindlib=libgcc" -LIBCPLUSPLUS ??= "${@bb.utils.contains("RUNTIME", "llvm", "-stdlib=libc++", "", d)}" +LIBCPLUSPLUS ??= "" TARGET_CXXFLAGS_append_toolchain-clang = " ${LIBCPLUSPLUS}" TUNE_CCARGS_append_toolchain-clang = " ${COMPILER_RT} ${LIBCPLUSPLUS}" @@ -69,7 +69,7 @@ LDFLAGS_append_toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is TOOLCHAIN ??= "gcc" # choose between 'gnu' 'llvm' RUNTIME ??= "gnu" -RUNTIME_toolchain-gcc = "gnu" +#RUNTIME_toolchain-gcc = "gnu" RUNTIME_armeb = "gnu" TOOLCHAIN_class-native = "gcc" @@ -89,13 +89,17 @@ def clang_base_deps(d): if not d.getVar('INHIBIT_DEFAULT_DEPS', False): if not oe.utils.inherits(d, 'allarch') : ret = " clang-cross-${TARGET_ARCH} virtual/libc " - if (d.getVar('COMPILER_RT').find('-rtlib=compiler-rt') != -1): + if (d.getVar('RUNTIME').find('llvm') != -1): + ret += " compiler-rt libcxx" + elif (d.getVar('COMPILER_RT').find('-rtlib=compiler-rt') != -1): ret += " compiler-rt " else: ret += " libgcc " - if (d.getVar('COMPILER_RT').find('--unwindlib=libunwind') != -1): + if (d.getVar('RUNTIME').find('llvm') != -1): + ret += " libcxx" + elif (d.getVar('COMPILER_RT').find('--unwindlib=libunwind') != -1): ret += " libcxx " - if (d.getVar('LIBCPLUSPLUS').find('-stdlib=libc++') != -1): + elif (d.getVar('LIBCPLUSPLUS').find('-stdlib=libc++') != -1): ret += " libcxx " else: ret += " virtual/${TARGET_PREFIX}compilerlibs " From 96b0d07aac7563a8624b6027303710fdccd4b0b0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 26 May 2021 11:42:16 -0700 Subject: [PATCH 022/166] layer.conf: Prefer llvm libunwind when RUNTIME = "llvm" Avoids conflicts with libunwind recipe from OE-Core Signed-off-by: Khem Raj (cherry picked from commit 5be1042c67063354217154e3c35ed83408d916ce) --- conf/layer.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/layer.conf b/conf/layer.conf index 6fa70add..ebf94460 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -28,6 +28,7 @@ PREFERRED_PROVIDER_libgcc-initial = "libgcc-initial" PREFERRED_PROVIDER_llvm = "clang" PREFERRED_PROVIDER_llvm-native = "clang-native" PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang" +PREFERRED_PROVIDER_libunwind = "${@bb.utils.contains("RUNTIME", "llvm", "libcxx", "libunwind", d)}" INHERIT += "clang" # Do not include clang in SDK unless user wants to From 40063f5a02616db3b10e8c4d48efb3ad8c3d21e3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 26 May 2021 17:29:01 -0700 Subject: [PATCH 023/166] nss: Pass options to select runtime for native parts Since clang maybe configured to use llvm runtime, we need to ensure to use gnu runtime in native builds Signed-off-by: Khem Raj (cherry picked from commit 563e11548bfe95444d447e058001d3d1da5fe8e8) --- conf/nonclangable.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index f2bee646..f9bd591a 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -291,7 +291,7 @@ COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc" # Uses gcc for native tools, e.g. nsinstall and passes clang options which fails so # let same compiler ( gcc or clang) be native/cross compiler # | gcc: error: unrecognized command line option ‘-Qunused-arguments’ -BUILD_CC_pn-nss_toolchain-clang = "clang" +BUILD_CC_pn-nss_toolchain-clang = "clang -rtlib=libgcc -unwindlib=none" # libnoprofile.c:19:5: error: expected parameter declarator # int printf(const char *format, ...) { From 15f11d74a5102891174c8b8b05e94d5c1380e1c0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 26 May 2021 17:31:59 -0700 Subject: [PATCH 024/166] compiler-rt-native: Fix build with clang Signed-off-by: Khem Raj (cherry picked from commit 9c8347351565ba4ea0b31e92cf55b29811372285) --- recipes-devtools/clang/compiler-rt_git.bb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index 49566e7e..992e42cf 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb @@ -27,6 +27,16 @@ DEPENDS_append_class-native = " clang-native" CXXFLAGS += "-stdlib=libstdc++" LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" +BUILD_CXXFLAGS += "-stdlib=libstdc++" +BUILD_LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" + +BUILD_CC_toolchain-clang = "${CCACHE}clang" +BUILD_CXX_toolchain-clang = "${CCACHE}clang++" +BUILD_CPP_toolchain-clang = "${CCACHE}clang -E" +BUILD_CCLD_toolchain-clang = "${CCACHE}clang" +BUILD_RANLIB_toolchain-clang = "llvm-ranlib" +BUILD_AR_toolchain-clang = "llvm-ar" +BUILD_NM_toolchain-clang = "llvm-nm" PACKAGECONFIG ??= "" PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" From b42bbe1275e7567e8a9adf08e9b86d5b85734285 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 26 May 2021 17:32:18 -0700 Subject: [PATCH 025/166] clang.bbclass: Limit using clang to target recipes only since toolchain-clang maybe available for native as well now, it means we have to ensure we do not use it for native recipes _yet_ Signed-off-by: Khem Raj (cherry picked from commit 95b2e77c088aacaae58aa9157fc7b7bde82527c8) --- classes/clang.bbclass | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index b53eace5..bbee721d 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -1,13 +1,13 @@ # Add the necessary override -CCACHE_COMPILERCHECK_toolchain-clang ?= "%compiler% -v" -HOST_CC_ARCH_prepend_toolchain-clang = "-target ${HOST_SYS} " -CC_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -CXX_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -CPP_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} -E" -CCLD_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -RANLIB_toolchain-clang = "${HOST_PREFIX}llvm-ranlib" -AR_toolchain-clang = "${HOST_PREFIX}llvm-ar" -NM_toolchain-clang = "${HOST_PREFIX}llvm-nm" +CCACHE_COMPILERCHECK_class-target_toolchain-clang ?= "%compiler% -v" +HOST_CC_ARCH_prepend_class-target_toolchain-clang = "-target ${HOST_SYS} " +CC_class-target_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" +CXX_class-target_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" +CPP_class-target_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} -E" +CCLD_class-target_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" +RANLIB_class-target_toolchain-clang = "${HOST_PREFIX}llvm-ranlib" +AR_class-target_toolchain-clang = "${HOST_PREFIX}llvm-ar" +NM_class-target_toolchain-clang = "${HOST_PREFIX}llvm-nm" LTO_toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'thin-lto', '-flto=thin', '-flto -fuse-ld=lld', d)}" PACKAGE_DEBUG_SPLIT_STYLE_toolchain-clang = "debug-without-src" From 09e40c325fbe7da7bf3c73404425b1054a50ce4a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 26 May 2021 19:58:42 -0700 Subject: [PATCH 026/166] libc-bench: It works fine with new way of choosing llvm runtime Signed-off-by: Khem Raj (cherry picked from commit 55978074f349330367ffbbf991e3287141f8fe4d) --- conf/nonclangable.conf | 3 --- 1 file changed, 3 deletions(-) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index f9bd591a..3f78b36c 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -272,11 +272,9 @@ LDFLAGS_append_pn-qemu_toolchain-clang_runtime-gnu_x86 = " -latomic" # glibc is built with gcc and hence encodes some libgcc specific builtins which are not found # when doing static linking with clang using compiler-rt, so use libgcc # undefined reference to `__unordtf2' -COMPILER_RT_pn-libc-bench_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc" COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc" COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc" COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc" -COMPILER_RT_pn-libc-bench_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc" COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc" COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc" COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc" @@ -284,7 +282,6 @@ COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc" #(unwind.o): in function `__pthread_unwind': #/usr/src/debug/glibc/2.29-r0/git/nptl/unwind.c:121: undefined reference to `_Unwind_ForcedUnwind' #clang-8: error: linker command failed with exit code 1 (use -v to see invocation) -COMPILER_RT_pn-libc-bench_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc" COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc" COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc" From fce9cfd85355f724330ed6518d85596deffbf99f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 28 May 2021 17:37:52 -0700 Subject: [PATCH 027/166] libunwind: Install headers and pkgconfig file This ensures it can replace nongnu libunwind Use it only when selecting RUNTIME = "llvm" Signed-off-by: Khem Raj (cherry picked from commit c48de926ac54802df7e1e4b7f91caa4fa4ef45b1) --- recipes-devtools/clang/clang/libunwind.pc.in | 9 +++++++++ recipes-devtools/clang/common.inc | 1 + recipes-devtools/clang/libcxx_git.bb | 11 +++++++++++ 3 files changed, 21 insertions(+) create mode 100644 recipes-devtools/clang/clang/libunwind.pc.in diff --git a/recipes-devtools/clang/clang/libunwind.pc.in b/recipes-devtools/clang/clang/libunwind.pc.in new file mode 100644 index 00000000..a93d6766 --- /dev/null +++ b/recipes-devtools/clang/clang/libunwind.pc.in @@ -0,0 +1,9 @@ +prefix=/usr +exec_prefix=/usr +libdir=@LIBDIR@ +includedir=/usr/include + +Name: libunwind +Description: libunwind base library +Version: @VERSION@ +Libs: -lunwind diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 8046c357..d68d6f5e 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -9,6 +9,7 @@ BASEURI ??= "${LLVM_GIT}/llvm-project;protocol=${LLVM_GIT_PROTOCOL};branch=${BRA SRC_URI = "\ ${BASEURI} \ file://llvm-config \ + file://libunwind.pc.in \ file://0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch \ file://0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \ file://0003-compiler-rt-support-a-new-embedded-linux-target.patch \ diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index c1790061..ef330ddd 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb @@ -77,5 +77,16 @@ ALLOW_EMPTY_${PN} = "1" PROVIDES += "${@bb.utils.contains("RUNTIME", "llvm", "libunwind", "", d)}" + +do_install_append() { + if ${@bb.utils.contains("RUNTIME", "llvm", "true", "false", d)} + then + install -Dm 0644 ${S}/libunwind/include/libunwind.h ${S}/libunwind/include/__libunwind_config.h ${D}${includedir} + install -Dm 0644 ${S}/libunwind/include/unwind.h ${D}${includedir}/unwind.h + install -d ${D}${libdir}/pkgconfig + sed -e 's,@LIBDIR@,${libdir},g;s,@VERSION@,${PV},g' ${S}/../libunwind.pc.in > ${D}${libdir}/pkgconfig/libunwind.pc + fi +} + BBCLASSEXTEND = "native nativesdk" TOOLCHAIN = "clang" From 2f3f9d953a9b78e61eac4fce1a84d7594f335c6c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 28 May 2021 17:40:13 -0700 Subject: [PATCH 028/166] libunwind: Implement unw_backtrace Signed-off-by: Khem Raj (cherry picked from commit d45403baedd7ae7755a02cfe0205000b760167bd) --- ...libunwind-Added-unw_backtrace-method.patch | 55 +++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 2 files changed, 56 insertions(+) create mode 100644 recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch diff --git a/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch new file mode 100644 index 00000000..53f816d8 --- /dev/null +++ b/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch @@ -0,0 +1,55 @@ +From 79195637cf6cde28baa23e41e7b417e98b036913 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 + +Source: https://github.com/ClickHouse-Extras/libunwind/commit/52f0f7861926cbfaef7e6c97d8a6d7ba2a1f6747#diff-a82fc885e2e4facf4b92d26171c13aa4aa5db296f77e1158ba2f8664e3bd1f5c +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + libunwind/include/libunwind.h | 1 + + libunwind/src/libunwind.cpp | 18 ++++++++++++++++++ + 2 files changed, 19 insertions(+) + +diff --git a/libunwind/include/libunwind.h b/libunwind/include/libunwind.h +index 0feecd7bd6fc..670cfa3ed71d 100644 +--- a/libunwind/include/libunwind.h ++++ b/libunwind/include/libunwind.h +@@ -127,6 +127,7 @@ extern int unw_is_fpreg(unw_cursor_t *, unw_regnum_t) LIBUNWIND_AVAIL; + extern int unw_is_signal_frame(unw_cursor_t *) LIBUNWIND_AVAIL; + extern int unw_get_proc_name(unw_cursor_t *, char *, size_t, unw_word_t *) LIBUNWIND_AVAIL; + //extern int unw_get_save_loc(unw_cursor_t*, int, unw_save_loc_t*); ++extern int unw_backtrace(void **, int) LIBUNWIND_AVAIL; + + extern unw_addr_space_t unw_local_addr_space; + +diff --git a/libunwind/src/libunwind.cpp b/libunwind/src/libunwind.cpp +index 9b3b92bdff09..986ef62f9231 100644 +--- a/libunwind/src/libunwind.cpp ++++ b/libunwind/src/libunwind.cpp +@@ -289,7 +289,25 @@ void __unw_remove_dynamic_fde(unw_word_t fde) { + #endif // defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) + #endif // !defined(__USING_SJLJ_EXCEPTIONS__) + ++int unw_backtrace(void **buffer, int size) { ++ unw_context_t context; ++ unw_cursor_t cursor; ++ if (unw_getcontext(&context) || unw_init_local(&cursor, &context)) { ++ return 0; ++ } ++ ++ unw_word_t ip; ++ int current = 0; ++ while (unw_step(&cursor) > 0) { ++ 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 diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index d68d6f5e..7f1a5f35 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -42,6 +42,7 @@ SRC_URI = "\ file://0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch \ file://0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ file://0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch \ + file://0033-libunwind-Added-unw_backtrace-method.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From 562e0a5b4ed3baba0056bd55c7d34115bdb198d1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 28 May 2021 18:19:22 -0700 Subject: [PATCH 029/166] Package libunwind independently This helps in ensuring it pose as RPROVIDES when llvm runtime is used Signed-off-by: Khem Raj (cherry picked from commit cee6adcb98ed39a30b6def6c4ab6d3965854178a) --- recipes-devtools/clang/libcxx_git.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index ef330ddd..87d133ea 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb @@ -75,8 +75,7 @@ CXXFLAGS_append_armv5 = " -mfpu=vfp2" ALLOW_EMPTY_${PN} = "1" -PROVIDES += "${@bb.utils.contains("RUNTIME", "llvm", "libunwind", "", d)}" - +PROVIDES_append_runtime-llvm = " libunwind" do_install_append() { if ${@bb.utils.contains("RUNTIME", "llvm", "true", "false", d)} @@ -88,5 +87,8 @@ do_install_append() { fi } +PACKAGES_append_runtime-llvm = " libunwind" +FILES_libunwind_runtime-llvm = "${libdir}/libunwind.so.*" + BBCLASSEXTEND = "native nativesdk" TOOLCHAIN = "clang" From b40b542899a84faa4793c042abb42a91ac426942 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 29 May 2021 13:51:19 -0700 Subject: [PATCH 030/166] compiler-rt-sanitizers: Fix hwsan builds with llvm libunwind Signed-off-by: Khem Raj (cherry picked from commit e9a764eac78f6099d34dd9ce8faae906b3fa6b4c) --- ...se-uintptr_t-instead-of-_Unwind_Word.patch | 35 +++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 2 files changed, 36 insertions(+) create mode 100644 recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch diff --git a/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch b/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch new file mode 100644 index 00000000..d04e0e8a --- /dev/null +++ b/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch @@ -0,0 +1,35 @@ +From fbc9b98b9f668bb6729c7f4c6cc9de9d40c674ce Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 29 May 2021 13:42:25 -0700 +Subject: [PATCH] compiler-rt: Use uintptr_t instead of _Unwind_Word + +_Unwind_Word is defined in compiler specific unwind.h but not in +libunwind provided unwind.h header, it works in most cases because +compilers search compiler headers ahead of system headers but for some +systems e.g. musl bases systems the compiler provided versions are not +preferred over system headers and therefore relying on _Unwind_Word +means its expecting this define in all unwind.h headers which is not the +case, using uintptr_t means we don't need this from unwind.h + +See https://reviews.llvm.org/D65699 + +Signed-off-by: Khem Raj +--- + compiler-rt/lib/hwasan/hwasan_exceptions.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/compiler-rt/lib/hwasan/hwasan_exceptions.cpp b/compiler-rt/lib/hwasan/hwasan_exceptions.cpp +index 169e7876cb58..6ed1da335428 100644 +--- a/compiler-rt/lib/hwasan/hwasan_exceptions.cpp ++++ b/compiler-rt/lib/hwasan/hwasan_exceptions.cpp +@@ -29,8 +29,8 @@ typedef _Unwind_Reason_Code PersonalityFn(int version, _Unwind_Action actions, + // is statically linked and the sanitizer runtime and the program are linked + // against different unwinders. The _Unwind_Context data structure is opaque so + // it may be incompatible between unwinders. +-typedef _Unwind_Word GetGRFn(_Unwind_Context* context, int index); +-typedef _Unwind_Word GetCFAFn(_Unwind_Context* context); ++typedef uintptr_t GetGRFn(_Unwind_Context* context, int index); ++typedef uintptr_t GetCFAFn(_Unwind_Context* context); + + extern "C" SANITIZER_INTERFACE_ATTRIBUTE _Unwind_Reason_Code + __hwasan_personality_wrapper(int version, _Unwind_Action actions, diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 7f1a5f35..82ab6946 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -43,6 +43,7 @@ SRC_URI = "\ file://0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ file://0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch \ file://0033-libunwind-Added-unw_backtrace-method.patch \ + file://0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From d12ec84919068732eac85411d362cb4b33db005f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 20 May 2021 06:42:46 -0700 Subject: [PATCH 031/166] bcc: Update to master tip In order to use latest clang, latest bcc sources are needed, this also means that we need to use vendored libbpf as thats the newest one needed and avoids dependencies on kernel bpf headers which maybe old and out of sync examples use error.h header which is not available on musl therefore disable examples when building on musl Signed-off-by: Khem Raj (cherry picked from commit 21182ec55dace9062be427c2ee583fd4027f899b) --- ...unction-blk_account_io_completion-to.patch | 169 ------------- ...ically-to-libclang-cpp-if-found-and-.patch | 68 ----- ...tion-issues-with-latest-llvm12-trunk.patch | 89 ------- ...snoop-do_sys_openat2-for-kernel-v5.6.patch | 50 ---- ...k-to-packaged-libbpf-if-CMAKE_USE_LI.patch | 239 ------------------ ...ation-error-with-latest-llvm12-trunk.patch | 60 ----- ...-libbpf-shared-library-change-libbcc.patch | 156 ------------ ...r-either-static-or-dynamic-libraries.patch | 69 ----- .../bcc/{bcc_0.17.0.bb => bcc_0.20.0.bb} | 20 +- 9 files changed, 7 insertions(+), 913 deletions(-) delete mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-Replace-kprobe-function-blk_account_io_completion-to.patch delete mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-cmake-link-dynamically-to-libclang-cpp-if-found-and-.patch delete mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-fix-compilation-issues-with-latest-llvm12-trunk.patch delete mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tools-opensnoop-snoop-do_sys_openat2-for-kernel-v5.6.patch delete mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0002-cmake-always-link-to-packaged-libbpf-if-CMAKE_USE_LI.patch delete mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0002-fix-compilation-error-with-latest-llvm12-trunk.patch delete mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0003-Remove-libbcc-no-libbpf-shared-library-change-libbcc.patch delete mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0004-cmake-look-for-either-static-or-dynamic-libraries.patch rename dynamic-layers/openembedded-layer/recipes-devtools/bcc/{bcc_0.17.0.bb => bcc_0.20.0.bb} (62%) diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-Replace-kprobe-function-blk_account_io_completion-to.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-Replace-kprobe-function-blk_account_io_completion-to.patch deleted file mode 100644 index ef932962..00000000 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-Replace-kprobe-function-blk_account_io_completion-to.patch +++ /dev/null @@ -1,169 +0,0 @@ -From 95c9229ea9f029a1b9e8dcbe86fc67f037c0dfa2 Mon Sep 17 00:00:00 2001 -From: Chen HaoNing -Date: Wed, 1 Jul 2020 15:49:17 -0500 -Subject: [PATCH] Replace kprobe function "blk_account_io_completion" to - "blk_account_io_done" for kernel version >= 5.8.0 - -The kernel function "blk_account_io_completion" is not available anymore as attach point of Kprobe as of kernel version 5.8.0. Therefore, after discussions, we decided to use function "blk_account_io_done" instead in every kprobe attachment to "blk_account_io_completion". - -Upstream-Status: Backport - ---- - docs/reference_guide.md | 4 ++-- - docs/tutorial_bcc_python_developer.md | 6 +++--- - examples/lua/kprobe-latency.lua | 2 +- - examples/tracing/bitehist.py | 2 +- - examples/tracing/disksnoop.py | 2 +- - tools/biosnoop.lua | 2 +- - tools/biosnoop.py | 2 +- - tools/biotop.py | 2 +- - tools/old/biosnoop.py | 2 +- - 9 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/docs/reference_guide.md b/docs/reference_guide.md -index 924fa203..9eaf27a5 100644 ---- a/docs/reference_guide.md -+++ b/docs/reference_guide.md -@@ -1784,7 +1784,7 @@ Example: - b = BPF(text=""" - BPF_HISTOGRAM(dist); - --int kprobe__blk_account_io_completion(struct pt_regs *ctx, struct request *req) -+int kprobe__blk_account_io_done(struct pt_regs *ctx, struct request *req) - { - dist.increment(bpf_log2l(req->__data_len / 1024)); - return 0; -@@ -1835,7 +1835,7 @@ Example: - b = BPF(text=""" - BPF_HISTOGRAM(dist); - --int kprobe__blk_account_io_completion(struct pt_regs *ctx, struct request *req) -+int kprobe__blk_account_io_done(struct pt_regs *ctx, struct request *req) - { - dist.increment(req->__data_len / 1024); - return 0; -diff --git a/docs/tutorial_bcc_python_developer.md b/docs/tutorial_bcc_python_developer.md -index 0cb0e780..b3b8ed6b 100644 ---- a/docs/tutorial_bcc_python_developer.md -+++ b/docs/tutorial_bcc_python_developer.md -@@ -220,7 +220,7 @@ void trace_completion(struct pt_regs *ctx, struct request *req) { - - b.attach_kprobe(event="blk_start_request", fn_name="trace_start") - b.attach_kprobe(event="blk_mq_start_request", fn_name="trace_start") --b.attach_kprobe(event="blk_account_io_completion", fn_name="trace_completion") -+b.attach_kprobe(event="blk_account_io_done", fn_name="trace_completion") - [...] - ``` - -@@ -351,7 +351,7 @@ b = BPF(text=""" - - BPF_HISTOGRAM(dist); - --int kprobe__blk_account_io_completion(struct pt_regs *ctx, struct request *req) -+int kprobe__blk_account_io_done(struct pt_regs *ctx, struct request *req) - { - dist.increment(bpf_log2l(req->__data_len / 1024)); - return 0; -@@ -374,7 +374,7 @@ b["dist"].print_log2_hist("kbytes") - A recap from earlier lessons: - - - ```kprobe__```: This prefix means the rest will be treated as a kernel function name that will be instrumented using kprobe. --- ```struct pt_regs *ctx, struct request *req```: Arguments to kprobe. The ```ctx``` is registers and BPF context, the ```req``` is the first argument to the instrumented function: ```blk_account_io_completion()```. -+- ```struct pt_regs *ctx, struct request *req```: Arguments to kprobe. The ```ctx``` is registers and BPF context, the ```req``` is the first argument to the instrumented function: ```blk_account_io_done()```. - - ```req->__data_len```: Dereferencing that member. - - New things to learn: -diff --git a/examples/lua/kprobe-latency.lua b/examples/lua/kprobe-latency.lua -index 60ac2c1c..98464e5c 100644 ---- a/examples/lua/kprobe-latency.lua -+++ b/examples/lua/kprobe-latency.lua -@@ -30,7 +30,7 @@ local lat_map = bpf.map('array', bins) - local trace_start = bpf.kprobe('myprobe:blk_start_request', function (ptregs) - map[ptregs.parm1] = time() - end, false, -1, 0) --local trace_end = bpf.kprobe('myprobe2:blk_account_io_completion', function (ptregs) -+local trace_end = bpf.kprobe('myprobe2:blk_account_io_done', function (ptregs) - -- The lines below are computing index - -- using log10(x)*10 = log2(x)*10/log2(10) = log2(x)*3 - -- index = 29 ~ 1 usec -diff --git a/examples/tracing/bitehist.py b/examples/tracing/bitehist.py -index 4d7c7958..89ceb307 100755 ---- a/examples/tracing/bitehist.py -+++ b/examples/tracing/bitehist.py -@@ -25,7 +25,7 @@ b = BPF(text=""" - BPF_HISTOGRAM(dist); - BPF_HISTOGRAM(dist_linear); - --int kprobe__blk_account_io_completion(struct pt_regs *ctx, struct request *req) -+int kprobe__blk_account_io_done(struct pt_regs *ctx, struct request *req) - { - dist.increment(bpf_log2l(req->__data_len / 1024)); - dist_linear.increment(req->__data_len / 1024); -diff --git a/examples/tracing/disksnoop.py b/examples/tracing/disksnoop.py -index 1101e6f2..a35e1abd 100755 ---- a/examples/tracing/disksnoop.py -+++ b/examples/tracing/disksnoop.py -@@ -46,7 +46,7 @@ void trace_completion(struct pt_regs *ctx, struct request *req) { - if BPF.get_kprobe_functions(b'blk_start_request'): - b.attach_kprobe(event="blk_start_request", fn_name="trace_start") - b.attach_kprobe(event="blk_mq_start_request", fn_name="trace_start") --b.attach_kprobe(event="blk_account_io_completion", fn_name="trace_completion") -+b.attach_kprobe(event="blk_account_io_done", fn_name="trace_completion") - - # header - print("%-18s %-2s %-7s %8s" % ("TIME(s)", "T", "BYTES", "LAT(ms)")) -diff --git a/tools/biosnoop.lua b/tools/biosnoop.lua -index 8d9b6a19..3e0441e2 100755 ---- a/tools/biosnoop.lua -+++ b/tools/biosnoop.lua -@@ -126,7 +126,7 @@ return function(BPF, utils) - bpf:attach_kprobe{event="blk_account_io_start", fn_name="trace_pid_start"} - bpf:attach_kprobe{event="blk_start_request", fn_name="trace_req_start"} - bpf:attach_kprobe{event="blk_mq_start_request", fn_name="trace_req_start"} -- bpf:attach_kprobe{event="blk_account_io_completion", -+ bpf:attach_kprobe{event="blk_account_io_done", - fn_name="trace_req_completion"} - - print("%-14s %-14s %-6s %-7s %-2s %-9s %-7s %7s" % {"TIME(s)", "COMM", "PID", -diff --git a/tools/biosnoop.py b/tools/biosnoop.py -index ff9b842b..5bbc77cd 100755 ---- a/tools/biosnoop.py -+++ b/tools/biosnoop.py -@@ -160,7 +160,7 @@ b.attach_kprobe(event="blk_account_io_start", fn_name="trace_pid_start") - if BPF.get_kprobe_functions(b'blk_start_request'): - b.attach_kprobe(event="blk_start_request", fn_name="trace_req_start") - b.attach_kprobe(event="blk_mq_start_request", fn_name="trace_req_start") --b.attach_kprobe(event="blk_account_io_completion", -+b.attach_kprobe(event="blk_account_io_done", - fn_name="trace_req_completion") - - # header -diff --git a/tools/biotop.py b/tools/biotop.py -index cad3759a..d3a42ef7 100755 ---- a/tools/biotop.py -+++ b/tools/biotop.py -@@ -178,7 +178,7 @@ b.attach_kprobe(event="blk_account_io_start", fn_name="trace_pid_start") - if BPF.get_kprobe_functions(b'blk_start_request'): - b.attach_kprobe(event="blk_start_request", fn_name="trace_req_start") - b.attach_kprobe(event="blk_mq_start_request", fn_name="trace_req_start") --b.attach_kprobe(event="blk_account_io_completion", -+b.attach_kprobe(event="blk_account_io_done", - fn_name="trace_req_completion") - - print('Tracing... Output every %d secs. Hit Ctrl-C to end' % interval) -diff --git a/tools/old/biosnoop.py b/tools/old/biosnoop.py -index 37ee3f9c..847ab91b 100755 ---- a/tools/old/biosnoop.py -+++ b/tools/old/biosnoop.py -@@ -98,7 +98,7 @@ int trace_req_completion(struct pt_regs *ctx, struct request *req) - b.attach_kprobe(event="blk_account_io_start", fn_name="trace_pid_start") - b.attach_kprobe(event="blk_start_request", fn_name="trace_req_start") - b.attach_kprobe(event="blk_mq_start_request", fn_name="trace_req_start") --b.attach_kprobe(event="blk_account_io_completion", -+b.attach_kprobe(event="blk_account_io_done", - fn_name="trace_req_completion") - - # header --- -2.17.1 - diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-cmake-link-dynamically-to-libclang-cpp-if-found-and-.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-cmake-link-dynamically-to-libclang-cpp-if-found-and-.patch deleted file mode 100644 index 74b2e277..00000000 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-cmake-link-dynamically-to-libclang-cpp-if-found-and-.patch +++ /dev/null @@ -1,68 +0,0 @@ -From f14f69d996ffc1c61dd523b839271d4a51328e4d Mon Sep 17 00:00:00 2001 -From: Luca Boccassi -Date: Fri, 1 Jan 2021 19:04:37 +0000 -Subject: [PATCH 1/3] cmake: link dynamically to libclang-cpp if found and - ENABLE_LLVM_SHARED is set - -ENABLE_LLVM_SHARED allows to dynamically link against libLLVM, but -libclang is still unconditionally linked statically. -Search for libclang-cpp.so, and if it is found and ENABLE_LLVM_SHARED -is set dynamically link against it. -Also expand the libstdc++ static linking check to include this new -condition. ---- - CMakeLists.txt | 1 + - cmake/clang_libs.cmake | 4 ++++ - cmake/static_libstdc++.cmake | 2 +- - 3 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 74fe4f19..b2e334e9 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -76,6 +76,7 @@ find_library(libclangRewrite NAMES clangRewrite clang-cpp HINTS ${CLANG_SEARCH}) - find_library(libclangSema NAMES clangSema clang-cpp HINTS ${CLANG_SEARCH}) - find_library(libclangSerialization NAMES clangSerialization clang-cpp HINTS ${CLANG_SEARCH}) - find_library(libclangASTMatchers NAMES clangASTMatchers clang-cpp HINTS ${CLANG_SEARCH}) -+find_library(libclang-shared libclang-cpp.so HINTS ${CLANG_SEARCH}) - if(libclangBasic STREQUAL "libclangBasic-NOTFOUND") - message(FATAL_ERROR "Unable to find clang libraries") - endif() -diff --git a/cmake/clang_libs.cmake b/cmake/clang_libs.cmake -index c33b635c..3f1523b7 100644 ---- a/cmake/clang_libs.cmake -+++ b/cmake/clang_libs.cmake -@@ -26,6 +26,9 @@ llvm_map_components_to_libnames(_llvm_libs ${llvm_raw_libs}) - llvm_expand_dependencies(llvm_libs ${_llvm_libs}) - endif() - -+if(ENABLE_LLVM_SHARED AND NOT libclang-shared STREQUAL "libclang-shared-NOTFOUND") -+set(clang_libs ${libclang-shared}) -+else() - # order is important - set(clang_libs - ${libclangFrontend} -@@ -46,6 +49,7 @@ list(APPEND clang_libs - ${libclangAST} - ${libclangLex} - ${libclangBasic}) -+endif() - - # prune unused llvm static library stuff when linking into the new .so - set(_exclude_flags) -diff --git a/cmake/static_libstdc++.cmake b/cmake/static_libstdc++.cmake -index 3c8ac179..787ed9ad 100644 ---- a/cmake/static_libstdc++.cmake -+++ b/cmake/static_libstdc++.cmake -@@ -1,7 +1,7 @@ - # only turn on static-libstdc++ if also linking statically against clang - string(REGEX MATCH ".*[.]a$" LIBCLANG_ISSTATIC "${libclangBasic}") - # if gcc 4.9 or higher is used, static libstdc++ is a good option --if (CMAKE_COMPILER_IS_GNUCC AND LIBCLANG_ISSTATIC) -+if (CMAKE_COMPILER_IS_GNUCC AND LIBCLANG_ISSTATIC AND (NOT ENABLE_LLVM_SHARED OR libclang-shared STREQUAL "libclang-shared-NOTFOUND")) - execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) - if (GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9) - execute_process(COMMAND ${CMAKE_C_COMPILER} -print-libgcc-file-name OUTPUT_VARIABLE GCC_LIB) --- -2.29.2 - diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-fix-compilation-issues-with-latest-llvm12-trunk.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-fix-compilation-issues-with-latest-llvm12-trunk.patch deleted file mode 100644 index b1f56e68..00000000 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-fix-compilation-issues-with-latest-llvm12-trunk.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 675fca6a646812361c16884ccd2ff789f40c4ce8 Mon Sep 17 00:00:00 2001 -From: Yonghong Song -Date: Tue, 3 Nov 2020 22:11:57 -0800 -Subject: [PATCH 1/2] fix compilation issues with latest llvm12 trunk -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -With latest llvm12 trunk, we got two compilation bugs. - -Bug #1: - /home/yhs/work/bcc/src/cc/frontends/clang/b_frontend_action.cc: - In member function ‘void ebpf::BFrontendAction::DoMiscWorkAround()’: - /home/yhs/work/bcc/src/cc/frontends/clang/b_frontend_action.cc:1706:31: - error: ‘class clang::SourceManage’ has no member named ‘getBuffer’; did you mean ‘getBufferData’? - rewriter_->getSourceMgr().getBuffer(rewriter_->getSourceMgr().getMainFileID())->getBufferSize(), - ^~~~~~~~~ - getBufferData - - This is due to upstream change https://reviews.llvm.org/D89394. - To fix, follow upstream examples in https://reviews.llvm.org/D89394. - -Bug #2: - /home/yhs/work/bcc/src/cc/bpf_module.cc: In member function ‘int ebpf::BPFModule::finalize()’: - /home/yhs/work/bcc/src/cc/bpf_module.cc:470:11: - error: ‘class llvm::EngineBuilder’ has no member named ‘setUseOrcMCJITReplacement’ - builder.setUseOrcMCJITReplacement(false); - ^~~~~~~~~~~~~~~~~~~~~~~~~ - - This is due to upstream - https://github.com/llvm/llvm-project/commit/6154c4115cd4b78d0171892aac21e340e72e32bd - - It seems builder.setUseOrcMCJITReplacement() is not needed any more. So just remove it - from bcc. - -Signed-off-by: Yonghong Song ---- - src/cc/bpf_module.cc | 2 ++ - src/cc/bpf_module_rw_engine.cc | 2 ++ - src/cc/frontends/clang/b_frontend_action.cc | 4 ++++ - 3 files changed, 8 insertions(+) - -diff --git a/src/cc/bpf_module.cc b/src/cc/bpf_module.cc -index 8fba8d27..c194b815 100644 ---- a/src/cc/bpf_module.cc -+++ b/src/cc/bpf_module.cc -@@ -466,7 +466,9 @@ int BPFModule::finalize() { - builder.setErrorStr(&err); - builder.setMCJITMemoryManager(ebpf::make_unique(sections_p)); - builder.setMArch("bpf"); -+#if LLVM_MAJOR_VERSION <= 11 - builder.setUseOrcMCJITReplacement(false); -+#endif - engine_ = unique_ptr(builder.create()); - if (!engine_) { - fprintf(stderr, "Could not create ExecutionEngine: %s\n", err.c_str()); -diff --git a/src/cc/bpf_module_rw_engine.cc b/src/cc/bpf_module_rw_engine.cc -index d7e31a71..9890af69 100644 ---- a/src/cc/bpf_module_rw_engine.cc -+++ b/src/cc/bpf_module_rw_engine.cc -@@ -356,7 +356,9 @@ unique_ptr BPFModule::finalize_rw(unique_ptr m) { - string err; - EngineBuilder builder(move(m)); - builder.setErrorStr(&err); -+#if LLVM_MAJOR_VERSION <= 11 - builder.setUseOrcMCJITReplacement(false); -+#endif - auto engine = unique_ptr(builder.create()); - if (!engine) - fprintf(stderr, "Could not create ExecutionEngine: %s\n", err.c_str()); -diff --git a/src/cc/frontends/clang/b_frontend_action.cc b/src/cc/frontends/clang/b_frontend_action.cc -index 154a3794..80b03b9b 100644 ---- a/src/cc/frontends/clang/b_frontend_action.cc -+++ b/src/cc/frontends/clang/b_frontend_action.cc -@@ -1694,7 +1694,11 @@ void BFrontendAction::DoMiscWorkAround() { - false); - - rewriter_->getEditBuffer(rewriter_->getSourceMgr().getMainFileID()).InsertTextAfter( -+#if LLVM_MAJOR_VERSION >= 12 -+ rewriter_->getSourceMgr().getBufferOrFake(rewriter_->getSourceMgr().getMainFileID()).getBufferSize(), -+#else - rewriter_->getSourceMgr().getBuffer(rewriter_->getSourceMgr().getMainFileID())->getBufferSize(), -+#endif - "\n#include \n"); - } - --- -2.30.0 - diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tools-opensnoop-snoop-do_sys_openat2-for-kernel-v5.6.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tools-opensnoop-snoop-do_sys_openat2-for-kernel-v5.6.patch deleted file mode 100644 index fb659ccc..00000000 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tools-opensnoop-snoop-do_sys_openat2-for-kernel-v5.6.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 8e12b10e7576a6d47e0dc2cdc36caeb9ba26fa12 Mon Sep 17 00:00:00 2001 -From: He Zhe -Date: Mon, 15 Jun 2020 07:05:24 +0000 -Subject: [PATCH] tools: opensnoop: snoop do_sys_openat2 for kernel v5.6 and - later - -Since kernel v5.6, fddb5d430ad9 ("open: introduce openat2(2) syscall"), -do_sys_openat2 instead of do_sys_open has been used as entry function for open. - -Upstream-Status: Inappropriate, upstream context has changed and needs more - tweak. - -Signed-off-by: He Zhe ---- - tools/opensnoop.py | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/tools/opensnoop.py b/tools/opensnoop.py -index 51d3dc05..522812d4 100755 ---- a/tools/opensnoop.py -+++ b/tools/opensnoop.py -@@ -22,6 +22,8 @@ from bcc.utils import printb - import argparse - from datetime import datetime, timedelta - import os -+import platform -+from pkg_resources import parse_version - - # arguments - examples = """examples: -@@ -235,8 +237,14 @@ if debug or args.ebpf: - # initialize BPF - b = BPF(text=bpf_text) - if not is_support_kfunc: -- b.attach_kprobe(event="do_sys_open", fn_name="trace_entry") -- b.attach_kretprobe(event="do_sys_open", fn_name="trace_return") -+ # Since kernel v5.6, do_sys_openat2 instead of do_sys_open has been used as entry function for open -+ if parse_version(platform.uname().release.split('-')[0]) > parse_version('5.6.0'): -+ entry = "do_sys_openat2" -+ else: -+ entry = "do_sys_open" -+ -+ b.attach_kprobe(event=entry, fn_name="trace_entry") -+ b.attach_kretprobe(event=entry, fn_name="trace_return") - - initial_ts = 0 - --- -2.17.1 - diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0002-cmake-always-link-to-packaged-libbpf-if-CMAKE_USE_LI.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0002-cmake-always-link-to-packaged-libbpf-if-CMAKE_USE_LI.patch deleted file mode 100644 index 0269fa4e..00000000 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0002-cmake-always-link-to-packaged-libbpf-if-CMAKE_USE_LI.patch +++ /dev/null @@ -1,239 +0,0 @@ -From ab9a9dadf294f69e024a8b58c983a6c2085c223a Mon Sep 17 00:00:00 2001 -From: Luca Boccassi -Date: Fri, 8 Jan 2021 16:58:56 +0000 -Subject: [PATCH 2/3] cmake: always link to packaged libbpf if - CMAKE_USE_LIBBPF_PACKAGE is set (#3210) - -Some of the executables still link to the local static versions -even if the user requested CMAKE_USE_LIBBPF_PACKAGE. Fix this by -using bcc-shared-no-libbpf more widely if the variable is set. - -Skip the git submodule and the extraction commands if the user -set CMAKE_USE_LIBBPF_PACKAGE ---- - CMakeLists.txt | 2 +- - examples/cpp/CMakeLists.txt | 59 ++++++++---------------------- - examples/cpp/pyperf/CMakeLists.txt | 5 +++ - introspection/CMakeLists.txt | 8 +++- - src/cc/CMakeLists.txt | 29 ++++++++++----- - tests/cc/CMakeLists.txt | 22 +++++++---- - 6 files changed, 61 insertions(+), 64 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b2e334e9..b68571ea 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -14,7 +14,7 @@ endif() - enable_testing() - - # populate submodules (libbpf) --if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/cc/libbpf/src) -+if(NOT CMAKE_USE_LIBBPF_PACKAGE AND NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/cc/libbpf/src) - execute_process(COMMAND git submodule update --init --recursive - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - endif() -diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt -index dae0e9ce..dd343245 100644 ---- a/examples/cpp/CMakeLists.txt -+++ b/examples/cpp/CMakeLists.txt -@@ -11,49 +11,20 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") - - option(INSTALL_CPP_EXAMPLES "Install C++ examples. Those binaries are statically linked and can take plenty of disk space" OFF) - --add_executable(HelloWorld HelloWorld.cc) --target_link_libraries(HelloWorld bcc-static) -- --add_executable(CPUDistribution CPUDistribution.cc) --target_link_libraries(CPUDistribution bcc-static) -- --add_executable(RecordMySQLQuery RecordMySQLQuery.cc) --target_link_libraries(RecordMySQLQuery bcc-static) -- --add_executable(TCPSendStack TCPSendStack.cc) --target_link_libraries(TCPSendStack bcc-static) -- --add_executable(RandomRead RandomRead.cc) --target_link_libraries(RandomRead bcc-static) -- --add_executable(LLCStat LLCStat.cc) --target_link_libraries(LLCStat bcc-static) -- --add_executable(FollyRequestContextSwitch FollyRequestContextSwitch.cc) --target_link_libraries(FollyRequestContextSwitch bcc-static) -- --add_executable(UseExternalMap UseExternalMap.cc) --target_link_libraries(UseExternalMap bcc-static) -- --add_executable(CGroupTest CGroupTest.cc) --target_link_libraries(CGroupTest bcc-static) -- --add_executable(TaskIterator TaskIterator.cc) --target_link_libraries(TaskIterator bcc-static) -- --add_executable(SkLocalStorageIterator SkLocalStorageIterator.cc) --target_link_libraries(SkLocalStorageIterator bcc-static) -- --if(INSTALL_CPP_EXAMPLES) -- install (TARGETS HelloWorld DESTINATION share/bcc/examples/cpp) -- install (TARGETS CPUDistribution DESTINATION share/bcc/examples/cpp) -- install (TARGETS RecordMySQLQuery DESTINATION share/bcc/examples/cpp) -- install (TARGETS TCPSendStack DESTINATION share/bcc/examples/cpp) -- install (TARGETS RandomRead DESTINATION share/bcc/examples/cpp) -- install (TARGETS LLCStat DESTINATION share/bcc/examples/cpp) -- install (TARGETS FollyRequestContextSwitch DESTINATION share/bcc/examples/cpp) -- install (TARGETS UseExternalMap DESTINATION share/bcc/examples/cpp) -- install (TARGETS CGroupTest DESTINATION share/bcc/examples/cpp) --endif(INSTALL_CPP_EXAMPLES) -+file(GLOB EXAMPLES *.cc) -+foreach(EXAMPLE ${EXAMPLES}) -+ get_filename_component(NAME ${EXAMPLE} NAME_WE) -+ add_executable(${NAME} ${EXAMPLE}) -+ -+ if(NOT CMAKE_USE_LIBBPF_PACKAGE) -+ target_link_libraries(${NAME} bcc-static) -+ else() -+ target_link_libraries(${NAME} bcc-shared-no-libbpf) -+ endif() -+ -+ if(INSTALL_CPP_EXAMPLES) -+ install (TARGETS ${NAME} DESTINATION share/bcc/examples/cpp) -+ endif(INSTALL_CPP_EXAMPLES) -+endforeach() - - add_subdirectory(pyperf) -diff --git a/examples/cpp/pyperf/CMakeLists.txt b/examples/cpp/pyperf/CMakeLists.txt -index 6f963c66..97420806 100644 ---- a/examples/cpp/pyperf/CMakeLists.txt -+++ b/examples/cpp/pyperf/CMakeLists.txt -@@ -7,6 +7,11 @@ include_directories(${CMAKE_SOURCE_DIR}/src/cc/libbpf/include/uapi) - - add_executable(PyPerf PyPerf.cc PyPerfUtil.cc PyPerfBPFProgram.cc PyPerfLoggingHelper.cc PyPerfDefaultPrinter.cc Py36Offsets.cc) - target_link_libraries(PyPerf bcc-static) -+if(NOT CMAKE_USE_LIBBPF_PACKAGE) -+ target_link_libraries(PyPerf bcc-static) -+else() -+ target_link_libraries(PyPerf bcc-shared-no-libbpf) -+endif() - - if(INSTALL_CPP_EXAMPLES) - install (TARGETS PyPerf DESTINATION share/bcc/examples/cpp) -diff --git a/introspection/CMakeLists.txt b/introspection/CMakeLists.txt -index 4328ee11..6c83f0c8 100644 ---- a/introspection/CMakeLists.txt -+++ b/introspection/CMakeLists.txt -@@ -8,7 +8,13 @@ include_directories(${CMAKE_SOURCE_DIR}/src/cc/libbpf/include/uapi) - option(INSTALL_INTROSPECTION "Install BPF introspection tools" ON) - option(BPS_LINK_RT "Pass -lrt to linker when linking bps tool" ON) - --set(bps_libs_to_link bpf-static elf z) -+# Note that the order matters! bpf-static first, the rest later -+if(CMAKE_USE_LIBBPF_PACKAGE AND LIBBPF_FOUND) -+set(bps_libs_to_link bpf-shared ${LIBBPF_LIBRARIES}) -+else() -+set(bps_libs_to_link bpf-static) -+endif() -+list(APPEND bps_libs_to_link elf z) - if(BPS_LINK_RT) - list(APPEND bps_libs_to_link rt) - endif() -diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt -index 4021c662..c8ea63aa 100644 ---- a/src/cc/CMakeLists.txt -+++ b/src/cc/CMakeLists.txt -@@ -10,8 +10,12 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/frontends/clang) - include_directories(${LLVM_INCLUDE_DIRS}) - include_directories(${LIBELF_INCLUDE_DIRS}) - # todo: if check for kernel version --include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libbpf/include) --include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libbpf/include/uapi) -+if (CMAKE_USE_LIBBPF_PACKAGE AND LIBBPF_FOUND) -+ include_directories(${LIBBPF_INCLUDE_DIRS}) -+else() -+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libbpf/include) -+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libbpf/include/uapi) -+endif() - - # add_definitions has a problem parsing "-D_GLIBCXX_USE_CXX11_ABI=0", this is safer - separate_arguments(LLVM_DEFINITIONS) -@@ -41,21 +45,26 @@ if(LIBBPF_INCLUDE_DIR) - add_definitions(-DHAVE_EXTERNAL_LIBBPF) - endif() - --if(LIBBPF_FOUND) -- set(extract_dir ${CMAKE_CURRENT_BINARY_DIR}/libbpf_a_extract) -- execute_process(COMMAND sh -c "mkdir -p ${extract_dir} && cd ${extract_dir} && ${CMAKE_AR} x ${LIBBPF_STATIC_LIBRARIES}") -- file(GLOB libbpf_sources "${extract_dir}/*.o") --else() -- file(GLOB libbpf_sources "libbpf/src/*.c") --endif() -+if(NOT CMAKE_USE_LIBBPF_PACKAGE) -+ if(LIBBPF_FOUND) -+ set(extract_dir ${CMAKE_CURRENT_BINARY_DIR}/libbpf_a_extract) -+ execute_process(COMMAND sh -c "mkdir -p ${extract_dir} && cd ${extract_dir} && ${CMAKE_AR} x ${LIBBPF_STATIC_LIBRARIES}") -+ file(GLOB libbpf_sources "${extract_dir}/*.o") -+ else() -+ file(GLOB libbpf_sources "libbpf/src/*.c") -+ endif() - --set(libbpf_uapi libbpf/include/uapi/linux/) -+ set(libbpf_uapi libbpf/include/uapi/linux/) -+endif() - - add_library(bpf-static STATIC libbpf.c perf_reader.c ${libbpf_sources}) - set_target_properties(bpf-static PROPERTIES OUTPUT_NAME bcc_bpf) - add_library(bpf-shared SHARED libbpf.c perf_reader.c ${libbpf_sources}) - set_target_properties(bpf-shared PROPERTIES VERSION ${REVISION_LAST} SOVERSION 0) - set_target_properties(bpf-shared PROPERTIES OUTPUT_NAME bcc_bpf) -+if(CMAKE_USE_LIBBPF_PACKAGE AND LIBBPF_FOUND) -+ target_link_libraries(bpf-shared ${LIBBPF_LIBRARIES}) -+endif() - - set(bcc_common_sources bcc_common.cc bpf_module.cc bcc_btf.cc exported_files.cc) - if (${LLVM_PACKAGE_VERSION} VERSION_EQUAL 6 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 6) -diff --git a/tests/cc/CMakeLists.txt b/tests/cc/CMakeLists.txt -index 528f1bda..b2fba5e3 100644 ---- a/tests/cc/CMakeLists.txt -+++ b/tests/cc/CMakeLists.txt -@@ -7,7 +7,11 @@ include_directories(${CMAKE_SOURCE_DIR}/src/cc/libbpf/include/uapi) - include_directories(${CMAKE_SOURCE_DIR}/tests/python/include) - - add_executable(test_static test_static.c) --target_link_libraries(test_static bcc-static) -+if(NOT CMAKE_USE_LIBBPF_PACKAGE) -+ target_link_libraries(test_static bcc-static) -+else() -+ target_link_libraries(test_static bcc-shared-no-libbpf) -+endif() - - add_test(NAME c_test_static COMMAND ${TEST_WRAPPER} c_test_static sudo ${CMAKE_CURRENT_BINARY_DIR}/test_static) - -@@ -35,17 +39,19 @@ set(TEST_LIBBCC_SOURCES - utils.cc - test_parse_tracepoint.cc) - --add_executable(test_libbcc ${TEST_LIBBCC_SOURCES}) -- - file(COPY dummy_proc_map.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - add_library(usdt_test_lib SHARED usdt_test_lib.cc) - --add_dependencies(test_libbcc bcc-shared) --target_link_libraries(test_libbcc ${PROJECT_BINARY_DIR}/src/cc/libbcc.so dl usdt_test_lib) --set_target_properties(test_libbcc PROPERTIES INSTALL_RPATH ${PROJECT_BINARY_DIR}/src/cc) --target_compile_definitions(test_libbcc PRIVATE -DLIBBCC_NAME=\"libbcc.so\") -+if(NOT CMAKE_USE_LIBBPF_PACKAGE) -+ add_executable(test_libbcc ${TEST_LIBBCC_SOURCES}) -+ add_dependencies(test_libbcc bcc-shared) - --add_test(NAME test_libbcc COMMAND ${TEST_WRAPPER} c_test_all sudo ${CMAKE_CURRENT_BINARY_DIR}/test_libbcc) -+ target_link_libraries(test_libbcc ${PROJECT_BINARY_DIR}/src/cc/libbcc.so dl usdt_test_lib) -+ set_target_properties(test_libbcc PROPERTIES INSTALL_RPATH ${PROJECT_BINARY_DIR}/src/cc) -+ target_compile_definitions(test_libbcc PRIVATE -DLIBBCC_NAME=\"libbcc.so\") -+ -+ add_test(NAME test_libbcc COMMAND ${TEST_WRAPPER} c_test_all sudo ${CMAKE_CURRENT_BINARY_DIR}/test_libbcc) -+endif() - - if(LIBBPF_FOUND) - add_executable(test_libbcc_no_libbpf ${TEST_LIBBCC_SOURCES}) --- -2.29.2 - diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0002-fix-compilation-error-with-latest-llvm12-trunk.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0002-fix-compilation-error-with-latest-llvm12-trunk.patch deleted file mode 100644 index ded9f28c..00000000 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0002-fix-compilation-error-with-latest-llvm12-trunk.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 35ff839b1b70b3cd7a9a025d0fd96173e7be566e Mon Sep 17 00:00:00 2001 -From: Yonghong Song -Date: Mon, 4 Jan 2021 19:09:20 -0800 -Subject: [PATCH 2/2] fix compilation error with latest llvm12 trunk -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -With latest llvm trunk (llvm12), I hit the following compilation -error: - ... - [ 17%] Building CXX object src/cc/frontends/b/CMakeFiles/b_frontend.dir/codegen_llvm.cc.o - /home/yhs/work/bcc/src/cc/frontends/b/codegen_llvm.cc: In member function - ‘virtual ebpf::StatusTuple ebpf::cc::CodegenLLVM::visit_table_decl_stmt_node(ebpf::cc::TableDeclStmtNode*)’: - /home/yhs/work/bcc/src/cc/frontends/b/codegen_llvm.cc:1122:37: - error: ‘class llvm::Module’ has no member named ‘getTypeB yName’; did you mean ‘getName’? - StructType *decl_struct = mod_->getTypeByName("_struct." + n->id_->name_); - ^~~~~~~~~~~~~ - getName - -This is due to llvm patch https://reviews.llvm.org/D78793 which -changed how to use getTypeByName(). This patch adjusted the usage -in bcc based on this patch. - -Signed-off-by: Yonghong Song ---- - src/cc/frontends/b/codegen_llvm.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/src/cc/frontends/b/codegen_llvm.cc b/src/cc/frontends/b/codegen_llvm.cc -index d8c9470a..71c83b41 100644 ---- a/src/cc/frontends/b/codegen_llvm.cc -+++ b/src/cc/frontends/b/codegen_llvm.cc -@@ -1119,7 +1119,11 @@ StatusTuple CodegenLLVM::visit_table_decl_stmt_node(TableDeclStmtNode *n) { - StructType *key_stype, *leaf_stype; - TRY2(lookup_struct_type(n->key_type_, &key_stype)); - TRY2(lookup_struct_type(n->leaf_type_, &leaf_stype)); -+#if LLVM_MAJOR_VERSION >= 12 -+ StructType *decl_struct = StructType::getTypeByName(mod_->getContext(), "_struct." + n->id_->name_); -+#else - StructType *decl_struct = mod_->getTypeByName("_struct." + n->id_->name_); -+#endif - if (!decl_struct) - decl_struct = StructType::create(ctx(), "_struct." + n->id_->name_); - if (decl_struct->isOpaque()) -@@ -1182,7 +1186,11 @@ StatusTuple CodegenLLVM::visit_func_decl_stmt_node(FuncDeclStmtNode *n) { - StructType *stype; - //TRY2(lookup_struct_type(formal, &stype)); - auto var = (StructVariableDeclStmtNode *)formal; -+#if LLVM_MAJOR_VERSION >= 12 -+ stype = StructType::getTypeByName(mod_->getContext(), "_struct." + var->struct_id_->name_); -+#else - stype = mod_->getTypeByName("_struct." + var->struct_id_->name_); -+#endif - if (!stype) return mkstatus_(n, "could not find type %s", var->struct_id_->c_str()); - formals.push_back(PointerType::getUnqual(stype)); - } else { --- -2.30.0 - diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0003-Remove-libbcc-no-libbpf-shared-library-change-libbcc.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0003-Remove-libbcc-no-libbpf-shared-library-change-libbcc.patch deleted file mode 100644 index 25e744f5..00000000 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0003-Remove-libbcc-no-libbpf-shared-library-change-libbcc.patch +++ /dev/null @@ -1,156 +0,0 @@ -From c7509c9e6377a374ca28d73960d505e129aace7b Mon Sep 17 00:00:00 2001 -From: Luca Boccassi -Date: Fri, 8 Jan 2021 17:04:03 +0000 -Subject: [PATCH 3/3] Remove libbcc-no-libbpf shared library, change libbcc - linkage instead - -The current upstream split does not work very well, as the SONAME is mangled so -nothing recognises it. Applications link against libbcc, not libbcc_no_bpf. -Remove it entirely, and switch the libbcc.so to dynamically -link with libbpf if CMAKE_USE_LIBBPF_PACKAGE is set. ---- - examples/cpp/CMakeLists.txt | 2 +- - examples/cpp/pyperf/CMakeLists.txt | 2 +- - src/cc/CMakeLists.txt | 36 +++++++++++++----------------- - tests/cc/CMakeLists.txt | 8 +++---- - 4 files changed, 21 insertions(+), 27 deletions(-) - -diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt -index dd343245..45b30280 100644 ---- a/examples/cpp/CMakeLists.txt -+++ b/examples/cpp/CMakeLists.txt -@@ -19,7 +19,7 @@ foreach(EXAMPLE ${EXAMPLES}) - if(NOT CMAKE_USE_LIBBPF_PACKAGE) - target_link_libraries(${NAME} bcc-static) - else() -- target_link_libraries(${NAME} bcc-shared-no-libbpf) -+ target_link_libraries(${NAME} bcc-shared) - endif() - - if(INSTALL_CPP_EXAMPLES) -diff --git a/examples/cpp/pyperf/CMakeLists.txt b/examples/cpp/pyperf/CMakeLists.txt -index 97420806..618b4e75 100644 ---- a/examples/cpp/pyperf/CMakeLists.txt -+++ b/examples/cpp/pyperf/CMakeLists.txt -@@ -10,7 +10,7 @@ target_link_libraries(PyPerf bcc-static) - if(NOT CMAKE_USE_LIBBPF_PACKAGE) - target_link_libraries(PyPerf bcc-static) - else() -- target_link_libraries(PyPerf bcc-shared-no-libbpf) -+ target_link_libraries(PyPerf bcc-shared) - endif() - - if(INSTALL_CPP_EXAMPLES) -diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt -index c8ea63aa..931de2d9 100644 ---- a/src/cc/CMakeLists.txt -+++ b/src/cc/CMakeLists.txt -@@ -83,6 +83,9 @@ set(bcc_sym_sources bcc_syms.cc bcc_elf.c bcc_perf_map.c bcc_proc.c) - set(bcc_common_headers libbpf.h perf_reader.h "${CMAKE_CURRENT_BINARY_DIR}/bcc_version.h") - set(bcc_table_headers file_desc.h table_desc.h table_storage.h) - set(bcc_api_headers bcc_common.h bpf_module.h bcc_exception.h bcc_syms.h bcc_proc.h bcc_elf.h) -+if(LIBBPF_FOUND) -+ set(bcc_common_sources ${bcc_common_sources} libbpf.c perf_reader.c) -+endif() - - if(ENABLE_CLANG_JIT) - add_library(bcc-shared SHARED -@@ -91,16 +94,6 @@ add_library(bcc-shared SHARED - set_target_properties(bcc-shared PROPERTIES VERSION ${REVISION_LAST} SOVERSION 0) - set_target_properties(bcc-shared PROPERTIES OUTPUT_NAME bcc) - --# If there's libbpf detected we build the libbcc-no-libbpf.so library, that --# dynamicaly links libbpf.so, in comparison to static link in libbcc.so. --if(LIBBPF_FOUND) -- add_library(bcc-shared-no-libbpf SHARED -- link_all.cc ${bcc_common_sources} ${bcc_table_sources} ${bcc_sym_sources} -- ${bcc_util_sources} libbpf.c perf_reader.c) -- set_target_properties(bcc-shared-no-libbpf PROPERTIES VERSION ${REVISION_LAST} SOVERSION 0) -- set_target_properties(bcc-shared-no-libbpf PROPERTIES OUTPUT_NAME bcc-no-libbpf) --endif() -- - if(ENABLE_USDT) - set(bcc_usdt_sources usdt/usdt.cc usdt/usdt_args.cc) - # else undefined -@@ -123,18 +116,25 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${llvm_lib_exclude_f - set(bcc_common_libs b_frontend clang_frontend - -Wl,--whole-archive ${clang_libs} ${llvm_libs} -Wl,--no-whole-archive - ${LIBELF_LIBRARIES}) --set(bcc_common_libs_for_a ${bcc_common_libs} bpf-static) --set(bcc_common_libs_for_s ${bcc_common_libs} bpf-static) --set(bcc_common_libs_for_n ${bcc_common_libs}) --set(bcc_common_libs_for_lua b_frontend clang_frontend bpf-static -+set(bcc_common_libs_for_a ${bcc_common_libs}) -+set(bcc_common_libs_for_s ${bcc_common_libs}) -+set(bcc_common_libs_for_lua b_frontend clang_frontend - ${clang_libs} ${llvm_libs} ${LIBELF_LIBRARIES}) -+if(LIBBPF_FOUND) -+ list(APPEND bcc_common_libs_for_a ${LIBBPF_LIBRARIES}) -+ list(APPEND bcc_common_libs_for_s ${LIBBPF_LIBRARIES}) -+ list(APPEND bcc_common_libs_for_lua ${LIBBPF_LIBRARIES}) -+else() -+ list(APPEND bcc_common_libs_for_a bpf-static) -+ list(APPEND bcc_common_libs_for_s bpf-static) -+ list(APPEND bcc_common_libs_for_lua bpf-static) -+endif() - - if(ENABLE_CPP_API) - add_subdirectory(api) - list(APPEND bcc_common_libs_for_a api-static) - # Keep all API functions - list(APPEND bcc_common_libs_for_s -Wl,--whole-archive api-static -Wl,--no-whole-archive) -- list(APPEND bcc_common_libs_for_n -Wl,--whole-archive api-static -Wl,--no-whole-archive) - endif() - - if(ENABLE_USDT) -@@ -142,7 +142,6 @@ if(ENABLE_USDT) - add_subdirectory(usdt) - list(APPEND bcc_common_libs_for_a usdt-static) - list(APPEND bcc_common_libs_for_s usdt-static) -- list(APPEND bcc_common_libs_for_n usdt-static) - list(APPEND bcc_common_libs_for_lua usdt-static) - endif() - -@@ -153,11 +152,6 @@ target_link_libraries(bcc-shared ${bcc_common_libs_for_s}) - target_link_libraries(bcc-static ${bcc_common_libs_for_a} bcc-loader-static) - set(bcc-lua-static ${bcc-lua-static} ${bcc_common_libs_for_lua}) - --if(LIBBPF_FOUND) -- target_link_libraries(bcc-shared-no-libbpf ${bcc_common_libs_for_n} ${LIBBPF_LIBRARIES}) -- install(TARGETS bcc-shared-no-libbpf LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) --endif() -- - install(TARGETS bcc-shared bcc-static bcc-loader-static bpf-static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - install(FILES ${bcc_table_headers} DESTINATION include/bcc) - install(FILES ${bcc_api_headers} DESTINATION include/bcc) -diff --git a/tests/cc/CMakeLists.txt b/tests/cc/CMakeLists.txt -index b2fba5e3..58493248 100644 ---- a/tests/cc/CMakeLists.txt -+++ b/tests/cc/CMakeLists.txt -@@ -10,7 +10,7 @@ add_executable(test_static test_static.c) - if(NOT CMAKE_USE_LIBBPF_PACKAGE) - target_link_libraries(test_static bcc-static) - else() -- target_link_libraries(test_static bcc-shared-no-libbpf) -+ target_link_libraries(test_static bcc-shared) - endif() - - add_test(NAME c_test_static COMMAND ${TEST_WRAPPER} c_test_static sudo ${CMAKE_CURRENT_BINARY_DIR}/test_static) -@@ -55,11 +55,11 @@ endif() - - if(LIBBPF_FOUND) - add_executable(test_libbcc_no_libbpf ${TEST_LIBBCC_SOURCES}) -- add_dependencies(test_libbcc_no_libbpf bcc-shared-no-libbpf) -+ add_dependencies(test_libbcc_no_libbpf bcc-shared) - -- target_link_libraries(test_libbcc_no_libbpf ${PROJECT_BINARY_DIR}/src/cc/libbcc-no-libbpf.so dl usdt_test_lib ${LIBBPF_LIBRARIES}) -+ target_link_libraries(test_libbcc_no_libbpf ${PROJECT_BINARY_DIR}/src/cc/libbcc.so dl usdt_test_lib ${LIBBPF_LIBRARIES}) - set_target_properties(test_libbcc_no_libbpf PROPERTIES INSTALL_RPATH ${PROJECT_BINARY_DIR}/src/cc) -- target_compile_definitions(test_libbcc_no_libbpf PRIVATE -DLIBBCC_NAME=\"libbcc-no-libbpf.so\") -+ target_compile_definitions(test_libbcc_no_libbpf PRIVATE -DLIBBCC_NAME=\"libbcc.so\") - - add_test(NAME test_libbcc_no_libbpf COMMAND ${TEST_WRAPPER} c_test_all_no_libbpf sudo ${CMAKE_CURRENT_BINARY_DIR}/test_libbcc_no_libbpf) - endif() --- -2.29.2 - diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0004-cmake-look-for-either-static-or-dynamic-libraries.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0004-cmake-look-for-either-static-or-dynamic-libraries.patch deleted file mode 100644 index 31bcbcd8..00000000 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0004-cmake-look-for-either-static-or-dynamic-libraries.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 6b4222cd41b3f5e833307aeff2b10c6b084d3f4f Mon Sep 17 00:00:00 2001 -From: Matteo Croce -Date: Wed, 27 Jan 2021 00:26:39 +0100 -Subject: [PATCH] cmake: look for either static or dynamic libraries - -On some distro, static libraries are shipped in a separate package. -Look for either a static or dynamic libbpf, and only fail if neither is found. ---- - cmake/FindLibBpf.cmake | 23 ++++++++++++++++------- - 1 file changed, 16 insertions(+), 7 deletions(-) - -diff --git a/cmake/FindLibBpf.cmake b/cmake/FindLibBpf.cmake -index 75683ae3d..dc10dcee4 100644 ---- a/cmake/FindLibBpf.cmake -+++ b/cmake/FindLibBpf.cmake -@@ -28,9 +28,9 @@ find_path (LIBBPF_INCLUDE_DIR - /sw/include - ENV CPATH) - --find_library (LIBBPF_STATIC_LIBRARIES -+find_library (LIBBPF_LIBRARIES - NAMES -- libbpf.a -+ bpf - PATHS - /usr/lib - /usr/local/lib -@@ -38,10 +38,13 @@ find_library (LIBBPF_STATIC_LIBRARIES - /sw/lib - ENV LIBRARY_PATH - ENV LD_LIBRARY_PATH) -+if(LIBBPF_LIBRARIES) -+list(APPEND PATHS LIBBPF_LIBRARIES) -+endif() - --find_library (LIBBPF_LIBRARIES -+find_library (LIBBPF_STATIC_LIBRARIES - NAMES -- bpf -+ libbpf.a - PATHS - /usr/lib - /usr/local/lib -@@ -49,13 +52,19 @@ find_library (LIBBPF_LIBRARIES - /sw/lib - ENV LIBRARY_PATH - ENV LD_LIBRARY_PATH) -+if(LIBBPF_STATIC_LIBRARIES) -+list(APPEND PATHS LIBBPF_STATIC_LIBRARIES) -+endif() - -+if(LIBBPF_STATIC_LIBRARIES OR LIBBPF_LIBRARIES) - include (FindPackageHandleStandardArgs) - - # handle the QUIETLY and REQUIRED arguments and set LIBBPF_FOUND to TRUE if all listed variables are TRUE - FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibBpf "Please install the libbpf development package" -- LIBBPF_LIBRARIES -- LIBBPF_STATIC_LIBRARIES -+ ${PATHS} - LIBBPF_INCLUDE_DIR) - --mark_as_advanced(LIBBPF_INCLUDE_DIR LIBBPF_STATIC_LIBRARIES LIBBPF_LIBRARIES) -+mark_as_advanced(LIBBPF_INCLUDE_DIR ${PATHS}) -+else() -+message(Please install the libbpf development package) -+endif() --- -2.29.2 - diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.17.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.20.0.bb similarity index 62% rename from dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.17.0.bb rename to dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.20.0.bb index 8953fd4a..1c24555d 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.17.0.bb +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.20.0.bb @@ -18,28 +18,23 @@ LUAJIT_powerpc64 = "" RDEPENDS_${PN} += "bash python3 python3-core python3-setuptools xz" -# Don't fetch submodules otherwise we fetch an older, vendored libbpf version -# We use a dynamic libbpf library instead -SRC_URI = "git://github.com/iovisor/bcc \ +SRC_URI = "gitsm://github.com/iovisor/bcc \ file://0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch \ file://0001-tools-trace.py-Fix-failing-to-exit.patch \ file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \ - file://0001-fix-compilation-issues-with-latest-llvm12-trunk.patch \ - file://0002-fix-compilation-error-with-latest-llvm12-trunk.patch \ - file://0001-cmake-link-dynamically-to-libclang-cpp-if-found-and-.patch \ - file://0002-cmake-always-link-to-packaged-libbpf-if-CMAKE_USE_LI.patch \ - file://0003-Remove-libbcc-no-libbpf-shared-library-change-libbcc.patch \ - file://0004-cmake-look-for-either-static-or-dynamic-libraries.patch \ " -DEPENDS += "libbpf" +SRCREV = "ab14fafec3fc13f89bd4678b7fc94829dcacaa7b" -SRCREV = "ad5b82a5196b222ed2cdc738d8444e8c9546a77f" +PV .= "+git${SRCPV}" S = "${WORKDIR}/git" -PACKAGECONFIG ??= "" +PACKAGECONFIG ??= "examples" +PACKAGECONFIG_remove_libc-musl = "examples" + PACKAGECONFIG[manpages] = "-DENABLE_MAN=ON,-DENABLE_MAN=OFF," +PACKAGECONFIG[examples] = "-DENABLE_EXAMPLES=ON,-DENABLE_EXAMPLES=OFF," EXTRA_OECMAKE = " \ -DENABLE_LLVM_SHARED=ON \ @@ -47,7 +42,6 @@ EXTRA_OECMAKE = " \ -DLLVM_PACKAGE_VERSION=${LLVMVERSION} \ -DPYTHON_CMD=${PYTHON} \ -DPYTHON_FLAGS=--install-lib=${PYTHON_SITEPACKAGES_DIR} \ - -DCMAKE_USE_LIBBPF_PACKAGE=ON \ " do_install_append() { From 42cb4b994de14e0ec15f2d8aa35a691b50843d9a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 1 Jun 2021 13:57:59 -0700 Subject: [PATCH 032/166] mongodb: Use llvm runtime when using clang Fixes linker errors like src/mongo/platform/overflow_arithmetic.h:63: error: undefined reference to '__mulodi4' src/mongo/platform/overflow_arithmetic.h:63: error: undefined reference to '__mulodi4' src/mongo/platform/overflow_arithmetic.h:63: error: undefined reference to '__mulodi4' src/mongo/platform/overflow_arithmetic.h:63: error: undefined reference to '__mulodi4' Signed-off-by: Khem Raj (cherry picked from commit 0c02a3503f6b240ec34c68bc9c00407bae2b0fa4) --- conf/nonclangable.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index 3f78b36c..71f9f905 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -253,6 +253,7 @@ COMPILER_RT_pn-openssh_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" COMPILER_RT_pn-webkitgtk_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" COMPILER_RT_pn-wpewebkit_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" COMPILER_RT_pn-python3-numpy_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT_pn-mongodb_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" COMPILER_RT_remove_pn-m4_powerpc = "-rtlib=compiler-rt" COMPILER_RT_remove_pn-ruby_powerpc = "-rtlib=compiler-rt" COMPILER_RT_remove_pn-webkitgtk_powerpc = "-rtlib=compiler-rt" From 34a2eb046d1d5fcee35df3fdb25d78bda4ee8e26 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 1 Jun 2021 14:00:19 -0700 Subject: [PATCH 033/166] nonclangable: pass -rtlib only when using clang with gnu runtime here The defaults wirh using RUNTIME = "llvm" is already pointing to compiler-rt there is no need to clutter cmdline Signed-off-by: Khem Raj (cherry picked from commit 785ce0f2df336ea2c7ef40a3e64eb84656f59eeb) --- conf/nonclangable.conf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index 71f9f905..b515e695 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -245,15 +245,15 @@ TUNE_CCARGS_remove_pn-pulseaudio_toolchain-clang = "-Qunused-arguments" #| /usr/src/debug/ruby/2.5.1-r0/build/../ruby-2.5.1/process.c:7073: undefined reference to `__mulodi4' #| clang-7: error: linker command failed with exit code 1 (use -v to see invocation) -COMPILER_RT_pn-ruby_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-python3_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-m4_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-cpio_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-openssh_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-webkitgtk_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-wpewebkit_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-python3-numpy_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-mongodb_toolchain-clang = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT_pn-ruby_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT_pn-python3_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT_pn-m4_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT_pn-cpio_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT_pn-openssh_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT_pn-webkitgtk_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT_pn-wpewebkit_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT_pn-python3-numpy_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT_pn-mongodb_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" COMPILER_RT_remove_pn-m4_powerpc = "-rtlib=compiler-rt" COMPILER_RT_remove_pn-ruby_powerpc = "-rtlib=compiler-rt" COMPILER_RT_remove_pn-webkitgtk_powerpc = "-rtlib=compiler-rt" From b48d95bd654829fe7a764b4471b9c7f9368430a8 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 2 Jun 2021 12:20:22 -0700 Subject: [PATCH 034/166] poke: Do not use -O2 with clang clang13 has a regression which segfaults the compiler while compiling poke, its reported upstream, until it is fixed do not use -O2 compiler switch Signed-off-by: Khem Raj (cherry picked from commit d01e38f98bb03d9afa72e9dfc10eb936fc6a4c29) --- conf/nonclangable.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index b515e695..e282de83 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -313,3 +313,6 @@ TOOLCHAIN_pn-u-boot-stm32mp = "gcc" TOOLCHAIN_pn-tf-a-stm32mp = "gcc" TOOLCHAIN_pn-tf-a-stm32mp-serialboot = "gcc" TOOLCHAIN_pn-u-boot-seco-imx = "gcc" + +# see https://bugs.llvm.org/show_bug.cgi?id=50443 this is in clang-13, until it is fixed do not use -O2 +SELECTED_OPTIMIZATION_remove_pn-poke_toolchain-clang = "-O2" From 49a6e88d7813600bf96e25f7322775d8e5ec7a76 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 30 May 2021 11:28:11 -0700 Subject: [PATCH 035/166] clang: Update to latest on master branch Signed-off-by: Khem Raj (cherry picked from commit 040ec88b95679a953bf63461f73700246ed34eef) --- recipes-devtools/clang/clang.inc | 2 +- ...l2-to-linker-cmdline-of-xml-is-found.patch | 2 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 8 ++++---- ...-support-a-new-embedded-linux-target.patch | 2 +- ...lify-cross-compilation.-Don-t-use-na.patch | 4 ++-- ...ryInfo-Undefine-libc-functions-if-th.patch | 2 +- ...-llvm-allow-env-override-of-exe-path.patch | 2 +- ...g-driver-Check-sysroot-for-ldso-path.patch | 2 +- ...tools.cpp-Add-lssp_nonshared-on-musl.patch | 2 +- ...does-not-support-128-bit-long-double.patch | 6 +++--- ...10-clang-Prepend-trailing-to-sysroot.patch | 2 +- ...e-the-target-sysroot-for-compiler-ru.patch | 4 ++-- ...efine-releative-gcc-installation-dir.patch | 2 +- ...ad-and-ldl-along-with-lunwind-for-st.patch | 20 ++++++++----------- ...UTABLE-when-cross-compiling-for-nati.patch | 2 +- ...5-Check-for-atomic-double-intrinsics.patch | 2 +- ...-clang-Enable-SSP-and-PIE-by-default.patch | 2 +- ...ler-runtime-library-to-link-step-for.patch | 2 +- ...-Fix-configure-for-packages-using-fi.patch | 12 +++++------ ...ce-dir-location-for-cross-toolchains.patch | 4 ++-- .../clang/clang/0020-fix-path-to-libffi.patch | 2 +- ...-dyld-prefix-when-checking-sysroot-f.patch | 2 +- ...-clang-Use-python3-in-python-scripts.patch | 2 +- ...-Yocto-based-GCC-install-search-path.patch | 2 +- .../0024-compiler-rt-Include-stddef.h.patch | 2 +- ...-Do-not-use-find_library-for-ncurses.patch | 4 ++-- ...or-for-adding-OE-distro-vendor-names.patch | 2 +- ...er-rt-Use-mcr-based-barrier-on-armv6.patch | 2 +- ...aults-to-dwarf-5-debug-info-on-Linux.patch | 2 +- ...ot-use-backtrace-APIs-on-non-glibc-l.patch | 2 +- ...iple-for-non-debian-multiarch-linux-.patch | 6 ++++-- ...-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch | 2 +- ...-scudo-standalone-with-libatomic-on-.patch | 6 +++--- ...libunwind-Added-unw_backtrace-method.patch | 2 +- ...se-uintptr_t-instead-of-_Unwind_Word.patch | 2 +- 35 files changed, 61 insertions(+), 63 deletions(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 86e937f2..7a5966ef 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "08d31ff4f45f795afb6648bc00257d60ff2f8204" +SRCREV ?= "054cc3b1b469de4b0cb25d1dc3af43c679c5dc44" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "main" diff --git a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch index 5a0c33d2..c4d125d7 100644 --- a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch +++ b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch @@ -1,4 +1,4 @@ -From b737bad67076c8c5a3f19f0808f7b5e4da616a5b Mon Sep 17 00:00:00 2001 +From e20b3c1ef199ea7b5f888c78a64fa21e69d0c269 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 22 May 2017 17:36:16 -0700 Subject: [PATCH] lldb: Add -lxml2 to linker cmdline of xml is found diff --git a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch index da33f563..fc105dad 100644 --- a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch +++ b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch @@ -1,4 +1,4 @@ -From 854f2bcd9770dd31641c89be6fa2603ac339d818 Mon Sep 17 00:00:00 2001 +From a39aaf48e8e0137cba75718b0fb77c68133a7713 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 27 Aug 2017 10:37:49 -0700 Subject: [PATCH] libcxxabi: Find libunwind headers when @@ -17,10 +17,10 @@ Signed-off-by: Khem Raj 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index d4eb01ce3888..5fe5b54371d1 100644 +index 1e8b73aa38cc..fb656e7db9fb 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt -@@ -516,14 +516,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") +@@ -512,14 +512,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") # Setup Source Code #=============================================================================== @@ -36,7 +36,7 @@ index d4eb01ce3888..5fe5b54371d1 100644 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} ${LIBCXXABI_LIBUNWIND_PATH}/include ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES} -@@ -534,15 +529,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) +@@ -530,15 +525,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) NO_CMAKE_FIND_ROOT_PATH ) diff --git a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch index 589833ef..e5913b2a 100644 --- a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch +++ b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch @@ -1,4 +1,4 @@ -From c4fa88657785e8ca179e39c6ec819960fd95c0f9 Mon Sep 17 00:00:00 2001 +From d90aa65eb5ab3d12ba8e56fde9cdf5db57a50ccb 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/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch index ab6679ac..4282f606 100644 --- a/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch +++ b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch @@ -1,4 +1,4 @@ -From 4b29b554ef9bfcbbcadd70f355df2f1eca55fade Mon Sep 17 00:00:00 2001 +From bce1f130dc86109ba398b756712393b93d7b6fd7 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 @@ -20,7 +20,7 @@ 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 c9939acfd710..57fe7bc635ed 100644 +index aa4905edb640..37c4479de462 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt @@ -74,7 +74,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOL diff --git a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index a22c6dd2..a9bc9399 100644 --- a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch @@ -1,4 +1,4 @@ -From 91de17d8a3b8efa9758c7f393ae8647eb159657f Mon Sep 17 00:00:00 2001 +From 87fb84e500d2671be478cb983998afb60d93b7de 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 diff --git a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch index 29010452..5e436ba6 100644 --- a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From b1c948df03ae8784f0078b9a23d78dff5cdb7175 Mon Sep 17 00:00:00 2001 +From aac14f4dc0fb5f8bf0350d6bcee111e2496c2769 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 path diff --git a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch index ba1466e7..03ea3993 100644 --- a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch +++ b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch @@ -1,4 +1,4 @@ -From 3a53f9b0fba8586c531db93fee524a4e4ca2017c Mon Sep 17 00:00:00 2001 +From 036a427f39847a8cc56bb5226ad89a3055a0ec28 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 diff --git a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index 3a7da762..309d5a23 100644 --- a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch +++ b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch @@ -1,4 +1,4 @@ -From f4aa83e324b98622e1174d00d51852289ae1349d Mon Sep 17 00:00:00 2001 +From 62cf14e937d10accf5208802a237136caf87036a 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 diff --git a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch index 30404070..b86adbe2 100644 --- a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch @@ -1,4 +1,4 @@ -From 081f27d53afe592fb8d7b3c4e8a0e2e8be4ee439 Mon Sep 17 00:00:00 2001 +From ac6c4f6b2eea1f74d66d95d2ca839f94ae54b26e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 02:00:11 -0700 Subject: [PATCH] clang: musl/ppc does not support 128-bit long double @@ -9,10 +9,10 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+) diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h -index 554f2174fee0..18bcfd173ede 100644 +index 2ceb0b0cbf1c..5b9a47d02f1a 100644 --- a/clang/lib/Basic/Targets/PPC.h +++ b/clang/lib/Basic/Targets/PPC.h -@@ -389,6 +389,10 @@ public: +@@ -407,6 +407,10 @@ public: LongDoubleFormat = &llvm::APFloat::IEEEdouble(); } diff --git a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch index 45ec740e..4f6138d6 100644 --- a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From bf9255d8abec8f8589e8700fff96dace5c986ad5 Mon Sep 17 00:00:00 2001 +From e74b86d360243aac37f71970969a41ef2e29b5bc 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 diff --git a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index bde7bf19..729acf78 100644 --- a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From 322063cbeb3de0719183b38ec3aab5334de28641 Mon Sep 17 00:00:00 2001 +From facdeca80d228bec1684802c6ac2618d9953cad8 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 @@ -15,7 +15,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 3342de85fc30..671d308e2efc 100644 +index 5791805a6711..ccd65daa055c 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -14,6 +14,7 @@ diff --git a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch index 1acce6c1..b10459ad 100644 --- a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch @@ -1,4 +1,4 @@ -From 017ff83dee2dce1a0940abdab1e32780cb86bc30 Mon Sep 17 00:00:00 2001 +From e1727d4a162c1f0c46caf9792ce32d17729eabf4 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 diff --git a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index 3584d70a..c118b477 100644 --- a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From b40a8752cea684e392a25f45028493711352e1e2 Mon Sep 17 00:00:00 2001 +From db17a2f5d14733efa51f44868e21373a038cab61 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 @@ -16,23 +16,19 @@ therefore we need to link in libpthread and libdl to fill these symbols Signed-off-by: Khem Raj --- - clang/lib/Driver/ToolChains/CommonArgs.cpp | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + clang/lib/Driver/ToolChains/CommonArgs.cpp | 2 ++ + 1 file changed, 2 insertions(+) diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp -index b74a9fe3eb92..4c7a2ec15a2e 100644 +index a1aab21c944b..3338cf6fdad9 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -1444,8 +1444,11 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, - break; - } - case ToolChain::UNW_CompilerRT: -- if (LGT == LibGccType::StaticLibGcc) -+ if (LGT == LibGccType::StaticLibGcc) { +@@ -1451,6 +1451,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"); + CmdArgs.push_back("-lpthread"); + CmdArgs.push_back("-ldl"); -+ } - else if (TC.getTriple().isOSCygMing()) { + } else if (TC.getTriple().isOSCygMing()) { if (LGT == LibGccType::SharedLibGcc) CmdArgs.push_back("-l:libunwind.dll.a"); diff --git a/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index 3b373710..b9d754d2 100644 --- a/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From 6cdc2ea0f1d738e8fd03c6f5d29bc1a22d46aeac Mon Sep 17 00:00:00 2001 +From 4840d4d70891e429f64a0b440ebd28eb544e09cc 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 diff --git a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch index baa2fa48..006be77d 100644 --- a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From 1a89fa157e92e70a9ca33fecd12fd12743c32b0b Mon Sep 17 00:00:00 2001 +From 662447e6dcc04b8cab8af89d164b91cdad8d39fd 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/0016-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch index 1b554dfa..1aefd5a2 100644 --- a/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch +++ b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch @@ -1,4 +1,4 @@ -From f44a8afe89238ba008d3452c295868aea221ba4b Mon Sep 17 00:00:00 2001 +From e797d257fb0e4f8561d39c8a8c4e0bfd2323ed43 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Thu, 26 Dec 2019 15:46:19 -0800 Subject: [PATCH] clang: Enable SSP and PIE by default diff --git a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index d5a4e5a5..b764bc36 100644 --- a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -1,4 +1,4 @@ -From 405d32adeeba5b003649c75c49db1194d9bd86ba Mon Sep 17 00:00:00 2001 +From f7aa025b6171ce7c9f4a37593f4875a331d73da2 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 diff --git a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index e6877427..857e07ef 100644 --- a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -1,4 +1,4 @@ -From 863e525e1ee6621f198ee1602702263f803f3ecd Mon Sep 17 00:00:00 2001 +From 3aa86ff94b54b378637ef3dcc95350d28e014aa9 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 5752f4277444..f40ea35faf46 100644 endmacro() diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index f3b27937fd8e..a48040a45275 100644 +index 9c2b85374307..7e4a07b5972c 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -1209,7 +1209,6 @@ macro(add_llvm_tool name) +@@ -1226,7 +1226,6 @@ macro(add_llvm_tool name) if( LLVM_BUILD_TOOLS ) get_target_export_arg(${name} LLVM export_to_llvmexports) install(TARGETS ${name} @@ -63,7 +63,7 @@ index f3b27937fd8e..a48040a45275 100644 RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR} COMPONENT ${name}) -@@ -1220,9 +1219,6 @@ macro(add_llvm_tool name) +@@ -1237,9 +1236,6 @@ macro(add_llvm_tool name) endif() endif() endif() @@ -73,7 +73,7 @@ index f3b27937fd8e..a48040a45275 100644 set_target_properties(${name} PROPERTIES FOLDER "Tools") endmacro(add_llvm_tool name) -@@ -1262,7 +1258,6 @@ macro(add_llvm_utility name) +@@ -1279,7 +1275,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 f3b27937fd8e..a48040a45275 100644 RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} COMPONENT ${name}) -@@ -1271,7 +1266,6 @@ macro(add_llvm_utility name) +@@ -1288,7 +1283,6 @@ macro(add_llvm_utility name) DEPENDS ${name} COMPONENT ${name}) endif() diff --git a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch index 545cd1f8..26df8cd5 100644 --- a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From e12f10a878d1ddb797204f07b4aee3ac52a10591 Mon Sep 17 00:00:00 2001 +From de696c06d7d00637a1787738b841e4514c65f061 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 @@ -19,7 +19,7 @@ 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 25af909d9bd2..87dd4a74c99c 100644 +index 287b21864154..42a8141c36bb 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -121,7 +121,13 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath, diff --git a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch index 95b1c362..1a0d8844 100644 --- a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch +++ b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch @@ -1,4 +1,4 @@ -From 0407ee030cf435da660461f3a3cc1c8c7909b8b8 Mon Sep 17 00:00:00 2001 +From 43515a2cf000fef0b08521b14a03191bbbd81865 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Fri, 3 Apr 2020 15:10:37 +0800 Subject: [PATCH] fix path to libffi diff --git a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index a36f1179..de9fad74 100644 --- a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From 673c58b89a0ca84a33aa760809c7cc6754928af4 Mon Sep 17 00:00:00 2001 +From 6e87ead1a81b300f69a5444b0e32ee2db189d6e3 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 diff --git a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch index 8c204f08..a26574d4 100644 --- a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From 00cda4dc84261e3cae5d484d5b6bc0059880852f Mon Sep 17 00:00:00 2001 +From e08f5f92d3d52f3716e71cb5b2a074766eb0e150 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/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index 5b23945e..fd0f3e6d 100644 --- a/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From 9601dddb6366e90725b364be6a21ddaa584557e2 Mon Sep 17 00:00:00 2001 +From 2d88ade091c2f3f66de514d398e5d22d0a7bd065 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 diff --git a/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch b/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch index 773911b3..0144f5c6 100644 --- a/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch +++ b/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch @@ -1,4 +1,4 @@ -From 574ba321d2e58b8aa791b32a4bdbc3110e0978e0 Mon Sep 17 00:00:00 2001 +From 26bd74255d5fdf7a9dd0fb9140e0f6c2b9be5ac6 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 6 Feb 2021 12:44:30 -0800 Subject: [PATCH] compiler-rt: Include stddef.h diff --git a/recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch index 4c2d54cb..dba22ec1 100644 --- a/recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch +++ b/recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch @@ -1,4 +1,4 @@ -From 6db98ec43e4dab2d4638a97caa81e5ef4b3f7310 Mon Sep 17 00:00:00 2001 +From a39a58f080877b99b1ef580f7915c547ad0112db 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 @@ -17,7 +17,7 @@ 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 0b5b81259492..d9e6fd1083d8 100644 +index 39e0a4b662c7..a186ac60986d 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -140,7 +140,7 @@ else() diff --git a/recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index 00daa04d..412a0302 100644 --- a/recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From 09a9c6735b682a4c622930cff3e0d549e9d638d2 Mon Sep 17 00:00:00 2001 +From c5ea14dd34a2d6ba93c94533b43ad83f560831b6 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 diff --git a/recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index f0153089..c7dd945c 100644 --- a/recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From 16ee97fc3d678472f761e7ab8254ffef12ad6502 Mon Sep 17 00:00:00 2001 +From e52894aae026b217e0dae193b1c1203de5e7792e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 diff --git a/recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch b/recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch index d52eb942..ade74d3e 100644 --- a/recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch +++ b/recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch @@ -1,4 +1,4 @@ -From 43733c59ee8fb7a4867f6f51fda1f449d6ce9013 Mon Sep 17 00:00:00 2001 +From 332447757e61e5c7ca0b3fbeafcaf0c53b308174 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 15 Apr 2021 18:58:07 -0700 Subject: [PATCH] clang: Switch defaults to dwarf-5 debug info on Linux diff --git a/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 372ac738..4fd2a2f9 100644 --- a/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From c2413de81c383407f6447edd41d9b3539641ff4f Mon Sep 17 00:00:00 2001 +From 9ff4fbb42c182b11a6b7bd870cb82a6ae4896fe3 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/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index 2e6527f5..f33663df 100644 --- a/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From 923e1a9142f88b4970a3a860b6e41bf74dea4091 Mon Sep 17 00:00:00 2001 +From 4cb3ad387cb2b4eb9c9ec8243aaafbffc71c9ede 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 @@ -11,9 +11,11 @@ Signed-off-by: Khem Raj clang/lib/Driver/ToolChains/Linux.cpp | 3 +++ 1 file changed, 3 insertions(+) +diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp +index 8a63dd8c0e60..66874319fc44 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -622,6 +622,9 @@ void Linux::addLibStdCxxIncludePaths(con +@@ -622,6 +622,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/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index 7da132a2..e3ba90b7 100644 --- a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From 24ce3255ade936fee508d83c7f2551c8f2142bac Mon Sep 17 00:00:00 2001 +From ce655e90531061414002634584590761734ce229 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES diff --git a/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index 6289e8bc..ea86ce67 100644 --- a/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From b7247e617cef1ed277c17bf0970104ccf55c5d92 Mon Sep 17 00:00:00 2001 +From b7dab91761d8656d802da8d0d754352f58fb05c9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips @@ -13,10 +13,10 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+) diff --git a/compiler-rt/lib/scudo/standalone/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/CMakeLists.txt -index 572ad078423f..8e5c0eaad211 100644 +index 8c3708d3a45f..f6687db1a663 100644 --- a/compiler-rt/lib/scudo/standalone/CMakeLists.txt +++ b/compiler-rt/lib/scudo/standalone/CMakeLists.txt -@@ -131,6 +131,10 @@ append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread SCUDO_LINK_FLAGS) +@@ -134,6 +134,10 @@ append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread SCUDO_LINK_FLAGS) append_list_if(FUCHSIA zircon SCUDO_LINK_LIBS) diff --git a/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch index 53f816d8..b04c4402 100644 --- a/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 79195637cf6cde28baa23e41e7b417e98b036913 Mon Sep 17 00:00:00 2001 +From a9ac0832f39e10a08d8b49b7c4968cc30100f706 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 23 May 2021 10:27:29 +0000 Subject: [PATCH] libunwind: Added unw_backtrace method diff --git a/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch b/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch index d04e0e8a..c1097db7 100644 --- a/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch +++ b/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch @@ -1,4 +1,4 @@ -From fbc9b98b9f668bb6729c7f4c6cc9de9d40c674ce Mon Sep 17 00:00:00 2001 +From 4ff7a960f67ee8b0df09fb76113d9a2380e4b802 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 29 May 2021 13:42:25 -0700 Subject: [PATCH] compiler-rt: Use uintptr_t instead of _Unwind_Word From 9b1d53bfbb6a7251faf44ef70f2be0b0e6be5c2d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 9 Jun 2021 19:53:21 -0700 Subject: [PATCH 036/166] clang: Do not force libgcc libunwind in rv32 and rv64 llvm unwind can work on rv32 and rv64 with latest clang so open up that option Signed-off-by: Khem Raj (cherry picked from commit bfad2060bcf17f26fff1e6dd760732d551794c2b) --- classes/clang.bbclass | 2 -- 1 file changed, 2 deletions(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index bbee721d..8c2e3b7f 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -17,8 +17,6 @@ COMPILER_RT_powerpc = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT_armeb = "-rtlib=libgcc ${UNWINDLIB}" UNWINDLIB ??= "" -UNWINDLIB_riscv64 = "--unwindlib=libgcc" -UNWINDLIB_riscv32 = "--unwindlib=libgcc" UNWINDLIB_powerpc = "--unwindlib=libgcc" UNWINDLIB_armeb = "--unwindlib=libgcc" From 7c5c4e7267e794ac44ad0e02f95fdafe4a81ed79 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 9 Jun 2021 19:57:03 -0700 Subject: [PATCH 037/166] nonclangable: Use libgcc for unwinder as well when using for builtins clang 13 does not like to mix rtlib and unwindlib when using libgcc Fixes clang-13: error: --rtlib=libgcc requires --unwindlib=libgcc secondly compiler-rt does not havw 128 bit ( tf ) functions on x86 so fallback to libgcc for those use libatomic for x86 since 64bit atomics are not in compiler-rt Signed-off-by: Khem Raj (cherry picked from commit 96face19ae51510d5e5923e575496844b5b85e62) --- conf/nonclangable.conf | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index e282de83..1058dc6c 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -268,23 +268,25 @@ COMPILER_RT_pn-qtbase_toolchain-clang_riscv32 = "-rtlib=compiler-rt ${UNWINDLIB} LDFLAGS_append_pn-gnutls_toolchain-clang_riscv64 = " -latomic" LDFLAGS_append_pn-harfbuzz_toolchain-clang_riscv64 = " -latomic" LDFLAGS_append_pn-qtwebengine_toolchain-clang_runtime-gnu_x86 = " -latomic" -LDFLAGS_append_pn-qemu_toolchain-clang_runtime-gnu_x86 = " -latomic" +LDFLAGS_append_pn-qemu_toolchain-clang_x86 = " -latomic" # glibc is built with gcc and hence encodes some libgcc specific builtins which are not found # when doing static linking with clang using compiler-rt, so use libgcc # undefined reference to `__unordtf2' -COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc" -COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc" -COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc" -COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc" -COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc" -COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc" +COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT_pn-libc-bench_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT_pn-mpich_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc --unwindlib=libgcc" #(unwind.o): in function `__pthread_unwind': #/usr/src/debug/glibc/2.29-r0/git/nptl/unwind.c:121: undefined reference to `_Unwind_ForcedUnwind' #clang-8: error: linker command failed with exit code 1 (use -v to see invocation) -COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc" -COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc" +COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc --unwindlib=libgcc" # Uses gcc for native tools, e.g. nsinstall and passes clang options which fails so # let same compiler ( gcc or clang) be native/cross compiler From 3b704fb8e2aeb8572b0cef241222d938e7674003 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 10 Jun 2021 09:31:01 -0700 Subject: [PATCH 038/166] aufs-util,libhugetlbfs,libc-bench: Use libgcc unwinder on glibc/arm these packages do static linking in parts and when libc is glibc then it has linked in some portions of libgcc since we can not use clang to compile glibc yet. Therefore use libgcc where needed for now Signed-off-by: Khem Raj (cherry picked from commit bf842214267663966ffa34e170368d55fcebd883) --- conf/nonclangable.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index 1058dc6c..fb5d47cd 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -285,8 +285,9 @@ COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc --unwin #(unwind.o): in function `__pthread_unwind': #/usr/src/debug/glibc/2.29-r0/git/nptl/unwind.c:121: undefined reference to `_Unwind_ForcedUnwind' #clang-8: error: linker command failed with exit code 1 (use -v to see invocation) -COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc --unwindlib=libgcc" -COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_arm = "--unwindlib=libgcc" +COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_arm = "--unwindlib=libgcc" +COMPILER_RT_pn-libc-bench_libc-glibc_toolchain-clang_arm = "--unwindlib=libgcc" # Uses gcc for native tools, e.g. nsinstall and passes clang options which fails so # let same compiler ( gcc or clang) be native/cross compiler From a8d8a82d79464acfa2c0fe05ae515e19406441a1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 10 Jun 2021 19:34:50 -0700 Subject: [PATCH 039/166] Use libgcc instead of compiler-rt on klibc apps klibc does not provide libssp functions e.g. __stack_chk_guard and __stack_chk_guard which it expects from libc and compiler-rt code tend to use these functions, so when using compiler-rt it ends up with undefined symbols e.g. /usr/lib/clang/13.0.0/lib/linux/libclang_rt.builtins-armhf.a(divmoddi4.c.o): in function `__divmoddi4': divmoddi4.c:(.text+0x70): undefined reference to `__stack_chk_fail' arm-yoe-linux-gnueabi-ld.bfd: divmoddi4.c:(.text+0x74): undefined reference to `__stack_chk_guard' Signed-off-by: Khem Raj (cherry picked from commit bc2b5e4b874968745fdcfbcea43e2eb8eafa592e) --- classes/clang.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 8c2e3b7f..849049aa 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -15,10 +15,12 @@ PACKAGE_DEBUG_SPLIT_STYLE_toolchain-clang = "debug-without-src" COMPILER_RT ??= "" COMPILER_RT_powerpc = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT_armeb = "-rtlib=libgcc ${UNWINDLIB}" +COMPILER_RT_libc-klibc = "-rtlib=libgcc ${UNWINDLIB}" UNWINDLIB ??= "" UNWINDLIB_powerpc = "--unwindlib=libgcc" UNWINDLIB_armeb = "--unwindlib=libgcc" +UNWINDLIB_libc-klibc = "--unwindlib=libgcc" LIBCPLUSPLUS ??= "" From 11a7ccd458cb68dc1057fcad458156a691aa5f4b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 10 Jun 2021 11:32:51 -0700 Subject: [PATCH 040/166] clang: Upgrade to latest on main/13.0 branch Fix compiler-rt build on armv6 reported in https://github.com/YoeDistro/yoe-distro/issues/555 Signed-off-by: Khem Raj (cherry picked from commit 23729bb8200838f3e0d7a73510cf41a05256ed3c) --- recipes-devtools/clang/clang.inc | 2 +- ...l2-to-linker-cmdline-of-xml-is-found.patch | 2 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 8 ++-- ...-support-a-new-embedded-linux-target.patch | 2 +- ...lify-cross-compilation.-Don-t-use-na.patch | 2 +- ...ryInfo-Undefine-libc-functions-if-th.patch | 2 +- ...-llvm-allow-env-override-of-exe-path.patch | 2 +- ...g-driver-Check-sysroot-for-ldso-path.patch | 10 ++-- ...tools.cpp-Add-lssp_nonshared-on-musl.patch | 4 +- ...does-not-support-128-bit-long-double.patch | 2 +- ...10-clang-Prepend-trailing-to-sysroot.patch | 6 +-- ...e-the-target-sysroot-for-compiler-ru.patch | 2 +- ...efine-releative-gcc-installation-dir.patch | 4 +- ...ad-and-ldl-along-with-lunwind-for-st.patch | 2 +- ...UTABLE-when-cross-compiling-for-nati.patch | 2 +- ...5-Check-for-atomic-double-intrinsics.patch | 2 +- ...-clang-Enable-SSP-and-PIE-by-default.patch | 8 ++-- ...ler-runtime-library-to-link-step-for.patch | 2 +- ...-Fix-configure-for-packages-using-fi.patch | 4 +- ...ce-dir-location-for-cross-toolchains.patch | 4 +- .../clang/clang/0020-fix-path-to-libffi.patch | 2 +- ...-dyld-prefix-when-checking-sysroot-f.patch | 12 ++--- ...-clang-Use-python3-in-python-scripts.patch | 2 +- ...-Yocto-based-GCC-install-search-path.patch | 4 +- .../0024-compiler-rt-Include-stddef.h.patch | 2 +- ...-Do-not-use-find_library-for-ncurses.patch | 2 +- ...or-for-adding-OE-distro-vendor-names.patch | 2 +- ...er-rt-Use-mcr-based-barrier-on-armv6.patch | 2 +- ...aults-to-dwarf-5-debug-info-on-Linux.patch | 2 +- ...ot-use-backtrace-APIs-on-non-glibc-l.patch | 2 +- ...iple-for-non-debian-multiarch-linux-.patch | 6 +-- ...-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch | 2 +- ...-scudo-standalone-with-libatomic-on-.patch | 2 +- ...libunwind-Added-unw_backtrace-method.patch | 2 +- ...se-uintptr_t-instead-of-_Unwind_Word.patch | 2 +- ...rt-Do-not-force-thumb-mode-directive.patch | 46 +++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 37 files changed, 106 insertions(+), 59 deletions(-) create mode 100644 recipes-devtools/clang/clang/0035-compiler-rt-Do-not-force-thumb-mode-directive.patch diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 7a5966ef..b2c6ab3e 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "054cc3b1b469de4b0cb25d1dc3af43c679c5dc44" +SRCREV ?= "1e50c3d785f4563873ab1ce86559f2a1285b5678" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "main" diff --git a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch index c4d125d7..84811a50 100644 --- a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch +++ b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch @@ -1,4 +1,4 @@ -From e20b3c1ef199ea7b5f888c78a64fa21e69d0c269 Mon Sep 17 00:00:00 2001 +From 3f5e7342d5f2490728e5971d9e709b3be736d633 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 22 May 2017 17:36:16 -0700 Subject: [PATCH] lldb: Add -lxml2 to linker cmdline of xml is found diff --git a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch index fc105dad..8c327027 100644 --- a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch +++ b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch @@ -1,4 +1,4 @@ -From a39aaf48e8e0137cba75718b0fb77c68133a7713 Mon Sep 17 00:00:00 2001 +From 9052bcd92350fe8ede577fe876e59951478e1949 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 27 Aug 2017 10:37:49 -0700 Subject: [PATCH] libcxxabi: Find libunwind headers when @@ -17,10 +17,10 @@ Signed-off-by: Khem Raj 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index 1e8b73aa38cc..fb656e7db9fb 100644 +index 9bd81075dd14..6a9ba8ec635d 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt -@@ -512,14 +512,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") +@@ -511,14 +511,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") # Setup Source Code #=============================================================================== @@ -36,7 +36,7 @@ index 1e8b73aa38cc..fb656e7db9fb 100644 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} ${LIBCXXABI_LIBUNWIND_PATH}/include ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES} -@@ -530,15 +525,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) +@@ -529,15 +524,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) NO_CMAKE_FIND_ROOT_PATH ) diff --git a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch index e5913b2a..04f02ae2 100644 --- a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch +++ b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch @@ -1,4 +1,4 @@ -From d90aa65eb5ab3d12ba8e56fde9cdf5db57a50ccb Mon Sep 17 00:00:00 2001 +From adf258f2809c719a3a52b1d832f0139d8e668a34 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/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch index 4282f606..e00b3183 100644 --- a/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch +++ b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch @@ -1,4 +1,4 @@ -From bce1f130dc86109ba398b756712393b93d7b6fd7 Mon Sep 17 00:00:00 2001 +From 08dabaabc28efd55ba1b77830fc8b92f1ad28894 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 diff --git a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index a9bc9399..1c773c7b 100644 --- a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch @@ -1,4 +1,4 @@ -From 87fb84e500d2671be478cb983998afb60d93b7de Mon Sep 17 00:00:00 2001 +From d3adf3b2a689fe006b6b24430b3f52ecd6807efa 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 diff --git a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch index 5e436ba6..33d07b69 100644 --- a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From aac14f4dc0fb5f8bf0350d6bcee111e2496c2769 Mon Sep 17 00:00:00 2001 +From 693007ba2f20c6ef45114d73166fb0273d1fdacb 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 path diff --git a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch index 03ea3993..3b68a2d8 100644 --- a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch +++ b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch @@ -1,4 +1,4 @@ -From 036a427f39847a8cc56bb5226ad89a3055a0ec28 Mon Sep 17 00:00:00 2001 +From a81fe1f4e85bfb616b914f894c767488ee230792 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 @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 1 file changed, 16 insertions(+) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index e855d337ae64..95d88e0c6d79 100644 +index 886e0b35ece8..5f40847f77a3 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -479,11 +479,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -476,11 +476,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = "lib64"; Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; @@ -37,7 +37,7 @@ index e855d337ae64..95d88e0c6d79 100644 break; case llvm::Triple::riscv32: { StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple); -@@ -505,6 +513,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -502,6 +510,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { case llvm::Triple::sparcv9: LibDir = "lib64"; Loader = "ld-linux.so.2"; @@ -48,7 +48,7 @@ index e855d337ae64..95d88e0c6d79 100644 break; case llvm::Triple::systemz: LibDir = "lib"; -@@ -519,6 +531,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -516,6 +528,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/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index 309d5a23..9e881c64 100644 --- a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch +++ b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch @@ -1,4 +1,4 @@ -From 62cf14e937d10accf5208802a237136caf87036a Mon Sep 17 00:00:00 2001 +From 1d8c23ef1e70a1404224918dd2090c6a2828c7ef 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 @@ -13,7 +13,7 @@ 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 a27841dc5985..e0be5e43a10b 100644 +index 517ba60e0b77..42cf98572b95 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -630,6 +630,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, diff --git a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch index b86adbe2..227a5f1c 100644 --- a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch @@ -1,4 +1,4 @@ -From ac6c4f6b2eea1f74d66d95d2ca839f94ae54b26e Mon Sep 17 00:00:00 2001 +From 082dd1f20b838510dca1481e9479c57ce8d03dff Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 02:00:11 -0700 Subject: [PATCH] clang: musl/ppc does not support 128-bit long double diff --git a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch index 4f6138d6..e7ff5f34 100644 --- a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From e74b86d360243aac37f71970969a41ef2e29b5bc Mon Sep 17 00:00:00 2001 +From 0c0f10bfe6d0b51080b81c73fae52ddb2a768e5d 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 @@ -24,10 +24,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 95d88e0c6d79..d2ccbe635208 100644 +index 5f40847f77a3..50cd166231c9 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -182,7 +182,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) +@@ -181,7 +181,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) Multilibs = GCCInstallation.getMultilibs(); SelectedMultilib = GCCInstallation.getMultilib(); llvm::Triple::ArchType Arch = Triple.getArch(); diff --git a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index 729acf78..d2fc933e 100644 --- a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From facdeca80d228bec1684802c6ac2618d9953cad8 Mon Sep 17 00:00:00 2001 +From 1c4f99104db0a5d2504fb9f1d4a5cd57a94aaaef 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 diff --git a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch index b10459ad..1bd3413a 100644 --- a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch @@ -1,4 +1,4 @@ -From e1727d4a162c1f0c46caf9792ce32d17729eabf4 Mon Sep 17 00:00:00 2001 +From 9be197ac1d1a80f4f8ec81bb7ea41a393869cab1 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 @@ -14,7 +14,7 @@ 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 e0be5e43a10b..19c13afe048d 100644 +index 42cf98572b95..cd0bf93aa299 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2529,19 +2529,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( diff --git a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index c118b477..ebf46961 100644 --- a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From db17a2f5d14733efa51f44868e21373a038cab61 Mon Sep 17 00:00:00 2001 +From 14c7eb733c03a775de7e828a11af6d43170620e8 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 diff --git a/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index b9d754d2..3ad5e3c1 100644 --- a/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From 4840d4d70891e429f64a0b440ebd28eb544e09cc Mon Sep 17 00:00:00 2001 +From 1ea29b33aebd027faf22bf9a0bf1c83c8b7c6571 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 diff --git a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch index 006be77d..f5285402 100644 --- a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From 662447e6dcc04b8cab8af89d164b91cdad8d39fd Mon Sep 17 00:00:00 2001 +From e8f619fae05f543455ec8e1e61e255ac5cbd5f39 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/0016-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch index 1aefd5a2..317ebc2d 100644 --- a/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch +++ b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch @@ -1,4 +1,4 @@ -From e797d257fb0e4f8561d39c8a8c4e0bfd2323ed43 Mon Sep 17 00:00:00 2001 +From 24701aa638b8e111d7c93cf129959b63403d2327 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Thu, 26 Dec 2019 15:46:19 -0800 Subject: [PATCH] clang: Enable SSP and PIE by default @@ -37,10 +37,10 @@ Signed-off-by: Khem Raj 13 files changed, 42 insertions(+), 30 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index d2ccbe635208..5bd2e5061f3c 100644 +index 50cd166231c9..af1f7a6e5c48 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -671,8 +671,14 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs, +@@ -668,8 +668,14 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs, } bool Linux::isPIEDefault() const { @@ -134,7 +134,7 @@ index e9b86cbcf428..47f304c0420d 100644 // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/10.2.0/../../../../i386-unknown-linux/lib" // CHECK-LD-32: "-L[[SYSROOT]]/lib" diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c -index 7febfd02a1ad..1381d9018e32 100644 +index baa37b5fd79d..a6aeb09f6cd8 100644 --- a/clang/test/Driver/fsanitize.c +++ b/clang/test/Driver/fsanitize.c @@ -330,15 +330,15 @@ diff --git a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index b764bc36..d11bf2ad 100644 --- a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -1,4 +1,4 @@ -From f7aa025b6171ce7c9f4a37593f4875a331d73da2 Mon Sep 17 00:00:00 2001 +From 91c7a0a31acf1ab7475b85144d923f70541fae7c 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 diff --git a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index 857e07ef..35da3eb0 100644 --- a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -1,4 +1,4 @@ -From 3aa86ff94b54b378637ef3dcc95350d28e014aa9 Mon Sep 17 00:00:00 2001 +From 2682484fb5365d5bfbe4c343f74298e155d20645 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,7 +52,7 @@ index 5752f4277444..f40ea35faf46 100644 endmacro() diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index 9c2b85374307..7e4a07b5972c 100644 +index 689cac474c1a..75f425955e2a 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -1226,7 +1226,6 @@ macro(add_llvm_tool name) diff --git a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch index 26df8cd5..a7c34107 100644 --- a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From de696c06d7d00637a1787738b841e4514c65f061 Mon Sep 17 00:00:00 2001 +From f59f431174b876e1fb64e982f1b4f3848376a840 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 @@ -19,7 +19,7 @@ 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 287b21864154..42a8141c36bb 100644 +index 930941fe8558..fad53b15cc52 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -121,7 +121,13 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath, diff --git a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch index 1a0d8844..126b83e7 100644 --- a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch +++ b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch @@ -1,4 +1,4 @@ -From 43515a2cf000fef0b08521b14a03191bbbd81865 Mon Sep 17 00:00:00 2001 +From 199b980b8aa03a9d102d33f1353b5e94fb255ea8 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Fri, 3 Apr 2020 15:10:37 +0800 Subject: [PATCH] fix path to libffi diff --git a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index de9fad74..769dd45e 100644 --- a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From 6e87ead1a81b300f69a5444b0e32ee2db189d6e3 Mon Sep 17 00:00:00 2001 +From 9b0acc4e9fb202a4d224fbf5eba54576fdb95ea3 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 @@ -18,10 +18,10 @@ Signed-off-by: Khem Raj 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 5bd2e5061f3c..8a63dd8c0e60 100644 +index af1f7a6e5c48..0b3bbdeab5f3 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -479,8 +479,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -476,8 +476,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = "lib64"; Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; @@ -32,7 +32,7 @@ index 5bd2e5061f3c..8a63dd8c0e60 100644 LibDir = "lib"; } break; -@@ -488,8 +488,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -485,8 +485,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = "lib64"; Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; @@ -43,7 +43,7 @@ index 5bd2e5061f3c..8a63dd8c0e60 100644 LibDir = "lib"; } break; -@@ -513,8 +513,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -510,8 +510,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { case llvm::Triple::sparcv9: LibDir = "lib64"; Loader = "ld-linux.so.2"; @@ -54,7 +54,7 @@ index 5bd2e5061f3c..8a63dd8c0e60 100644 LibDir = "lib"; } break; -@@ -531,8 +531,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -528,8 +528,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/0022-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch index a26574d4..84948b22 100644 --- a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From e08f5f92d3d52f3716e71cb5b2a074766eb0e150 Mon Sep 17 00:00:00 2001 +From 90d69c23d95ae59ddbc6c2383ea30f622f09f4eb 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/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index fd0f3e6d..0e23e872 100644 --- a/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From 2d88ade091c2f3f66de514d398e5d22d0a7bd065 Mon Sep 17 00:00:00 2001 +From 5c6b926de61fb1c7f2bf425fe09bab0bf59ac101 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,7 +57,7 @@ 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 19c13afe048d..458acb47a45d 100644 +index cd0bf93aa299..54ed719c9f0c 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2111,6 +2111,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( diff --git a/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch b/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch index 0144f5c6..8a616219 100644 --- a/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch +++ b/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch @@ -1,4 +1,4 @@ -From 26bd74255d5fdf7a9dd0fb9140e0f6c2b9be5ac6 Mon Sep 17 00:00:00 2001 +From 83c73d91b61f989a8e3d4b96ada4f10c5c426c73 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 6 Feb 2021 12:44:30 -0800 Subject: [PATCH] compiler-rt: Include stddef.h diff --git a/recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch index dba22ec1..2e082849 100644 --- a/recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch +++ b/recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch @@ -1,4 +1,4 @@ -From a39a58f080877b99b1ef580f7915c547ad0112db Mon Sep 17 00:00:00 2001 +From e3f5f4346d0faeca424ce0494fbc2b1f75373e5f 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 diff --git a/recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index 412a0302..bf4f4752 100644 --- a/recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From c5ea14dd34a2d6ba93c94533b43ad83f560831b6 Mon Sep 17 00:00:00 2001 +From d008023e9fcd2615ca21d74c85e197570ba24502 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 diff --git a/recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index c7dd945c..0f7d0dfc 100644 --- a/recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From e52894aae026b217e0dae193b1c1203de5e7792e Mon Sep 17 00:00:00 2001 +From 656ce3eec5ca681fdbcc137f86cbf48de920f3cc Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 diff --git a/recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch b/recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch index ade74d3e..44189049 100644 --- a/recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch +++ b/recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch @@ -1,4 +1,4 @@ -From 332447757e61e5c7ca0b3fbeafcaf0c53b308174 Mon Sep 17 00:00:00 2001 +From b85085aee33ceeee4aee46b8b7c293f1b0de5f6a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 15 Apr 2021 18:58:07 -0700 Subject: [PATCH] clang: Switch defaults to dwarf-5 debug info on Linux diff --git a/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 4fd2a2f9..fa868575 100644 --- a/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From 9ff4fbb42c182b11a6b7bd870cb82a6ae4896fe3 Mon Sep 17 00:00:00 2001 +From 8a2e12e1d4054b989018d31c28ec843300001739 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/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index f33663df..57ae8bf0 100644 --- a/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From 4cb3ad387cb2b4eb9c9ec8243aaafbffc71c9ede Mon Sep 17 00:00:00 2001 +From 329d1ae9d9c5f4b7453865dc6fbb9c5341a4d02d 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 @@ -12,10 +12,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 8a63dd8c0e60..66874319fc44 100644 +index 0b3bbdeab5f3..b73644df5641 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -622,6 +622,9 @@ void Linux::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, +@@ -619,6 +619,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/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index e3ba90b7..0d05abc3 100644 --- a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From ce655e90531061414002634584590761734ce229 Mon Sep 17 00:00:00 2001 +From 3b4033d5a25f03ec9496151ae868cf0f0e63a6ae Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES diff --git a/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index ea86ce67..79fef6de 100644 --- a/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From b7dab91761d8656d802da8d0d754352f58fb05c9 Mon Sep 17 00:00:00 2001 +From 1e5dfaf08426f235a92081aadda5ae2a149ff871 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips diff --git a/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch index b04c4402..ef2a7f32 100644 --- a/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From a9ac0832f39e10a08d8b49b7c4968cc30100f706 Mon Sep 17 00:00:00 2001 +From 049cffbdf0e6e19037a5bc49483e6d68b18d6a0e Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 23 May 2021 10:27:29 +0000 Subject: [PATCH] libunwind: Added unw_backtrace method diff --git a/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch b/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch index c1097db7..ea400989 100644 --- a/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch +++ b/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch @@ -1,4 +1,4 @@ -From 4ff7a960f67ee8b0df09fb76113d9a2380e4b802 Mon Sep 17 00:00:00 2001 +From 54593b1564c12f55da088f3d6c68d4a55e411083 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 29 May 2021 13:42:25 -0700 Subject: [PATCH] compiler-rt: Use uintptr_t instead of _Unwind_Word diff --git a/recipes-devtools/clang/clang/0035-compiler-rt-Do-not-force-thumb-mode-directive.patch b/recipes-devtools/clang/clang/0035-compiler-rt-Do-not-force-thumb-mode-directive.patch new file mode 100644 index 00000000..2597926f --- /dev/null +++ b/recipes-devtools/clang/clang/0035-compiler-rt-Do-not-force-thumb-mode-directive.patch @@ -0,0 +1,46 @@ +From 69a653669e6cdad91803143aca02706e7f7228d3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 12 Jun 2021 08:42:36 -0700 +Subject: [PATCH] [compiler-rt] Do not force thumb mode directive + +.thumb_func was not switching mode until [1] +so it did not show up but now that .thumb_func (without argument) is +switching mode, its causing build failures on armv6 ( rpi0 ) even when +build is explicitly asking for this file to be built with -marm (ARM +mode), therefore use DEFINE_COMPILERRT_FUNCTION macro to add function +header which considers arch and mode from compiler cmdline to decide if +the function is built using thumb mode or arm mode. + +[1] https://reviews.llvm.org/D101975 + +Signed-off-by: Khem Raj +--- + compiler-rt/lib/builtins/arm/sync-ops.h | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/compiler-rt/lib/builtins/arm/sync-ops.h b/compiler-rt/lib/builtins/arm/sync-ops.h +index 7a26170741ad..d914f9d3a109 100644 +--- a/compiler-rt/lib/builtins/arm/sync-ops.h ++++ b/compiler-rt/lib/builtins/arm/sync-ops.h +@@ -16,9 +16,8 @@ + + #define SYNC_OP_4(op) \ + .p2align 2; \ +- .thumb; \ + .syntax unified; \ +- DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op) \ ++ DEFINE_COMPILERRT_FUNCTION(__sync_fetch_and_##op) \ + DMB; \ + mov r12, r0; \ + LOCAL_LABEL(tryatomic_##op) : ldrex r0, [r12]; \ +@@ -31,9 +30,8 @@ + + #define SYNC_OP_8(op) \ + .p2align 2; \ +- .thumb; \ + .syntax unified; \ +- DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op) \ ++ DEFINE_COMPILERRT_FUNCTION(__sync_fetch_and_##op) \ + push {r4, r5, r6, lr}; \ + DMB; \ + mov r12, r0; \ diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 82ab6946..45f80829 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -44,6 +44,7 @@ SRC_URI = "\ file://0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch \ file://0033-libunwind-Added-unw_backtrace-method.patch \ file://0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch \ + file://0035-compiler-rt-Do-not-force-thumb-mode-directive.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From d8c5c7f60b446ce4c30a8a68dc47f3332f2607d7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 15 Jun 2021 12:07:30 -0700 Subject: [PATCH 041/166] clang: Update to latest master/13.0 Drop 0024-compiler-rt-Include-stddef.h.patch its accepted upstream Signed-off-by: Khem Raj (cherry picked from commit 2b5f122e57697b972bc1b65ea7dbb015a9303d11) --- recipes-devtools/clang/clang.inc | 2 +- ...l2-to-linker-cmdline-of-xml-is-found.patch | 2 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 2 +- ...-support-a-new-embedded-linux-target.patch | 18 ++----------- ...lify-cross-compilation.-Don-t-use-na.patch | 2 +- ...ryInfo-Undefine-libc-functions-if-th.patch | 2 +- ...-llvm-allow-env-override-of-exe-path.patch | 2 +- ...g-driver-Check-sysroot-for-ldso-path.patch | 2 +- ...tools.cpp-Add-lssp_nonshared-on-musl.patch | 2 +- ...does-not-support-128-bit-long-double.patch | 2 +- ...10-clang-Prepend-trailing-to-sysroot.patch | 2 +- ...e-the-target-sysroot-for-compiler-ru.patch | 2 +- ...efine-releative-gcc-installation-dir.patch | 2 +- ...ad-and-ldl-along-with-lunwind-for-st.patch | 6 ++--- ...UTABLE-when-cross-compiling-for-nati.patch | 2 +- ...5-Check-for-atomic-double-intrinsics.patch | 2 +- ...-clang-Enable-SSP-and-PIE-by-default.patch | 2 +- ...ler-runtime-library-to-link-step-for.patch | 2 +- ...-Fix-configure-for-packages-using-fi.patch | 2 +- ...ce-dir-location-for-cross-toolchains.patch | 2 +- .../clang/clang/0020-fix-path-to-libffi.patch | 2 +- ...-dyld-prefix-when-checking-sysroot-f.patch | 2 +- ...-clang-Use-python3-in-python-scripts.patch | 2 +- ...-Yocto-based-GCC-install-search-path.patch | 2 +- .../0024-compiler-rt-Include-stddef.h.patch | 27 ------------------- ...Do-not-use-find_library-for-ncurses.patch} | 2 +- ...r-for-adding-OE-distro-vendor-names.patch} | 2 +- ...r-rt-Use-mcr-based-barrier-on-armv6.patch} | 2 +- ...ults-to-dwarf-5-debug-info-on-Linux.patch} | 2 +- ...t-use-backtrace-APIs-on-non-glibc-l.patch} | 2 +- ...ple-for-non-debian-multiarch-linux-.patch} | 2 +- ...scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch} | 2 +- ...scudo-standalone-with-libatomic-on-.patch} | 2 +- ...ibunwind-Added-unw_backtrace-method.patch} | 6 ++--- ...e-uintptr_t-instead-of-_Unwind_Word.patch} | 2 +- ...t-Do-not-force-thumb-mode-directive.patch} | 2 +- recipes-devtools/clang/common.inc | 23 ++++++++-------- 37 files changed, 51 insertions(+), 93 deletions(-) delete mode 100644 recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch rename recipes-devtools/clang/clang/{0025-llvm-Do-not-use-find_library-for-ncurses.patch => 0024-llvm-Do-not-use-find_library-for-ncurses.patch} (96%) rename recipes-devtools/clang/clang/{0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch => 0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch} (94%) rename recipes-devtools/clang/clang/{0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch => 0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch} (98%) rename recipes-devtools/clang/clang/{0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch => 0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch} (93%) rename recipes-devtools/clang/clang/{0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch => 0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch} (97%) rename recipes-devtools/clang/clang/{0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch => 0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch} (94%) rename recipes-devtools/clang/clang/{0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch => 0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch} (95%) rename recipes-devtools/clang/clang/{0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch => 0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch} (94%) rename recipes-devtools/clang/clang/{0033-libunwind-Added-unw_backtrace-method.patch => 0032-libunwind-Added-unw_backtrace-method.patch} (91%) rename recipes-devtools/clang/clang/{0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch => 0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch} (96%) rename recipes-devtools/clang/clang/{0035-compiler-rt-Do-not-force-thumb-mode-directive.patch => 0034-compiler-rt-Do-not-force-thumb-mode-directive.patch} (97%) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index b2c6ab3e..610c8b91 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "1e50c3d785f4563873ab1ce86559f2a1285b5678" +SRCREV ?= "3bc899b4de74d395b03d3969d700aac71f89bc12" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "main" diff --git a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch index 84811a50..19c19fff 100644 --- a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch +++ b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch @@ -1,4 +1,4 @@ -From 3f5e7342d5f2490728e5971d9e709b3be736d633 Mon Sep 17 00:00:00 2001 +From 8bbe4129627506374e857cae7d8ce86f08725cd7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 22 May 2017 17:36:16 -0700 Subject: [PATCH] lldb: Add -lxml2 to linker cmdline of xml is found diff --git a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch index 8c327027..00eee52e 100644 --- a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch +++ b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch @@ -1,4 +1,4 @@ -From 9052bcd92350fe8ede577fe876e59951478e1949 Mon Sep 17 00:00:00 2001 +From 3c3aa3d7c09f50ebbece24434d8fe12fc2ce7114 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 diff --git a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch index 04f02ae2..2558fe5c 100644 --- a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch +++ b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch @@ -1,30 +1,16 @@ -From adf258f2809c719a3a52b1d832f0139d8e668a34 Mon Sep 17 00:00:00 2001 +From ddb0abe6cd8e28d744f6f911388bbc5ed67a169c 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 Signed-off-by: Khem Raj --- - compiler-rt/lib/builtins/int_util.c | 2 +- .../make/platform/clang_linux_embedded.mk | 286 ++++++++++++++++++ .../clang_linux_embedded_test_input.c | 0 - 3 files changed, 287 insertions(+), 1 deletion(-) + 2 files changed, 286 insertions(+) create mode 100644 compiler-rt/make/platform/clang_linux_embedded.mk create mode 100644 compiler-rt/make/platform/clang_linux_embedded_test_input.c -diff --git a/compiler-rt/lib/builtins/int_util.c b/compiler-rt/lib/builtins/int_util.c -index 226a6e93440d..efc977acbb39 100644 ---- a/compiler-rt/lib/builtins/int_util.c -+++ b/compiler-rt/lib/builtins/int_util.c -@@ -54,7 +54,7 @@ void __compilerrt_abort_impl(const char *file, int line, const char *function) { - #else - - // Get the system definition of abort() --#include -+extern void abort (void) __attribute__ ((__noreturn__)); - - #ifndef _WIN32 - __attribute__((weak)) diff --git a/compiler-rt/make/platform/clang_linux_embedded.mk b/compiler-rt/make/platform/clang_linux_embedded.mk new file mode 100644 index 000000000000..d0a890075a1c diff --git a/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch index e00b3183..73dad7c0 100644 --- a/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch +++ b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch @@ -1,4 +1,4 @@ -From 08dabaabc28efd55ba1b77830fc8b92f1ad28894 Mon Sep 17 00:00:00 2001 +From ec6de16258fb4eb031dbb502082ee63722b11286 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 diff --git a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index 1c773c7b..f2c9a796 100644 --- a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch @@ -1,4 +1,4 @@ -From d3adf3b2a689fe006b6b24430b3f52ecd6807efa Mon Sep 17 00:00:00 2001 +From 6b27010179b4ca52616a4416ee974145628dbf00 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 diff --git a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch index 33d07b69..cda2641d 100644 --- a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From 693007ba2f20c6ef45114d73166fb0273d1fdacb Mon Sep 17 00:00:00 2001 +From 02f3ffb65786b68550bbe97ed31fbe0cfc525552 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 path diff --git a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch index 3b68a2d8..5213f809 100644 --- a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch +++ b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch @@ -1,4 +1,4 @@ -From a81fe1f4e85bfb616b914f894c767488ee230792 Mon Sep 17 00:00:00 2001 +From 661d95171fbb0c62166299ac22d75f302b089444 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 diff --git a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index 9e881c64..5c02abb4 100644 --- a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch +++ b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch @@ -1,4 +1,4 @@ -From 1d8c23ef1e70a1404224918dd2090c6a2828c7ef Mon Sep 17 00:00:00 2001 +From 3cf88452ed0fe187741b8973135fb97e0a7055e7 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 diff --git a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch index 227a5f1c..968ff371 100644 --- a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch @@ -1,4 +1,4 @@ -From 082dd1f20b838510dca1481e9479c57ce8d03dff Mon Sep 17 00:00:00 2001 +From bb49fa5b1ced3ae610cc796d72319df8f69630d0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 02:00:11 -0700 Subject: [PATCH] clang: musl/ppc does not support 128-bit long double diff --git a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch index e7ff5f34..baba6e66 100644 --- a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From 0c0f10bfe6d0b51080b81c73fae52ddb2a768e5d Mon Sep 17 00:00:00 2001 +From 0c0f1e5f1099ec4fea52cb18a9dc0b31c301a0fb 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 diff --git a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index d2fc933e..866f6802 100644 --- a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From 1c4f99104db0a5d2504fb9f1d4a5cd57a94aaaef Mon Sep 17 00:00:00 2001 +From a0de10cdb0d21d7cfed431586b54832e929f99a6 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 diff --git a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch index 1bd3413a..3c8f1026 100644 --- a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch @@ -1,4 +1,4 @@ -From 9be197ac1d1a80f4f8ec81bb7ea41a393869cab1 Mon Sep 17 00:00:00 2001 +From 37ac2d6586a22407ace1cd8cf24ddbf7810f0e9a 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 diff --git a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index ebf46961..c5008aee 100644 --- a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From 14c7eb733c03a775de7e828a11af6d43170620e8 Mon Sep 17 00:00:00 2001 +From 5f14a644ff02256d067c706f77ed045d113f7efc 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 @@ -20,10 +20,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 a1aab21c944b..3338cf6fdad9 100644 +index c123625bb817..7fa84e86045e 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -1451,6 +1451,8 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, +@@ -1450,6 +1450,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/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index 3ad5e3c1..55e8d90d 100644 --- a/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From 1ea29b33aebd027faf22bf9a0bf1c83c8b7c6571 Mon Sep 17 00:00:00 2001 +From 547ad6e37f4fa53e6267cb5cfafaac37192304df 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 diff --git a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch index f5285402..4a71996b 100644 --- a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From e8f619fae05f543455ec8e1e61e255ac5cbd5f39 Mon Sep 17 00:00:00 2001 +From 71e2cd6ff51f0f4212c231db9a6626b3a248dfd7 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/0016-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch index 317ebc2d..b1097a38 100644 --- a/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch +++ b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch @@ -1,4 +1,4 @@ -From 24701aa638b8e111d7c93cf129959b63403d2327 Mon Sep 17 00:00:00 2001 +From 816a9eedc5c031667d495b9ebb1b623773bcdcf4 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Thu, 26 Dec 2019 15:46:19 -0800 Subject: [PATCH] clang: Enable SSP and PIE by default diff --git a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index d11bf2ad..832d83b4 100644 --- a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -1,4 +1,4 @@ -From 91c7a0a31acf1ab7475b85144d923f70541fae7c Mon Sep 17 00:00:00 2001 +From d362483cf317d224a27c3a1147c4ed50a120aa6e 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 diff --git a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index 35da3eb0..2ed324a9 100644 --- a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -1,4 +1,4 @@ -From 2682484fb5365d5bfbe4c343f74298e155d20645 Mon Sep 17 00:00:00 2001 +From a55cd03900022a08172d85268ee5630099f68278 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 diff --git a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch index a7c34107..4d52d1b4 100644 --- a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From f59f431174b876e1fb64e982f1b4f3848376a840 Mon Sep 17 00:00:00 2001 +From 9ce38d7cbf9bc38520410da3595d9e18ffcba49f 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 diff --git a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch index 126b83e7..5a1917b5 100644 --- a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch +++ b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch @@ -1,4 +1,4 @@ -From 199b980b8aa03a9d102d33f1353b5e94fb255ea8 Mon Sep 17 00:00:00 2001 +From e8a30d3d8f2e9b62e9022fab86210e45c3395400 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Fri, 3 Apr 2020 15:10:37 +0800 Subject: [PATCH] fix path to libffi diff --git a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index 769dd45e..4b5ff3e8 100644 --- a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From 9b0acc4e9fb202a4d224fbf5eba54576fdb95ea3 Mon Sep 17 00:00:00 2001 +From e2140a10a80e737b42408e7847502f1a7723388f 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 diff --git a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch index 84948b22..b771a80f 100644 --- a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From 90d69c23d95ae59ddbc6c2383ea30f622f09f4eb Mon Sep 17 00:00:00 2001 +From 35659b7324baa809ff04e52e8f0d55584a0e4033 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/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index 0e23e872..1c364dbd 100644 --- a/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From 5c6b926de61fb1c7f2bf425fe09bab0bf59ac101 Mon Sep 17 00:00:00 2001 +From bac45d7406d40b0ced2841e23bc19e8a641d35be 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 diff --git a/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch b/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch deleted file mode 100644 index 8a616219..00000000 --- a/recipes-devtools/clang/clang/0024-compiler-rt-Include-stddef.h.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 83c73d91b61f989a8e3d4b96ada4f10c5c426c73 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 6 Feb 2021 12:44:30 -0800 -Subject: [PATCH] compiler-rt: Include stddef.h - -size_t is use in the source needs relevant header to include the -definition, fixes build on musl - -compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp:82:61: error: unknown type name 'size_t'; did you mean 'std::size_t'? - -Signed-off-by: Khem Raj ---- - compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp b/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp -index b87798603fda..d5b0a42fd3fb 100644 ---- a/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp -+++ b/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp -@@ -25,6 +25,7 @@ - } - - #include -+#include // for size_t - #include - #include // for dlsym() - diff --git a/recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch similarity index 96% rename from recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch rename to recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch index 2e082849..0ef5ea31 100644 --- a/recipes-devtools/clang/clang/0025-llvm-Do-not-use-find_library-for-ncurses.patch +++ b/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch @@ -1,4 +1,4 @@ -From e3f5f4346d0faeca424ce0494fbc2b1f75373e5f Mon Sep 17 00:00:00 2001 +From 3b8cefb2e85d29da9935e6c8ec2ff7f6d99d7809 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 diff --git a/recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch similarity index 94% rename from recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch rename to recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index bf4f4752..a1d5535d 100644 --- a/recipes-devtools/clang/clang/0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From d008023e9fcd2615ca21d74c85e197570ba24502 Mon Sep 17 00:00:00 2001 +From aef271e12ce0bdf1d19548b4031cadea88d316d1 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 diff --git a/recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch similarity index 98% rename from recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch rename to recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index 0f7d0dfc..adb64d15 100644 --- a/recipes-devtools/clang/clang/0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From 656ce3eec5ca681fdbcc137f86cbf48de920f3cc Mon Sep 17 00:00:00 2001 +From 1385f46939352191af3a61e0c924da58eee11a25 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 diff --git a/recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch b/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch similarity index 93% rename from recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch rename to recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch index 44189049..05b003a4 100644 --- a/recipes-devtools/clang/clang/0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch +++ b/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch @@ -1,4 +1,4 @@ -From b85085aee33ceeee4aee46b8b7c293f1b0de5f6a Mon Sep 17 00:00:00 2001 +From b03d3a24cd49083a2f8e9cbbc9b66ec72b690d6d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 15 Apr 2021 18:58:07 -0700 Subject: [PATCH] clang: Switch defaults to dwarf-5 debug info on Linux diff --git a/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch similarity index 97% rename from recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch rename to recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index fa868575..eb131181 100644 --- a/recipes-devtools/clang/clang/0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From 8a2e12e1d4054b989018d31c28ec843300001739 Mon Sep 17 00:00:00 2001 +From 24544a16a6a6cf4d37d9277b183eb44514dbebde 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/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch similarity index 94% rename from recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch rename to recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index 57ae8bf0..e8ec9629 100644 --- a/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From 329d1ae9d9c5f4b7453865dc6fbb9c5341a4d02d Mon Sep 17 00:00:00 2001 +From 856a1ba88befb17cf65c2f8e8ac068a9a2736cea 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 diff --git a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch similarity index 95% rename from recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch rename to recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index 0d05abc3..44599164 100644 --- a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From 3b4033d5a25f03ec9496151ae868cf0f0e63a6ae Mon Sep 17 00:00:00 2001 +From 959fef3b3acc0e9df4e9849828fc1097bbf2bf45 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES diff --git a/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch similarity index 94% rename from recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch rename to recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index 79fef6de..1aeeaa3a 100644 --- a/recipes-devtools/clang/clang/0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From 1e5dfaf08426f235a92081aadda5ae2a149ff871 Mon Sep 17 00:00:00 2001 +From 0d7941cf793b25319c773067d40e4235576dc630 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips diff --git a/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch similarity index 91% rename from recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch rename to recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch index ef2a7f32..45b23383 100644 --- a/recipes-devtools/clang/clang/0033-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 049cffbdf0e6e19037a5bc49483e6d68b18d6a0e Mon Sep 17 00:00:00 2001 +From 84bf553c54b6c1ec19623f0564dde3fb671df612 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 @@ -24,10 +24,10 @@ index 0feecd7bd6fc..670cfa3ed71d 100644 extern unw_addr_space_t unw_local_addr_space; diff --git a/libunwind/src/libunwind.cpp b/libunwind/src/libunwind.cpp -index 9b3b92bdff09..986ef62f9231 100644 +index 1faf000ce44a..1edbdea6a19e 100644 --- a/libunwind/src/libunwind.cpp +++ b/libunwind/src/libunwind.cpp -@@ -289,7 +289,25 @@ void __unw_remove_dynamic_fde(unw_word_t fde) { +@@ -295,7 +295,25 @@ void __unw_remove_dynamic_fde(unw_word_t fde) { #endif // defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) #endif // !defined(__USING_SJLJ_EXCEPTIONS__) diff --git a/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch b/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch similarity index 96% rename from recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch rename to recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch index ea400989..c6a5ccc2 100644 --- a/recipes-devtools/clang/clang/0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch +++ b/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch @@ -1,4 +1,4 @@ -From 54593b1564c12f55da088f3d6c68d4a55e411083 Mon Sep 17 00:00:00 2001 +From 2c73193c66359ea0506e4f9ebf69d534ca1aa0fd Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 29 May 2021 13:42:25 -0700 Subject: [PATCH] compiler-rt: Use uintptr_t instead of _Unwind_Word diff --git a/recipes-devtools/clang/clang/0035-compiler-rt-Do-not-force-thumb-mode-directive.patch b/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch similarity index 97% rename from recipes-devtools/clang/clang/0035-compiler-rt-Do-not-force-thumb-mode-directive.patch rename to recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch index 2597926f..26ca0485 100644 --- a/recipes-devtools/clang/clang/0035-compiler-rt-Do-not-force-thumb-mode-directive.patch +++ b/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch @@ -1,4 +1,4 @@ -From 69a653669e6cdad91803143aca02706e7f7228d3 Mon Sep 17 00:00:00 2001 +From 127d2d9a234809ba2c76bc3f64b0902cc7b24ba3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Jun 2021 08:42:36 -0700 Subject: [PATCH] [compiler-rt] Do not force thumb mode directive diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 45f80829..324e7e89 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -33,18 +33,17 @@ SRC_URI = "\ file://0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch \ file://0022-clang-Use-python3-in-python-scripts.patch \ file://0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch \ - file://0024-compiler-rt-Include-stddef.h.patch \ - file://0025-llvm-Do-not-use-find_library-for-ncurses.patch \ - file://0026-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch \ - file://0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \ - file://0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch \ - file://0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch \ - file://0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch \ - file://0031-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ - file://0032-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch \ - file://0033-libunwind-Added-unw_backtrace-method.patch \ - file://0034-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch \ - file://0035-compiler-rt-Do-not-force-thumb-mode-directive.patch \ + file://0024-llvm-Do-not-use-find_library-for-ncurses.patch \ + file://0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch \ + file://0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \ + file://0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch \ + file://0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch \ + file://0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch \ + file://0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ + file://0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch \ + file://0032-libunwind-Added-unw_backtrace-method.patch \ + file://0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch \ + file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From 817ff1b3ea50be97bde9e6d9240e05b56c2b93e1 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Tue, 18 May 2021 05:25:57 -0700 Subject: [PATCH 042/166] spirv-llvm-translator: Remove a trailing slash from SRC_URI The trailing slash caused the mirror name endswith a dot which looks strange: github.com.KhronosGroup.SPIRV-LLVM-Translator. The slash is not needed, so remove it. Signed-off-by: Robert Yang Signed-off-by: Changqing Li (cherry picked from commit 5455c65e37bd0e881aad8fc318beb6d0a4469703) --- .../spirv-llvm-translator/spirv-llvm-translator_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb index d6da4e82..dfb0b7f9 100644 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb @@ -2,7 +2,7 @@ LICENSE = "NCSA" LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=47e311aa9caedd1b3abf098bd7814d1d" BRANCH = "master" -SRC_URI = "git://github.com/KhronosGroup/SPIRV-LLVM-Translator/;protocol=https;branch=${BRANCH} \ +SRC_URI = "git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;branch=${BRANCH} \ " PV = "13.0.0" From bc52c18be9399dc8186ba9d81b5083a3965d94c6 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 21 Jun 2021 10:23:50 -0700 Subject: [PATCH 043/166] clang: Update to latest on main/13.0 line Package new content for scanbuild and libear Signed-off-by: Khem Raj (cherry picked from commit 50e25bfa72a14b2b156964828995873fdc70da60) --- recipes-devtools/clang/clang.inc | 2 +- recipes-devtools/clang/clang_git.bb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 610c8b91..b724d2c7 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "3bc899b4de74d395b03d3969d700aac71f89bc12" +SRCREV ?= "ec08f03be3942d4ae6694d0f7a9b490fe3cbba9b" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "main" diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 47fdd698..7f0fccc2 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -252,6 +252,7 @@ FILES_${PN} += "\ ${libdir}/${BPN} \ ${nonarch_libdir}/${BPN}/*/include/ \ ${datadir}/scan-* \ + ${libdir}/libscanbuild \ ${datadir}/opt-viewer/ \ " @@ -282,6 +283,7 @@ FILES_libclang = "\ FILES_${PN}-dev += "\ ${datadir}/llvm/cmake \ ${libdir}/cmake \ + ${libdir}/libear \ ${nonarch_libdir}/${BPN}/*.la \ " From e374e9c324c53f53777b8f5dad2fb230981ba161 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 23 Jun 2021 08:47:15 -0700 Subject: [PATCH 044/166] spirv-llvm-translator: Update to latest trunk Signed-off-by: Khem Raj (cherry picked from commit 9c84711bbf8ff21e4276fb59d0e858fc3983155e) --- .../spirv-llvm-translator/spirv-llvm-translator_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb index dfb0b7f9..d35dc8f2 100644 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb @@ -6,7 +6,7 @@ SRC_URI = "git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;br " PV = "13.0.0" -SRCREV = "76c76efeb8bcb3414dcd26ef938de43eb1beb516" +SRCREV = "ddb5c962f0a11dc3dcc03e1e1840d2d826b95af9" S = "${WORKDIR}/git" From 7810c53fe39f72a57f6613d1aa22762e8a252d6b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 23 Jun 2021 11:01:46 -0700 Subject: [PATCH 045/166] openmp: Fix build on non-x86 targets Signed-off-by: Khem Raj (cherry picked from commit b9c9325d65fdcc6a1bfdb15b538c7454894ce15f) --- ...-openmp-Fix-build-on-non-x86-targets.patch | 121 ++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 2 files changed, 122 insertions(+) create mode 100644 recipes-devtools/clang/clang/0035-openmp-Fix-build-on-non-x86-targets.patch diff --git a/recipes-devtools/clang/clang/0035-openmp-Fix-build-on-non-x86-targets.patch b/recipes-devtools/clang/clang/0035-openmp-Fix-build-on-non-x86-targets.patch new file mode 100644 index 00000000..3ce1096a --- /dev/null +++ b/recipes-devtools/clang/clang/0035-openmp-Fix-build-on-non-x86-targets.patch @@ -0,0 +1,121 @@ +[OpenMP] Fix builds for non-x86 after distributed barrier patch + +Upstream-Status: Submitted [https://reviews.llvm.org/D104788] + +diff --git a/openmp/runtime/cmake/config-ix.cmake b/openmp/runtime/cmake/config-ix.cmake +--- a/openmp/runtime/cmake/config-ix.cmake ++++ b/openmp/runtime/cmake/config-ix.cmake +@@ -109,6 +109,23 @@ + set(CMAKE_REQUIRED_LIBRARIES) + endif() + ++# Check for aligned memory allocator function ++check_include_file(xmmintrin.h LIBOMP_HAVE_XMMINTRIN_H) ++set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) ++if (LIBOMP_HAVE_XMMINTRIN_H) ++ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -DLIBOMP_HAVE_XMMINTRIN_H") ++endif() ++set(source_code "// check for _mm_malloc ++ #ifdef LIBOMP_HAVE_XMMINTRIN_H ++ #include ++ #endif ++ int main() { void *ptr = _mm_malloc(sizeof(int) * 1000, 64); _mm_free(ptr); return 0; }") ++check_cxx_source_compiles("${source_code}" LIBOMP_HAVE__MM_MALLOC) ++set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) ++check_symbol_exists(aligned_alloc "stdlib.h" LIBOMP_HAVE_ALIGNED_ALLOC) ++check_symbol_exists(posix_memalign "stdlib.h" LIBOMP_HAVE_POSIX_MEMALIGN) ++check_symbol_exists(_aligned_malloc "malloc.h" LIBOMP_HAVE__ALIGNED_MALLOC) ++ + # Check linker flags + if(WIN32) + libomp_check_linker_flag(/SAFESEH LIBOMP_HAVE_SAFESEH_FLAG) +diff --git a/openmp/runtime/src/kmp_barrier.h b/openmp/runtime/src/kmp_barrier.h +--- a/openmp/runtime/src/kmp_barrier.h ++++ b/openmp/runtime/src/kmp_barrier.h +@@ -15,6 +15,34 @@ + + #include "kmp.h" + ++#if KMP_HAVE_XMMINTRIN_H && KMP_HAVE__MM_MALLOC ++#include ++#define KMP_ALIGNED_ALLOCATE(size, alignment) _mm_malloc(size, alignment) ++#define KMP_ALIGNED_FREE(ptr) _mm_free(ptr) ++#elif KMP_HAVE_ALIGNED_ALLOC ++#define KMP_ALIGNED_ALLOCATE(size, alignment) aligned_alloc(alignment, size) ++#define KMP_ALIGNED_FREE(ptr) free(ptr) ++#elif KMP_HAVE_POSIX_MEMALIGN ++#include "kmp_i18n.h" ++static inline void *KMP_ALIGNED_ALLOCATE(size_t size, size_t alignment) { ++ void *ptr; ++ int n = posix_memalign(&ptr, alignment, size); ++ if (n != 0) { ++ __kmp_fatal(KMP_MSG(FunctionError, "posix_memalign()"), KMP_ERR(errno), ++ __kmp_msg_null); ++ } ++ return ptr; ++} ++#define KMP_ALIGNED_FREE(ptr) free(ptr) ++#elif KMP_HAVE__ALIGNED_MALLOC ++#include ++#define KMP_ALIGNED_ALLOCATE(size, alignment) _aligned_malloc(size, alignment) ++#define KMP_ALIGNED_FREE(ptr) _aligned_free(ptr) ++#else ++#define KMP_ALIGNED_ALLOCATE(size, alignment) KMP_INTERNAL_MALLOC(size) ++#define KMP_ALIGNED_FREE(ptr) KMP_INTERNAL_FREE(ptr) ++#endif ++ + // Use four cache lines: MLC tends to prefetch the next or previous cache line + // creating a possible fake conflict between cores, so this is the only way to + // guarantee that no such prefetch can happen. +@@ -79,7 +107,7 @@ + + // Used instead of constructor to create aligned data + static distributedBarrier *allocate(int nThreads) { +- distributedBarrier *d = (distributedBarrier *)_mm_malloc( ++ distributedBarrier *d = (distributedBarrier *)KMP_ALIGNED_ALLOCATE( + sizeof(distributedBarrier), 4 * CACHE_LINE); + d->num_threads = 0; + d->max_threads = 0; +@@ -96,7 +124,7 @@ + return d; + } + +- static void deallocate(distributedBarrier *db) { _mm_free(db); } ++ static void deallocate(distributedBarrier *db) { KMP_ALIGNED_FREE(db); } + + void update_num_threads(size_t nthr) { init(nthr); } + +diff --git a/openmp/runtime/src/kmp_config.h.cmake b/openmp/runtime/src/kmp_config.h.cmake +--- a/openmp/runtime/src/kmp_config.h.cmake ++++ b/openmp/runtime/src/kmp_config.h.cmake +@@ -88,6 +88,16 @@ + #define KMP_HAVE_ATTRIBUTE_RTM LIBOMP_HAVE_ATTRIBUTE_RTM + #cmakedefine01 LIBOMP_ARCH_AARCH64_A64FX + #define KMP_ARCH_AARCH64_A64FX LIBOMP_ARCH_AARCH64_A64FX ++#cmakedefine01 LIBOMP_HAVE_XMMINTRIN_H ++#define KMP_HAVE_XMMINTRIN_H LIBOMP_HAVE_XMMINTRIN_H ++#cmakedefine01 LIBOMP_HAVE__MM_MALLOC ++#define KMP_HAVE__MM_MALLOC LIBOMP_HAVE__MM_MALLOC ++#cmakedefine01 LIBOMP_HAVE_ALIGNED_ALLOC ++#define KMP_HAVE_ALIGNED_ALLOC LIBOMP_HAVE_ALIGNED_ALLOC ++#cmakedefine01 LIBOMP_HAVE_POSIX_MEMALIGN ++#define KMP_HAVE_POSIX_MEMALIGN LIBOMP_HAVE_POSIX_MEMALIGN ++#cmakedefine01 LIBOMP_HAVE__ALIGNED_MALLOC ++#define KMP_HAVE__ALIGNED_MALLOC LIBOMP_HAVE__ALIGNED_MALLOC + + // Configured cache line based on architecture + #if KMP_ARCH_PPC64 +diff --git a/openmp/runtime/src/kmp_os.h b/openmp/runtime/src/kmp_os.h +--- a/openmp/runtime/src/kmp_os.h ++++ b/openmp/runtime/src/kmp_os.h +@@ -1038,6 +1038,9 @@ + KMP_MFENCE_(); \ + } + #define KMP_SFENCE() KMP_SFENCE_() ++#else ++#define KMP_MFENCE() KMP_MB() ++#define KMP_SFENCE() KMP_MB() + #endif + + #ifndef KMP_IMB + diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 324e7e89..bf9cbe3c 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -44,6 +44,7 @@ SRC_URI = "\ file://0032-libunwind-Added-unw_backtrace-method.patch \ file://0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch \ file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ + file://0035-openmp-Fix-build-on-non-x86-targets.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From 365960215f5d595e0a3717ce697a0ac00b9bdc6f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 24 Jun 2021 14:49:45 -0700 Subject: [PATCH 046/166] libcxx: Fix native build Use libgcc with clang-native to compile it Fixes #465 Signed-off-by: Khem Raj (cherry picked from commit 4d066667c3cbba3b88d2f8d6c5640f5f793d10b4) Conflicts: - recipes-devtools/clang/libcxx_git.bb: Commit 93552c79eed5daa44a24bf4b7a063a2ade739e97 had some of the changes already. --- classes/clang.bbclass | 24 +++++++++++++----------- recipes-devtools/clang/libcxx_git.bb | 11 +++++++---- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 849049aa..563aa9d8 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -1,31 +1,33 @@ # Add the necessary override -CCACHE_COMPILERCHECK_class-target_toolchain-clang ?= "%compiler% -v" -HOST_CC_ARCH_prepend_class-target_toolchain-clang = "-target ${HOST_SYS} " -CC_class-target_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -CXX_class-target_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -CPP_class-target_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} -E" -CCLD_class-target_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -RANLIB_class-target_toolchain-clang = "${HOST_PREFIX}llvm-ranlib" -AR_class-target_toolchain-clang = "${HOST_PREFIX}llvm-ar" -NM_class-target_toolchain-clang = "${HOST_PREFIX}llvm-nm" +CCACHE_COMPILERCHECK_toolchain-clang ?= "%compiler% -v" +HOST_CC_ARCH_prepend_toolchain-clang = "-target ${HOST_SYS} " +CC_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" +CXX_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" +CPP_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} -E" +CCLD_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" +RANLIB_toolchain-clang = "${HOST_PREFIX}llvm-ranlib" +AR_toolchain-clang = "${HOST_PREFIX}llvm-ar" +NM_toolchain-clang = "${HOST_PREFIX}llvm-nm" LTO_toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'thin-lto', '-flto=thin', '-flto -fuse-ld=lld', d)}" PACKAGE_DEBUG_SPLIT_STYLE_toolchain-clang = "debug-without-src" COMPILER_RT ??= "" +COMPILER_RT_class-native = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT_powerpc = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT_armeb = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT_libc-klibc = "-rtlib=libgcc ${UNWINDLIB}" UNWINDLIB ??= "" +UNWINDLIB_class-native = "--unwindlib=libgcc" UNWINDLIB_powerpc = "--unwindlib=libgcc" UNWINDLIB_armeb = "--unwindlib=libgcc" UNWINDLIB_libc-klibc = "--unwindlib=libgcc" LIBCPLUSPLUS ??= "" -TARGET_CXXFLAGS_append_toolchain-clang = " ${LIBCPLUSPLUS}" -TUNE_CCARGS_append_toolchain-clang = " ${COMPILER_RT} ${LIBCPLUSPLUS}" +CXXFLAGS_append_toolchain-clang = " ${LIBCPLUSPLUS}" +LDFLAGS_append_toolchain-clang = " ${COMPILER_RT} ${LIBCPLUSPLUS}" TUNE_CCARGS_remove_toolchain-clang = "-meb" TUNE_CCARGS_remove_toolchain-clang = "-mel" diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index 87d133ea..bdb364e9 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb @@ -12,7 +12,7 @@ inherit cmake cmake-native python3native PACKAGECONFIG ??= "compiler-rt exceptions ${@bb.utils.contains("RUNTIME", "llvm", "unwind unwind-shared", "", d)}" PACKAGECONFIG_append_armv5 = " no-atomics" - +PACKAGECONFIG_remove_class-native = "compiler-rt" PACKAGECONFIG[unwind] = "-DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON,-DLIBCXXABI_USE_LLVM_UNWINDER=OFF,," PACKAGECONFIG[exceptions] = "-DLIBCXXABI_ENABLE_EXCEPTIONS=ON -DDLIBCXX_ENABLE_EXCEPTIONS=ON,-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF -DLIBCXX_ENABLE_EXCEPTIONS=OFF -DCMAKE_REQUIRED_FLAGS='-fno-exceptions'," PACKAGECONFIG[no-atomics] = "-D_LIBCXXABI_HAS_ATOMIC_BUILTINS=OFF -DCMAKE_SHARED_LINKER_FLAGS='-latomic',," @@ -21,10 +21,13 @@ PACKAGECONFIG[unwind-shared] = "-DLIBUNWIND_ENABLE_SHARED=ON,-DLIBUNWIND_ENABLE_ DEPENDS += "ninja-native" DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" +DEPENDS_append_class-native = " clang-native" LIBCPLUSPLUS = "" COMPILER_RT ?= "-rtlib=compiler-rt" +CC_append_toolchain-clang_class-native = " -unwindlib=libgcc -rtlib=libgcc" + CXXFLAGS += "-stdlib=libstdc++" LDFLAGS += "-unwindlib=libgcc -stdlib=libstdc++" INHIBIT_DEFAULT_DEPS = "1" @@ -60,8 +63,8 @@ EXTRA_OECMAKE_append_class-target = " \ -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${NM} \ -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${RANLIB} \ " - -EXTRA_OECMAKE_append_class-native = " -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF" +EXTRA_OECMAKE_append_class-native = " -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \ +" EXTRA_OECMAKE_append_class-nativesdk = " -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \ -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${AR} \ @@ -91,4 +94,4 @@ PACKAGES_append_runtime-llvm = " libunwind" FILES_libunwind_runtime-llvm = "${libdir}/libunwind.so.*" BBCLASSEXTEND = "native nativesdk" -TOOLCHAIN = "clang" +TOOLCHAIN_forcevariable = "clang" From ec709d6a706cc89cb42b992a5dd29524498daf51 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Thu, 24 Jun 2021 14:46:57 +0800 Subject: [PATCH 047/166] clang: drop git suffix from version variables other recipe like intel-graphics-compiler, config failed with below error: [IGC] Could not find the LLVM dylib. Aborting. with a suffix in library name make other recipe cannot found it. Backport a patch from 12.0.0 to fix this. Signed-off-by: Changqing Li (cherry picked from commit 95c264e9bbb36eb0ea043c2f016ccb1334d5396c) --- ...uffix-from-various-version-variables.patch | 70 +++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 2 files changed, 71 insertions(+) create mode 100644 recipes-devtools/clang/clang/0036-Drop-the-git-suffix-from-various-version-variables.patch diff --git a/recipes-devtools/clang/clang/0036-Drop-the-git-suffix-from-various-version-variables.patch b/recipes-devtools/clang/clang/0036-Drop-the-git-suffix-from-various-version-variables.patch new file mode 100644 index 00000000..81978c0b --- /dev/null +++ b/recipes-devtools/clang/clang/0036-Drop-the-git-suffix-from-various-version-variables.patch @@ -0,0 +1,70 @@ +From f25f79545c919543e182f629f7101f4b35faaac6 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Wed, 23 Jun 2021 16:25:06 +0800 +Subject: [PATCH] Drop the 'git' suffix from various version variables + +Upstream-Status: Backport [cherry-picked from branch 12.0.0] + +Signed-off-by: Changqing Li +--- + libcxx/CMakeLists.txt | 2 +- + libcxxabi/CMakeLists.txt | 2 +- + libunwind/CMakeLists.txt | 2 +- + llvm/CMakeLists.txt | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt +index 06ee1d74a03e..1ead84c19fcb 100644 +--- a/libcxx/CMakeLists.txt ++++ b/libcxx/CMakeLists.txt +@@ -29,7 +29,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUIL + project(libcxx CXX C) + + set(PACKAGE_NAME libcxx) +- set(PACKAGE_VERSION 13.0.0git) ++ set(PACKAGE_VERSION 13.0.0) + set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") + set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") + +diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt +index fb656e7db9fb..405bc3ceeaa7 100644 +--- a/libcxxabi/CMakeLists.txt ++++ b/libcxxabi/CMakeLists.txt +@@ -28,7 +28,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_B + project(libcxxabi CXX C) + + set(PACKAGE_NAME libcxxabi) +- set(PACKAGE_VERSION 11.0.0git) ++ set(PACKAGE_VERSION 11.0.0) + set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") + set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") + +diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt +index a2c03fd3f8aa..82424253c8da 100644 +--- a/libunwind/CMakeLists.txt ++++ b/libunwind/CMakeLists.txt +@@ -24,7 +24,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_B + project(libunwind LANGUAGES C CXX ASM) + + set(PACKAGE_NAME libunwind) +- set(PACKAGE_VERSION 13.0.0git) ++ set(PACKAGE_VERSION 13.0.0) + set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") + set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") + +diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt +index 135036f509d2..c28bc3f8d19d 100644 +--- a/llvm/CMakeLists.txt ++++ b/llvm/CMakeLists.txt +@@ -20,7 +20,7 @@ if(NOT DEFINED LLVM_VERSION_PATCH) + set(LLVM_VERSION_PATCH 0) + endif() + if(NOT DEFINED LLVM_VERSION_SUFFIX) +- set(LLVM_VERSION_SUFFIX git) ++ set(LLVM_VERSION_SUFFIX "") + endif() + + if (NOT PACKAGE_VERSION) +-- +2.17.1 + diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index bf9cbe3c..4b19e50f 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -45,6 +45,7 @@ SRC_URI = "\ file://0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch \ file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ file://0035-openmp-Fix-build-on-non-x86-targets.patch \ + file://0036-Drop-the-git-suffix-from-various-version-variables.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From 4214c3258f0316d39829b31daed609ff603fd87a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 28 Jun 2021 15:13:21 -0700 Subject: [PATCH 048/166] clang: Update to latest on 13.0.0/trunk Signed-off-by: Khem Raj (cherry picked from commit 81119d8315050c422872c918bb576239ba71bf05) --- recipes-devtools/clang/clang.inc | 2 +- ...l2-to-linker-cmdline-of-xml-is-found.patch | 2 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 2 +- ...-support-a-new-embedded-linux-target.patch | 2 +- ...lify-cross-compilation.-Don-t-use-na.patch | 4 +- ...ryInfo-Undefine-libc-functions-if-th.patch | 18 +-- ...-llvm-allow-env-override-of-exe-path.patch | 2 +- ...g-driver-Check-sysroot-for-ldso-path.patch | 2 +- ...tools.cpp-Add-lssp_nonshared-on-musl.patch | 4 +- ...does-not-support-128-bit-long-double.patch | 6 +- ...10-clang-Prepend-trailing-to-sysroot.patch | 2 +- ...e-the-target-sysroot-for-compiler-ru.patch | 2 +- ...efine-releative-gcc-installation-dir.patch | 4 +- ...ad-and-ldl-along-with-lunwind-for-st.patch | 6 +- ...UTABLE-when-cross-compiling-for-nati.patch | 2 +- ...5-Check-for-atomic-double-intrinsics.patch | 2 +- ...-clang-Enable-SSP-and-PIE-by-default.patch | 2 +- ...ler-runtime-library-to-link-step-for.patch | 2 +- ...-Fix-configure-for-packages-using-fi.patch | 12 +- ...ce-dir-location-for-cross-toolchains.patch | 4 +- .../clang/clang/0020-fix-path-to-libffi.patch | 2 +- ...-dyld-prefix-when-checking-sysroot-f.patch | 2 +- ...-clang-Use-python3-in-python-scripts.patch | 6 +- ...-Yocto-based-GCC-install-search-path.patch | 4 +- ...-Do-not-use-find_library-for-ncurses.patch | 2 +- ...or-for-adding-OE-distro-vendor-names.patch | 2 +- ...er-rt-Use-mcr-based-barrier-on-armv6.patch | 2 +- ...aults-to-dwarf-5-debug-info-on-Linux.patch | 2 +- ...ot-use-backtrace-APIs-on-non-glibc-l.patch | 2 +- ...iple-for-non-debian-multiarch-linux-.patch | 2 +- ...-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch | 2 +- ...-scudo-standalone-with-libatomic-on-.patch | 2 +- ...libunwind-Added-unw_backtrace-method.patch | 2 +- ...se-uintptr_t-instead-of-_Unwind_Word.patch | 2 +- ...rt-Do-not-force-thumb-mode-directive.patch | 2 +- ...ffix-from-various-version-variables.patch} | 34 +++-- ...-openmp-Fix-build-on-non-x86-targets.patch | 121 ------------------ recipes-devtools/clang/common.inc | 3 +- 38 files changed, 83 insertions(+), 193 deletions(-) rename recipes-devtools/clang/clang/{0036-Drop-the-git-suffix-from-various-version-variables.patch => 0035-Drop-the-git-suffix-from-various-version-variables.patch} (63%) delete mode 100644 recipes-devtools/clang/clang/0035-openmp-Fix-build-on-non-x86-targets.patch diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index b724d2c7..f9091daf 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "ec08f03be3942d4ae6694d0f7a9b490fe3cbba9b" +SRCREV ?= "6088f86a2e1ce3ab6fe9573e26fc63a5cf338fa9" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "main" diff --git a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch index 19c19fff..c0596030 100644 --- a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch +++ b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch @@ -1,4 +1,4 @@ -From 8bbe4129627506374e857cae7d8ce86f08725cd7 Mon Sep 17 00:00:00 2001 +From 178532a3c0a68bb321eca567e203db33440c460a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 22 May 2017 17:36:16 -0700 Subject: [PATCH] lldb: Add -lxml2 to linker cmdline of xml is found diff --git a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch index 00eee52e..9c9f156a 100644 --- a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch +++ b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch @@ -1,4 +1,4 @@ -From 3c3aa3d7c09f50ebbece24434d8fe12fc2ce7114 Mon Sep 17 00:00:00 2001 +From bef9616b881669fa9b67788ff86f036cb40e5c13 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 diff --git a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch index 2558fe5c..b99bb473 100644 --- a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch +++ b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch @@ -1,4 +1,4 @@ -From ddb0abe6cd8e28d744f6f911388bbc5ed67a169c Mon Sep 17 00:00:00 2001 +From 9e608a5afeffb4ffe01791daf92e6d78bedd9c81 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/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch index 73dad7c0..b982e88d 100644 --- a/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch +++ b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch @@ -1,4 +1,4 @@ -From ec6de16258fb4eb031dbb502082ee63722b11286 Mon Sep 17 00:00:00 2001 +From 109ad829390ef0eb54bd38cebd4f541b3fc02672 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 @@ -20,7 +20,7 @@ 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 aa4905edb640..37c4479de462 100644 +index f5b07cee45c4..d7ac04f1648b 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt @@ -74,7 +74,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOL diff --git a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index f2c9a796..33d590fa 100644 --- a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch @@ -1,4 +1,4 @@ -From 6b27010179b4ca52616a4416ee974145628dbf00 Mon Sep 17 00:00:00 2001 +From 70009eade931cc3ed7a93bdd8df57f7b9f10c9fc 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 @@ -13,10 +13,10 @@ Signed-off-by: Khem Raj 1 file changed, 21 insertions(+) diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def -index defc95d0062a..41d2099d0c5b 100644 +index 66fe96419549..fff073360d50 100644 --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def +++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def -@@ -809,6 +809,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") +@@ -815,6 +815,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") TLI_DEFINE_ENUM_INTERNAL(fopen) TLI_DEFINE_STRING_INTERNAL("fopen") /// FILE *fopen64(const char *filename, const char *opentype) @@ -26,7 +26,7 @@ index defc95d0062a..41d2099d0c5b 100644 TLI_DEFINE_ENUM_INTERNAL(fopen64) TLI_DEFINE_STRING_INTERNAL("fopen64") /// int fork(); -@@ -856,6 +859,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek") +@@ -862,6 +865,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek") /// int fseeko(FILE *stream, off_t offset, int whence); TLI_DEFINE_ENUM_INTERNAL(fseeko) TLI_DEFINE_STRING_INTERNAL("fseeko") @@ -36,7 +36,7 @@ index defc95d0062a..41d2099d0c5b 100644 /// int fseeko64(FILE *stream, off64_t offset, int whence) TLI_DEFINE_ENUM_INTERNAL(fseeko64) TLI_DEFINE_STRING_INTERNAL("fseeko64") -@@ -866,6 +872,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos") +@@ -872,6 +878,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos") TLI_DEFINE_ENUM_INTERNAL(fstat) TLI_DEFINE_STRING_INTERNAL("fstat") /// int fstat64(int filedes, struct stat64 *buf) @@ -46,7 +46,7 @@ index defc95d0062a..41d2099d0c5b 100644 TLI_DEFINE_ENUM_INTERNAL(fstat64) TLI_DEFINE_STRING_INTERNAL("fstat64") /// int fstatvfs(int fildes, struct statvfs *buf); -@@ -881,6 +890,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell") +@@ -887,6 +896,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell") TLI_DEFINE_ENUM_INTERNAL(ftello) TLI_DEFINE_STRING_INTERNAL("ftello") /// off64_t ftello64(FILE *stream) @@ -56,7 +56,7 @@ index defc95d0062a..41d2099d0c5b 100644 TLI_DEFINE_ENUM_INTERNAL(ftello64) TLI_DEFINE_STRING_INTERNAL("ftello64") /// int ftrylockfile(FILE *file); -@@ -1007,6 +1019,9 @@ TLI_DEFINE_STRING_INTERNAL("logl") +@@ -1013,6 +1025,9 @@ TLI_DEFINE_STRING_INTERNAL("logl") TLI_DEFINE_ENUM_INTERNAL(lstat) TLI_DEFINE_STRING_INTERNAL("lstat") /// int lstat64(const char *path, struct stat64 *buf); @@ -66,7 +66,7 @@ index defc95d0062a..41d2099d0c5b 100644 TLI_DEFINE_ENUM_INTERNAL(lstat64) TLI_DEFINE_STRING_INTERNAL("lstat64") /// void *malloc(size_t size); -@@ -1250,6 +1265,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") +@@ -1256,6 +1271,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") TLI_DEFINE_ENUM_INTERNAL(stat) TLI_DEFINE_STRING_INTERNAL("stat") /// int stat64(const char *path, struct stat64 *buf); @@ -76,7 +76,7 @@ index defc95d0062a..41d2099d0c5b 100644 TLI_DEFINE_ENUM_INTERNAL(stat64) TLI_DEFINE_STRING_INTERNAL("stat64") /// int statvfs(const char *path, struct statvfs *buf); -@@ -1385,6 +1403,9 @@ TLI_DEFINE_STRING_INTERNAL("times") +@@ -1391,6 +1409,9 @@ TLI_DEFINE_STRING_INTERNAL("times") TLI_DEFINE_ENUM_INTERNAL(tmpfile) TLI_DEFINE_STRING_INTERNAL("tmpfile") /// FILE *tmpfile64(void) diff --git a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch index cda2641d..9eea146c 100644 --- a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From 02f3ffb65786b68550bbe97ed31fbe0cfc525552 Mon Sep 17 00:00:00 2001 +From 07d1cbe94f0841ab55a80ee602be790e9acaedab 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 path diff --git a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch index 5213f809..33ce5f9f 100644 --- a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch +++ b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch @@ -1,4 +1,4 @@ -From 661d95171fbb0c62166299ac22d75f302b089444 Mon Sep 17 00:00:00 2001 +From 2bfe2ac2e914bf1447d0b2dbf8a4fd504e24c5ec 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 diff --git a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index 5c02abb4..98577b89 100644 --- a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch +++ b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch @@ -1,4 +1,4 @@ -From 3cf88452ed0fe187741b8973135fb97e0a7055e7 Mon Sep 17 00:00:00 2001 +From ce6295ac3e6e39cd683f5fc0862e1428cc8920d9 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 @@ -13,7 +13,7 @@ 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 517ba60e0b77..42cf98572b95 100644 +index bd5f9c744bba..2208e3db3f40 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -630,6 +630,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, diff --git a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch index 968ff371..882c68a6 100644 --- a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch @@ -1,4 +1,4 @@ -From bb49fa5b1ced3ae610cc796d72319df8f69630d0 Mon Sep 17 00:00:00 2001 +From 8ab487d8060bfbe02baf2a201d49fd618f41fe27 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 02:00:11 -0700 Subject: [PATCH] clang: musl/ppc does not support 128-bit long double @@ -9,10 +9,10 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+) diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h -index 2ceb0b0cbf1c..5b9a47d02f1a 100644 +index 554f2174fee0..18bcfd173ede 100644 --- a/clang/lib/Basic/Targets/PPC.h +++ b/clang/lib/Basic/Targets/PPC.h -@@ -407,6 +407,10 @@ public: +@@ -389,6 +389,10 @@ public: LongDoubleFormat = &llvm::APFloat::IEEEdouble(); } diff --git a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch index baba6e66..0f2b20dc 100644 --- a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From 0c0f1e5f1099ec4fea52cb18a9dc0b31c301a0fb Mon Sep 17 00:00:00 2001 +From 3a0d8a37332bda82c6343917abdf61594bff2096 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 diff --git a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index 866f6802..834599d8 100644 --- a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From a0de10cdb0d21d7cfed431586b54832e929f99a6 Mon Sep 17 00:00:00 2001 +From e56e18b218b28d8e2559bbb6dd30d583ad292b6a 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 diff --git a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch index 3c8f1026..759df80c 100644 --- a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch @@ -1,4 +1,4 @@ -From 37ac2d6586a22407ace1cd8cf24ddbf7810f0e9a Mon Sep 17 00:00:00 2001 +From 98cd2a87a8018e93d91635eef5cb3d60db125973 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 @@ -14,7 +14,7 @@ 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 42cf98572b95..cd0bf93aa299 100644 +index 2208e3db3f40..813f693db2b5 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2529,19 +2529,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( diff --git a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index c5008aee..23659e49 100644 --- a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From 5f14a644ff02256d067c706f77ed045d113f7efc Mon Sep 17 00:00:00 2001 +From 227795b6fe097af4ce2f191acc362633fc05115c 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 @@ -20,10 +20,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 c123625bb817..7fa84e86045e 100644 +index cfda0ff1852c..3fd28a07f19a 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -1450,6 +1450,8 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, +@@ -1449,6 +1449,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/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index 55e8d90d..30cd9807 100644 --- a/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From 547ad6e37f4fa53e6267cb5cfafaac37192304df Mon Sep 17 00:00:00 2001 +From e93653198e1143ffe30ecd22fbb30bd4d2cff37a 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 diff --git a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch index 4a71996b..dca61fb0 100644 --- a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From 71e2cd6ff51f0f4212c231db9a6626b3a248dfd7 Mon Sep 17 00:00:00 2001 +From 4d77ad180796d5dca4756366968f0146f16b3d1d 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/0016-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch index b1097a38..dda78a58 100644 --- a/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch +++ b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch @@ -1,4 +1,4 @@ -From 816a9eedc5c031667d495b9ebb1b623773bcdcf4 Mon Sep 17 00:00:00 2001 +From 9c4e9d50d952f3282718846bb87067bf0352fd90 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Thu, 26 Dec 2019 15:46:19 -0800 Subject: [PATCH] clang: Enable SSP and PIE by default diff --git a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index 832d83b4..abe7a0db 100644 --- a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -1,4 +1,4 @@ -From d362483cf317d224a27c3a1147c4ed50a120aa6e Mon Sep 17 00:00:00 2001 +From a53559aff7c59b120377bca6a2ecd8ced5e3ae22 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 diff --git a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index 2ed324a9..6223fda7 100644 --- a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -1,4 +1,4 @@ -From a55cd03900022a08172d85268ee5630099f68278 Mon Sep 17 00:00:00 2001 +From 517fd1ccf607e843eb87466e595a312eff302dd2 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 5752f4277444..f40ea35faf46 100644 endmacro() diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index 689cac474c1a..75f425955e2a 100644 +index 7e91b77adcab..6b46f03f0e2c 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -1226,7 +1226,6 @@ macro(add_llvm_tool name) +@@ -1229,7 +1229,6 @@ macro(add_llvm_tool name) if( LLVM_BUILD_TOOLS ) get_target_export_arg(${name} LLVM export_to_llvmexports) install(TARGETS ${name} @@ -63,7 +63,7 @@ index 689cac474c1a..75f425955e2a 100644 RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR} COMPONENT ${name}) -@@ -1237,9 +1236,6 @@ macro(add_llvm_tool name) +@@ -1240,9 +1239,6 @@ macro(add_llvm_tool name) endif() endif() endif() @@ -73,7 +73,7 @@ index 689cac474c1a..75f425955e2a 100644 set_target_properties(${name} PROPERTIES FOLDER "Tools") endmacro(add_llvm_tool name) -@@ -1279,7 +1275,6 @@ macro(add_llvm_utility name) +@@ -1282,7 +1278,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 689cac474c1a..75f425955e2a 100644 RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} COMPONENT ${name}) -@@ -1288,7 +1283,6 @@ macro(add_llvm_utility name) +@@ -1291,7 +1286,6 @@ macro(add_llvm_utility name) DEPENDS ${name} COMPONENT ${name}) endif() diff --git a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch index 4d52d1b4..f2144eb3 100644 --- a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From 9ce38d7cbf9bc38520410da3595d9e18ffcba49f Mon Sep 17 00:00:00 2001 +From 3ffe72a7a7edff730564dbd35460dc84619aaf1d 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 @@ -19,7 +19,7 @@ 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 930941fe8558..fad53b15cc52 100644 +index 6ea6e2e47e63..4a5c73999677 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -121,7 +121,13 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath, diff --git a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch index 5a1917b5..5f9c8066 100644 --- a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch +++ b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch @@ -1,4 +1,4 @@ -From e8a30d3d8f2e9b62e9022fab86210e45c3395400 Mon Sep 17 00:00:00 2001 +From abfe886026fdd4c6bf9123fc6fac441277dc360b Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Fri, 3 Apr 2020 15:10:37 +0800 Subject: [PATCH] fix path to libffi diff --git a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index 4b5ff3e8..82165ef3 100644 --- a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From e2140a10a80e737b42408e7847502f1a7723388f Mon Sep 17 00:00:00 2001 +From e0bae776f771953f8fcf42104379b27de771fa30 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 diff --git a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch index b771a80f..c548c05f 100644 --- a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From 35659b7324baa809ff04e52e8f0d55584a0e4033 Mon Sep 17 00:00:00 2001 +From 2231e5c5715a97cdc3711a5052e53fd055f16f12 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 @@ -60,7 +60,7 @@ index 6bd05531333b..9e134123ef44 100755 #===- clang-tidy-diff.py - ClangTidy Diff Checker -----------*- python -*--===# # diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -index 313ecd2f9571..a298e38b1a45 100755 +index de810230b285..200b7c6eb652 100755 --- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py +++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py @@ -1,4 +1,4 @@ @@ -70,7 +70,7 @@ index 313ecd2f9571..a298e38b1a45 100755 #===- run-clang-tidy.py - Parallel clang-tidy runner --------*- python -*--===# # diff --git a/clang/tools/clang-format/git-clang-format b/clang/tools/clang-format/git-clang-format -index 3646b4ff41d7..a6a7393448c9 100755 +index 0233ceb3a868..16bc55f98762 100755 --- a/clang/tools/clang-format/git-clang-format +++ b/clang/tools/clang-format/git-clang-format @@ -1,4 +1,4 @@ diff --git a/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index 1c364dbd..c0677677 100644 --- a/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From bac45d7406d40b0ced2841e23bc19e8a641d35be Mon Sep 17 00:00:00 2001 +From 62d734153b18afd919a31f070059ea0a3db669fb 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,7 +57,7 @@ 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 cd0bf93aa299..54ed719c9f0c 100644 +index 813f693db2b5..60297dcddf44 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2111,6 +2111,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( diff --git a/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch index 0ef5ea31..09382f62 100644 --- a/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch +++ b/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch @@ -1,4 +1,4 @@ -From 3b8cefb2e85d29da9935e6c8ec2ff7f6d99d7809 Mon Sep 17 00:00:00 2001 +From 45322a3c5e8948ff4d88f49857489fb35fad9959 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 diff --git a/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index a1d5535d..2a2970fc 100644 --- a/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From aef271e12ce0bdf1d19548b4031cadea88d316d1 Mon Sep 17 00:00:00 2001 +From 27aa73bbffbddeef618e9c33b95b2690b8c5ba54 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 diff --git a/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index adb64d15..f4b8ea59 100644 --- a/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From 1385f46939352191af3a61e0c924da58eee11a25 Mon Sep 17 00:00:00 2001 +From 2ee84e75df8aa0d7d217d7a32076228d5d0db146 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 diff --git a/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch b/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch index 05b003a4..f6d225d5 100644 --- a/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch +++ b/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch @@ -1,4 +1,4 @@ -From b03d3a24cd49083a2f8e9cbbc9b66ec72b690d6d Mon Sep 17 00:00:00 2001 +From ee8087a34236d81e3b7630c33777120d1a6f2fbe Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 15 Apr 2021 18:58:07 -0700 Subject: [PATCH] clang: Switch defaults to dwarf-5 debug info on Linux diff --git a/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index eb131181..e0aec9f3 100644 --- a/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From 24544a16a6a6cf4d37d9277b183eb44514dbebde Mon Sep 17 00:00:00 2001 +From ec2f3fbb247b72a9ba2cf823b6627133f6e318f5 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/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index e8ec9629..3e2b6baf 100644 --- a/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From 856a1ba88befb17cf65c2f8e8ac068a9a2736cea Mon Sep 17 00:00:00 2001 +From 195b51e0f6b5f776e6f4887e03a5a6b83b9a7158 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 diff --git a/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index 44599164..755adedd 100644 --- a/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From 959fef3b3acc0e9df4e9849828fc1097bbf2bf45 Mon Sep 17 00:00:00 2001 +From e80aae1ea22262da904487229f170caee9f02247 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES diff --git a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index 1aeeaa3a..f99b076e 100644 --- a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From 0d7941cf793b25319c773067d40e4235576dc630 Mon Sep 17 00:00:00 2001 +From ba6410dbdf4440b2ce79f52e6adbeecf2a81336b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips diff --git a/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch index 45b23383..4b6396c3 100644 --- a/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 84bf553c54b6c1ec19623f0564dde3fb671df612 Mon Sep 17 00:00:00 2001 +From efa3ae538a895376840647ccd8fb06f30d06ff80 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 23 May 2021 10:27:29 +0000 Subject: [PATCH] libunwind: Added unw_backtrace method diff --git a/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch b/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch index c6a5ccc2..2dc17894 100644 --- a/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch +++ b/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch @@ -1,4 +1,4 @@ -From 2c73193c66359ea0506e4f9ebf69d534ca1aa0fd Mon Sep 17 00:00:00 2001 +From 7f5d4498bcb68924c27680c93bf12c3fea022664 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 29 May 2021 13:42:25 -0700 Subject: [PATCH] compiler-rt: Use uintptr_t instead of _Unwind_Word diff --git a/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch b/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch index 26ca0485..7f3b9e46 100644 --- a/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch +++ b/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch @@ -1,4 +1,4 @@ -From 127d2d9a234809ba2c76bc3f64b0902cc7b24ba3 Mon Sep 17 00:00:00 2001 +From 5acbaaaec447b9083328cef452b4d7d1c542985d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Jun 2021 08:42:36 -0700 Subject: [PATCH] [compiler-rt] Do not force thumb mode directive diff --git a/recipes-devtools/clang/clang/0036-Drop-the-git-suffix-from-various-version-variables.patch b/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch similarity index 63% rename from recipes-devtools/clang/clang/0036-Drop-the-git-suffix-from-various-version-variables.patch rename to recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch index 81978c0b..3ef66d4a 100644 --- a/recipes-devtools/clang/clang/0036-Drop-the-git-suffix-from-various-version-variables.patch +++ b/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch @@ -1,4 +1,4 @@ -From f25f79545c919543e182f629f7101f4b35faaac6 Mon Sep 17 00:00:00 2001 +From ae81bf58c31d5c93190c3dd85a4100b86055193a Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Wed, 23 Jun 2021 16:25:06 +0800 Subject: [PATCH] Drop the 'git' suffix from various version variables @@ -6,12 +6,14 @@ Subject: [PATCH] Drop the 'git' suffix from various version variables Upstream-Status: Backport [cherry-picked from branch 12.0.0] Signed-off-by: Changqing Li +Signed-off-by: Khem Raj --- - libcxx/CMakeLists.txt | 2 +- - libcxxabi/CMakeLists.txt | 2 +- - libunwind/CMakeLists.txt | 2 +- - llvm/CMakeLists.txt | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) + libcxx/CMakeLists.txt | 2 +- + libcxxabi/CMakeLists.txt | 2 +- + libunwind/CMakeLists.txt | 2 +- + llvm/CMakeLists.txt | 2 +- + .../llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 06ee1d74a03e..1ead84c19fcb 100644 @@ -27,7 +29,7 @@ index 06ee1d74a03e..1ead84c19fcb 100644 set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index fb656e7db9fb..405bc3ceeaa7 100644 +index 6a9ba8ec635d..dcd7b8765de3 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -28,7 +28,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_B @@ -53,7 +55,7 @@ index a2c03fd3f8aa..82424253c8da 100644 set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt -index 135036f509d2..c28bc3f8d19d 100644 +index 5d3ad7a4fd58..796b47a3d554 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -20,7 +20,7 @@ if(NOT DEFINED LLVM_VERSION_PATCH) @@ -65,6 +67,16 @@ index 135036f509d2..c28bc3f8d19d 100644 endif() if (NOT PACKAGE_VERSION) --- -2.17.1 - +diff --git a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h +index ba85df023ae6..f19c22ad13c0 100644 +--- a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h ++++ b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h +@@ -80,7 +80,7 @@ + #define LLVM_VERSION_PATCH 0 + + /* LLVM version string */ +-#define LLVM_VERSION_STRING "13.0.0git" ++#define LLVM_VERSION_STRING "13.0.0" + + /* Whether LLVM records statistics for use with GetStatistics(), + * PrintStatistics() or PrintStatisticsJSON() diff --git a/recipes-devtools/clang/clang/0035-openmp-Fix-build-on-non-x86-targets.patch b/recipes-devtools/clang/clang/0035-openmp-Fix-build-on-non-x86-targets.patch deleted file mode 100644 index 3ce1096a..00000000 --- a/recipes-devtools/clang/clang/0035-openmp-Fix-build-on-non-x86-targets.patch +++ /dev/null @@ -1,121 +0,0 @@ -[OpenMP] Fix builds for non-x86 after distributed barrier patch - -Upstream-Status: Submitted [https://reviews.llvm.org/D104788] - -diff --git a/openmp/runtime/cmake/config-ix.cmake b/openmp/runtime/cmake/config-ix.cmake ---- a/openmp/runtime/cmake/config-ix.cmake -+++ b/openmp/runtime/cmake/config-ix.cmake -@@ -109,6 +109,23 @@ - set(CMAKE_REQUIRED_LIBRARIES) - endif() - -+# Check for aligned memory allocator function -+check_include_file(xmmintrin.h LIBOMP_HAVE_XMMINTRIN_H) -+set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) -+if (LIBOMP_HAVE_XMMINTRIN_H) -+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -DLIBOMP_HAVE_XMMINTRIN_H") -+endif() -+set(source_code "// check for _mm_malloc -+ #ifdef LIBOMP_HAVE_XMMINTRIN_H -+ #include -+ #endif -+ int main() { void *ptr = _mm_malloc(sizeof(int) * 1000, 64); _mm_free(ptr); return 0; }") -+check_cxx_source_compiles("${source_code}" LIBOMP_HAVE__MM_MALLOC) -+set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) -+check_symbol_exists(aligned_alloc "stdlib.h" LIBOMP_HAVE_ALIGNED_ALLOC) -+check_symbol_exists(posix_memalign "stdlib.h" LIBOMP_HAVE_POSIX_MEMALIGN) -+check_symbol_exists(_aligned_malloc "malloc.h" LIBOMP_HAVE__ALIGNED_MALLOC) -+ - # Check linker flags - if(WIN32) - libomp_check_linker_flag(/SAFESEH LIBOMP_HAVE_SAFESEH_FLAG) -diff --git a/openmp/runtime/src/kmp_barrier.h b/openmp/runtime/src/kmp_barrier.h ---- a/openmp/runtime/src/kmp_barrier.h -+++ b/openmp/runtime/src/kmp_barrier.h -@@ -15,6 +15,34 @@ - - #include "kmp.h" - -+#if KMP_HAVE_XMMINTRIN_H && KMP_HAVE__MM_MALLOC -+#include -+#define KMP_ALIGNED_ALLOCATE(size, alignment) _mm_malloc(size, alignment) -+#define KMP_ALIGNED_FREE(ptr) _mm_free(ptr) -+#elif KMP_HAVE_ALIGNED_ALLOC -+#define KMP_ALIGNED_ALLOCATE(size, alignment) aligned_alloc(alignment, size) -+#define KMP_ALIGNED_FREE(ptr) free(ptr) -+#elif KMP_HAVE_POSIX_MEMALIGN -+#include "kmp_i18n.h" -+static inline void *KMP_ALIGNED_ALLOCATE(size_t size, size_t alignment) { -+ void *ptr; -+ int n = posix_memalign(&ptr, alignment, size); -+ if (n != 0) { -+ __kmp_fatal(KMP_MSG(FunctionError, "posix_memalign()"), KMP_ERR(errno), -+ __kmp_msg_null); -+ } -+ return ptr; -+} -+#define KMP_ALIGNED_FREE(ptr) free(ptr) -+#elif KMP_HAVE__ALIGNED_MALLOC -+#include -+#define KMP_ALIGNED_ALLOCATE(size, alignment) _aligned_malloc(size, alignment) -+#define KMP_ALIGNED_FREE(ptr) _aligned_free(ptr) -+#else -+#define KMP_ALIGNED_ALLOCATE(size, alignment) KMP_INTERNAL_MALLOC(size) -+#define KMP_ALIGNED_FREE(ptr) KMP_INTERNAL_FREE(ptr) -+#endif -+ - // Use four cache lines: MLC tends to prefetch the next or previous cache line - // creating a possible fake conflict between cores, so this is the only way to - // guarantee that no such prefetch can happen. -@@ -79,7 +107,7 @@ - - // Used instead of constructor to create aligned data - static distributedBarrier *allocate(int nThreads) { -- distributedBarrier *d = (distributedBarrier *)_mm_malloc( -+ distributedBarrier *d = (distributedBarrier *)KMP_ALIGNED_ALLOCATE( - sizeof(distributedBarrier), 4 * CACHE_LINE); - d->num_threads = 0; - d->max_threads = 0; -@@ -96,7 +124,7 @@ - return d; - } - -- static void deallocate(distributedBarrier *db) { _mm_free(db); } -+ static void deallocate(distributedBarrier *db) { KMP_ALIGNED_FREE(db); } - - void update_num_threads(size_t nthr) { init(nthr); } - -diff --git a/openmp/runtime/src/kmp_config.h.cmake b/openmp/runtime/src/kmp_config.h.cmake ---- a/openmp/runtime/src/kmp_config.h.cmake -+++ b/openmp/runtime/src/kmp_config.h.cmake -@@ -88,6 +88,16 @@ - #define KMP_HAVE_ATTRIBUTE_RTM LIBOMP_HAVE_ATTRIBUTE_RTM - #cmakedefine01 LIBOMP_ARCH_AARCH64_A64FX - #define KMP_ARCH_AARCH64_A64FX LIBOMP_ARCH_AARCH64_A64FX -+#cmakedefine01 LIBOMP_HAVE_XMMINTRIN_H -+#define KMP_HAVE_XMMINTRIN_H LIBOMP_HAVE_XMMINTRIN_H -+#cmakedefine01 LIBOMP_HAVE__MM_MALLOC -+#define KMP_HAVE__MM_MALLOC LIBOMP_HAVE__MM_MALLOC -+#cmakedefine01 LIBOMP_HAVE_ALIGNED_ALLOC -+#define KMP_HAVE_ALIGNED_ALLOC LIBOMP_HAVE_ALIGNED_ALLOC -+#cmakedefine01 LIBOMP_HAVE_POSIX_MEMALIGN -+#define KMP_HAVE_POSIX_MEMALIGN LIBOMP_HAVE_POSIX_MEMALIGN -+#cmakedefine01 LIBOMP_HAVE__ALIGNED_MALLOC -+#define KMP_HAVE__ALIGNED_MALLOC LIBOMP_HAVE__ALIGNED_MALLOC - - // Configured cache line based on architecture - #if KMP_ARCH_PPC64 -diff --git a/openmp/runtime/src/kmp_os.h b/openmp/runtime/src/kmp_os.h ---- a/openmp/runtime/src/kmp_os.h -+++ b/openmp/runtime/src/kmp_os.h -@@ -1038,6 +1038,9 @@ - KMP_MFENCE_(); \ - } - #define KMP_SFENCE() KMP_SFENCE_() -+#else -+#define KMP_MFENCE() KMP_MB() -+#define KMP_SFENCE() KMP_MB() - #endif - - #ifndef KMP_IMB - diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 4b19e50f..ed954994 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -44,8 +44,7 @@ SRC_URI = "\ file://0032-libunwind-Added-unw_backtrace-method.patch \ file://0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch \ file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ - file://0035-openmp-Fix-build-on-non-x86-targets.patch \ - file://0036-Drop-the-git-suffix-from-various-version-variables.patch \ + file://0035-Drop-the-git-suffix-from-various-version-variables.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From 870ede107ecb16535b2d01ec918af254bca6b157 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 29 Jun 2021 21:17:07 -0700 Subject: [PATCH 049/166] gnutls: Disable integrated assembler on aarch64 integrated assembler crashes latest clang on aarch64, so lets disable it for now Signed-off-by: Khem Raj (cherry picked from commit 9d89acd175067a828313b8b2a215e6f7595f61b5) --- conf/nonclangable.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index fb5d47cd..dd9c90e0 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -217,6 +217,9 @@ CFLAGS_append_pn-luajit_toolchain-clang_mips = " -no-integrated-as" #| ^ CFLAGS_append_pn-nettle_toolchain-clang_powerpc64le = " -no-integrated-as" +# Fixes clang crash when compiling gnutls-3.7.2/lib/accelerated/aarch64/elf/sha512-armv8.s +CFLAGS_append_pn-gnutls_toolchain-clang_aarch64 = " -no-integrated-as" + # regtest.cc:374:39: error: invalid suffix on literal; C++11 requires a # space between literal and identifier [-Wreserved-user-defined-literal] #| snprintf_func (buf, sizeof(buf), "%"Q"u", x); From c7c3af07a518805c63234b4ba472e63c1b9e74d4 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Fri, 2 Jul 2021 17:04:37 +0800 Subject: [PATCH 050/166] clang: fix do_package error when multilib enabled After enable multilib, libdir is /usr/lib64, but in llvm's CMakelist.txt, the install path is hardcode as /usr/lib eg: ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource} Signed-off-by: Changqing Li (cherry picked from commit f42c4297dde21787ee6873f33636617e1d562798) --- recipes-devtools/clang/clang_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 7f0fccc2..e52005bb 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -252,7 +252,7 @@ FILES_${PN} += "\ ${libdir}/${BPN} \ ${nonarch_libdir}/${BPN}/*/include/ \ ${datadir}/scan-* \ - ${libdir}/libscanbuild \ + ${nonarch_libdir}/libscanbuild \ ${datadir}/opt-viewer/ \ " @@ -283,7 +283,7 @@ FILES_libclang = "\ FILES_${PN}-dev += "\ ${datadir}/llvm/cmake \ ${libdir}/cmake \ - ${libdir}/libear \ + ${nonarch_libdir}/libear \ ${nonarch_libdir}/${BPN}/*.la \ " From 7aeb9c5823be644306f11a4ca35cc0f2b9518a6b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 7 Jul 2021 21:03:19 -0700 Subject: [PATCH 051/166] clang: Depend on clang runtime when using RUNTIME = "llvm" for native packages Signed-off-by: Khem Raj (cherry picked from commit 77394fabd1fee7f4ea3a9358dfba7e94e6a98e8d) --- classes/clang.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 563aa9d8..a6b26a80 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -109,6 +109,7 @@ def clang_base_deps(d): return "" BASE_DEFAULT_DEPS_toolchain-clang_class-target = "${@clang_base_deps(d)}" +BASE_DEFAULT_DEPS_append_class-native_toolchain-clang_runtime-llvm = " libcxx-native compiler-rt-native" cmake_do_generate_toolchain_file_append_toolchain-clang () { cat >> ${WORKDIR}/toolchain.cmake < Date: Thu, 8 Jul 2021 12:32:57 -0700 Subject: [PATCH 052/166] clang: Upgrade to latest on trunk/13.0 Signed-off-by: Khem Raj (cherry picked from commit c6237ecf3e36eea143607a2cd7164c9eba70d466) --- recipes-devtools/clang/clang.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index f9091daf..c5daddc5 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "6088f86a2e1ce3ab6fe9573e26fc63a5cf338fa9" +SRCREV ?= "2bad8bd08924146b3c28513938cc9e7c325c620c" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "main" From 85e367c96a7b8de1cc12b8d006ce9a0b8683ce1b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 16 Jul 2021 09:29:57 -0700 Subject: [PATCH 053/166] libclc: Drop using -cl-no-stdinc This flag is no longer needed with latest clang-13 Signed-off-by: Khem Raj (cherry picked from commit 5e3f7c2fd647ae9552a19f679f37260fc5ebecff) --- recipes-devtools/clang/libclc_git.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes-devtools/clang/libclc_git.bb b/recipes-devtools/clang/libclc_git.bb index 4edd4bf0..9525b257 100644 --- a/recipes-devtools/clang/libclc_git.bb +++ b/recipes-devtools/clang/libclc_git.bb @@ -19,7 +19,6 @@ EXTRA_OECMAKE += " \ -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ -Dclc_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeCLCCompiler.cmake.in \ -Dll_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeLLAsmCompiler.cmake.in \ - -DCMAKE_LLAsm_FLAGS=-cl-no-stdinc -DCMAKE_CLC_FLAGS=-cl-no-stdinc \ " do_configure_prepend () { From 9f64c50fa14f4144d6d5efac2d8a69e5f216afe1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 17 Jul 2021 11:14:10 -0700 Subject: [PATCH 054/166] mesa: Use gcc on aarch64 clang master/13.x has started segfaulting while building mesa, until it is fixed upstream lets switch to using gcc for mesa Signed-off-by: Khem Raj (cherry picked from commit 314a7014e3abb9ef297aa293c2e56ad916c2dc84) --- recipes-graphics/mesa/mesa_%.bbappend | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend index c08a9ff3..faa34171 100644 --- a/recipes-graphics/mesa/mesa_%.bbappend +++ b/recipes-graphics/mesa/mesa_%.bbappend @@ -17,3 +17,6 @@ SRC_URI += "file://0001-gallium-add-missing-header-for-powf.patch \ " PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true -Ddraw-use-llvm=true,-Dllvm=false,clang clang-native elfutils" + +# see https://bugs.llvm.org/show_bug.cgi?id=51126 +TOOLCHAIN_aarch64 = "gcc" From d19595eb84c59cb3bcd3f9218b03215fe3a804a5 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 17 Jul 2021 17:39:05 -0700 Subject: [PATCH 055/166] libcxx: Explicitly set LLVM_DEFAULT_TARGET_TRIPLE This helps during cross-compile as new clang expects this to be set or else it deduces it and that deduction can go wrong. See commit 395271ad11b8c233db1a4e0e6a76aa52e93e5aec in clang repo Signed-off-by: Khem Raj (cherry picked from commit b224c4148f46c4dd326d2b72a9c1d55c364ed48f) --- recipes-devtools/clang/libcxx_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index bdb364e9..381c62a6 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb @@ -62,6 +62,7 @@ EXTRA_OECMAKE_append_class-target = " \ -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${AR} \ -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${NM} \ -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${RANLIB} \ + -DLLVM_DEFAULT_TARGET_TRIPLE=${HOST_SYS} \ " EXTRA_OECMAKE_append_class-native = " -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \ " @@ -70,6 +71,7 @@ EXTRA_OECMAKE_append_class-nativesdk = " -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \ -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${AR} \ -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${NM} \ -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${RANLIB} \ + -DLLVM_DEFAULT_TARGET_TRIPLE=${HOST_SYS} \ " EXTRA_OECMAKE_append_libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=ON " From a752911bb66cc071dd84632f126aaecf1c67716f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 22 Jul 2021 12:46:44 -0700 Subject: [PATCH 056/166] clang: Switch to 13.x branch Signed-off-by: Khem Raj (cherry picked from commit 82fdd8d7bf4bcd77fd52583400803224efd7e9f2) --- recipes-devtools/clang/clang.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index c5daddc5..009cfe9b 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,10 +8,10 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "2bad8bd08924146b3c28513938cc9e7c325c620c" +SRCREV ?= "6b2e4c5a58d7f75f52b740bd7d96dc3a00b7ef6c" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" -BRANCH = "main" +BRANCH = "release/13.x" LLVMMD5SUM = "8a15a0759ef07f2682d2ba4b893c9afe" CLANGMD5SUM = "ff42885ed2ab98f1ecb8c1fc41205343" From d8bc58d6cf0dea6588e1b62e95e805b9aadc63cd Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 27 Jul 2021 16:19:17 -0700 Subject: [PATCH 057/166] compiler-rt,libcxx: Fix native builds when using RUNTIME=llvm Signed-off-by: Khem Raj (cherry picked from commit e85ba2ec1b2aebbf66ac48f9bd43c22f23a8fcc2) --- recipes-devtools/clang/compiler-rt_git.bb | 2 ++ recipes-devtools/clang/libcxx_git.bb | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index 992e42cf..665c7b10 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb @@ -29,6 +29,8 @@ CXXFLAGS += "-stdlib=libstdc++" LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" BUILD_CXXFLAGS += "-stdlib=libstdc++" BUILD_LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" +BUILD_CPPFLAGS_remove = "-stdlib=libc++" +BUILD_LDFLAGS_remove = "-stdlib=libc++ -lc++abi" BUILD_CC_toolchain-clang = "${CCACHE}clang" BUILD_CXX_toolchain-clang = "${CCACHE}clang++" diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index 381c62a6..b143f8cd 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb @@ -30,6 +30,11 @@ CC_append_toolchain-clang_class-native = " -unwindlib=libgcc -rtlib=libgcc" CXXFLAGS += "-stdlib=libstdc++" LDFLAGS += "-unwindlib=libgcc -stdlib=libstdc++" +BUILD_CXXFLAGS += "-stdlib=libstdc++" +BUILD_LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" +BUILD_CPPFLAGS_remove = "-stdlib=libc++" +BUILD_LDFLAGS_remove = "-stdlib=libc++ -lc++abi" + INHIBIT_DEFAULT_DEPS = "1" LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da3953 \ From 327daef44607b6e6454e837848fafdc5cb7d635f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 29 Jul 2021 09:59:04 -0700 Subject: [PATCH 058/166] Revert "mesa: Use gcc on aarch64" This reverts commit 314a7014e3abb9ef297aa293c2e56ad916c2dc84. (cherry picked from commit b16f6862259fac7c193cd3e633f4250ae878bb38) --- recipes-graphics/mesa/mesa_%.bbappend | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend index faa34171..c08a9ff3 100644 --- a/recipes-graphics/mesa/mesa_%.bbappend +++ b/recipes-graphics/mesa/mesa_%.bbappend @@ -17,6 +17,3 @@ SRC_URI += "file://0001-gallium-add-missing-header-for-powf.patch \ " PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true -Ddraw-use-llvm=true,-Dllvm=false,clang clang-native elfutils" - -# see https://bugs.llvm.org/show_bug.cgi?id=51126 -TOOLCHAIN_aarch64 = "gcc" From 26126fb59c20fc8aba560b6790ecf57568a92806 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 1 Aug 2021 09:22:56 -0700 Subject: [PATCH 059/166] lvm2,libdevmapper: Use gcc to compile clang13 based builds are failing during postprocessing Mismatch between symbols in shared library and lists in .exported_symbols.* files: dm_bit_get_prev | dm_config_clone_node ... dm_udev_wait | make[1]: *** [../libdm/make.tmpl:511: .export.sym] Error 1 Signed-off-by: Khem Raj (cherry picked from commit 17c9d4406c725fffe24eddb7a6d23228f3bdea94) --- conf/nonclangable.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index dd9c90e0..1a931f92 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -135,6 +135,11 @@ TOOLCHAIN_pn-qemu_arm = "gcc" #| ^~~~~~~~~~~~~~~~~~~~~~~ TOOLCHAIN_pn-caps = "gcc" +# Fails to build with clang-13 errors with .export.sym file +# Mismatch between symbols in shared library and lists in .exported_symbols.* files: dm_bit_get_prev +TOOLCHAIN_pn-lvm2 = "gcc" +TOOLCHAIN_pn-libdevmapper = "gcc" + TOOLCHAIN_pn-lttng-ust_riscv64 = "gcc" #| ../libffi-3.3-rc0/src/arm/sysv.S: Assembler messages: From d1bfdd654f863e2f89dc36b4b4d2e7423fe5c0f3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 1 Aug 2021 12:05:37 -0700 Subject: [PATCH 060/166] clang: Update to latest 13.x branch Signed-off-by: Khem Raj (cherry picked from commit 527f628b7d9bbfe8d3fbe743e876d30c4545a71a) --- recipes-devtools/clang/clang.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 009cfe9b..45181a92 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "6b2e4c5a58d7f75f52b740bd7d96dc3a00b7ef6c" +SRCREV ?= "6eaf46beb4628abf8f5b09a333bcd44d2fb2aff9" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" From 48ef88ab7fce1d9dd5b620ef98ddb84ca7cf23cf Mon Sep 17 00:00:00 2001 From: "Signed-off-by: Martin Jansa" Date: Mon, 2 Aug 2021 09:45:55 -0700 Subject: [PATCH 061/166] meta-clang: Convert to new override syntax Signed-off-by: Martin Jansa Signed-off-by: Khem Raj (cherry picked from commit 17737cc4ecd3aea2c978bf83e283bcb08d097487) --- .github/workflows/yoe.yml | 4 +- README.md | 6 +- classes/clang.bbclass | 102 +++---- classes/scan-build.bbclass | 12 +- conf/nonclangable.conf | 266 +++++++++--------- conf/nonscanable.conf | 44 +-- .../samba/samba_4.%.bbappend | 4 +- .../recipes-devtools/bcc/bcc_0.20.0.bb | 14 +- .../bpftrace/bpftrace_0.11.4.bb | 4 +- .../kernel-selftest/kernel-selftest.bbappend | 6 +- .../systemd-boot/systemd-boot_%.bbappend | 2 +- .../openssl/openssl_%.bbappend | 8 +- recipes-core/busybox/busybox_1.31.1%.bbappend | 6 +- recipes-core/glib-2.0/glib-2.0_%.bbappend | 2 +- recipes-core/meta/clang-environment.inc | 18 +- .../meta/meta-environment-extsdk.bbappend | 2 +- recipes-core/meta/meta-environment.bbappend | 2 +- recipes-core/musl/musl_%.bbappend | 8 +- recipes-core/ncurses/ncurses_%.bbappend | 2 +- .../nativesdk-packagegroup-sdk-host.bbappend | 2 +- .../packagegroup-core-buildessential.bbappend | 4 +- ...egroup-core-standalone-sdk-target.bbappend | 2 +- .../packagegroup-cross-canadian.bbappend | 2 +- recipes-devtools/castxml/castxml_git.bb | 18 +- .../clang/clang-cross-canadian_git.bb | 2 +- recipes-devtools/clang/clang_git.bb | 90 +++--- .../clang/compiler-rt-sanitizers_git.bb | 42 +-- recipes-devtools/clang/compiler-rt_git.bb | 54 ++-- recipes-devtools/clang/libclc_git.bb | 4 +- recipes-devtools/clang/libcxx_git.bb | 38 +-- .../clang/nativesdk-clang-glue.bb | 4 +- recipes-devtools/clang/openmp_git.bb | 16 +- recipes-devtools/gdb/gdb_%.bbappend | 4 +- recipes-devtools/rpm/rpm_%.bbappend | 12 +- .../spirv-llvm-translator_git.bb | 4 +- .../ghostscript/ghostscript_%.bbappend | 4 +- recipes-extended/mdadm/mdadm_%.bbappend | 2 +- recipes-graphics/mesa/mesa_%.bbappend | 12 +- recipes-multimedia/ffmpeg/ffmpeg_%.bbappend | 4 +- .../gstreamer/gstreamer1.0-libav_%.bbappend | 4 +- .../libvorbis/libvorbis_%.bbappend | 2 +- .../libunwind/libunwind_%.bbappend | 2 +- 42 files changed, 420 insertions(+), 420 deletions(-) diff --git a/.github/workflows/yoe.yml b/.github/workflows/yoe.yml index ca2885b0..133f74bf 100644 --- a/.github/workflows/yoe.yml +++ b/.github/workflows/yoe.yml @@ -50,7 +50,7 @@ jobs: echo BB_NUMBER_THREADS = \"16\" >> conf/local.conf echo PARALLEL_MAKE = \"-j 32\" >> conf/local.conf echo CLANGSDK = \"1\" >> conf/local.conf - echo IMAGE_INSTALL_append = \" clang \" >> conf/local.conf + echo IMAGE_INSTALL:append = \" clang \" >> conf/local.conf echo XZ_DEFAULTS = \"--threads=8\" >> conf/local.conf echo SDKMACHINE = \"aarch64\" >> conf/local.conf /bin/bash -c "sed -i -e 's/PACKAGE_FEED_URI.*$//' conf/site.conf" @@ -67,7 +67,7 @@ jobs: run: | cd yoe export DISPLAY=":0" - echo TESTIMAGE_AUTO_qemuall = \"1\" >> conf/local.conf + echo TESTIMAGE_AUTO:qemuall = \"1\" >> conf/local.conf /bin/bash -c ". ./qemuarm64-envsetup.sh && bitbake yoe-sdk-image" - name: Prepare results run: | diff --git a/README.md b/README.md index eddf5484..ddbcfe2b 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ in `local.conf`. You can select libstdc++ per package too by writing bbappends for them containing ```shell -LIBCPLUSPLUS_toolchain-clang_pn- = "-stdlibc=libc++" +LIBCPLUSPLUS:toolchain-clang:pn- = "-stdlibc=libc++" ``` Defaults are chosen to be GNU for maximum compatibility with existing GNU systems. Its always good to use single runtime on a system, mixing runtimes can cause complications during @@ -119,7 +119,7 @@ Few components do not build with clang, if you have a component to add to that l simply add it to `conf/nonclangable.inc` e.g. ```shell -TOOLCHAIN_pn- = "gcc" +TOOLCHAIN:pn- = "gcc" ``` and OE will start using gcc to cross compile that recipe. @@ -127,7 +127,7 @@ and OE will start using gcc to cross compile that recipe. if a component does not build with libc++, you can add it to `conf/nonclangable.inc` e.g. ```shell -CXX_remove_pn-_toolchain-clang = " -stdlib=libc++ " +CXX:remove:pn-_toolchain-clang = " -stdlib=libc++ " ``` # compiler-rt failing in do_configure with custom TARGET_VENDOR diff --git a/classes/clang.bbclass b/classes/clang.bbclass index a6b26a80..cb7ea6eb 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -1,90 +1,90 @@ # Add the necessary override -CCACHE_COMPILERCHECK_toolchain-clang ?= "%compiler% -v" -HOST_CC_ARCH_prepend_toolchain-clang = "-target ${HOST_SYS} " -CC_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -CXX_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -CPP_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} -E" -CCLD_toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -RANLIB_toolchain-clang = "${HOST_PREFIX}llvm-ranlib" -AR_toolchain-clang = "${HOST_PREFIX}llvm-ar" -NM_toolchain-clang = "${HOST_PREFIX}llvm-nm" - -LTO_toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'thin-lto', '-flto=thin', '-flto -fuse-ld=lld', d)}" -PACKAGE_DEBUG_SPLIT_STYLE_toolchain-clang = "debug-without-src" +CCACHE_COMPILERCHECK:toolchain-clang ?= "%compiler% -v" +HOST_CC_ARCH:prepend:toolchain-clang = "-target ${HOST_SYS} " +CC:toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" +CXX:toolchain-clang = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" +CPP:toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} -E" +CCLD:toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" +RANLIB:toolchain-clang = "${HOST_PREFIX}llvm-ranlib" +AR:toolchain-clang = "${HOST_PREFIX}llvm-ar" +NM:toolchain-clang = "${HOST_PREFIX}llvm-nm" + +LTO:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'thin-lto', '-flto=thin', '-flto -fuse-ld=lld', d)}" +PACKAGE_DEBUG_SPLIT_STYLE:toolchain-clang = "debug-without-src" COMPILER_RT ??= "" -COMPILER_RT_class-native = "-rtlib=libgcc ${UNWINDLIB}" -COMPILER_RT_powerpc = "-rtlib=libgcc ${UNWINDLIB}" -COMPILER_RT_armeb = "-rtlib=libgcc ${UNWINDLIB}" +COMPILER_RT:class-native = "-rtlib=libgcc ${UNWINDLIB}" +COMPILER_RT:powerpc = "-rtlib=libgcc ${UNWINDLIB}" +COMPILER_RT:armeb = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT_libc-klibc = "-rtlib=libgcc ${UNWINDLIB}" UNWINDLIB ??= "" -UNWINDLIB_class-native = "--unwindlib=libgcc" -UNWINDLIB_powerpc = "--unwindlib=libgcc" -UNWINDLIB_armeb = "--unwindlib=libgcc" +UNWINDLIB:class-native = "--unwindlib=libgcc" +UNWINDLIB:powerpc = "--unwindlib=libgcc" +UNWINDLIB:armeb = "--unwindlib=libgcc" UNWINDLIB_libc-klibc = "--unwindlib=libgcc" LIBCPLUSPLUS ??= "" -CXXFLAGS_append_toolchain-clang = " ${LIBCPLUSPLUS}" -LDFLAGS_append_toolchain-clang = " ${COMPILER_RT} ${LIBCPLUSPLUS}" +CXXFLAGS:append:toolchain-clang = " ${LIBCPLUSPLUS}" +LDFLAGS:append:toolchain-clang = " ${COMPILER_RT} ${LIBCPLUSPLUS}" -TUNE_CCARGS_remove_toolchain-clang = "-meb" -TUNE_CCARGS_remove_toolchain-clang = "-mel" -TUNE_CCARGS_append_toolchain-clang = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -mbig-endian", " -mlittle-endian", d)}" +TUNE_CCARGS:remove:toolchain-clang = "-meb" +TUNE_CCARGS:remove:toolchain-clang = "-mel" +TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -mbig-endian", " -mlittle-endian", d)}" # Clang does not yet support big.LITTLE performance tunes, so use the LITTLE for tunes -TUNE_CCARGS_remove_toolchain-clang = "-mtune=cortex-a57.cortex-a53 -mtune=cortex-a72.cortex-a53 -mtune=cortex-a15.cortex-a7 -mtune=cortex-a17.cortex-a7 -mtune=cortex-a72.cortex-a35 -mtune=cortex-a73.cortex-a53 -mtune=cortex-a75.cortex-a55 -mtune=cortex-a76.cortex-a55" -TUNE_CCARGS_append_toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa72-cortexa53 cortexa57-cortexa53 cortexa73-cortexa53", " -mcpu=cortex-a53", "", d)}" -TUNE_CCARGS_append_toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa15-cortexa7 cortexa17-cortexa7", " -mcpu=cortex-a7", "", d)}" -TUNE_CCARGS_append_toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa72-cortexa35", " -mcpu=cortex-a35", "", d)}" -TUNE_CCARGS_append_toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa75-cortex-a55 cortexa76-cortex-a55", " -mcpu=cortex-a55", "", d)}" +TUNE_CCARGS:remove:toolchain-clang = "-mtune=cortex-a57.cortex-a53 -mtune=cortex-a72.cortex-a53 -mtune=cortex-a15.cortex-a7 -mtune=cortex-a17.cortex-a7 -mtune=cortex-a72.cortex-a35 -mtune=cortex-a73.cortex-a53 -mtune=cortex-a75.cortex-a55 -mtune=cortex-a76.cortex-a55" +TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa72-cortexa53 cortexa57-cortexa53 cortexa73-cortexa53", " -mcpu=cortex-a53", "", d)}" +TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa15-cortexa7 cortexa17-cortexa7", " -mcpu=cortex-a7", "", d)}" +TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa72-cortexa35", " -mcpu=cortex-a35", "", d)}" +TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa75-cortex-a55 cortexa76-cortex-a55", " -mcpu=cortex-a55", "", d)}" # Clang does not support octeontx2 processor -TUNE_CCARGS_remove_toolchain-clang = "-mcpu=octeontx2" +TUNE_CCARGS:remove:toolchain-clang = "-mcpu=octeontx2" # LLD does not yet support relaxation for RISCV e.g. https://reviews.freebsd.org/D25210 -TUNE_CCARGS_append_toolchain-clang_riscv32 = " -mno-relax" -TUNE_CCARGS_append_toolchain-clang_riscv64 = " -mno-relax" +TUNE_CCARGS:append:toolchain-clang:riscv32 = " -mno-relax" +TUNE_CCARGS:append:toolchain-clang:riscv64 = " -mno-relax" -TUNE_CCARGS_remove_toolchain-clang_powerpc = "-mhard-float" -TUNE_CCARGS_remove_toolchain-clang_powerpc = "-mno-spe" +TUNE_CCARGS:remove:toolchain-clang:powerpc = "-mhard-float" +TUNE_CCARGS:remove:toolchain-clang:powerpc = "-mno-spe" -TUNE_CCARGS_append_toolchain-clang = " -Qunused-arguments" -TUNE_CCARGS_append_toolchain-clang_libc-musl_powerpc64 = " -mlong-double-64" -TUNE_CCARGS_append_toolchain-clang_libc-musl_powerpc64le = " -mlong-double-64" +TUNE_CCARGS:append:toolchain-clang = " -Qunused-arguments" +TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc64 = " -mlong-double-64" +TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc64le = " -mlong-double-64" # usrmerge workaround -TUNE_CCARGS_append_toolchain-clang = "${@bb.utils.contains("DISTRO_FEATURES", "usrmerge", " --dyld-prefix=/usr", "", d)}" +TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains("DISTRO_FEATURES", "usrmerge", " --dyld-prefix=/usr", "", d)}" -LDFLAGS_append_toolchain-clang_class-nativesdk_x86-64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-x86-64.so.2" -LDFLAGS_append_toolchain-clang_class-nativesdk_x86 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux.so.2" -LDFLAGS_append_toolchain-clang_class-nativesdk_aarch64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-aarch64.so.1" +LDFLAGS:append:toolchain-clang:class-nativesdk:x86-64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-x86-64.so.2" +LDFLAGS:append:toolchain-clang:class-nativesdk:x86 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux.so.2" +LDFLAGS:append:toolchain-clang:class-nativesdk:aarch64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-aarch64.so.1" -LDFLAGS_toolchain-clang_class-nativesdk = "${BUILDSDK_LDFLAGS} \ +LDFLAGS:toolchain-clang:class-nativesdk = "${BUILDSDK_LDFLAGS} \ -Wl,-rpath-link,${STAGING_LIBDIR}/.. \ -Wl,-rpath,${libdir}/.. " # Enable lld globally" -LDFLAGS_append_toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=lld', '', d)}" +LDFLAGS:append:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=lld', '', d)}" # choose between 'gcc' 'clang' an empty '' can be used as well TOOLCHAIN ??= "gcc" # choose between 'gnu' 'llvm' RUNTIME ??= "gnu" #RUNTIME_toolchain-gcc = "gnu" -RUNTIME_armeb = "gnu" +RUNTIME:armeb = "gnu" -TOOLCHAIN_class-native = "gcc" -TOOLCHAIN_class-nativesdk = "gcc" -TOOLCHAIN_class-cross-canadian = "gcc" -TOOLCHAIN_class-crosssdk = "gcc" -TOOLCHAIN_class-cross = "gcc" +TOOLCHAIN:class-native = "gcc" +TOOLCHAIN:class-nativesdk = "gcc" +TOOLCHAIN:class-cross-canadian = "gcc" +TOOLCHAIN:class-crosssdk = "gcc" +TOOLCHAIN:class-cross = "gcc" OVERRIDES =. "${@['', 'toolchain-${TOOLCHAIN}:']['${TOOLCHAIN}' != '']}" OVERRIDES =. "${@['', 'runtime-${RUNTIME}:']['${RUNTIME}' != '']}" OVERRIDES[vardepsexclude] += "TOOLCHAIN RUNTIME" -#DEPENDS_append_toolchain-clang_class-target = " clang-cross-${TARGET_ARCH} " +#DEPENDS_append_toolchain-clang:class-target = " clang-cross-${TARGET_ARCH} " #DEPENDS_remove_toolchain-clang_allarch = "clang-cross-${TARGET_ARCH}" def clang_base_deps(d): @@ -108,8 +108,8 @@ def clang_base_deps(d): return ret return "" -BASE_DEFAULT_DEPS_toolchain-clang_class-target = "${@clang_base_deps(d)}" -BASE_DEFAULT_DEPS_append_class-native_toolchain-clang_runtime-llvm = " libcxx-native compiler-rt-native" +BASE_DEFAULT_DEPS:toolchain-clang:class-target = "${@clang_base_deps(d)}" +BASE_DEFAULT_DEPS:append:class-native:toolchain-clang_runtime-llvm = " libcxx-native compiler-rt-native" cmake_do_generate_toolchain_file_append_toolchain-clang () { cat >> ${WORKDIR}/toolchain.cmake <max_response_quads]; #| ^ #| 1 error generated. -TOOLCHAIN_pn-libdc1394 = "gcc" +TOOLCHAIN:pn-libdc1394 = "gcc" # error: return address can be determined only for current frame -TOOLCHAIN_pn-libexecinfo_mipsarch = "gcc" -TOOLCHAIN_pn-libgcc = "gcc" -TOOLCHAIN_pn-libgcc-initial = "gcc" -TOOLCHAIN_pn-libgfortran = "gcc" -TOOLCHAIN_pn-libssp-nonshared = "gcc" +TOOLCHAIN:pn-libexecinfo:mipsarch = "gcc" +TOOLCHAIN:pn-libgcc = "gcc" +TOOLCHAIN:pn-libgcc-initial = "gcc" +TOOLCHAIN:pn-libgfortran = "gcc" +TOOLCHAIN:pn-libssp-nonshared = "gcc" # Dunfell is not affected by the ell and iwd breakages. # Once we update past dunfell, patches to fix it properly # can be found in OpenMandriva packages. # ell 0.39 introduced nested functions sadly -#TOOLCHAIN_pn-ell = "gcc" +#TOOLCHAIN:pn-ell = "gcc" # iwd 1.13 introduced nested functions sadly -#TOOLCHAIN_pn-iwd = "gcc" +#TOOLCHAIN:pn-iwd = "gcc" #| cargo:warning=/mnt/a/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/libstd-rs/1.27.1-r0/re #cipe-sysroot/usr/include/bits/stdlib.h:90:3: error: "Assumed value of MB_LEN_MAX wrong" #| cargo:warning=# error "Assumed value of MB_LEN_MAX wrong" #| cargo:warning= ^ -TOOLCHAIN_pn-libstd-rs = "gcc" -TOOLCHAIN_pn-m4_powerpc = "gcc" +TOOLCHAIN:pn-libstd-rs = "gcc" +TOOLCHAIN:pn-m4:powerpc = "gcc" # clang does not have 64bit atomics on mips32 -#TOOLCHAIN_pn-mesa_mips = "gcc" -#TOOLCHAIN_pn-mesa_mipsel = "gcc" -TOOLCHAIN_pn-mesa_riscv64 = "gcc" -TOOLCHAIN_pn-mesa_powerpc = "gcc" +#TOOLCHAIN_pn-mesa:mips = "gcc" +#TOOLCHAIN_pn-mesa:mipsel = "gcc" +TOOLCHAIN:pn-mesa:riscv64 = "gcc" +TOOLCHAIN:pn-mesa:powerpc = "gcc" # variant-impl.hpp:309:36: error: 'is_variant' does not name a template but is followed by template arguments -TOOLCHAIN_pn-omxplayer = "gcc" +TOOLCHAIN:pn-omxplayer = "gcc" # error: return address can be determined only for current frame -TOOLCHAIN_pn-openflow_mipsarch = "gcc" -TOOLCHAIN_pn-opensbi = "gcc" -TOOLCHAIN_pn-openjdk-8 = "gcc" -TOOLCHAIN_pn-openjre-8 = "gcc" -TOOLCHAIN_pn-piglit = "gcc" -TOOLCHAIN_pn-prelink = "gcc" +TOOLCHAIN:pn-openflow:mipsarch = "gcc" +TOOLCHAIN:pn-opensbi = "gcc" +TOOLCHAIN:pn-openjdk-8 = "gcc" +TOOLCHAIN:pn-openjre-8 = "gcc" +TOOLCHAIN:pn-piglit = "gcc" +TOOLCHAIN:pn-prelink = "gcc" # Qemu cant run profile tests run during build # | *** stack smashing detected ***: terminated # | ./pgo-wrapper: line 3: 3372346 Aborted -#TOOLCHAIN_pn-python3 = "gcc" +#TOOLCHAIN:pn-python3 = "gcc" # has dpkg source which does not compile -TOOLCHAIN_pn-start-stop-daemon = "gcc" -TOOLCHAIN_pn-syslinux = "gcc" -TOOLCHAIN_pn-systemtap = "gcc" +TOOLCHAIN:pn-start-stop-daemon = "gcc" +TOOLCHAIN:pn-syslinux = "gcc" +TOOLCHAIN:pn-systemtap = "gcc" # v4l-utils uses nested functions -TOOLCHAIN_pn-v4l-utils = "gcc" +TOOLCHAIN:pn-v4l-utils = "gcc" # uses C++ which clang does not like -TOOLCHAIN_pn-wvstreams = "gcc" -TOOLCHAIN_pn-wvdial = "gcc" +TOOLCHAIN:pn-wvstreams = "gcc" +TOOLCHAIN:pn-wvdial = "gcc" #| ../../mpfr-3.1.4/src/mul.c:324:11: error: invalid output constraint '=h' in asm #| umul_ppmm (tmp[1], tmp[0], MPFR_MANT (b)[0], MPFR_MANT (c)[0]); -TOOLCHAIN_pn-mpfr_mips = "gcc" -TOOLCHAIN_pn-mpfr_mips64 = "gcc" +TOOLCHAIN:pn-mpfr:mips = "gcc" +TOOLCHAIN:pn-mpfr:mips64 = "gcc" # #../../lib/libicui18n.so: undefined reference to `__atomic_fetch_sub_4' #../../lib/libicui18n.so: undefined reference to `__atomic_load_4' #../../lib/libicui18n.so: undefined reference to `__atomic_store_4' #../../lib/libicui18n.so: undefined reference to `__atomic_fetch_add_4' # -TOOLCHAIN_pn-icu_armv4 = "gcc" -TOOLCHAIN_pn-icu_armv5 = "gcc" +TOOLCHAIN:pn-icu:armv4 = "gcc" +TOOLCHAIN:pn-icu:armv5 = "gcc" #../../libgcrypt-1.6.5/mpi/mpih-div.c:98:3: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions -TOOLCHAIN_pn-libgcrypt_mips64 = "gcc" +TOOLCHAIN:pn-libgcrypt:mips64 = "gcc" # 32-bit assembly code in pixman uses gas specific extensions -CFLAGS_append_pn-pixman_toolchain-clang_arm = " -fno-integrated-as" +CFLAGS:append:pn-pixman:toolchain-clang:arm = " -fno-integrated-as" # debug information generated by clang 12 confuses the older # external gas version -DEBUG_FLAGS_remove_pn-pixman_toolchain-clang_arm = "-g" +DEBUG_FLAGS:remove:pn-pixman:toolchain-clang:arm = "-g" #recipe-sysroot/usr/include/mozjs-60/mozilla/Span.h:634:5: error: statement not allowed in constexpr function #| MOZ_RELEASE_ASSERT(aStart <= len && (aLength == dynamic_extent || #| ^ -#TOOLCHAIN_pn-polkit = "gcc" +#TOOLCHAIN:pn-polkit = "gcc" #| ./ports/linux/pseudo_wrappers.c:80:14: error: use of unknown builtin '__builtin_apply' [-Wimplicit-function-declaration] #| void *res = __builtin_apply((void (*)()) real_syscall, __builtin_apply_args(), sizeof(long) * 7); @@ -110,15 +110,15 @@ DEBUG_FLAGS_remove_pn-pixman_toolchain-clang_arm = "-g" #| ./ports/linux/pseudo_wrappers.c:80:57: error: use of unknown builtin '__builtin_apply_args' [-Wimplicit-function-declaration] #| void *res = __builtin_apply((void (*)()) real_syscall, __builtin_apply_args(), sizeof(long) * 7); -TOOLCHAIN_pn-pseudo = "gcc" +TOOLCHAIN:pn-pseudo = "gcc" #| ../../pulseaudio-10.0/src/pulsecore/mix_neon.c../../pulseaudio-10.0/src/pulsecore/sconv_neon.c:49::27: error: unknown register name 'q0' in asm #| : "memory", "cc", "q0" /* clobber list */ #| ^ -TOOLCHAIN_pn-pulseaudio_aarch64 = "gcc" +TOOLCHAIN:pn-pulseaudio:aarch64 = "gcc" # mix_neon.c:179:9: error: invalid operand in inline asm: 'vld1.s32 ${0:h}, [$2] # vld1.s32 ${1:h}, [$3] ' -TOOLCHAIN_pn-pulseaudio_armv7ve = "gcc" -TOOLCHAIN_pn-pulseaudio_armv7a = "gcc" +TOOLCHAIN:pn-pulseaudio:armv7ve = "gcc" +TOOLCHAIN:pn-pulseaudio:armv7a = "gcc" #| /usr/src/debug/qemu/2.6.0-r1/qemu-2.6.0/util/bitmap.c:191: undefined reference to `__atomic_fetch_or_4' #| /usr/src/debug/qemu/2.6.0-r1/qemu-2.6.0/util/bitmap.c:210: undefined reference to `__atomic_fetch_or_4' @@ -128,84 +128,84 @@ TOOLCHAIN_pn-pulseaudio_armv7a = "gcc" #| /usr/src/debug/qemu/2.6.0-r1/qemu-2.6.0/util/bitmap.c:273: undefined reference to `__atomic_fetch_and_4' # We need to link in with -latomic which comes from gcc-runtime anyway so just keep using gcc # to compile qemu for target -TOOLCHAIN_pn-qemu_arm = "gcc" +TOOLCHAIN:pn-qemu:arm = "gcc" #| ./dsp/v4f_IIR2.h:554:12: error: no matching function for call to 'v4f_map' #| a[5] = v4f_map<__builtin_cosf> (f); #| ^~~~~~~~~~~~~~~~~~~~~~~ -TOOLCHAIN_pn-caps = "gcc" +TOOLCHAIN:pn-caps = "gcc" # Fails to build with clang-13 errors with .export.sym file # Mismatch between symbols in shared library and lists in .exported_symbols.* files: dm_bit_get_prev -TOOLCHAIN_pn-lvm2 = "gcc" -TOOLCHAIN_pn-libdevmapper = "gcc" +TOOLCHAIN:pn-lvm2 = "gcc" +TOOLCHAIN:pn-libdevmapper = "gcc" -TOOLCHAIN_pn-lttng-ust_riscv64 = "gcc" +TOOLCHAIN:pn-lttng-ust:riscv64 = "gcc" #| ../libffi-3.3-rc0/src/arm/sysv.S: Assembler messages: #| ../libffi-3.3-rc0/src/arm/sysv.S:131: Error: selected processor does not support `vldrle d0,[sp]' in ARM mode #| ../libffi-3.3-rc0/src/arm/sysv.S:132: Error: selected processor does not support `vldmgt sp,{d0-d7}' in ARM mode -TOOLCHAIN_pn-libffi_armeb = "gcc" +TOOLCHAIN:pn-libffi:armeb = "gcc" # Clang/mips still generates __sync_fetch_and_add_8 instead of __atomic_fetch_add_8 so it can't even use # libatomic to provide these functions, therefore can not compile redis on mips -TOOLCHAIN_pn-redis_mips = "gcc" +TOOLCHAIN:pn-redis:mips = "gcc" -CFLAGS_append_pn-liboil_toolchain-clang_x86-64 = " -fheinous-gnu-extensions " +CFLAGS:append:pn-liboil:toolchain-clang:x86-64 = " -fheinous-gnu-extensions " #io_getevents.c:25:141: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions #io_syscall5(int, __io_getevents_0_4, io_getevents, io_context_t, ctx, long, min_nr, long, nr, struct io_event *, events, struct timespec *, timeout) -CFLAGS_append_pn-libaio_toolchain-clang_mips = " -fheinous-gnu-extensions" +CFLAGS:append:pn-libaio:toolchain-clang:mips = " -fheinous-gnu-extensions" #| error: unknown warning option '-Wimplicit-fallthrough=0'; did you mean '-Wimplicit-fallthrough'? [-Werror,-Wunknown-warning-option] -CFLAGS_append_pn-mdadm_toolchain-clang = " -Wno-error=unknown-warning-option" +CFLAGS:append:pn-mdadm:toolchain-clang = " -Wno-error=unknown-warning-option" # ../db-5.3.28/src/mutex/mut_tas.c:150:34: error: unknown directive #:9:2: note: instantiated into assembly here # .force_thumb # ^ -#CFLAGS_append_pn-db_toolchain-clang = " -no-integrated-as" +#CFLAGS_append_pn-db:toolchain-clang = " -no-integrated-as" # #| ../../../DirectFB-1.7.7/lib/direct/armasm_memcpy.S:63:2: error: invalid instruction #| ldmgeia r1!, {r3, r4, r12, lr} #| ^ -CFLAGS_append_pn-directfb_toolchain-clang_arm = " -no-integrated-as" +CFLAGS:append:pn-directfb:toolchain-clang:arm = " -no-integrated-as" -CFLAGS_append_pn-userland_toolchain-clang = " -no-integrated-as" +CFLAGS:append:pn-userland:toolchain-clang = " -no-integrated-as" # libjpeg-turbo-2.0.2/simd/mips/jsimd_dspr2.S # :13:5: error: invalid token in expression # .if $17 != 0 # ^ -CFLAGS_append_pn-libjpeg-turbo_toolchain-clang_mipsarch = " -no-integrated-as" +CFLAGS:append:pn-libjpeg-turbo:toolchain-clang:mipsarch = " -no-integrated-as" # arm-yoe-linux-gnueabi-ld: /usr/src/debug/libvorbis/1.3.6-r0/build/lib/../../libvorbis-1.3.6/lib/sharedbook.c:165: undefined reference to `__pow_finite' -CFLAGS_append_pn-libvorbis_toolchain-clang_armv7ve = " -fno-fast-math" -CFLAGS_append_pn-mpg123_toolchain-clang_armv7ve = " -fno-fast-math" +CFLAGS:append:pn-libvorbis:toolchain-clang:armv7ve = " -fno-fast-math" +CFLAGS:append:pn-mpg123:toolchain-clang:armv7ve = " -fno-fast-math" #../kexec-tools-2.0.18/purgatory/arch/i386/entry32-16.S:23:2: error: unknown directive # .arch i386 # ^ -CC_append_pn-kexec-tools_toolchain-clang_x86-64 = " -no-integrated-as" -CC_append_pn-kexec-tools_toolchain-clang_x86 = " -no-integrated-as" -CC_append_pn-kexec-tools-klibc_toolchain-clang_x86-64 = " -no-integrated-as" -CC_append_pn-kexec-tools-klibc_toolchain-clang_x86 = " -no-integrated-as" +CC:append:pn-kexec-tools:toolchain-clang:x86-64 = " -no-integrated-as" +CC:append:pn-kexec-tools:toolchain-clang:x86 = " -no-integrated-as" +CC:append:pn-kexec-tools-klibc:toolchain-clang:x86-64 = " -no-integrated-as" +CC:append:pn-kexec-tools-klibc:toolchain-clang:x86 = " -no-integrated-as" #| /tmp/x86-sse2-cdb148.s:207:9: error: ambiguous operand size for instruction 'sub' #| sub SIZE, 64 #| ^~~~ -CFLAGS_append_pn-tinymembench_toolchain-clang_x86-64 = " -no-integrated-as" -CFLAGS_append_pn-tinymembench_toolchain-clang_x86 = " -no-integrated-as" -CFLAGS_append_pn-tinymembench_toolchain-clang_mipsarch = " -no-integrated-as" +CFLAGS:append:pn-tinymembench:toolchain-clang:x86-64 = " -no-integrated-as" +CFLAGS:append:pn-tinymembench:toolchain-clang:x86 = " -no-integrated-as" +CFLAGS:append:pn-tinymembench:toolchain-clang:mipsarch = " -no-integrated-as" -CFLAGS_append_pn-ne10_toolchain-clang_arm = " -no-integrated-as" -CFLAGS_append_pn-libde265_toolchain-clang_arm = " -no-integrated-as" +CFLAGS:append:pn-ne10:toolchain-clang:arm = " -no-integrated-as" +CFLAGS:append:pn-libde265:toolchain-clang:arm = " -no-integrated-as" # :5 : error: unknown directive #^ # .endfunc # ^ -CFLAGS_append_pn-libsdl2_toolchain-clang_arm = " -no-integrated-as" +CFLAGS:append:pn-libsdl2:toolchain-clang:arm = " -no-integrated-as" #2816:2: error: changed section type for .debug_frame, expected: 0x7000001E # .section .debug_frame,"",@progbits @@ -213,94 +213,94 @@ CFLAGS_append_pn-libsdl2_toolchain-clang_arm = " -no-integrated-as" #lj_vm.S:2890:2: error: changed section flags for .eh_frame, expected: 0x2 # .section .eh_frame,"aw",@progbits # ^ -CFLAGS_append_pn-luajit_toolchain-clang_mips = " -no-integrated-as" +CFLAGS:append:pn-luajit:toolchain-clang:mips = " -no-integrated-as" # Generated asm file can not be compiled with clang assembler due to presence of .0 label # and its references #| aes-decrypt-internal-2.s:368:1: error: unexpected token at start of statement #| .0: #| ^ -CFLAGS_append_pn-nettle_toolchain-clang_powerpc64le = " -no-integrated-as" +CFLAGS:append:pn-nettle:toolchain-clang:powerpc64le = " -no-integrated-as" # Fixes clang crash when compiling gnutls-3.7.2/lib/accelerated/aarch64/elf/sha512-armv8.s -CFLAGS_append_pn-gnutls_toolchain-clang_aarch64 = " -no-integrated-as" +CFLAGS:append:pn-gnutls:toolchain-clang:aarch64 = " -no-integrated-as" # regtest.cc:374:39: error: invalid suffix on literal; C++11 requires a # space between literal and identifier [-Wreserved-user-defined-literal] #| snprintf_func (buf, sizeof(buf), "%"Q"u", x); #| ^ -CXXFLAGS_append_pn-xdelta3_toolchain-clang = " -Wno-error=reserved-user-defined-literal" +CXXFLAGS:append:pn-xdelta3:toolchain-clang = " -Wno-error=reserved-user-defined-literal" # -fno-tree-vrp is gcc specific -CXXFLAGS_remove_pn-mozjs_toolchain-clang = "-fno-tree-vrp" -CFLAGS_remove_pn-mozjs_toolchain-clang = "-fno-tree-vrp" +CXXFLAGS:remove:pn-mozjs:toolchain-clang = "-fno-tree-vrp" +CFLAGS:remove:pn-mozjs:toolchain-clang = "-fno-tree-vrp" #memcached.c:6280:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] -CPPFLAGS_append_pn-memcached_toolchain-clang = " -Wno-error=embedded-directive" +CPPFLAGS:append:pn-memcached:toolchain-clang = " -Wno-error=embedded-directive" #| /tmp/mcp2515-578c41.s: Assembler messages: #| /tmp/mcp2515-578c41.s:1525: Error: r13 not allowed here -- `sub.w sp,r1,#8' #| /tmp/mcp2515-578c41.s:1821: Error: r13 not allowed here -- `sub.w sp,r6,#8' #| clang-7: error: assembler command failed with exit code 1 (use -v to see invocation) -TUNE_CCARGS_remove_pn-upm_toolchain-clang = "-no-integrated-as" -TUNE_CCARGS_remove_pn-omxplayer_toolchain-clang = "-no-integrated-as" -TUNE_CCARGS_remove_pn-nfs-utils_toolchain-clang = "-Qunused-arguments" +TUNE_CCARGS:remove:pn-upm:toolchain-clang = "-no-integrated-as" +TUNE_CCARGS:remove:pn-omxplayer:toolchain-clang = "-no-integrated-as" +TUNE_CCARGS:remove:pn-nfs-utils:toolchain-clang = "-Qunused-arguments" # We want to error out when -msse option is used otherwise it enables sse on non-x86 arches -TUNE_CCARGS_remove_pn-pipewire_toolchain-clang = "-Qunused-arguments" -TUNE_CCARGS_remove_pn-tesseract_toolchain-clang = "-Qunused-arguments" -TUNE_CCARGS_remove_pn-pulseaudio_toolchain-clang = "-Qunused-arguments" +TUNE_CCARGS:remove:pn-pipewire:toolchain-clang = "-Qunused-arguments" +TUNE_CCARGS:remove:pn-tesseract:toolchain-clang = "-Qunused-arguments" +TUNE_CCARGS:remove:pn-pulseaudio:toolchain-clang = "-Qunused-arguments" #| /usr/src/debug/ruby/2.5.1-r0/build/../ruby-2.5.1/process.c:7073: undefined reference to `__mulodi4' #| clang-7: error: linker command failed with exit code 1 (use -v to see invocation) -COMPILER_RT_pn-ruby_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-python3_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-m4_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-cpio_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-openssh_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-webkitgtk_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-wpewebkit_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-python3-numpy_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_pn-mongodb_toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT_remove_pn-m4_powerpc = "-rtlib=compiler-rt" -COMPILER_RT_remove_pn-ruby_powerpc = "-rtlib=compiler-rt" -COMPILER_RT_remove_pn-webkitgtk_powerpc = "-rtlib=compiler-rt" -COMPILER_RT_remove_pn-m4_armeb = "-rtlib=compiler-rt" -COMPILER_RT_remove_pn-ruby_armeb = "-rtlib=compiler-rt" -COMPILER_RT_remove_pn-webkitgtk_armeb = "-rtlib=compiler-rt" +COMPILER_RT:pn-ruby:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-python3:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-m4:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-cpio:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-openssh:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-webkitgtk:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-wpewebkit:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-python3-numpy:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-mongodb:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:remove:pn-m4:powerpc = "-rtlib=compiler-rt" +COMPILER_RT:remove:pn-ruby:powerpc = "-rtlib=compiler-rt" +COMPILER_RT:remove:pn-webkitgtk:powerpc = "-rtlib=compiler-rt" +COMPILER_RT:remove:pn-m4:armeb = "-rtlib=compiler-rt" +COMPILER_RT:remove:pn-ruby:armeb = "-rtlib=compiler-rt" +COMPILER_RT:remove:pn-webkitgtk:armeb = "-rtlib=compiler-rt" # build/lib/libQt5Widgets.so: undefined reference to `__lshrti3' # __lshrti3 is missing in libgcc -COMPILER_RT_pn-qtbase_toolchain-clang_riscv32 = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-qtbase:toolchain-clang:riscv32 = "-rtlib=compiler-rt ${UNWINDLIB}" -LDFLAGS_append_pn-gnutls_toolchain-clang_riscv64 = " -latomic" -LDFLAGS_append_pn-harfbuzz_toolchain-clang_riscv64 = " -latomic" -LDFLAGS_append_pn-qtwebengine_toolchain-clang_runtime-gnu_x86 = " -latomic" -LDFLAGS_append_pn-qemu_toolchain-clang_x86 = " -latomic" +LDFLAGS:append:pn-gnutls:toolchain-clang:riscv64 = " -latomic" +LDFLAGS:append:pn-harfbuzz:toolchain-clang:riscv64 = " -latomic" +LDFLAGS:append:pn-qtwebengine:toolchain-clang_runtime-gnu:x86 = " -latomic" +LDFLAGS:append:pn-qemu:toolchain-clang:x86 = " -latomic" # glibc is built with gcc and hence encodes some libgcc specific builtins which are not found # when doing static linking with clang using compiler-rt, so use libgcc # undefined reference to `__unordtf2' -COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" -COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" -COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" -COMPILER_RT_pn-libc-bench_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" -COMPILER_RT_pn-mpich_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" -COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc --unwindlib=libgcc" -COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc --unwindlib=libgcc" -COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT:pn-aufs-util:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT:pn-libhugetlbfs:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT:pn-tsocks:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT:pn-libc-bench:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT:pn-mpich:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT:pn-aufs-util:libc-glibc:toolchain-clang:x86-64 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT:pn-libhugetlbfs:libc-glibc:toolchain-clang:x86-64 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT:pn-tsocks:libc-glibc:toolchain-clang:x86-64 = "-rtlib=libgcc --unwindlib=libgcc" #(unwind.o): in function `__pthread_unwind': #/usr/src/debug/glibc/2.29-r0/git/nptl/unwind.c:121: undefined reference to `_Unwind_ForcedUnwind' #clang-8: error: linker command failed with exit code 1 (use -v to see invocation) -COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_arm = "--unwindlib=libgcc" -COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_arm = "--unwindlib=libgcc" -COMPILER_RT_pn-libc-bench_libc-glibc_toolchain-clang_arm = "--unwindlib=libgcc" +COMPILER_RT:pn-aufs-util:libc-glibc:toolchain-clang:arm = "--unwindlib=libgcc" +COMPILER_RT:pn-libhugetlbfs:libc-glibc:toolchain-clang:arm = "--unwindlib=libgcc" +COMPILER_RT:pn-libc-bench:libc-glibc:toolchain-clang:arm = "--unwindlib=libgcc" # Uses gcc for native tools, e.g. nsinstall and passes clang options which fails so # let same compiler ( gcc or clang) be native/cross compiler # | gcc: error: unrecognized command line option ‘-Qunused-arguments’ -BUILD_CC_pn-nss_toolchain-clang = "clang -rtlib=libgcc -unwindlib=none" +BUILD_CC:pn-nss:toolchain-clang = "clang -rtlib=libgcc -unwindlib=none" # libnoprofile.c:19:5: error: expected parameter declarator # int printf(const char *format, ...) { @@ -308,16 +308,16 @@ BUILD_CC_pn-nss_toolchain-clang = "clang -rtlib=libgcc -unwindlib=none" # error: non-constant-expression cannot be narrowed from type 'std::chrono::duration< #long long, std::ratio<1, 1> >::rep' (aka 'long long') to '__time_t' (aka 'long') in initializer list # [-Wc++11-narrowing] -CXXFLAGS_append_pn-apt_toolchain-clang = " -Wno-c++11-narrowing" -lcl_maybe_fortify_pn-apt_toolchain-clang = "" +CXXFLAGS:append:pn-apt:toolchain-clang = " -Wno-c++11-narrowing" +lcl_maybe_fortify:pn-apt:toolchain-clang = "" # LTO # Seems to use symver ASMs see https://stackoverflow.com/questions/46304742/how-to-combine-lto-with-symbol-versioning # lib/puny_encode.c:136: multiple definition of `_idn2_punycode_encode' -LTO_pn-libidn2_toolchain-clang = "" +LTO:pn-libidn2:toolchain-clang = "" #libcairo.so: undefined reference to pthread_mutexattr_init [--no-allow-shlib-undefined] -LTO_pn-cairo_toolchain-clang = "" +LTO:pn-cairo:toolchain-clang = "" # Hardcoded gcc use in makefiles TOOLCHAIN_pn-u-boot-stm32mp = "gcc" @@ -326,4 +326,4 @@ TOOLCHAIN_pn-tf-a-stm32mp-serialboot = "gcc" TOOLCHAIN_pn-u-boot-seco-imx = "gcc" # see https://bugs.llvm.org/show_bug.cgi?id=50443 this is in clang-13, until it is fixed do not use -O2 -SELECTED_OPTIMIZATION_remove_pn-poke_toolchain-clang = "-O2" +SELECTED_OPTIMIZATION:remove:pn-poke:toolchain-clang = "-O2" diff --git a/conf/nonscanable.conf b/conf/nonscanable.conf index e2b8f5dd..3cdc454e 100644 --- a/conf/nonscanable.conf +++ b/conf/nonscanable.conf @@ -1,22 +1,22 @@ -SCAN_BUILD_pn-linux-libc-headers = "" -SCAN_BUILD_pn-update-rc.d = "" -SCAN_BUILD_pn-initscripts = "" -SCAN_BUILD_pn-base-files = "" -SCAN_BUILD_pn-os-release = "" -SCAN_BUILD_pn-wireless-regdb = "" -SCAN_BUILD_pn-tzdata = "" -SCAN_BUILD_pn-qemuwrapper-cross = "" -SCAN_BUILD_pn-depmodwrapper-cross = "" -SCAN_BUILD_pn-bluez-firmware-rpidistro = "" -SCAN_BUILD_pn-udev-rules-rpi = "" -SCAN_BUILD_pn-shadow-securetty = "" -SCAN_BUILD_pn-96boards-tools = "" -SCAN_BUILD_pn-run-postinsts = "" -SCAN_BUILD_pn-keymaps = "" -SCAN_BUILD_pn-sysvinit-inittab = "" -SCAN_BUILD_pn-pi-bluetooth = "" -SCAN_BUILD_pn-rpi-config = "" -SCAN_BUILD_pn-bcm2835-bootfiles = "" -SCAN_BUILD_pn-autoconf-archive = "" -SCAN_BUILD_pn-compiler-rt = "" -SCAN_BUILD_pn-libcxx = "" +SCAN_BUILD:pn-linux-libc-headers = "" +SCAN_BUILD:pn-update-rc.d = "" +SCAN_BUILD:pn-initscripts = "" +SCAN_BUILD:pn-base-files = "" +SCAN_BUILD:pn-os-release = "" +SCAN_BUILD:pn-wireless-regdb = "" +SCAN_BUILD:pn-tzdata = "" +SCAN_BUILD:pn-qemuwrapper-cross = "" +SCAN_BUILD:pn-depmodwrapper-cross = "" +SCAN_BUILD:pn-bluez-firmware-rpidistro = "" +SCAN_BUILD:pn-udev-rules-rpi = "" +SCAN_BUILD:pn-shadow-securetty = "" +SCAN_BUILD:pn-96boards-tools = "" +SCAN_BUILD:pn-run-postinsts = "" +SCAN_BUILD:pn-keymaps = "" +SCAN_BUILD:pn-sysvinit-inittab = "" +SCAN_BUILD:pn-pi-bluetooth = "" +SCAN_BUILD:pn-rpi-config = "" +SCAN_BUILD:pn-bcm2835-bootfiles = "" +SCAN_BUILD:pn-autoconf-archive = "" +SCAN_BUILD:pn-compiler-rt = "" +SCAN_BUILD:pn-libcxx = "" diff --git a/dynamic-layers/networking-layer/recipes-connectivity/samba/samba_4.%.bbappend b/dynamic-layers/networking-layer/recipes-connectivity/samba/samba_4.%.bbappend index dd3c5f9d..543f32ce 100644 --- a/dynamic-layers/networking-layer/recipes-connectivity/samba/samba_4.%.bbappend +++ b/dynamic-layers/networking-layer/recipes-connectivity/samba/samba_4.%.bbappend @@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" -SRC_URI_append = " file://fix_duplicate_pdb_search_init.patch " +SRC_URI:append = " file://fix_duplicate_pdb_search_init.patch " diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.20.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.20.0.bb index 1c24555d..c615a25a 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.20.0.bb +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.20.0.bb @@ -13,10 +13,10 @@ DEPENDS += "bison-native \ " LUAJIT ?= "luajit" -LUAJIT_powerpc64le = "" -LUAJIT_powerpc64 = "" +LUAJIT:powerpc64le = "" +LUAJIT:powerpc64 = "" -RDEPENDS_${PN} += "bash python3 python3-core python3-setuptools xz" +RDEPENDS:${PN} += "bash python3 python3-core python3-setuptools xz" SRC_URI = "gitsm://github.com/iovisor/bcc \ file://0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch \ @@ -31,7 +31,7 @@ PV .= "+git${SRCPV}" S = "${WORKDIR}/git" PACKAGECONFIG ??= "examples" -PACKAGECONFIG_remove_libc-musl = "examples" +PACKAGECONFIG:remove:libc-musl = "examples" PACKAGECONFIG[manpages] = "-DENABLE_MAN=ON,-DENABLE_MAN=OFF," PACKAGECONFIG[examples] = "-DENABLE_EXAMPLES=ON,-DENABLE_EXAMPLES=OFF," @@ -44,12 +44,12 @@ EXTRA_OECMAKE = " \ -DPYTHON_FLAGS=--install-lib=${PYTHON_SITEPACKAGES_DIR} \ " -do_install_append() { +do_install:append() { sed -e 's@#!/usr/bin/python@#!/usr/bin/env python3@g' \ -i $(find ${D}${datadir}/${PN} -type f) } -FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}" -FILES_${PN}-doc += "${datadir}/${PN}/man" +FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}" +FILES:${PN}-doc += "${datadir}/${PN}/man" COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*)-linux" diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.11.4.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.11.4.bb index d6ab0cea..9f67d943 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.11.4.bb +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.11.4.bb @@ -11,7 +11,7 @@ DEPENDS += "bison-native \ " PV .= "+git${SRCREV}" -RDEPENDS_${PN} += "bash python3 xz" +RDEPENDS:${PN} += "bash python3 xz" SRC_URI = "git://github.com/iovisor/bpftrace;branch=master \ file://0001-bpforc.h-Include-optional-header.patch \ @@ -29,4 +29,4 @@ EXTRA_OECMAKE = " \ " COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*)-linux" -COMPATIBLE_HOST_libc-musl = "null" +COMPATIBLE_HOST:libc-musl = "null" diff --git a/dynamic-layers/openembedded-layer/recipes-kernel/kernel-selftest/kernel-selftest.bbappend b/dynamic-layers/openembedded-layer/recipes-kernel/kernel-selftest/kernel-selftest.bbappend index a1d4585f..580d98bf 100644 --- a/dynamic-layers/openembedded-layer/recipes-kernel/kernel-selftest/kernel-selftest.bbappend +++ b/dynamic-layers/openembedded-layer/recipes-kernel/kernel-selftest/kernel-selftest.bbappend @@ -1,4 +1,4 @@ -DEPENDS_append = " clang-native" -DEPENDS_remove = "llvm-native" +DEPENDS:append = " clang-native" +DEPENDS:remove = "llvm-native" -EXCLUDE_FROM_WORLD_forcevariable = "" +EXCLUDE_FROM_WORLD:forcevariable = "" diff --git a/recipes-bsp/systemd-boot/systemd-boot_%.bbappend b/recipes-bsp/systemd-boot/systemd-boot_%.bbappend index d5e4bcc5..bc0bdd9a 100644 --- a/recipes-bsp/systemd-boot/systemd-boot_%.bbappend +++ b/recipes-bsp/systemd-boot/systemd-boot_%.bbappend @@ -1,4 +1,4 @@ -do_configure_append_toolchain-clang() { +do_configure:append:toolchain-clang() { export EFI_CC="${CC}" sed -i -e "s#O0#O#g" ${S}/src/boot/efi/meson.build } diff --git a/recipes-connectivity/openssl/openssl_%.bbappend b/recipes-connectivity/openssl/openssl_%.bbappend index 408ac387..9112eadc 100644 --- a/recipes-connectivity/openssl/openssl_%.bbappend +++ b/recipes-connectivity/openssl/openssl_%.bbappend @@ -1,8 +1,8 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -LDLIBS_append_toolchain-clang_riscv64 = " -latomic" -LDLIBS_append_toolchain-clang_riscv32 = " -latomic" +LDLIBS:append:toolchain-clang:riscv64 = " -latomic" +LDLIBS:append:toolchain-clang:riscv32 = " -latomic" -do_configure_prepend_toolchain-clang () { +do_configure:prepend:toolchain-clang () { export LDLIBS="${LDLIBS}" } diff --git a/recipes-core/busybox/busybox_1.31.1%.bbappend b/recipes-core/busybox/busybox_1.31.1%.bbappend index 726ee762..201f1f0e 100644 --- a/recipes-core/busybox/busybox_1.31.1%.bbappend +++ b/recipes-core/busybox/busybox_1.31.1%.bbappend @@ -1,9 +1,9 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI_append_toolchain-clang = "\ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" +SRC_URI:append:toolchain-clang = "\ file://0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const-1.31.1.patch \ " # networking/tls_pstm_sqr_comba.c:514:4: error: inline assembly requires more registers than available # SQRADD2(*tmpx++, *tmpy--); # ^ -TOOLCHAIN_x86 = "gcc" +TOOLCHAIN:x86 = "gcc" diff --git a/recipes-core/glib-2.0/glib-2.0_%.bbappend b/recipes-core/glib-2.0/glib-2.0_%.bbappend index 4a0f94af..2aef80ec 100644 --- a/recipes-core/glib-2.0/glib-2.0_%.bbappend +++ b/recipes-core/glib-2.0/glib-2.0_%.bbappend @@ -1 +1 @@ -CFLAGS_append_libc-musl = " -Wno-format-nonliteral" +CFLAGS:append:libc-musl = " -Wno-format-nonliteral" diff --git a/recipes-core/meta/clang-environment.inc b/recipes-core/meta/clang-environment.inc index a238e498..78876100 100644 --- a/recipes-core/meta/clang-environment.inc +++ b/recipes-core/meta/clang-environment.inc @@ -1,14 +1,14 @@ export TARGET_CLANGCC_ARCH = "${TARGET_CC_ARCH}" -TARGET_CLANGCC_ARCH_remove = "-mthumb-interwork" -TARGET_CLANGCC_ARCH_remove = "-mmusl" -TARGET_CLANGCC_ARCH_remove = "-muclibc" -TARGET_CLANGCC_ARCH_remove = "-meb" -TARGET_CLANGCC_ARCH_remove = "-mel" -TARGET_CLANGCC_ARCH_append = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -mbig-endian", " -mlittle-endian", d)}" -TARGET_CLANGCC_ARCH_remove_powerpc = "-mhard-float" -TARGET_CLANGCC_ARCH_remove_powerpc = "-mno-spe" +TARGET_CLANGCC_ARCH:remove = "-mthumb-interwork" +TARGET_CLANGCC_ARCH:remove = "-mmusl" +TARGET_CLANGCC_ARCH:remove = "-muclibc" +TARGET_CLANGCC_ARCH:remove = "-meb" +TARGET_CLANGCC_ARCH:remove = "-mel" +TARGET_CLANGCC_ARCH:append = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -mbig-endian", " -mlittle-endian", d)}" +TARGET_CLANGCC_ARCH:remove:powerpc = "-mhard-float" +TARGET_CLANGCC_ARCH:remove:powerpc = "-mno-spe" -create_sdk_files_append() { +create_sdk_files:append() { script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS} if ${@bb.utils.contains('CLANGSDK', '1', 'true', 'false', d)}; then echo 'export CLANGCC="${TARGET_PREFIX}clang --target=${TARGET_SYS} ${TARGET_CLANGCC_ARCH} --sysroot=$SDKTARGETSYSROOT"' >> $script diff --git a/recipes-core/meta/meta-environment-extsdk.bbappend b/recipes-core/meta/meta-environment-extsdk.bbappend index e867074c..d40a025e 100644 --- a/recipes-core/meta/meta-environment-extsdk.bbappend +++ b/recipes-core/meta/meta-environment-extsdk.bbappend @@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" require clang-environment.inc diff --git a/recipes-core/meta/meta-environment.bbappend b/recipes-core/meta/meta-environment.bbappend index e867074c..d40a025e 100644 --- a/recipes-core/meta/meta-environment.bbappend +++ b/recipes-core/meta/meta-environment.bbappend @@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" require clang-environment.inc diff --git a/recipes-core/musl/musl_%.bbappend b/recipes-core/musl/musl_%.bbappend index 70fe10cd..d9e95498 100644 --- a/recipes-core/musl/musl_%.bbappend +++ b/recipes-core/musl/musl_%.bbappend @@ -1,4 +1,4 @@ -DEPENDS_append_toolchain-clang = " clang-cross-${TARGET_ARCH}" -DEPENDS_remove_toolchain-clang = "virtual/${TARGET_PREFIX}gcc" -TOOLCHAIN_x86-x32 = "gcc" -TOOLCHAIN_powerpc64 = "gcc" +DEPENDS:append:toolchain-clang = " clang-cross-${TARGET_ARCH}" +DEPENDS:remove:toolchain-clang = "virtual/${TARGET_PREFIX}gcc" +TOOLCHAIN:x86-x32 = "gcc" +TOOLCHAIN:powerpc64 = "gcc" diff --git a/recipes-core/ncurses/ncurses_%.bbappend b/recipes-core/ncurses/ncurses_%.bbappend index 096d5bcb..6e7a7c13 100644 --- a/recipes-core/ncurses/ncurses_%.bbappend +++ b/recipes-core/ncurses/ncurses_%.bbappend @@ -1 +1 @@ -CACHED_CONFIGUREVARS_append_toolchain-clang = " cf_cv_prog_CC_c_o=yes cf_cv_prog_CXX_c_o=yes" +CACHED_CONFIGUREVARS:append:toolchain-clang = " cf_cv_prog_CC_c_o=yes cf_cv_prog_CXX_c_o=yes" diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend index 0c8ae6c3..b2b0a845 100644 --- a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend +++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend @@ -1 +1 @@ -RDEPENDS_${PN} += "${@bb.utils.contains('CLANGSDK', '1', 'nativesdk-clang', '', d)}" +RDEPENDS:${PN} += "${@bb.utils.contains('CLANGSDK', '1', 'nativesdk-clang', '', d)}" diff --git a/recipes-core/packagegroups/packagegroup-core-buildessential.bbappend b/recipes-core/packagegroups/packagegroup-core-buildessential.bbappend index 403af1ac..527ff741 100644 --- a/recipes-core/packagegroups/packagegroup-core-buildessential.bbappend +++ b/recipes-core/packagegroups/packagegroup-core-buildessential.bbappend @@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -RDEPENDS_packagegroup-core-buildessential_append_toolchain-clang = " clang " +RDEPENDS:packagegroup-core-buildessential:append:toolchain-clang = " clang " diff --git a/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend b/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend index 59f0959b..29990f0b 100644 --- a/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend +++ b/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend @@ -1 +1 @@ -RRECOMMENDS_${PN} += "${@bb.utils.contains('CLANGSDK', '1', 'libcxx-dev libcxx-staticdev compiler-rt-dev compiler-rt-staticdev', '', d)}" +RRECOMMENDS:${PN} += "${@bb.utils.contains('CLANGSDK', '1', 'libcxx-dev libcxx-staticdev compiler-rt-dev compiler-rt-staticdev', '', d)}" diff --git a/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend b/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend index 5b397b59..3199a698 100644 --- a/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend +++ b/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend @@ -1,3 +1,3 @@ CLANGCROSSCANADIAN = "clang-cross-canadian-${TRANSLATED_TARGET_ARCH}" CLANGCROSSCANADIANDEPS += "${@all_multilib_tune_values(d, 'CLANGCROSSCANADIAN')}" -RDEPENDS_${PN} += "${@bb.utils.contains('CLANGSDK', '1', '${CLANGCROSSCANADIANDEPS}', '', d)}" +RDEPENDS:${PN} += "${@bb.utils.contains('CLANGSDK', '1', '${CLANGCROSSCANADIANDEPS}', '', d)}" diff --git a/recipes-devtools/castxml/castxml_git.bb b/recipes-devtools/castxml/castxml_git.bb index 4d3aa8ae..f2c6b3ed 100644 --- a/recipes-devtools/castxml/castxml_git.bb +++ b/recipes-devtools/castxml/castxml_git.bb @@ -14,15 +14,15 @@ DEPENDS = "clang" # Match clang's idea of what TOOLCHAIN should be. TOOLCHAIN = "clang" -TOOLCHAIN_class-native = "gcc" -TOOLCHAIN_class-nativesdk = "clang" - -BUILD_CC_class-nativesdk = "clang" -BUILD_CXX_class-nativesdk = "clang++" -BUILD_AR_class-nativesdk = "llvm-ar" -BUILD_RANLIB_class-nativesdk = "llvm-ranlib" -BUILD_NM_class-nativesdk = "llvm-nm" -LDFLAGS_append_class-nativesdk = " -fuse-ld=gold" +TOOLCHAIN:class-native = "gcc" +TOOLCHAIN:class-nativesdk = "clang" + +BUILD_CC:class-nativesdk = "clang" +BUILD_CXX:class-nativesdk = "clang++" +BUILD_AR:class-nativesdk = "llvm-ar" +BUILD_RANLIB:class-nativesdk = "llvm-ranlib" +BUILD_NM:class-nativesdk = "llvm-nm" +LDFLAGS:append:class-nativesdk = " -fuse-ld=gold" inherit cmake cmake-native pkgconfig python3native diff --git a/recipes-devtools/clang/clang-cross-canadian_git.bb b/recipes-devtools/clang/clang-cross-canadian_git.bb index b16dbe11..2e00bd90 100644 --- a/recipes-devtools/clang/clang-cross-canadian_git.bb +++ b/recipes-devtools/clang/clang-cross-canadian_git.bb @@ -27,6 +27,6 @@ do_install() { } SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-llvm-ar \ *-llvm-ranlib *-llvm-nm *-lld *-ld.lld" -do_install_append() { +do_install:append() { cross_canadian_bindirlinks } diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index e52005bb..6642af61 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -10,11 +10,11 @@ require common-source.inc INHIBIT_DEFAULT_DEPS = "1" -BUILD_CC_class-nativesdk = "clang" -BUILD_CXX_class-nativesdk = "clang++" -BUILD_AR_class-nativesdk = "llvm-ar" -BUILD_RANLIB_class-nativesdk = "llvm-ranlib" -BUILD_NM_class-nativesdk = "llvm-nm" +BUILD_CC:class-nativesdk = "clang" +BUILD_CXX:class-nativesdk = "clang++" +BUILD_AR:class-nativesdk = "llvm-ar" +BUILD_RANLIB:class-nativesdk = "llvm-ranlib" +BUILD_NM:class-nativesdk = "llvm-nm" inherit cmake cmake-native pkgconfig python3native @@ -55,8 +55,8 @@ PACKAGECONFIG ??= "compiler-rt libcplusplus shared-libs lldb-wchar \ ${@bb.utils.contains('RUNTIME', 'llvm', 'compiler-rt libcplusplus unwindlib libomp', '', d)} \ rtti eh libedit terminfo \ " -PACKAGECONFIG_class-native = "rtti eh libedit shared-libs ${@bb.utils.contains('RUNTIME', 'llvm', 'compiler-rt libcplusplus unwindlib libomp', '', d)}" -PACKAGECONFIG_class-nativesdk = "rtti eh libedit shared-libs ${@bb.utils.filter('DISTRO_FEATURES', 'thin-lto lto', d)} ${@bb.utils.contains('RUNTIME', 'llvm', 'compiler-rt libcplusplus unwindlib libomp', '', d)}" +PACKAGECONFIG:class-native = "rtti eh libedit shared-libs ${@bb.utils.contains('RUNTIME', 'llvm', 'compiler-rt libcplusplus unwindlib libomp', '', d)}" +PACKAGECONFIG:class-nativesdk = "rtti eh libedit shared-libs ${@bb.utils.filter('DISTRO_FEATURES', 'thin-lto lto', d)} ${@bb.utils.contains('RUNTIME', 'llvm', 'compiler-rt libcplusplus unwindlib libomp', '', d)}" PACKAGECONFIG[compiler-rt] = "-DCLANG_DEFAULT_RTLIB=compiler-rt,," PACKAGECONFIG[libcplusplus] = "-DCLANG_DEFAULT_CXX_STDLIB=libc++,," @@ -101,7 +101,7 @@ CLANG_DEFAULT_OPENMP_RUNTIME;\ LLVM_TARGETS_TO_BUILD ?= "AMDGPU;AArch64;ARM;BPF;Mips;PowerPC;RISCV;X86" LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ?= "" -LLVM_EXPERIMENTAL_TARGETS_TO_BUILD_append = ";${@get_clang_experimental_target_arch(bb, d)}" +LLVM_EXPERIMENTAL_TARGETS_TO_BUILD:append = ";${@get_clang_experimental_target_arch(bb, d)}" HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" HF[vardepvalue] = "${HF}" @@ -109,10 +109,10 @@ HF[vardepvalue] = "${HF}" LLVM_PROJECTS ?= "clang;clang-tools-extra;lld${LLDB}" LLDB ?= ";lldb" # LLDB support for RISCV/Mips32 does not work yet -LLDB_riscv32 = "" -LLDB_riscv64 = "" -LLDB_mips = "" -LLDB_mipsel = "" +LLDB:riscv32 = "" +LLDB:riscv64 = "" +LLDB:mips = "" +LLDB:mipsel = "" #CMAKE_VERBOSE = "VERBOSE=1" @@ -136,10 +136,10 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD='${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}' \ " -EXTRA_OECMAKE_append_class-native = "\ +EXTRA_OECMAKE:append:class-native = "\ -DPYTHON_EXECUTABLE='${PYTHON}' \ " -EXTRA_OECMAKE_append_class-nativesdk = "\ +EXTRA_OECMAKE:append:class-nativesdk = "\ -DCMAKE_CROSSCOMPILING:BOOL=ON \ -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR} -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \ -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ @@ -154,7 +154,7 @@ EXTRA_OECMAKE_append_class-nativesdk = "\ -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ -DPYTHON_EXECUTABLE='${PYTHON}' \ " -EXTRA_OECMAKE_append_class-target = "\ +EXTRA_OECMAKE:append:class-target = "\ -DCMAKE_CROSSCOMPILING:BOOL=ON \ -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR}' \ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ @@ -175,17 +175,17 @@ EXTRA_OECMAKE_append_class-target = "\ " DEPENDS = "binutils zlib libffi libxml2 libxml2-native ninja-native swig-native" -DEPENDS_append_class-nativesdk = " clang-crosssdk-${SDK_ARCH} virtual/${TARGET_PREFIX}binutils-crosssdk nativesdk-python3" -DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} python3" +DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_ARCH} virtual/${TARGET_PREFIX}binutils-crosssdk nativesdk-python3" +DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} python3" -RRECOMMENDS_${PN} = "binutils" -RRECOMMENDS_${PN}_append_class-target = " libcxx-dev" +RRECOMMENDS:${PN} = "binutils" +RRECOMMENDS:${PN}:append:class-target = " libcxx-dev" -do_install_append() { +do_install:append() { rm -rf ${D}${libdir}/python*/site-packages/six.py } -do_install_append_class-target () { +do_install:append:class-target () { # Allow bin path to change based on YOCTO_ALTERNATE_EXE_PATH sed -i 's;${_IMPORT_PREFIX}/bin;${_IMPORT_PREFIX_BIN};g' ${D}${libdir}/cmake/llvm/LLVMExports-release.cmake @@ -208,7 +208,7 @@ endif()\n" ${D}${libdir}/cmake/llvm/LLVMExports-release.cmake done } -do_install_append_class-native () { +do_install:append:class-native () { install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clang-tblgen ${D}${bindir}/clang-tblgen install -Dm 0755 ${B}${BINPATHPREFIX}/bin/lldb-tblgen ${D}${bindir}/lldb-tblgen for f in `find ${D}${bindir} -executable -type f -not -type l`; do @@ -220,7 +220,7 @@ do_install_append_class-native () { ln -sf llvm-config ${D}${bindir}/llvm-config${PV} } -do_install_append_class-nativesdk () { +do_install:append:class-nativesdk () { install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clang-tblgen ${D}${bindir}/clang-tblgen install -Dm 0755 ${B}${BINPATHPREFIX}/bin/lldb-tblgen ${D}${bindir}/lldb-tblgen for f in `find ${D}${bindir} -executable -type f -not -type l`; do @@ -236,15 +236,15 @@ do_install_append_class-nativesdk () { PACKAGES =+ "${PN}-libllvm ${PN}-lldb-python libclang lldb lldb-server liblldb" PROVIDES += "llvm llvm${PV}" -PROVIDES_append_class-native = " llvm-native" +PROVIDES:append:class-native = " llvm-native" BBCLASSEXTEND = "native nativesdk" -RDEPENDS_lldb += "${PN}-lldb-python" +RDEPENDS:lldb += "${PN}-lldb-python" -FILES_${PN}-lldb-python = "${libdir}/python*/site-packages/lldb/*" +FILES:${PN}-lldb-python = "${libdir}/python*/site-packages/lldb/*" -FILES_${PN} += "\ +FILES:${PN} += "\ ${libdir}/BugpointPasses.so \ ${libdir}/LLVMHello.so \ ${libdir}/LLVMgold.so \ @@ -256,59 +256,59 @@ FILES_${PN} += "\ ${datadir}/opt-viewer/ \ " -FILES_lldb = "\ +FILES:lldb = "\ ${bindir}/lldb \ " -FILES_lldb-server = "\ +FILES:lldb-server = "\ ${bindir}/lldb-server \ " -FILES_liblldb = "\ +FILES:liblldb = "\ ${libdir}/liblldbIntelFeatures.so* \ ${libdir}/liblldb.so* \ " -FILES_${PN}-libllvm =+ "\ +FILES:${PN}-libllvm =+ "\ ${libdir}/libLLVM-${MAJOR_VER}.${MINOR_VER}.so \ ${libdir}/libLLVM-${MAJOR_VER}.so \ ${libdir}/libLLVM-${MAJOR_VER}git.so \ ${libdir}/libLLVM-${MAJOR_VER}.${MINOR_VER}git.so \ " -FILES_libclang = "\ +FILES:libclang = "\ ${libdir}/libclang.so.${MAJOR_VER} \ " -FILES_${PN}-dev += "\ +FILES:${PN}-dev += "\ ${datadir}/llvm/cmake \ ${libdir}/cmake \ ${nonarch_libdir}/libear \ ${nonarch_libdir}/${BPN}/*.la \ " -FILES_${PN}-staticdev += "${nonarch_libdir}/${BPN}/*.a" +FILES:${PN}-staticdev += "${nonarch_libdir}/${BPN}/*.a" -FILES_${PN}-staticdev_remove = "${libdir}/${BPN}/*.a" -FILES_${PN}-dev_remove = "${libdir}/${BPN}/*.la" -FILES_${PN}_remove = "${libdir}/${BPN}/*" +FILES:${PN}-staticdev:remove = "${libdir}/${BPN}/*.a" +FILES:${PN}-dev:remove = "${libdir}/${BPN}/*.la" +FILES:${PN}:remove = "${libdir}/${BPN}/*" -INSANE_SKIP_${PN} += "already-stripped" +INSANE_SKIP:${PN} += "already-stripped" #INSANE_SKIP_${PN}-dev += "dev-elf" -INSANE_SKIP_${PN}-lldb-python += "dev-so dev-deps" -INSANE_SKIP_liblldb = "dev-so" +INSANE_SKIP:${PN}-lldb-python += "dev-so dev-deps" +INSANE_SKIP:liblldb = "dev-so" #Avoid SSTATE_SCAN_COMMAND running sed over llvm-config. -SSTATE_SCAN_FILES_remove = "*-config" +SSTATE_SCAN_FILES:remove = "*-config" TOOLCHAIN = "clang" -TOOLCHAIN_class-native = "gcc" -TOOLCHAIN_class-nativesdk = "clang" +TOOLCHAIN:class-native = "gcc" +TOOLCHAIN:class-nativesdk = "clang" -SYSROOT_DIRS_append_class-target = " ${nonarch_libdir}" +SYSROOT_DIRS:append:class-target = " ${nonarch_libdir}" -SYSROOT_PREPROCESS_FUNCS_append_class-target = " clang_sysroot_preprocess" +SYSROOT_PREPROCESS_FUNCS:append:class-target = " clang_sysroot_preprocess" clang_sysroot_preprocess() { install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb index 38558d76..42005df6 100644 --- a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb @@ -13,11 +13,11 @@ inherit cmake pkgconfig python3native LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee54e877a" -TUNE_CCARGS_remove = "-no-integrated-as" +TUNE_CCARGS:remove = "-no-integrated-as" DEPENDS += "ninja-native virtual/crypt" -DEPENDS_append_class-native = " clang-native libxcrypt-native" -DEPENDS_append_class-nativesdk = " clang-native nativesdk-libxcrypt" +DEPENDS:append:class-native = " clang-native libxcrypt-native" +DEPENDS:append:class-nativesdk = " clang-native nativesdk-libxcrypt" PACKAGECONFIG ??= "" PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" @@ -45,15 +45,15 @@ EXTRA_OECMAKE += "-DCOMPILER_RT_STANDALONE_BUILD=OFF \ -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \ " -EXTRA_OECMAKE_append_class-nativesdk = "\ +EXTRA_OECMAKE:append:class-nativesdk = "\ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ " -EXTRA_OECMAKE_append_libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=ON " -EXTRA_OECMAKE_append_powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc " +EXTRA_OECMAKE:append:libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=ON " +EXTRA_OECMAKE:append:powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc " -do_install_append () { +do_install:append () { if [ -n "${LLVM_LIBDIR_SUFFIX}" ]; then mkdir -p ${D}${nonarch_libdir} mv ${D}${libdir}/clang ${D}${nonarch_libdir}/clang @@ -64,17 +64,17 @@ do_install_append () { } FILES_SOLIBSDEV = "" -FILES_${PN} += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/lib*${SOLIBSDEV} \ +FILES:${PN} += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/lib*${SOLIBSDEV} \ ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/*.txt \ ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/share/*.txt" -FILES_${PN}-staticdev += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a" -FILES_${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \ +FILES:${PN}-staticdev += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a" +FILES:${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \ ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/include \ ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o \ ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.asan-preinit*.a \ " -INSANE_SKIP_${PN} = "dev-so libdir" -INSANE_SKIP_${PN}-dbg = "libdir" +INSANE_SKIP:${PN} = "dev-so libdir" +INSANE_SKIP:${PN}-dbg = "libdir" #PROVIDES_append_class-target = "\ # virtual/${TARGET_PREFIX}compilerlibs \ @@ -85,18 +85,18 @@ INSANE_SKIP_${PN}-dbg = "libdir" # " # -RDEPENDS_${PN}-dev += "${PN}-staticdev" +RDEPENDS:${PN}-dev += "${PN}-staticdev" BBCLASSEXTEND = "native nativesdk" -ALLOW_EMPTY_${PN} = "1" -ALLOW_EMPTY_${PN}-dev = "1" +ALLOW_EMPTY:${PN} = "1" +ALLOW_EMPTY:${PN}-dev = "1" -TOOLCHAIN_forcevariable = "clang" -SYSROOT_DIRS_append_class-target = " ${nonarch_libdir}" +TOOLCHAIN:forcevariable = "clang" +SYSROOT_DIRS:append:class-target = " ${nonarch_libdir}" # riscv and x86_64 Sanitizers work on musl too -COMPATIBLE_HOST_libc-musl_x86-64 = "(.*)" -COMPATIBLE_HOST_libc-musl_riscv64 = "(.*)" -COMPATIBLE_HOST_libc-musl_riscv32 = "(.*)" -COMPATIBLE_HOST_libc-musl = "null" +COMPATIBLE_HOST:libc-musl:x86-64 = "(.*)" +COMPATIBLE_HOST:libc-musl:riscv64 = "(.*)" +COMPATIBLE_HOST:libc-musl:riscv32 = "(.*)" +COMPATIBLE_HOST:libc-musl = "null" diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index 665c7b10..cdb571dd 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb @@ -16,29 +16,29 @@ LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee LIBCPLUSPLUS = "" COMPILER_RT = "" -TUNE_CCARGS_remove = "-no-integrated-as" +TUNE_CCARGS:remove = "-no-integrated-as" INHIBIT_DEFAULT_DEPS = "1" DEPENDS += "ninja-native libgcc" -DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc gcc-runtime" -DEPENDS_append_class-nativesdk = " clang-native" -DEPENDS_append_class-native = " clang-native" +DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc gcc-runtime" +DEPENDS:append:class-nativesdk = " clang-native" +DEPENDS:append:class-native = " clang-native" CXXFLAGS += "-stdlib=libstdc++" LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" BUILD_CXXFLAGS += "-stdlib=libstdc++" BUILD_LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" -BUILD_CPPFLAGS_remove = "-stdlib=libc++" -BUILD_LDFLAGS_remove = "-stdlib=libc++ -lc++abi" +BUILD_CPPFLAGS:remove = "-stdlib=libc++" +BUILD_LDFLAGS:remove = "-stdlib=libc++ -lc++abi" -BUILD_CC_toolchain-clang = "${CCACHE}clang" -BUILD_CXX_toolchain-clang = "${CCACHE}clang++" -BUILD_CPP_toolchain-clang = "${CCACHE}clang -E" -BUILD_CCLD_toolchain-clang = "${CCACHE}clang" -BUILD_RANLIB_toolchain-clang = "llvm-ranlib" -BUILD_AR_toolchain-clang = "llvm-ar" -BUILD_NM_toolchain-clang = "llvm-nm" +BUILD_CC:toolchain-clang = "${CCACHE}clang" +BUILD_CXX:toolchain-clang = "${CCACHE}clang++" +BUILD_CPP:toolchain-clang = "${CCACHE}clang -E" +BUILD_CCLD:toolchain-clang = "${CCACHE}clang" +BUILD_RANLIB:toolchain-clang = "llvm-ranlib" +BUILD_AR:toolchain-clang = "llvm-ar" +BUILD_NM:toolchain-clang = "llvm-nm" PACKAGECONFIG ??= "" PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" @@ -60,22 +60,22 @@ EXTRA_OECMAKE += "-DCOMPILER_RT_STANDALONE_BUILD=OFF \ -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \ " -EXTRA_OECMAKE_append_class-target = "\ +EXTRA_OECMAKE:append:class-target = "\ -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ " -EXTRA_OECMAKE_append_class-nativesdk = "\ +EXTRA_OECMAKE:append:class-nativesdk = "\ -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ " -EXTRA_OECMAKE_append_powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc " +EXTRA_OECMAKE:append:powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc " -do_install_append () { +do_install:append () { if [ -n "${LLVM_LIBDIR_SUFFIX}" ]; then mkdir -p ${D}${nonarch_libdir} mv ${D}${libdir}/clang ${D}${nonarch_libdir}/clang @@ -84,17 +84,17 @@ do_install_append () { } FILES_SOLIBSDEV = "" -FILES_${PN} += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/lib*${SOLIBSDEV} \ +FILES:${PN} += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/lib*${SOLIBSDEV} \ ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/*.txt \ ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/share/*.txt" -FILES_${PN}-staticdev += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a" -FILES_${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \ +FILES:${PN}-staticdev += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a" +FILES:${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \ ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/include \ ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o \ ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.asan-preinit*.a \ " -INSANE_SKIP_${PN} = "dev-so libdir" -INSANE_SKIP_${PN}-dbg = "libdir" +INSANE_SKIP:${PN} = "dev-so libdir" +INSANE_SKIP:${PN}-dbg = "libdir" #PROVIDES_append_class-target = "\ # virtual/${TARGET_PREFIX}compilerlibs \ @@ -105,12 +105,12 @@ INSANE_SKIP_${PN}-dbg = "libdir" # " # -RDEPENDS_${PN}-dev += "${PN}-staticdev" +RDEPENDS:${PN}-dev += "${PN}-staticdev" BBCLASSEXTEND = "native nativesdk" -ALLOW_EMPTY_${PN} = "1" -ALLOW_EMPTY_${PN}-dev = "1" +ALLOW_EMPTY:${PN} = "1" +ALLOW_EMPTY:${PN}-dev = "1" -TOOLCHAIN_forcevariable = "clang" -SYSROOT_DIRS_append_class-target = " ${nonarch_libdir}" +TOOLCHAIN:forcevariable = "clang" +SYSROOT_DIRS:append:class-target = " ${nonarch_libdir}" diff --git a/recipes-devtools/clang/libclc_git.bb b/recipes-devtools/clang/libclc_git.bb index 9525b257..3cc52b5f 100644 --- a/recipes-devtools/clang/libclc_git.bb +++ b/recipes-devtools/clang/libclc_git.bb @@ -21,7 +21,7 @@ EXTRA_OECMAKE += " \ -Dll_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeLLAsmCompiler.cmake.in \ " -do_configure_prepend () { +do_configure:prepend () { # Write out a qemu wrapper that will be used by cmake # so that it can run target helper binaries through that. qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" @@ -32,6 +32,6 @@ EOF chmod +x ${WORKDIR}/qemuwrapper } -FILES_${PN} += "${datadir}/clc" +FILES:${PN} += "${datadir}/clc" BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index b143f8cd..9ee3d341 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb @@ -11,8 +11,8 @@ require common-source.inc inherit cmake cmake-native python3native PACKAGECONFIG ??= "compiler-rt exceptions ${@bb.utils.contains("RUNTIME", "llvm", "unwind unwind-shared", "", d)}" -PACKAGECONFIG_append_armv5 = " no-atomics" -PACKAGECONFIG_remove_class-native = "compiler-rt" +PACKAGECONFIG:append:armv5 = " no-atomics" +PACKAGECONFIG:remove:class-native = "compiler-rt" PACKAGECONFIG[unwind] = "-DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON,-DLIBCXXABI_USE_LLVM_UNWINDER=OFF,," PACKAGECONFIG[exceptions] = "-DLIBCXXABI_ENABLE_EXCEPTIONS=ON -DDLIBCXX_ENABLE_EXCEPTIONS=ON,-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF -DLIBCXX_ENABLE_EXCEPTIONS=OFF -DCMAKE_REQUIRED_FLAGS='-fno-exceptions'," PACKAGECONFIG[no-atomics] = "-D_LIBCXXABI_HAS_ATOMIC_BUILTINS=OFF -DCMAKE_SHARED_LINKER_FLAGS='-latomic',," @@ -20,20 +20,20 @@ PACKAGECONFIG[compiler-rt] = "-DLIBCXX_USE_COMPILER_RT=ON -DLIBCXXABI_USE_COMPIL PACKAGECONFIG[unwind-shared] = "-DLIBUNWIND_ENABLE_SHARED=ON,-DLIBUNWIND_ENABLE_SHARED=OFF,," DEPENDS += "ninja-native" -DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" -DEPENDS_append_class-native = " clang-native" +DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" +DEPENDS:append:class-native = " clang-native" LIBCPLUSPLUS = "" COMPILER_RT ?= "-rtlib=compiler-rt" -CC_append_toolchain-clang_class-native = " -unwindlib=libgcc -rtlib=libgcc" +CC:append:toolchain-clang:class-native = " -unwindlib=libgcc -rtlib=libgcc" CXXFLAGS += "-stdlib=libstdc++" LDFLAGS += "-unwindlib=libgcc -stdlib=libstdc++" BUILD_CXXFLAGS += "-stdlib=libstdc++" BUILD_LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" -BUILD_CPPFLAGS_remove = "-stdlib=libc++" -BUILD_LDFLAGS_remove = "-stdlib=libc++ -lc++abi" +BUILD_CPPFLAGS:remove = "-stdlib=libc++" +BUILD_LDFLAGS:remove = "-stdlib=libc++ -lc++abi" INHIBIT_DEFAULT_DEPS = "1" @@ -42,7 +42,7 @@ LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da39 file://libunwind/LICENSE.TXT;md5=f66970035d12f196030658b11725e1a1 \ " -LLVM_LIBDIR_SUFFIX_powerpc64 = "64" +LLVM_LIBDIR_SUFFIX:powerpc64 = "64" OECMAKE_TARGET_COMPILE = "cxxabi cxx" OECMAKE_TARGET_INSTALL = "install-cxx install-cxxabi ${@bb.utils.contains("RUNTIME", "llvm", "install-unwind", "", d)}" @@ -63,31 +63,31 @@ EXTRA_OECMAKE += "\ -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \ " -EXTRA_OECMAKE_append_class-target = " \ +EXTRA_OECMAKE:append:class-target = " \ -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${AR} \ -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${NM} \ -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${RANLIB} \ -DLLVM_DEFAULT_TARGET_TRIPLE=${HOST_SYS} \ " -EXTRA_OECMAKE_append_class-native = " -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \ +EXTRA_OECMAKE:append:class-native = " -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \ " -EXTRA_OECMAKE_append_class-nativesdk = " -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \ +EXTRA_OECMAKE:append:class-nativesdk = " -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \ -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${AR} \ -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${NM} \ -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${RANLIB} \ -DLLVM_DEFAULT_TARGET_TRIPLE=${HOST_SYS} \ " -EXTRA_OECMAKE_append_libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=ON " +EXTRA_OECMAKE:append:libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=ON " -CXXFLAGS_append_armv5 = " -mfpu=vfp2" +CXXFLAGS:append:armv5 = " -mfpu=vfp2" -ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY:${PN} = "1" -PROVIDES_append_runtime-llvm = " libunwind" +PROVIDES:append_runtime-llvm = " libunwind" -do_install_append() { +do_install:append() { if ${@bb.utils.contains("RUNTIME", "llvm", "true", "false", d)} then install -Dm 0644 ${S}/libunwind/include/libunwind.h ${S}/libunwind/include/__libunwind_config.h ${D}${includedir} @@ -97,8 +97,8 @@ do_install_append() { fi } -PACKAGES_append_runtime-llvm = " libunwind" -FILES_libunwind_runtime-llvm = "${libdir}/libunwind.so.*" +PACKAGES:append_runtime-llvm = " libunwind" +FILES:libunwind_runtime-llvm = "${libdir}/libunwind.so.*" BBCLASSEXTEND = "native nativesdk" -TOOLCHAIN_forcevariable = "clang" +TOOLCHAIN:forcevariable = "clang" diff --git a/recipes-devtools/clang/nativesdk-clang-glue.bb b/recipes-devtools/clang/nativesdk-clang-glue.bb index 169366a7..f1f34d5f 100644 --- a/recipes-devtools/clang/nativesdk-clang-glue.bb +++ b/recipes-devtools/clang/nativesdk-clang-glue.bb @@ -23,8 +23,8 @@ sysroot_stage_all () { sysroot_stage_dir ${D} ${SYSROOT_DESTDIR} } -FILES_${PN} += "${prefix_nativesdk} ${base_libdir_nativesdk}" -FILES_${PN}-dbg = "" +FILES:${PN} += "${prefix_nativesdk} ${base_libdir_nativesdk}" +FILES:${PN}-dbg = "" deltask do_configure deltask do_compile diff --git a/recipes-devtools/clang/openmp_git.bb b/recipes-devtools/clang/openmp_git.bb index 95b3a9ec..7ce89eb5 100644 --- a/recipes-devtools/clang/openmp_git.bb +++ b/recipes-devtools/clang/openmp_git.bb @@ -27,9 +27,9 @@ OECMAKE_SOURCEPATH = "${S}/openmp" PACKAGECONFIG ?= "ompt-tools offloading-plugin" -PACKAGECONFIG_remove_arm = "ompt-tools offloading-plugin" -PACKAGECONFIG_remove_mipsarch = "ompt-tools offloading-plugin" -PACKAGECONFIG_remove_powerpc = "ompt-tools offloading-plugin" +PACKAGECONFIG:remove:arm = "ompt-tools offloading-plugin" +PACKAGECONFIG:remove:mipsarch = "ompt-tools offloading-plugin" +PACKAGECONFIG:remove:powerpc = "ompt-tools offloading-plugin" PACKAGECONFIG[ompt-tools] = "-DOPENMP_ENABLE_OMPT_TOOLS=ON,-DOPENMP_ENABLE_OMPT_TOOLS=OFF," PACKAGECONFIG[aliases] = "-DLIBOMP_INSTALL_ALIASES=ON,-DLIBOMP_INSTALL_ALIASES=OFF," @@ -37,11 +37,11 @@ PACKAGECONFIG[offloading-plugin] = ",,elfutils libffi,libelf libffi" PACKAGES += "${PN}-libomptarget-amdgcn" FILES_SOLIBSDEV = "" -FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}" -FILES_${PN}-libomptarget-amdgcn = "${libdir}/libomptarget-amdgcn-*.bc" -INSANE_SKIP_${PN} = "dev-so" +FILES:${PN} += "${libdir}/lib*${SOLIBSDEV}" +FILES:${PN}-libomptarget-amdgcn = "${libdir}/libomptarget-amdgcn-*.bc" +INSANE_SKIP:${PN} = "dev-so" -COMPATIBLE_HOST_mips64 = "null" -COMPATIBLE_HOST_riscv32 = "null" +COMPATIBLE_HOST:mips64 = "null" +COMPATIBLE_HOST:riscv32 = "null" BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-devtools/gdb/gdb_%.bbappend b/recipes-devtools/gdb/gdb_%.bbappend index 63fbf481..ee1991b6 100644 --- a/recipes-devtools/gdb/gdb_%.bbappend +++ b/recipes-devtools/gdb/gdb_%.bbappend @@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI_append_toolchain-clang_riscv64 = " file://0001-gdb-Link-with-latomic-for-riscv-clang-alone.patch " +SRC_URI:append:toolchain-clang:riscv64 = " file://0001-gdb-Link-with-latomic-for-riscv-clang-alone.patch " diff --git a/recipes-devtools/rpm/rpm_%.bbappend b/recipes-devtools/rpm/rpm_%.bbappend index 732af3f4..26c9e993 100644 --- a/recipes-devtools/rpm/rpm_%.bbappend +++ b/recipes-devtools/rpm/rpm_%.bbappend @@ -1,9 +1,9 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -DEPENDS_append_toolchain-clang = " openmp" -DEPENDS_remove_toolchain-clang_riscv32 = "openmp" -DEPENDS_remove_toolchain-clang_mipsarch = "openmp" +DEPENDS:append:toolchain-clang = " openmp" +DEPENDS:remove:toolchain-clang:riscv32 = "openmp" +DEPENDS:remove:toolchain-clang:mipsarch = "openmp" # rpm needs OMP -TOOLCHAIN_riscv32 = "gcc" -TOOLCHAIN_mipsarch = "gcc" +TOOLCHAIN:riscv32 = "gcc" +TOOLCHAIN:mipsarch = "gcc" diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb index d35dc8f2..1e187933 100644 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb @@ -29,11 +29,11 @@ EXTRA_OECMAKE = "\ -DCCACHE_ALLOWED=FALSE \ " -do_compile_append() { +do_compile:append() { oe_runmake llvm-spirv } -do_install_append() { +do_install:append() { install -Dm755 ${B}/tools/llvm-spirv/llvm-spirv ${D}${bindir}/llvm-spirv } diff --git a/recipes-extended/ghostscript/ghostscript_%.bbappend b/recipes-extended/ghostscript/ghostscript_%.bbappend index fe22e341..c1496d00 100644 --- a/recipes-extended/ghostscript/ghostscript_%.bbappend +++ b/recipes-extended/ghostscript/ghostscript_%.bbappend @@ -1,6 +1,6 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -do_configure_prepend_toolchain-clang () { +do_configure:prepend:toolchain-clang () { if ${@bb.utils.contains('RUNTIME', 'llvm', 'true', 'false', d)}; then sed -i -e "s|-stdlib=libstdc++|-stdlib=libc++|g" ${S}/configure.ac fi diff --git a/recipes-extended/mdadm/mdadm_%.bbappend b/recipes-extended/mdadm/mdadm_%.bbappend index 903836e5..2bdf6ca7 100644 --- a/recipes-extended/mdadm/mdadm_%.bbappend +++ b/recipes-extended/mdadm/mdadm_%.bbappend @@ -3,4 +3,4 @@ # | &dev->size_low, &dev->size_high); # | ^~~~~~~~~~~~~~ -CFLAGS_append_toolchain-clang = " -Wno-error=address-of-packed-member" +CFLAGS:append:toolchain-clang = " -Wno-error=address-of-packed-member" diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend index c08a9ff3..a314e09e 100644 --- a/recipes-graphics/mesa/mesa_%.bbappend +++ b/recipes-graphics/mesa/mesa_%.bbappend @@ -1,12 +1,12 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI_append_toolchain-clang = " file://clang13.patch " +SRC_URI:append:toolchain-clang = " file://clang13.patch " -LDFLAGS_append_toolchain-clang = " -latomic -lm" -DEPENDS_append_toolchain-clang = " libatomic-ops" +LDFLAGS:append:toolchain-clang = " -latomic -lm" +DEPENDS:append:toolchain-clang = " libatomic-ops" -EXTRA_OEMASON_append_toolchain-clang_x86 = " -Dasm=false" -EXTRA_OEMASON_append_toolchain-clang_x86-64 = " -Dasm=false" +EXTRA_OEMASON:append:toolchain-clang:x86 = " -Dasm=false" +EXTRA_OEMASON:append:toolchain-clang:x86-64 = " -Dasm=false" export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-config" diff --git a/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend b/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend index 2077fdad..7854eb1c 100644 --- a/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend +++ b/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend @@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI_append_toolchain-clang_mips64 = " file://clang_mips64.patch" +SRC_URI:append:toolchain-clang:mips64 = " file://clang_mips64.patch" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend index dee9619a..c6acc2c4 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend +++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI_append_toolchain-clang_mips64 = " file://0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch" +SRC_URI:append:toolchain-clang:mips64 = " file://0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch" diff --git a/recipes-multimedia/libvorbis/libvorbis_%.bbappend b/recipes-multimedia/libvorbis/libvorbis_%.bbappend index c6fe98c2..bfc832f4 100644 --- a/recipes-multimedia/libvorbis/libvorbis_%.bbappend +++ b/recipes-multimedia/libvorbis/libvorbis_%.bbappend @@ -1,4 +1,4 @@ # | clang-7: error: unknown argument: '-mfused-madd' -do_configure_prepend_toolchain-clang() { +do_configure:prepend:toolchain-clang() { sed -i -e "s/-mfused-madd//g" ${S}/configure.ac } diff --git a/recipes-support/libunwind/libunwind_%.bbappend b/recipes-support/libunwind/libunwind_%.bbappend index 6c9057cb..7dee3e8d 100644 --- a/recipes-support/libunwind/libunwind_%.bbappend +++ b/recipes-support/libunwind/libunwind_%.bbappend @@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" COMPATIBLE_HOST_runtime-llvm = "null" From 58c31558ecf192b1b0ce88972a9f248c1e87d5fa Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Fri, 30 Jul 2021 17:01:51 +0200 Subject: [PATCH 062/166] Manually finish conversion Signed-off-by: Martin Jansa Signed-off-by: Khem Raj (cherry picked from commit 953591e89fba92501cf421adf448aa69caa12e14) --- README.md | 2 +- classes/clang.bbclass | 8 ++++---- classes/scan-build.bbclass | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ddbcfe2b..61dffaf3 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ and OE will start using gcc to cross compile that recipe. if a component does not build with libc++, you can add it to `conf/nonclangable.inc` e.g. ```shell -CXX:remove:pn-_toolchain-clang = " -stdlib=libc++ " +CXX:remove:pn-:toolchain-clang = " -stdlib=libc++ " ``` # compiler-rt failing in do_configure with custom TARGET_VENDOR diff --git a/classes/clang.bbclass b/classes/clang.bbclass index cb7ea6eb..970e5d9a 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -71,7 +71,7 @@ LDFLAGS:append:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is TOOLCHAIN ??= "gcc" # choose between 'gnu' 'llvm' RUNTIME ??= "gnu" -#RUNTIME_toolchain-gcc = "gnu" +#RUNTIME:toolchain-gcc = "gnu" RUNTIME:armeb = "gnu" TOOLCHAIN:class-native = "gcc" @@ -84,8 +84,8 @@ OVERRIDES =. "${@['', 'toolchain-${TOOLCHAIN}:']['${TOOLCHAIN}' != '']}" OVERRIDES =. "${@['', 'runtime-${RUNTIME}:']['${RUNTIME}' != '']}" OVERRIDES[vardepsexclude] += "TOOLCHAIN RUNTIME" -#DEPENDS_append_toolchain-clang:class-target = " clang-cross-${TARGET_ARCH} " -#DEPENDS_remove_toolchain-clang_allarch = "clang-cross-${TARGET_ARCH}" +#DEPENDS:append:toolchain-clang:class-target = " clang-cross-${TARGET_ARCH} " +#DEPENDS:remove:toolchain-clang:allarch = "clang-cross-${TARGET_ARCH}" def clang_base_deps(d): if not d.getVar('INHIBIT_DEFAULT_DEPS', False): @@ -111,7 +111,7 @@ def clang_base_deps(d): BASE_DEFAULT_DEPS:toolchain-clang:class-target = "${@clang_base_deps(d)}" BASE_DEFAULT_DEPS:append:class-native:toolchain-clang_runtime-llvm = " libcxx-native compiler-rt-native" -cmake_do_generate_toolchain_file_append_toolchain-clang () { +cmake_do_generate_toolchain_file:append:toolchain-clang () { cat >> ${WORKDIR}/toolchain.cmake < Date: Mon, 2 Aug 2021 18:14:19 -0700 Subject: [PATCH 063/166] recipes: Fix remaining override conversion Signed-off-by: Khem Raj (cherry picked from commit 1fbf558d6ff699ae0c8b60ad8313515367e83898) --- classes/clang.bbclass | 2 +- recipes-devtools/clang/libcxx_git.bb | 6 +++--- recipes-support/libunwind/libunwind_%.bbappend | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 970e5d9a..d3b585b1 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -109,7 +109,7 @@ def clang_base_deps(d): return "" BASE_DEFAULT_DEPS:toolchain-clang:class-target = "${@clang_base_deps(d)}" -BASE_DEFAULT_DEPS:append:class-native:toolchain-clang_runtime-llvm = " libcxx-native compiler-rt-native" +BASE_DEFAULT_DEPS:append:class-native:toolchain-clang:runtime-llvm = " libcxx-native compiler-rt-native" cmake_do_generate_toolchain_file:append:toolchain-clang () { cat >> ${WORKDIR}/toolchain.cmake < Date: Wed, 4 Aug 2021 20:48:55 -0700 Subject: [PATCH 064/166] clang.bbclass: Convert libc-klibc override to new syntax Signed-off-by: Khem Raj (cherry picked from commit 5b30d620ba40f6d4176adf668139404b97003daa) --- classes/clang.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index d3b585b1..b9d045c9 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -16,7 +16,7 @@ COMPILER_RT ??= "" COMPILER_RT:class-native = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT:powerpc = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT:armeb = "-rtlib=libgcc ${UNWINDLIB}" -COMPILER_RT_libc-klibc = "-rtlib=libgcc ${UNWINDLIB}" +COMPILER_RT:libc-klibc = "-rtlib=libgcc ${UNWINDLIB}" UNWINDLIB ??= "" UNWINDLIB:class-native = "--unwindlib=libgcc" From 7707e3a7750f45594948f76fd5a3330701f84972 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 4 Aug 2021 21:01:24 -0700 Subject: [PATCH 065/166] nonclangable.conf: Convert remaining overrides to new syntax Signed-off-by: Khem Raj (cherry picked from commit d2a30f0fd7377c1e19c778dc6b82dca4fa21c0d4) --- conf/nonclangable.conf | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index d579d85d..71ac3b02 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -51,8 +51,8 @@ TOOLCHAIN:pn-libssp-nonshared = "gcc" TOOLCHAIN:pn-libstd-rs = "gcc" TOOLCHAIN:pn-m4:powerpc = "gcc" # clang does not have 64bit atomics on mips32 -#TOOLCHAIN_pn-mesa:mips = "gcc" -#TOOLCHAIN_pn-mesa:mipsel = "gcc" +#TOOLCHAIN:pn-mesa:mips = "gcc" +#TOOLCHAIN:pn-mesa:mipsel = "gcc" TOOLCHAIN:pn-mesa:riscv64 = "gcc" TOOLCHAIN:pn-mesa:powerpc = "gcc" # variant-impl.hpp:309:36: error: 'is_variant' does not name a template but is followed by template arguments @@ -164,7 +164,7 @@ CFLAGS:append:pn-mdadm:toolchain-clang = " -Wno-error=unknown-warning-option" #:9:2: note: instantiated into assembly here # .force_thumb # ^ -#CFLAGS_append_pn-db:toolchain-clang = " -no-integrated-as" +#CFLAGS:append:pn-db:toolchain-clang = " -no-integrated-as" # #| ../../../DirectFB-1.7.7/lib/direct/armasm_memcpy.S:63:2: error: invalid instruction #| ldmgeia r1!, {r3, r4, r12, lr} @@ -253,15 +253,15 @@ TUNE_CCARGS:remove:pn-pulseaudio:toolchain-clang = "-Qunused-arguments" #| /usr/src/debug/ruby/2.5.1-r0/build/../ruby-2.5.1/process.c:7073: undefined reference to `__mulodi4' #| clang-7: error: linker command failed with exit code 1 (use -v to see invocation) -COMPILER_RT:pn-ruby:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT:pn-python3:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT:pn-m4:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT:pn-cpio:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT:pn-openssh:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT:pn-webkitgtk:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT:pn-wpewebkit:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT:pn-python3-numpy:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" -COMPILER_RT:pn-mongodb:toolchain-clang_runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-ruby:toolchain-clang:runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-python3:toolchain-clang:runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-m4:toolchain-clang:runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-cpio:toolchain-clang:runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-openssh:toolchain-clang:runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-webkitgtk:toolchain-clang:runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-wpewebkit:toolchain-clang:runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-python3-numpy:toolchain-clang:runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" +COMPILER_RT:pn-mongodb:toolchain-clang:runtime-gnu = "-rtlib=compiler-rt ${UNWINDLIB}" COMPILER_RT:remove:pn-m4:powerpc = "-rtlib=compiler-rt" COMPILER_RT:remove:pn-ruby:powerpc = "-rtlib=compiler-rt" COMPILER_RT:remove:pn-webkitgtk:powerpc = "-rtlib=compiler-rt" @@ -275,7 +275,7 @@ COMPILER_RT:pn-qtbase:toolchain-clang:riscv32 = "-rtlib=compiler-rt ${UNWINDLIB} LDFLAGS:append:pn-gnutls:toolchain-clang:riscv64 = " -latomic" LDFLAGS:append:pn-harfbuzz:toolchain-clang:riscv64 = " -latomic" -LDFLAGS:append:pn-qtwebengine:toolchain-clang_runtime-gnu:x86 = " -latomic" +LDFLAGS:append:pn-qtwebengine:toolchain-clang:runtime-gnu:x86 = " -latomic" LDFLAGS:append:pn-qemu:toolchain-clang:x86 = " -latomic" # glibc is built with gcc and hence encodes some libgcc specific builtins which are not found From d15030d58db0544aa22760b2bdb90fbd10edbce7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 4 Aug 2021 21:15:47 -0700 Subject: [PATCH 066/166] jack: Use gcc to build for 32bit arches Latest jack does not build with clang-13 for 32bit arches | In file included from ../git/common/JackFreewheelDriver.cpp:23: | ../git/common/JackEngineControl.h:67:5: error: requested alignment is less than minimum alignment of 8 for type 'Jack::JackTransportEngine' | alignas(UInt32) JackTransportEngine fTransport; | ^ | ../git/common/JackEngineControl.h:89:5: error: requested alignment is less than minimum alignment of 8 for type 'Jack::JackFrameTimer' | alignas(UInt32) JackFrameTimer fFrameTimer; | ^ | 2 errors generated. Signed-off-by: Khem Raj (cherry picked from commit e4978cc3ef008c69a49295dc8bc997b8291f6b11) --- conf/nonclangable.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index 71ac3b02..749bcc39 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -151,6 +151,12 @@ TOOLCHAIN:pn-libffi:armeb = "gcc" # libatomic to provide these functions, therefore can not compile redis on mips TOOLCHAIN:pn-redis:mips = "gcc" +# latest 32bit arch versions fails to compile with clang 13 +# common/JackEngineControl.h:89:5: error: requested alignment is less than minimum alignment of 8 for type 'Jack::JackFrameTimer' +#| alignas(UInt32) JackFrameTimer fFrameTimer; +#| ^ +TOOLCHAIN:pn-jack = "${@['clang','gcc'][d.getVar('SITEINFO_BITS') != '32']}" + CFLAGS:append:pn-liboil:toolchain-clang:x86-64 = " -fheinous-gnu-extensions " #io_getevents.c:25:141: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions From a312165ab8422726594d7aecc21c4bead7e29738 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 6 Aug 2021 19:51:36 -0700 Subject: [PATCH 067/166] libc-bench: Link with libgcc when using llvm runtime This uses static link and glibc uses libgcc intrinsics which otherwise are undefinded. Glibc is built using gcc + gnu runtime still Signed-off-by: Khem Raj (cherry picked from commit 0516983c48d6aad32a133f73d308125edd146f1c) --- conf/nonclangable.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index 749bcc39..4b444cc9 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -291,6 +291,7 @@ COMPILER_RT:pn-aufs-util:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwin COMPILER_RT:pn-libhugetlbfs:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" COMPILER_RT:pn-tsocks:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" COMPILER_RT:pn-libc-bench:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT:pn-libc-bench:libc-glibc:toolchain-clang:x86-64 = "-rtlib=libgcc --unwindlib=libgcc" COMPILER_RT:pn-mpich:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" COMPILER_RT:pn-aufs-util:libc-glibc:toolchain-clang:x86-64 = "-rtlib=libgcc --unwindlib=libgcc" COMPILER_RT:pn-libhugetlbfs:libc-glibc:toolchain-clang:x86-64 = "-rtlib=libgcc --unwindlib=libgcc" From 7857e6f566e5ea1887cb62ae8905df1d3d04a60c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 6 Aug 2021 20:42:42 -0700 Subject: [PATCH 068/166] clang: Update to latest on 13.x release branch Fix libcxx/locale builds on musl Signed-off-by: Khem Raj (cherry picked from commit f9c73c7cbcce9d7b549fbec5d814a432125c876c) --- recipes-devtools/clang/clang.inc | 2 +- ...l2-to-linker-cmdline-of-xml-is-found.patch | 2 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 8 +-- ...-support-a-new-embedded-linux-target.patch | 2 +- ...lify-cross-compilation.-Don-t-use-na.patch | 6 +-- ...ryInfo-Undefine-libc-functions-if-th.patch | 4 +- ...-llvm-allow-env-override-of-exe-path.patch | 2 +- ...g-driver-Check-sysroot-for-ldso-path.patch | 4 +- ...tools.cpp-Add-lssp_nonshared-on-musl.patch | 4 +- ...does-not-support-128-bit-long-double.patch | 6 +-- ...10-clang-Prepend-trailing-to-sysroot.patch | 4 +- ...e-the-target-sysroot-for-compiler-ru.patch | 8 +-- ...efine-releative-gcc-installation-dir.patch | 4 +- ...ad-and-ldl-along-with-lunwind-for-st.patch | 4 +- ...UTABLE-when-cross-compiling-for-nati.patch | 2 +- ...5-Check-for-atomic-double-intrinsics.patch | 2 +- ...-clang-Enable-SSP-and-PIE-by-default.patch | 10 ++-- ...ler-runtime-library-to-link-step-for.patch | 8 +-- ...-Fix-configure-for-packages-using-fi.patch | 18 +++---- ...ce-dir-location-for-cross-toolchains.patch | 6 +-- .../clang/clang/0020-fix-path-to-libffi.patch | 2 +- ...-dyld-prefix-when-checking-sysroot-f.patch | 4 +- ...-clang-Use-python3-in-python-scripts.patch | 4 +- ...-Yocto-based-GCC-install-search-path.patch | 4 +- ...-Do-not-use-find_library-for-ncurses.patch | 8 +-- ...or-for-adding-OE-distro-vendor-names.patch | 2 +- ...er-rt-Use-mcr-based-barrier-on-armv6.patch | 2 +- ...aults-to-dwarf-5-debug-info-on-Linux.patch | 2 +- ...ot-use-backtrace-APIs-on-non-glibc-l.patch | 2 +- ...iple-for-non-debian-multiarch-linux-.patch | 4 +- ...-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch | 2 +- ...-scudo-standalone-with-libatomic-on-.patch | 2 +- ...libunwind-Added-unw_backtrace-method.patch | 2 +- ...se-uintptr_t-instead-of-_Unwind_Word.patch | 2 +- ...rt-Do-not-force-thumb-mode-directive.patch | 4 +- ...uffix-from-various-version-variables.patch | 51 +++++++++++-------- ...ot-use-install-relative-libc-headers.patch | 32 ++++++++++++ recipes-devtools/clang/common.inc | 3 +- 38 files changed, 141 insertions(+), 97 deletions(-) create mode 100644 recipes-devtools/clang/clang/0036-clang-Do-not-use-install-relative-libc-headers.patch diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 45181a92..129ff43c 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "6eaf46beb4628abf8f5b09a333bcd44d2fb2aff9" +SRCREV ?= "6789c4564a4b33049cb1335d9b8078057af2dc11" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" diff --git a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch index c0596030..54929834 100644 --- a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch +++ b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch @@ -1,4 +1,4 @@ -From 178532a3c0a68bb321eca567e203db33440c460a Mon Sep 17 00:00:00 2001 +From 21550a2d3cc2cde8ab66eacb9a8ba58205e8d22c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 22 May 2017 17:36:16 -0700 Subject: [PATCH] lldb: Add -lxml2 to linker cmdline of xml is found diff --git a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch index 9c9f156a..221952e4 100644 --- a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch +++ b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch @@ -1,4 +1,4 @@ -From bef9616b881669fa9b67788ff86f036cb40e5c13 Mon Sep 17 00:00:00 2001 +From aaaa693524e39f5d2b742ff077e085fbd0e5ab4f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 27 Aug 2017 10:37:49 -0700 Subject: [PATCH] libcxxabi: Find libunwind headers when @@ -17,10 +17,10 @@ Signed-off-by: Khem Raj 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index 9bd81075dd14..6a9ba8ec635d 100644 +index 9fb35860d483..971629d81dbe 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt -@@ -511,14 +511,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") +@@ -510,14 +510,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") # Setup Source Code #=============================================================================== @@ -36,7 +36,7 @@ index 9bd81075dd14..6a9ba8ec635d 100644 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} ${LIBCXXABI_LIBUNWIND_PATH}/include ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES} -@@ -529,15 +524,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) +@@ -528,15 +523,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) NO_CMAKE_FIND_ROOT_PATH ) diff --git a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch index b99bb473..f29a6fbc 100644 --- a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch +++ b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch @@ -1,4 +1,4 @@ -From 9e608a5afeffb4ffe01791daf92e6d78bedd9c81 Mon Sep 17 00:00:00 2001 +From 1bbf35da15f5a3cae13b2dfe14ac3e86a0e10524 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/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch index b982e88d..303c7074 100644 --- a/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch +++ b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch @@ -1,4 +1,4 @@ -From 109ad829390ef0eb54bd38cebd4f541b3fc02672 Mon Sep 17 00:00:00 2001 +From 814f8efe5eb563ae8ea65a197ccd25e090e8dccf 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 @@ -20,10 +20,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 f5b07cee45c4..d7ac04f1648b 100644 +index e12d1eb1cebf..522a3a6a421c 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt -@@ -74,7 +74,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOL +@@ -78,7 +78,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOL "Build for a bare-metal target.") if (COMPILER_RT_STANDALONE_BUILD) diff --git a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index 33d590fa..8156f98c 100644 --- a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch @@ -1,4 +1,4 @@ -From 70009eade931cc3ed7a93bdd8df57f7b9f10c9fc Mon Sep 17 00:00:00 2001 +From d4c741812da36bf80caf294485cbb89e0ff4e656 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 @@ -13,7 +13,7 @@ Signed-off-by: Khem Raj 1 file changed, 21 insertions(+) diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def -index 66fe96419549..fff073360d50 100644 +index ded53617b304..da612e9b4352 100644 --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def +++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def @@ -815,6 +815,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") diff --git a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch index 9eea146c..f5a2e2a2 100644 --- a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From 07d1cbe94f0841ab55a80ee602be790e9acaedab Mon Sep 17 00:00:00 2001 +From bda8d7c1853f418f350bb33b2d7dd77b2bd6978b 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 path diff --git a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch index 33ce5f9f..9ec8cf3c 100644 --- a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch +++ b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch @@ -1,4 +1,4 @@ -From 2bfe2ac2e914bf1447d0b2dbf8a4fd504e24c5ec Mon Sep 17 00:00:00 2001 +From 343bc6290910a3dd468116d8f08eb6596193011c 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 @@ -14,7 +14,7 @@ Signed-off-by: Khem Raj 1 file changed, 16 insertions(+) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 886e0b35ece8..5f40847f77a3 100644 +index c9360fc67165..4b1d6bff7231 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp @@ -476,11 +476,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { diff --git a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index 98577b89..cb252c88 100644 --- a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch +++ b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch @@ -1,4 +1,4 @@ -From ce6295ac3e6e39cd683f5fc0862e1428cc8920d9 Mon Sep 17 00:00:00 2001 +From f4f6b66d6504a8b24d1ee40454af41312556da34 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 @@ -13,7 +13,7 @@ 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 bd5f9c744bba..2208e3db3f40 100644 +index da39f29e4619..9103b153d461 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -630,6 +630,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, diff --git a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch index 882c68a6..7c923dbb 100644 --- a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch @@ -1,4 +1,4 @@ -From 8ab487d8060bfbe02baf2a201d49fd618f41fe27 Mon Sep 17 00:00:00 2001 +From 7268d68a37b65365a5e864c774004c18fc314a78 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 02:00:11 -0700 Subject: [PATCH] clang: musl/ppc does not support 128-bit long double @@ -9,10 +9,10 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+) diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h -index 554f2174fee0..18bcfd173ede 100644 +index 7c14a4eb9410..b182ef53348f 100644 --- a/clang/lib/Basic/Targets/PPC.h +++ b/clang/lib/Basic/Targets/PPC.h -@@ -389,6 +389,10 @@ public: +@@ -392,6 +392,10 @@ public: LongDoubleFormat = &llvm::APFloat::IEEEdouble(); } diff --git a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch index 0f2b20dc..fea39d56 100644 --- a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From 3a0d8a37332bda82c6343917abdf61594bff2096 Mon Sep 17 00:00:00 2001 +From 5cf7c803df7ca4fafe546a7c66c2956a443d1245 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 @@ -24,7 +24,7 @@ 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 5f40847f77a3..50cd166231c9 100644 +index 4b1d6bff7231..9daf35aefc4e 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp @@ -181,7 +181,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) diff --git a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index 834599d8..d8c94ec4 100644 --- a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From e56e18b218b28d8e2559bbb6dd30d583ad292b6a Mon Sep 17 00:00:00 2001 +From 06078eb841ff9201903475ff25ac7c8ca50257ec 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 @@ -15,10 +15,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 5791805a6711..ccd65daa055c 100644 +index 6c1b88141c45..ee6a257a6cb4 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp -@@ -14,6 +14,7 @@ +@@ -13,6 +13,7 @@ #include "ToolChains/Flang.h" #include "clang/Basic/ObjCRuntime.h" #include "clang/Basic/Sanitizers.h" @@ -26,7 +26,7 @@ index 5791805a6711..ccd65daa055c 100644 #include "clang/Config/config.h" #include "clang/Driver/Action.h" #include "clang/Driver/Driver.h" -@@ -407,7 +408,10 @@ StringRef ToolChain::getOSLibName() const { +@@ -410,7 +411,10 @@ StringRef ToolChain::getOSLibName() const { } std::string ToolChain::getCompilerRTPath() const { diff --git a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch index 759df80c..b4233c71 100644 --- a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch @@ -1,4 +1,4 @@ -From 98cd2a87a8018e93d91635eef5cb3d60db125973 Mon Sep 17 00:00:00 2001 +From 71efce5c969be5ccc88b6355972e34e5ea7017d3 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 @@ -14,7 +14,7 @@ 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 2208e3db3f40..813f693db2b5 100644 +index 9103b153d461..4f12262bbf47 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2529,19 +2529,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( diff --git a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index 23659e49..eda9e5f5 100644 --- a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From 227795b6fe097af4ce2f191acc362633fc05115c Mon Sep 17 00:00:00 2001 +From 91c00f0141a5f616293f36b7b812fda2c1535518 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 @@ -20,7 +20,7 @@ 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 cfda0ff1852c..3fd28a07f19a 100644 +index 83cab3ac00cb..367e8603ff70 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -1449,6 +1449,8 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, diff --git a/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index 30cd9807..f62a70fa 100644 --- a/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From e93653198e1143ffe30ecd22fbb30bd4d2cff37a Mon Sep 17 00:00:00 2001 +From 3135ebc7763fc943ab98a9527821c1fec2437e54 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 diff --git a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch index dca61fb0..ea623594 100644 --- a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From 4d77ad180796d5dca4756366968f0146f16b3d1d Mon Sep 17 00:00:00 2001 +From 3637a56392943de9b3580ff880e3773e132c54cd 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/0016-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch index dda78a58..b7f07033 100644 --- a/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch +++ b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch @@ -1,4 +1,4 @@ -From 9c4e9d50d952f3282718846bb87067bf0352fd90 Mon Sep 17 00:00:00 2001 +From d1badac1289907fb193477c96c073a964bae71dd Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Thu, 26 Dec 2019 15:46:19 -0800 Subject: [PATCH] clang: Enable SSP and PIE by default @@ -37,7 +37,7 @@ Signed-off-by: Khem Raj 13 files changed, 42 insertions(+), 30 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 50cd166231c9..af1f7a6e5c48 100644 +index 9daf35aefc4e..8c6102f47192 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp @@ -668,8 +668,14 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs, @@ -134,10 +134,10 @@ index e9b86cbcf428..47f304c0420d 100644 // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/10.2.0/../../../../i386-unknown-linux/lib" // CHECK-LD-32: "-L[[SYSROOT]]/lib" diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c -index baa37b5fd79d..a6aeb09f6cd8 100644 +index b7d61abe7ec5..461b69b0ac15 100644 --- a/clang/test/Driver/fsanitize.c +++ b/clang/test/Driver/fsanitize.c -@@ -330,15 +330,15 @@ +@@ -344,15 +344,15 @@ // RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fno-sanitize=vptr -fsanitize=undefined,address %s -### 2>&1 // OK @@ -157,7 +157,7 @@ index baa37b5fd79d..a6aeb09f6cd8 100644 // CHECK-NO-PIE-NOT: "-pie" // CHECK-NO-PIE: "-mrelocation-model" "static" -@@ -673,12 +673,12 @@ +@@ -687,12 +687,12 @@ // RUN: %clang -fno-sanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NOSP // NOSP-NOT: "-fsanitize=safe-stack" diff --git a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index abe7a0db..d13649d3 100644 --- a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -1,4 +1,4 @@ -From a53559aff7c59b120377bca6a2ecd8ced5e3ae22 Mon Sep 17 00:00:00 2001 +From 0bc6d20c623b55ce93b64942c96422433ca2741a 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 87b71f7ba334..412374e8820e 100644 +index 496429f3841e..99ca892533b1 100644 --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt -@@ -189,7 +189,7 @@ split_list(LIBCXX_LINK_FLAGS) +@@ -194,7 +194,7 @@ split_list(LIBCXX_LINK_FLAGS) if (LIBCXX_ENABLE_SHARED) add_library(cxx_shared SHARED ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS}) target_link_libraries(cxx_shared PUBLIC cxx-headers @@ -26,7 +26,7 @@ index 87b71f7ba334..412374e8820e 100644 set_target_properties(cxx_shared PROPERTIES COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}" -@@ -266,7 +266,7 @@ set(CMAKE_STATIC_LIBRARY_PREFIX "lib") +@@ -272,7 +272,7 @@ set(CMAKE_STATIC_LIBRARY_PREFIX "lib") if (LIBCXX_ENABLE_STATIC) add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS}) target_link_libraries(cxx_static PUBLIC cxx-headers diff --git a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index 6223fda7..c6f16c8c 100644 --- a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -1,4 +1,4 @@ -From 517fd1ccf607e843eb87466e595a312eff302dd2 Mon Sep 17 00:00:00 2001 +From 0888ddfdc7d6c07ebc9edd74207066718fff2f7b 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 5752f4277444..f40ea35faf46 100644 endmacro() diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index 7e91b77adcab..6b46f03f0e2c 100644 +index 3e009f5061d3..1d40ad3e7ecc 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -1229,7 +1229,6 @@ macro(add_llvm_tool name) +@@ -1232,7 +1232,6 @@ macro(add_llvm_tool name) if( LLVM_BUILD_TOOLS ) get_target_export_arg(${name} LLVM export_to_llvmexports) install(TARGETS ${name} @@ -63,7 +63,7 @@ index 7e91b77adcab..6b46f03f0e2c 100644 RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR} COMPONENT ${name}) -@@ -1240,9 +1239,6 @@ macro(add_llvm_tool name) +@@ -1243,9 +1242,6 @@ macro(add_llvm_tool name) endif() endif() endif() @@ -73,7 +73,7 @@ index 7e91b77adcab..6b46f03f0e2c 100644 set_target_properties(${name} PROPERTIES FOLDER "Tools") endmacro(add_llvm_tool name) -@@ -1282,7 +1278,6 @@ macro(add_llvm_utility name) +@@ -1285,7 +1281,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 7e91b77adcab..6b46f03f0e2c 100644 RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} COMPONENT ${name}) -@@ -1291,7 +1286,6 @@ macro(add_llvm_utility name) +@@ -1294,7 +1289,6 @@ macro(add_llvm_utility name) DEPENDS ${name} COMPONENT ${name}) endif() @@ -90,10 +90,10 @@ index 7e91b77adcab..6b46f03f0e2c 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 5f07acc1f692..47fe887e083b 100644 +index 5e9e2674405e..3c72df35b308 100644 --- a/llvm/cmake/modules/TableGen.cmake +++ b/llvm/cmake/modules/TableGen.cmake -@@ -177,14 +177,8 @@ macro(add_tablegen target project) +@@ -179,14 +179,8 @@ macro(add_tablegen target project) endif() if ((${project} STREQUAL LLVM OR ${project} STREQUAL MLIR) AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS) @@ -108,7 +108,7 @@ index 5f07acc1f692..47fe887e083b 100644 COMPONENT ${target} RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}) if(NOT LLVM_ENABLE_IDE) -@@ -193,5 +187,4 @@ macro(add_tablegen target project) +@@ -195,5 +189,4 @@ macro(add_tablegen target project) COMPONENT ${target}) endif() endif() diff --git a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch index f2144eb3..9cdffd7e 100644 --- a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From 3ffe72a7a7edff730564dbd35460dc84619aaf1d Mon Sep 17 00:00:00 2001 +From 4df8cd257a064ced4ef3eb6d8316ba72508877e0 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 @@ -19,10 +19,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 6ea6e2e47e63..4a5c73999677 100644 +index 5c323cb6ea23..c3ae820c06ab 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp -@@ -121,7 +121,13 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath, +@@ -122,7 +122,13 @@ 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/0020-fix-path-to-libffi.patch b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch index 5f9c8066..9a0447f2 100644 --- a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch +++ b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch @@ -1,4 +1,4 @@ -From abfe886026fdd4c6bf9123fc6fac441277dc360b Mon Sep 17 00:00:00 2001 +From afe79daee4ff0e8b09e6b9892db997ae81db9d52 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Fri, 3 Apr 2020 15:10:37 +0800 Subject: [PATCH] fix path to libffi diff --git a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index 82165ef3..c98d9810 100644 --- a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From e0bae776f771953f8fcf42104379b27de771fa30 Mon Sep 17 00:00:00 2001 +From 289ea0614e9e1febca27761c7e189bd9a4fa144d 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 @@ -18,7 +18,7 @@ Signed-off-by: Khem Raj 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index af1f7a6e5c48..0b3bbdeab5f3 100644 +index 8c6102f47192..4b39c2bdf14d 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp @@ -476,8 +476,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { diff --git a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch index c548c05f..01c8336b 100644 --- a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From 2231e5c5715a97cdc3711a5052e53fd055f16f12 Mon Sep 17 00:00:00 2001 +From ab7a9baf7df82b79d7239bb188a5c814f3083210 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 @@ -60,7 +60,7 @@ index 6bd05531333b..9e134123ef44 100755 #===- clang-tidy-diff.py - ClangTidy Diff Checker -----------*- python -*--===# # diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -index de810230b285..200b7c6eb652 100755 +index acd1ed6979c0..12bd7f9c7dc3 100755 --- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py +++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py @@ -1,4 +1,4 @@ diff --git a/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index c0677677..57285ff2 100644 --- a/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From 62d734153b18afd919a31f070059ea0a3db669fb Mon Sep 17 00:00:00 2001 +From f4ebbd98b3fb1cb6def64ede8ccc4861c7e91b9e 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,7 +57,7 @@ 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 813f693db2b5..60297dcddf44 100644 +index 4f12262bbf47..9750c42e1f56 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2111,6 +2111,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( diff --git a/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch index 09382f62..f2050875 100644 --- a/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch +++ b/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch @@ -1,4 +1,4 @@ -From 45322a3c5e8948ff4d88f49857489fb35fad9959 Mon Sep 17 00:00:00 2001 +From 9511c156c10538e702bedb06b711ee419d2a530d 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 @@ -17,7 +17,7 @@ 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 39e0a4b662c7..a186ac60986d 100644 +index 6f13acfa2757..0f269835fd17 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -140,7 +140,7 @@ else() @@ -30,10 +30,10 @@ index 39e0a4b662c7..a186ac60986d 100644 if(COMPILER_RT_TERMINFO_LIB) set(LLVM_ENABLE_TERMINFO 1) diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake -index d4cbf37d19a2..a320cf97b306 100644 +index dd0aaadb47c7..66a50cf01230 100644 --- a/llvm/cmake/config-ix.cmake +++ b/llvm/cmake/config-ix.cmake -@@ -175,7 +175,7 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") +@@ -176,7 +176,7 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") set(MAYBE_REQUIRED) endif() if(LLVM_ENABLE_TERMINFO) diff --git a/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index 2a2970fc..c3c5acc3 100644 --- a/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From 27aa73bbffbddeef618e9c33b95b2690b8c5ba54 Mon Sep 17 00:00:00 2001 +From e2362f6dc9e3756fa0fc3582c0b981184bc2298b 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 diff --git a/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index f4b8ea59..885c6341 100644 --- a/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From 2ee84e75df8aa0d7d217d7a32076228d5d0db146 Mon Sep 17 00:00:00 2001 +From 60c000d2bd8045f818359983b45996db1dbcccac Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 diff --git a/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch b/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch index f6d225d5..e4f57951 100644 --- a/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch +++ b/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch @@ -1,4 +1,4 @@ -From ee8087a34236d81e3b7630c33777120d1a6f2fbe Mon Sep 17 00:00:00 2001 +From be5c0fb50de4cd165c90d6d6749b8e64f80547d3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 15 Apr 2021 18:58:07 -0700 Subject: [PATCH] clang: Switch defaults to dwarf-5 debug info on Linux diff --git a/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index e0aec9f3..2ea06618 100644 --- a/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From ec2f3fbb247b72a9ba2cf823b6627133f6e318f5 Mon Sep 17 00:00:00 2001 +From ec9a1d4a64af51a69b770ed2bb229a755178fe18 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/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index 3e2b6baf..9b244049 100644 --- a/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From 195b51e0f6b5f776e6f4887e03a5a6b83b9a7158 Mon Sep 17 00:00:00 2001 +From e31cbc938bd97095a114c8f179b4fa8719c13da4 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 @@ -12,7 +12,7 @@ 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 0b3bbdeab5f3..b73644df5641 100644 +index 4b39c2bdf14d..46c83b002e6c 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp @@ -619,6 +619,9 @@ void Linux::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, diff --git a/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index 755adedd..1e153114 100644 --- a/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From e80aae1ea22262da904487229f170caee9f02247 Mon Sep 17 00:00:00 2001 +From fa07ed6fe456700579ddbb1bbb61ecbbf22ce872 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES diff --git a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index f99b076e..ba0ad51c 100644 --- a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From ba6410dbdf4440b2ce79f52e6adbeecf2a81336b Mon Sep 17 00:00:00 2001 +From fa42cb05e193173acec7cbcefd77419c90dd1161 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips diff --git a/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch index 4b6396c3..99e45c41 100644 --- a/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From efa3ae538a895376840647ccd8fb06f30d06ff80 Mon Sep 17 00:00:00 2001 +From 791297b55b977423fb2a30b8380d5678c5969095 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 23 May 2021 10:27:29 +0000 Subject: [PATCH] libunwind: Added unw_backtrace method diff --git a/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch b/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch index 2dc17894..61abcd0b 100644 --- a/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch +++ b/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch @@ -1,4 +1,4 @@ -From 7f5d4498bcb68924c27680c93bf12c3fea022664 Mon Sep 17 00:00:00 2001 +From 716d03efa9f7ac77bab5e6c5f62163a328dab393 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 29 May 2021 13:42:25 -0700 Subject: [PATCH] compiler-rt: Use uintptr_t instead of _Unwind_Word diff --git a/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch b/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch index 7f3b9e46..9dfea83d 100644 --- a/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch +++ b/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch @@ -1,7 +1,7 @@ -From 5acbaaaec447b9083328cef452b4d7d1c542985d Mon Sep 17 00:00:00 2001 +From 971ac96cbedb42f318f86c6b6baccf58b4a03740 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Jun 2021 08:42:36 -0700 -Subject: [PATCH] [compiler-rt] Do not force thumb mode directive +Subject: [PATCH] compiler-rt: Do not force thumb mode directive .thumb_func was not switching mode until [1] so it did not show up but now that .thumb_func (without argument) is diff --git a/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch b/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch index 3ef66d4a..ab071167 100644 --- a/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch +++ b/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch @@ -1,4 +1,4 @@ -From ae81bf58c31d5c93190c3dd85a4100b86055193a Mon Sep 17 00:00:00 2001 +From 400407d9877e4e0408fbf113c6ba7786c341e615 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Wed, 23 Jun 2021 16:25:06 +0800 Subject: [PATCH] Drop the 'git' suffix from various version variables @@ -8,18 +8,18 @@ Upstream-Status: Backport [cherry-picked from branch 12.0.0] Signed-off-by: Changqing Li Signed-off-by: Khem Raj --- - libcxx/CMakeLists.txt | 2 +- - libcxxabi/CMakeLists.txt | 2 +- - libunwind/CMakeLists.txt | 2 +- - llvm/CMakeLists.txt | 2 +- - .../llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) + libcxx/CMakeLists.txt | 2 +- + libcxxabi/CMakeLists.txt | 2 +- + libunwind/CMakeLists.txt | 2 +- + llvm/CMakeLists.txt | 6 +++--- + .../llvm/include/llvm/Config/llvm-config.h | 2 +- + 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt -index 06ee1d74a03e..1ead84c19fcb 100644 +index b1e25358d41a..0048f3284ac2 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt -@@ -29,7 +29,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUIL +@@ -27,7 +27,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUIL project(libcxx CXX C) set(PACKAGE_NAME libcxx) @@ -29,7 +29,7 @@ index 06ee1d74a03e..1ead84c19fcb 100644 set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index 6a9ba8ec635d..dcd7b8765de3 100644 +index 971629d81dbe..a3e25d8e67ca 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -28,7 +28,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_B @@ -42,7 +42,7 @@ index 6a9ba8ec635d..dcd7b8765de3 100644 set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt -index a2c03fd3f8aa..82424253c8da 100644 +index 81eddbc24879..8b6811ac648e 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -24,7 +24,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_B @@ -55,18 +55,29 @@ index a2c03fd3f8aa..82424253c8da 100644 set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt -index 5d3ad7a4fd58..796b47a3d554 100644 +index 99773a5ee546..4822fc7edd8f 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt -@@ -20,7 +20,7 @@ if(NOT DEFINED LLVM_VERSION_PATCH) - set(LLVM_VERSION_PATCH 0) +@@ -795,8 +795,8 @@ if (TENSORFLOW_C_LIB_PATH) + include_directories(${TENSORFLOW_C_LIB_PATH}/include) + if (NOT TF_PROTO_HEADERS) + message(STATUS "TF_PROTO_HEADERS not defined. Looking for tensorflow pip package.") +- execute_process(COMMAND +- ${Python3_EXECUTABLE} "-m" "pip" "show" "tensorflow" ++ execute_process(COMMAND ++ ${Python3_EXECUTABLE} "-m" "pip" "show" "tensorflow" + OUTPUT_VARIABLE TF_PIP_OUT) + if ("${TF_PIP_OUT}" STREQUAL "") + message(FATAL ERROR "Tensorflow pip package is also required for 'development' mode (protobuf headers)") +@@ -828,7 +828,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "") + include_directories(${TENSORFLOW_AOT_PATH}/include) + add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src + ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime) +- install(TARGETS tf_xla_runtime EXPORT LLVMExports ++ install(TARGETS tf_xla_runtime EXPORT LLVMExports + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime) + set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime) endif() - if(NOT DEFINED LLVM_VERSION_SUFFIX) -- set(LLVM_VERSION_SUFFIX git) -+ set(LLVM_VERSION_SUFFIX "") - endif() - - if (NOT PACKAGE_VERSION) diff --git a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h index ba85df023ae6..f19c22ad13c0 100644 --- a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h diff --git a/recipes-devtools/clang/clang/0036-clang-Do-not-use-install-relative-libc-headers.patch b/recipes-devtools/clang/clang/0036-clang-Do-not-use-install-relative-libc-headers.patch new file mode 100644 index 00000000..87cf1694 --- /dev/null +++ b/recipes-devtools/clang/clang/0036-clang-Do-not-use-install-relative-libc-headers.patch @@ -0,0 +1,32 @@ +From a812e507582ff1ef74c2ceee9ba4943b21a72948 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 + +In OE we use same clang for native and cross builds, therefore we need +to ensure that native sysroot install of libc++ is not searched for +headers when doing cross compile instead it searches the target sysroot +this is especially troublesome when libcxx-native is staged along with +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(-) + +diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp +index 9750c42e1f56..553cb985737f 100644 +--- a/clang/lib/Driver/ToolChains/Gnu.cpp ++++ b/clang/lib/Driver/ToolChains/Gnu.cpp +@@ -2928,7 +2928,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; + // If this is a development, non-installed, clang, libcxx will diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index ed954994..1a018091 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -45,9 +45,10 @@ SRC_URI = "\ file://0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch \ file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ file://0035-Drop-the-git-suffix-from-various-version-variables.patch \ + file://0036-clang-Do-not-use-install-relative-libc-headers.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ -" + " # Fallback to no-PIE if not set GCCPIE ??= "" From 4d6dad266480451737ce10c0b2a8627a493405f7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 Aug 2021 09:38:01 -0700 Subject: [PATCH 069/166] clang/compiler-rt: Convert to new override syntax Signed-off-by: Khem Raj (cherry picked from commit 45a3707291a4e8bd2469b0d2bb9cf9e07878ae08) --- recipes-devtools/clang/clang_git.bb | 2 +- recipes-devtools/clang/compiler-rt-sanitizers_git.bb | 2 +- recipes-devtools/clang/compiler-rt_git.bb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 6642af61..d0f7c48b 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -295,7 +295,7 @@ FILES:${PN}:remove = "${libdir}/${BPN}/*" INSANE_SKIP:${PN} += "already-stripped" -#INSANE_SKIP_${PN}-dev += "dev-elf" +#INSANE_SKIP:${PN}-dev += "dev-elf" INSANE_SKIP:${PN}-lldb-python += "dev-so dev-deps" INSANE_SKIP:liblldb = "dev-so" diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb index 42005df6..18ec31d8 100644 --- a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb @@ -76,7 +76,7 @@ FILES:${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER} INSANE_SKIP:${PN} = "dev-so libdir" INSANE_SKIP:${PN}-dbg = "libdir" -#PROVIDES_append_class-target = "\ +#PROVIDES:append:class-target = "\ # virtual/${TARGET_PREFIX}compilerlibs \ # libgcc \ # libgcc-initial \ diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index cdb571dd..55b33784 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb @@ -96,7 +96,7 @@ FILES:${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER} INSANE_SKIP:${PN} = "dev-so libdir" INSANE_SKIP:${PN}-dbg = "libdir" -#PROVIDES_append_class-target = "\ +#PROVIDES:append:class-target = "\ # virtual/${TARGET_PREFIX}compilerlibs \ # libgcc \ # libgcc-initial \ From fa309b3d0d5998ae0c6cfa9cce8ded2b9c461d66 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 16 Aug 2021 09:20:14 -0700 Subject: [PATCH 070/166] clang: Update to latest on 13.x Signed-off-by: Khem Raj (cherry picked from commit ccd1a48d2719a88c64caa065c9ea689076710b43) --- recipes-devtools/clang/clang.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 129ff43c..85f7c1ad 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "6789c4564a4b33049cb1335d9b8078057af2dc11" +SRCREV ?= "dcdb12496c24a02874dc060efac68adf178284cc" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" From ae452b907fae7ccc2616f4e50f09971852ae3cc4 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 18 Aug 2021 14:50:24 -0700 Subject: [PATCH 071/166] mpich: Use gcc runtime with clang for x86/x86_64 It needs symbols like __multf3 which are not in compiler-rt Signed-off-by: Khem Raj (cherry picked from commit 8f0c09e191340358319889b6f54af5227de3e9ec) --- conf/nonclangable.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index 4b444cc9..60d48410 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -292,7 +292,8 @@ COMPILER_RT:pn-libhugetlbfs:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --un COMPILER_RT:pn-tsocks:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" COMPILER_RT:pn-libc-bench:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" COMPILER_RT:pn-libc-bench:libc-glibc:toolchain-clang:x86-64 = "-rtlib=libgcc --unwindlib=libgcc" -COMPILER_RT:pn-mpich:libc-glibc:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT:pn-mpich:toolchain-clang:x86 = "-rtlib=libgcc --unwindlib=libgcc" +COMPILER_RT:pn-mpich:toolchain-clang:x86-64 = "-rtlib=libgcc --unwindlib=libgcc" COMPILER_RT:pn-aufs-util:libc-glibc:toolchain-clang:x86-64 = "-rtlib=libgcc --unwindlib=libgcc" COMPILER_RT:pn-libhugetlbfs:libc-glibc:toolchain-clang:x86-64 = "-rtlib=libgcc --unwindlib=libgcc" COMPILER_RT:pn-tsocks:libc-glibc:toolchain-clang:x86-64 = "-rtlib=libgcc --unwindlib=libgcc" From 2d983df1b13ed248b3d29fc1a075f3240e9f282a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 26 Aug 2021 12:34:02 -0700 Subject: [PATCH 072/166] clang: Update towards 13.x RC2 Revert a patch in openmp which added opt dependency, which fails to find opt when ding standalone builds see https://reviews.llvm.org/D107156 Changes in this bump * 34ff6a75f583 [docs] Update release notes for OpenMP 5.1 loop transformations. * 34300c3c00f5 [libc++] Fix incorrect bypassing of * 198edf09f58e [libc++] XFAIL align.pass.cpp for PowerPC LE * 4094728a8147 [libc++abi] Apply simplify scan_eh_tab to SjLj * 4e692c97a8c1 [LoopIdiom] Don't transform loop into memmove when load from body has more than one use * c22eb9a4a5dd [NFC][LoopIdiom] Add reproducer of wrong memmove transformation * d069343fa526 Revert "[RISCV] Fix reporting of incorrect commutable operand indices" * 1828e57eb586 ThinLTO: Fix inline assembly references to static functions with CFI * 7161e4f3345f [clang-tidy] Hotfix default parameter value in 'bugprone-easily-swappable-parameters' * a7933290f72a [RISCV] Fix reporting of incorrect commutable operand indices * c9afa3a749f0 [Coverage][llvm-cov] Correctly export branch coverage in LCOV format * e8ce80e31d93 [profile] Don't use pragma comment linker on mingw * 4f857ea56b4f [profile] Add underscore to /alternatename for Win/x86 * d3d9dc586933 [profile] Build with -fms-extensions in MinGW mode * cf035cac186b [scudo][standalone] Link tests against libatomic if libatomic exists * 1f0b043ae709 [libomptarget] Apply D106710 to amdgcn devicertl * ab2d8f074974 [libomptarget][amdcgn] Add build dependency for opt * 3020229e73ec [clang] Replace asm with __asm__ in cuda header * d6944303acfd [openmp] Annotate tmp variables with omp_thread_mem_alloc * 47bbdbecb039 [AMDGPU][OpenMP] Wrap amdgcn declare variant inside ifdef * 573858e9805e [AMDGPU][OpenMP] Use llvm-link to link ocml libraries * 512c57ea97ae [OpenMP][AMDGCN] Initial math headers support * d1923cb0aec2 [AMDGPU][OpenMP] Support linking of math libraries * 7f2f829479dc Revert sharing subprograms across CUs * ae5ed5d23bb1 [libc++] Bypass calling exception-throwing functions in the dylib with -fno-exceptions * 23ba3732246a [libc++][PowerPC] Fix a test case failure when compiled with libcxx * 80878ccb3286 [libc++] Fix XFAIL annotation * 10a4a861837d [lldb] Add tests for TypeSystemMap::GetTypeSystemForLanguage * 535b7fb2201a [lldb] Avoid unhandled Error in TypeSystemMap::GetTypeSystemForLanguage * ddc49d0f1f2b [clang] [MSVC] Implement __mulh and __umulh builtins for aarch64 * 34f839fc9d4c Revert "[clang][fpenv][patch] Change clang option -ffp-model=precise to select ffp-contract=on" * b643ee1b9c1a [AArch64] Fix comparison peephole opt with non-0/1 immediate (PR51476) * 98feb20df14e [profile] Only use NT_GNU_BUILD_ID if supported * fcd5126bfba8 [X86][AVX] Extract SUBV_BROADCAST constant bits from just the lower subvector range (PR51281) * f3e1d94de69d [ARM][atomicrmw] Fix CMP_SWAP_32 expand assert * 15b8be0b832a [libc++] Skip logic for detecting C11 features when using_if_exists is supported * 404024f9adc1 [libc++] Split off tests for aligned_alloc & friends into separate test files * c40c3bfa9a87 [libc++] Convert test-suite workarounds for some C11 features to XFAILs * 0c25e0174861 [Flang] Fix build failure on MacOS * 2e4c11ee3209 [PowerPC] Disable CTR Loop generate for fma with the PPC double double type. * 08dd644d078a ReleaseNotes: add lld/ELF notes * 2153cad11ba2 [DAGCombiner] Stop visitEXTRACT_SUBVECTOR creating illegal BITCASTs post legalisation. * 87d56ad4411d [LLD] [MinGW] Add more options for disabling flags in the executable * b9be17a7ecf9 [clang] fix crash on template instantiation of invalid requires expressions * d86e569e8119 [clang] [hexagon] Add resource include dir * 24d8b6565a2e [Attributor][FIX] Guard constant casts with type size checks * 5b60faae3f10 [InstCombine] avoid infinite loops from min/max canonicalization * f4006c59497d [InstSimplify] fold min/max with limit constant * ba048518e08f [InstSimplify] add tests for min/max idioms; NFC * 0dd4f002e1d3 [OpenMP]Fix PR50336: Remove temporary files in the offload bundler tool * a57d98111e63 [LoopVectorize] Improve vectorisation of some intrinsics by treating them as uniform * 740f08210e5d [NFC] Clean up tests in test/Transforms/LoopVectorize/assume.ll * 1bbe8ef81549 [lld-macho] Fill out release notes for 13.x Signed-off-by: Khem Raj (cherry picked from commit 5187604e18b970e486b88e6f2eba6a454ef4f7ef) --- recipes-devtools/clang/clang.inc | 2 +- ...l2-to-linker-cmdline-of-xml-is-found.patch | 2 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 2 +- ...-support-a-new-embedded-linux-target.patch | 2 +- ...lify-cross-compilation.-Don-t-use-na.patch | 2 +- ...ryInfo-Undefine-libc-functions-if-th.patch | 2 +- ...-llvm-allow-env-override-of-exe-path.patch | 2 +- ...g-driver-Check-sysroot-for-ldso-path.patch | 2 +- ...tools.cpp-Add-lssp_nonshared-on-musl.patch | 2 +- ...does-not-support-128-bit-long-double.patch | 2 +- ...10-clang-Prepend-trailing-to-sysroot.patch | 2 +- ...e-the-target-sysroot-for-compiler-ru.patch | 2 +- ...efine-releative-gcc-installation-dir.patch | 2 +- ...ad-and-ldl-along-with-lunwind-for-st.patch | 2 +- ...UTABLE-when-cross-compiling-for-nati.patch | 2 +- ...5-Check-for-atomic-double-intrinsics.patch | 2 +- ...-clang-Enable-SSP-and-PIE-by-default.patch | 2 +- ...ler-runtime-library-to-link-step-for.patch | 2 +- ...-Fix-configure-for-packages-using-fi.patch | 2 +- ...ce-dir-location-for-cross-toolchains.patch | 2 +- .../clang/clang/0020-fix-path-to-libffi.patch | 2 +- ...-dyld-prefix-when-checking-sysroot-f.patch | 2 +- ...-clang-Use-python3-in-python-scripts.patch | 2 +- ...-Yocto-based-GCC-install-search-path.patch | 2 +- ...-Do-not-use-find_library-for-ncurses.patch | 2 +- ...or-for-adding-OE-distro-vendor-names.patch | 2 +- ...er-rt-Use-mcr-based-barrier-on-armv6.patch | 2 +- ...aults-to-dwarf-5-debug-info-on-Linux.patch | 2 +- ...ot-use-backtrace-APIs-on-non-glibc-l.patch | 2 +- ...iple-for-non-debian-multiarch-linux-.patch | 2 +- ...-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch | 2 +- ...-scudo-standalone-with-libatomic-on-.patch | 2 +- ...libunwind-Added-unw_backtrace-method.patch | 2 +- ...se-uintptr_t-instead-of-_Unwind_Word.patch | 2 +- ...rt-Do-not-force-thumb-mode-directive.patch | 2 +- ...uffix-from-various-version-variables.patch | 8 +++---- ...ot-use-install-relative-libc-headers.patch | 2 +- ...get-amdcgn-Add-build-dependency-for-.patch | 23 +++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 39 files changed, 64 insertions(+), 40 deletions(-) create mode 100644 recipes-devtools/clang/clang/0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 85f7c1ad..2d148d93 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "dcdb12496c24a02874dc060efac68adf178284cc" +SRCREV ?= "34ff6a75f58377f32a5046a29f55c4c0e58bee9e" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" diff --git a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch index 54929834..03cdf137 100644 --- a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch +++ b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch @@ -1,4 +1,4 @@ -From 21550a2d3cc2cde8ab66eacb9a8ba58205e8d22c Mon Sep 17 00:00:00 2001 +From 8b3176b08a055a24ea139573b9811658fe4e753c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 22 May 2017 17:36:16 -0700 Subject: [PATCH] lldb: Add -lxml2 to linker cmdline of xml is found diff --git a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch index 221952e4..1013fa2f 100644 --- a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch +++ b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch @@ -1,4 +1,4 @@ -From aaaa693524e39f5d2b742ff077e085fbd0e5ab4f Mon Sep 17 00:00:00 2001 +From 99f413f6e186984945d2b06887b04719f8b592c5 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 diff --git a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch index f29a6fbc..944effda 100644 --- a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch +++ b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch @@ -1,4 +1,4 @@ -From 1bbf35da15f5a3cae13b2dfe14ac3e86a0e10524 Mon Sep 17 00:00:00 2001 +From bc650811b01223a3414803a681d9cc702e913667 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/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch index 303c7074..d52945df 100644 --- a/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch +++ b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch @@ -1,4 +1,4 @@ -From 814f8efe5eb563ae8ea65a197ccd25e090e8dccf Mon Sep 17 00:00:00 2001 +From efe92b1ce720b6fc28653dcec6f1661cc2e28602 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 diff --git a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index 8156f98c..9dfd5ef1 100644 --- a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch @@ -1,4 +1,4 @@ -From d4c741812da36bf80caf294485cbb89e0ff4e656 Mon Sep 17 00:00:00 2001 +From 41ffac4cc1d19f415c432c273ccaae37c2e09562 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 diff --git a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch index f5a2e2a2..cbedd9c3 100644 --- a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From bda8d7c1853f418f350bb33b2d7dd77b2bd6978b Mon Sep 17 00:00:00 2001 +From 4b513bf033833ebcd1cbd341ea2f8ecda6cdf22f 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 path diff --git a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch index 9ec8cf3c..814ffa7d 100644 --- a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch +++ b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch @@ -1,4 +1,4 @@ -From 343bc6290910a3dd468116d8f08eb6596193011c Mon Sep 17 00:00:00 2001 +From f497114b87d7bcd6977d25435caeb3aee305932c 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 diff --git a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index cb252c88..4f356e52 100644 --- a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch +++ b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch @@ -1,4 +1,4 @@ -From f4f6b66d6504a8b24d1ee40454af41312556da34 Mon Sep 17 00:00:00 2001 +From d46fbb73eb8a9f80e8963a9a5878f8f3ae909b88 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 diff --git a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch index 7c923dbb..eb875fc5 100644 --- a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch @@ -1,4 +1,4 @@ -From 7268d68a37b65365a5e864c774004c18fc314a78 Mon Sep 17 00:00:00 2001 +From 7370800ae29490b222cf35d6c1fb294d1f280be5 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 02:00:11 -0700 Subject: [PATCH] clang: musl/ppc does not support 128-bit long double diff --git a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch index fea39d56..563690f8 100644 --- a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From 5cf7c803df7ca4fafe546a7c66c2956a443d1245 Mon Sep 17 00:00:00 2001 +From 325b576c6429cf0ce727ddae4959d6eb5c1c8c44 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 diff --git a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index d8c94ec4..a1e3ba12 100644 --- a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From 06078eb841ff9201903475ff25ac7c8ca50257ec Mon Sep 17 00:00:00 2001 +From ddd3e53d43af3a935266e801ab872fd9f513afd3 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 diff --git a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch index b4233c71..4467f4ce 100644 --- a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch @@ -1,4 +1,4 @@ -From 71efce5c969be5ccc88b6355972e34e5ea7017d3 Mon Sep 17 00:00:00 2001 +From 40e7f980b21498f2716a50b8833480d3b66d68dd 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 diff --git a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index eda9e5f5..81bf66f0 100644 --- a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From 91c00f0141a5f616293f36b7b812fda2c1535518 Mon Sep 17 00:00:00 2001 +From 1634a9346565ff133cdc74141cfa6c2460ec86a3 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 diff --git a/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index f62a70fa..63551f5c 100644 --- a/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From 3135ebc7763fc943ab98a9527821c1fec2437e54 Mon Sep 17 00:00:00 2001 +From 2dc51ab94f34186bc4010aa4aced1107b7bcf9d0 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 diff --git a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch index ea623594..420d6686 100644 --- a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From 3637a56392943de9b3580ff880e3773e132c54cd Mon Sep 17 00:00:00 2001 +From fcbcc842fb332137484b97247a06c33428f8d9eb 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/0016-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch index b7f07033..d4fe8cb9 100644 --- a/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch +++ b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch @@ -1,4 +1,4 @@ -From d1badac1289907fb193477c96c073a964bae71dd Mon Sep 17 00:00:00 2001 +From 3b9e71add277ac2e23f57e839b486c1b69162a52 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Thu, 26 Dec 2019 15:46:19 -0800 Subject: [PATCH] clang: Enable SSP and PIE by default diff --git a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index d13649d3..1d2d8ea3 100644 --- a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -1,4 +1,4 @@ -From 0bc6d20c623b55ce93b64942c96422433ca2741a Mon Sep 17 00:00:00 2001 +From 8c753b4791fb7f736c06218b059377e680c80c88 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 diff --git a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index c6f16c8c..e1f86d43 100644 --- a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -1,4 +1,4 @@ -From 0888ddfdc7d6c07ebc9edd74207066718fff2f7b Mon Sep 17 00:00:00 2001 +From 9d505591b46e8a0f37713266efe9ee7a5dd66f41 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 diff --git a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch index 9cdffd7e..b91209cc 100644 --- a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From 4df8cd257a064ced4ef3eb6d8316ba72508877e0 Mon Sep 17 00:00:00 2001 +From 2c3bdfd798dbf7de310252d3af93162784affa49 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 diff --git a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch index 9a0447f2..2695e224 100644 --- a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch +++ b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch @@ -1,4 +1,4 @@ -From afe79daee4ff0e8b09e6b9892db997ae81db9d52 Mon Sep 17 00:00:00 2001 +From eda78e4ad137cd8e27f3a22faa22dc43f408e000 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Fri, 3 Apr 2020 15:10:37 +0800 Subject: [PATCH] fix path to libffi diff --git a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index c98d9810..b459b998 100644 --- a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From 289ea0614e9e1febca27761c7e189bd9a4fa144d Mon Sep 17 00:00:00 2001 +From 705f0ac6e987b1c9776012fd933a94b61a25eacd 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 diff --git a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch index 01c8336b..fc9a3e28 100644 --- a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From ab7a9baf7df82b79d7239bb188a5c814f3083210 Mon Sep 17 00:00:00 2001 +From b3aca4fcbef8ee80cda0305f3682ae99fee56495 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/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index 57285ff2..baf33677 100644 --- a/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From f4ebbd98b3fb1cb6def64ede8ccc4861c7e91b9e Mon Sep 17 00:00:00 2001 +From 5d0adaf8fbc52c473134510e1f746468e229e93d 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 diff --git a/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch index f2050875..c34c5223 100644 --- a/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch +++ b/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch @@ -1,4 +1,4 @@ -From 9511c156c10538e702bedb06b711ee419d2a530d Mon Sep 17 00:00:00 2001 +From 46cf43ff4f206adaeeb7022c598bd7a5eef2fd86 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 diff --git a/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index c3c5acc3..8ea914a3 100644 --- a/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From e2362f6dc9e3756fa0fc3582c0b981184bc2298b Mon Sep 17 00:00:00 2001 +From 6eae70b44b9e67160891e4206c80b64ab9779dc1 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 diff --git a/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index 885c6341..8ef564f7 100644 --- a/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From 60c000d2bd8045f818359983b45996db1dbcccac Mon Sep 17 00:00:00 2001 +From f55aaf7648c036e0206da45254ff9698c4c5e12c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 diff --git a/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch b/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch index e4f57951..be85bd35 100644 --- a/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch +++ b/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch @@ -1,4 +1,4 @@ -From be5c0fb50de4cd165c90d6d6749b8e64f80547d3 Mon Sep 17 00:00:00 2001 +From a88d2df9239ae4acd27ae2fa8097e957c9af82c1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 15 Apr 2021 18:58:07 -0700 Subject: [PATCH] clang: Switch defaults to dwarf-5 debug info on Linux diff --git a/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 2ea06618..668cbe92 100644 --- a/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From ec9a1d4a64af51a69b770ed2bb229a755178fe18 Mon Sep 17 00:00:00 2001 +From 98477da239c066b9630b969c66b6468bbc35a980 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/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index 9b244049..0cf92926 100644 --- a/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From e31cbc938bd97095a114c8f179b4fa8719c13da4 Mon Sep 17 00:00:00 2001 +From a7855091d730910093cd3922ec8364b5d7ad9416 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 diff --git a/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index 1e153114..a20cb7ff 100644 --- a/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From fa07ed6fe456700579ddbb1bbb61ecbbf22ce872 Mon Sep 17 00:00:00 2001 +From a1ef57c134d9a9c8b1914f1d6e462f2cbf47c1ba Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES diff --git a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index ba0ad51c..a00853e2 100644 --- a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From fa42cb05e193173acec7cbcefd77419c90dd1161 Mon Sep 17 00:00:00 2001 +From f94c4a49fecce77c7c217a445e4db0ee840dcdae Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips diff --git a/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch index 99e45c41..3fd61c51 100644 --- a/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 791297b55b977423fb2a30b8380d5678c5969095 Mon Sep 17 00:00:00 2001 +From 9ddf8c26e50067029fbee9072e2066567f3f29b1 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 23 May 2021 10:27:29 +0000 Subject: [PATCH] libunwind: Added unw_backtrace method diff --git a/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch b/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch index 61abcd0b..18697ec3 100644 --- a/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch +++ b/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch @@ -1,4 +1,4 @@ -From 716d03efa9f7ac77bab5e6c5f62163a328dab393 Mon Sep 17 00:00:00 2001 +From bf3f1e570a08c1d78d025db054fe670512083def Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 29 May 2021 13:42:25 -0700 Subject: [PATCH] compiler-rt: Use uintptr_t instead of _Unwind_Word diff --git a/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch b/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch index 9dfea83d..7034ea6f 100644 --- a/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch +++ b/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch @@ -1,4 +1,4 @@ -From 971ac96cbedb42f318f86c6b6baccf58b4a03740 Mon Sep 17 00:00:00 2001 +From 8868489317495de1175cd353e4b793e89f2dbdc6 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Jun 2021 08:42:36 -0700 Subject: [PATCH] compiler-rt: Do not force thumb mode directive diff --git a/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch b/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch index ab071167..4983d323 100644 --- a/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch +++ b/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch @@ -1,4 +1,4 @@ -From 400407d9877e4e0408fbf113c6ba7786c341e615 Mon Sep 17 00:00:00 2001 +From 5786d2b8541cf95e26e99bd4e6d5d5b094e269c6 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Wed, 23 Jun 2021 16:25:06 +0800 Subject: [PATCH] Drop the 'git' suffix from various version variables @@ -55,10 +55,10 @@ index 81eddbc24879..8b6811ac648e 100644 set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt -index 99773a5ee546..4822fc7edd8f 100644 +index af53a26d2d67..052bdb4e7881 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt -@@ -795,8 +795,8 @@ if (TENSORFLOW_C_LIB_PATH) +@@ -800,8 +800,8 @@ if (TENSORFLOW_C_LIB_PATH) include_directories(${TENSORFLOW_C_LIB_PATH}/include) if (NOT TF_PROTO_HEADERS) message(STATUS "TF_PROTO_HEADERS not defined. Looking for tensorflow pip package.") @@ -69,7 +69,7 @@ index 99773a5ee546..4822fc7edd8f 100644 OUTPUT_VARIABLE TF_PIP_OUT) if ("${TF_PIP_OUT}" STREQUAL "") message(FATAL ERROR "Tensorflow pip package is also required for 'development' mode (protobuf headers)") -@@ -828,7 +828,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "") +@@ -833,7 +833,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "") include_directories(${TENSORFLOW_AOT_PATH}/include) add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime) diff --git a/recipes-devtools/clang/clang/0036-clang-Do-not-use-install-relative-libc-headers.patch b/recipes-devtools/clang/clang/0036-clang-Do-not-use-install-relative-libc-headers.patch index 87cf1694..4706f109 100644 --- a/recipes-devtools/clang/clang/0036-clang-Do-not-use-install-relative-libc-headers.patch +++ b/recipes-devtools/clang/clang/0036-clang-Do-not-use-install-relative-libc-headers.patch @@ -1,4 +1,4 @@ -From a812e507582ff1ef74c2ceee9ba4943b21a72948 Mon Sep 17 00:00:00 2001 +From 7415c342c26a8cb09ccb7279d3e8cbe958adcc44 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 diff --git a/recipes-devtools/clang/clang/0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch b/recipes-devtools/clang/clang/0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch new file mode 100644 index 00000000..66463a2c --- /dev/null +++ b/recipes-devtools/clang/clang/0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch @@ -0,0 +1,23 @@ +From d23235c2b03957e6b1f55068808e33419896ee4d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 27 Aug 2021 16:45:24 -0700 +Subject: [PATCH] Revert "[libomptarget][amdcgn] Add build dependency for opt" + +This reverts commit ab2d8f0749745663d1f029ee4c88fbc492bef00f. +--- + openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt +index 4765d1989e52..8fec7dc6f17d 100644 +--- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt ++++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt +@@ -157,7 +157,7 @@ foreach(mcpu ${mcpus}) + add_custom_command( + OUTPUT ${bc_libname} + COMMAND ${LINK_TOOL} ${bc_files} | ${OPT_TOOL} --always-inline -o ${OUTPUTDIR}/${bc_libname} +- DEPENDS ${bc_files} opt) ++ DEPENDS ${bc_files}) + + add_custom_target(lib${libname}-${mcpu} ALL DEPENDS ${bc_libname}) + diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 1a018091..735b91e0 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -46,6 +46,7 @@ SRC_URI = "\ file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ file://0035-Drop-the-git-suffix-from-various-version-variables.patch \ file://0036-clang-Do-not-use-install-relative-libc-headers.patch \ + file://0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From c27b829f750a83cc926d7cdd620a54d5a4e1b1b7 Mon Sep 17 00:00:00 2001 From: Naveen Saini Date: Thu, 2 Sep 2021 05:30:58 +0000 Subject: [PATCH 073/166] spirv-llvm-translator: switch to release llvm_release_130 branch Fetching SPIRV-Headers, which provides required spirv.hpp headers https://github.com/KhronosGroup/SPIRV-Headers.git Signed-off-by: Naveen Saini (cherry picked from commit 610c47baddbfb310ffa681cc202211ed4a659e95) --- .../spirv-llvm-translator/spirv-llvm-translator_git.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb index 1e187933..87106e35 100644 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb @@ -1,12 +1,14 @@ LICENSE = "NCSA" LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=47e311aa9caedd1b3abf098bd7814d1d" -BRANCH = "master" +BRANCH = "llvm_release_130" SRC_URI = "git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;branch=${BRANCH} \ + git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/SPIRV-Headers;name=headers \ " PV = "13.0.0" -SRCREV = "ddb5c962f0a11dc3dcc03e1e1840d2d826b95af9" +SRCREV = "7d3a83f6e81be9e13254e73edd4272fa96ed0d44" +SRCREV_headers = "ddf3230c14c71e81fc0eae9b781cc4bcc2d1f0f5" S = "${WORKDIR}/git" @@ -27,6 +29,7 @@ EXTRA_OECMAKE = "\ -DLLVM_INCLUDE_TESTS=ON \ -Wno-dev \ -DCCACHE_ALLOWED=FALSE \ + -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${S}/SPIRV-Headers \ " do_compile:append() { From 01486fba02dfa722795c81cb19c79c0bfc849987 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 28 Aug 2021 12:10:12 -0700 Subject: [PATCH 074/166] clang: Fix llvm-link and opt dependency build failure in libomp Update to latest 13.x as well * 9e41dc71b8d4 [docs] Mention that the legacy PM is deprecated and will be removed after 14 * 73c36a9be558 [OpenMP][FIX] Allow declare variant to work with reference types * bcb43617cb7f [NewPM] Add missing LTO ArgPromotion pass * 703ee975d26a [AlignFromAssume] Bailout w/non-constant alignments (pr51680) Signed-off-by: Khem Raj (cherry picked from commit 4f69b68228f75b6a3f2375a0258fd04f4f67ce70) --- recipes-devtools/clang/clang.inc | 2 +- ...get-amdcgn-Add-build-dependency-for-.patch | 23 -------- recipes-devtools/clang/clang/D108404.diff | 58 +++++++++++++++++++ recipes-devtools/clang/clang/D108868.diff | 47 +++++++++++++++ recipes-devtools/clang/common.inc | 3 +- 5 files changed, 108 insertions(+), 25 deletions(-) delete mode 100644 recipes-devtools/clang/clang/0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch create mode 100644 recipes-devtools/clang/clang/D108404.diff create mode 100644 recipes-devtools/clang/clang/D108868.diff diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 2d148d93..829c03bc 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "34ff6a75f58377f32a5046a29f55c4c0e58bee9e" +SRCREV ?= "9e41dc71b8d4040fa5f0742022d6cf9852096744" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" diff --git a/recipes-devtools/clang/clang/0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch b/recipes-devtools/clang/clang/0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch deleted file mode 100644 index 66463a2c..00000000 --- a/recipes-devtools/clang/clang/0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch +++ /dev/null @@ -1,23 +0,0 @@ -From d23235c2b03957e6b1f55068808e33419896ee4d Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 27 Aug 2021 16:45:24 -0700 -Subject: [PATCH] Revert "[libomptarget][amdcgn] Add build dependency for opt" - -This reverts commit ab2d8f0749745663d1f029ee4c88fbc492bef00f. ---- - openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt -index 4765d1989e52..8fec7dc6f17d 100644 ---- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt -+++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt -@@ -157,7 +157,7 @@ foreach(mcpu ${mcpus}) - add_custom_command( - OUTPUT ${bc_libname} - COMMAND ${LINK_TOOL} ${bc_files} | ${OPT_TOOL} --always-inline -o ${OUTPUTDIR}/${bc_libname} -- DEPENDS ${bc_files} opt) -+ DEPENDS ${bc_files}) - - add_custom_target(lib${libname}-${mcpu} ALL DEPENDS ${bc_libname}) - diff --git a/recipes-devtools/clang/clang/D108404.diff b/recipes-devtools/clang/clang/D108404.diff new file mode 100644 index 00000000..68d8ebc9 --- /dev/null +++ b/recipes-devtools/clang/clang/D108404.diff @@ -0,0 +1,58 @@ +Backported from https://reviews.llvm.org/D108404 + +diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt +--- a/llvm/runtimes/CMakeLists.txt ++++ b/llvm/runtimes/CMakeLists.txt +@@ -350,15 +350,19 @@ + # Create a runtimes target that uses this file as its top-level CMake file. + # The runtimes target is a configuration of all the runtime libraries + # together in a single CMake invocaiton. ++ if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES) ++ message(STATUS "Adding dependencies opt llvm-link") ++ set(extra_deps opt llvm-link) ++ endif() + if(NOT LLVM_RUNTIME_TARGETS) + runtime_default_target( +- DEPENDS ${deps} ++ DEPENDS ${deps} ${extra_deps} + PREFIXES ${prefixes}) + set(test_targets check-runtimes) + else() + if("default" IN_LIST LLVM_RUNTIME_TARGETS) + runtime_default_target( +- DEPENDS ${deps} ++ DEPENDS ${deps} ${extra_deps} + PREFIXES ${prefixes}) + list(REMOVE_ITEM LLVM_RUNTIME_TARGETS "default") + else() +diff --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt +--- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt ++++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt +@@ -151,6 +151,7 @@ + + # Create target to build all Bitcode libraries. + add_custom_target(omptarget-new-nvptx-bc) ++add_dependencies(omptarget-new-nvptx-bc opt llvm-link) + + # Generate a Bitcode library for all the compute capabilities the user requested + foreach(sm ${nvptx_sm_list}) +@@ -197,6 +198,7 @@ + + add_custom_target(${bclib_target_name} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${bclib_name}_opt) + add_dependencies(omptarget-new-nvptx-bc ${bclib_target_name}) ++ add_dependencies(${bclib_target_name} opt llvm-link) + + # Copy library to destination. + add_custom_command(TARGET ${bclib_target_name} POST_BUILD +diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt +--- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt ++++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt +@@ -157,7 +157,7 @@ + add_custom_command( + OUTPUT ${bc_libname} + COMMAND ${LINK_TOOL} ${bc_files} | ${OPT_TOOL} --always-inline -o ${OUTPUTDIR}/${bc_libname} +- DEPENDS ${bc_files} opt) ++ DEPENDS ${bc_files} llvm-link opt) + + add_custom_target(lib${libname}-${mcpu} ALL DEPENDS ${bc_libname}) + diff --git a/recipes-devtools/clang/clang/D108868.diff b/recipes-devtools/clang/clang/D108868.diff new file mode 100644 index 00000000..a12a3eb8 --- /dev/null +++ b/recipes-devtools/clang/clang/D108868.diff @@ -0,0 +1,47 @@ +Backported from https://reviews.llvm.org/D108868 + +--- a/llvm/runtimes/CMakeLists.txt ++++ b/llvm/runtimes/CMakeLists.txt +@@ -350,9 +350,14 @@ if(runtimes) + # Create a runtimes target that uses this file as its top-level CMake file. + # The runtimes target is a configuration of all the runtime libraries + # together in a single CMake invocaiton. ++ set(extra_deps "") + if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES) +- message(STATUS "Adding dependencies opt llvm-link") +- set(extra_deps opt llvm-link) ++ if(TARGET opt) ++ list(APPEND extra_deps opt) ++ endif() ++ if(TARGET llvm-link) ++ list(APPEND extra_deps llvm-link) ++ endif() + endif() + if(NOT LLVM_RUNTIME_TARGETS) + runtime_default_target( +--- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt ++++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt +@@ -149,6 +149,14 @@ endmacro() + + set(libname "omptarget-amdgcn") + ++set(toolchain_deps "") ++if(TARGET llvm-link) ++ list(APPEND toolchain_deps llvm-link) ++endif() ++if(TARGET opt) ++ list(APPEND toolchain_deps opt) ++endif() ++ + foreach(mcpu ${mcpus}) + set(bc_files) + add_cuda_bc_library(${cuda_sources}) +@@ -157,7 +165,7 @@ foreach(mcpu ${mcpus}) + add_custom_command( + OUTPUT ${bc_libname} + COMMAND ${LINK_TOOL} ${bc_files} | ${OPT_TOOL} --always-inline -o ${OUTPUTDIR}/${bc_libname} +- DEPENDS ${bc_files} llvm-link opt) ++ DEPENDS ${bc_files} ${toolchain_deps}) + + add_custom_target(lib${libname}-${mcpu} ALL DEPENDS ${bc_libname}) + diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 735b91e0..b11e1806 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -46,7 +46,8 @@ SRC_URI = "\ file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ file://0035-Drop-the-git-suffix-from-various-version-variables.patch \ file://0036-clang-Do-not-use-install-relative-libc-headers.patch \ - file://0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch \ + file://D108404.diff \ + file://D108868.diff \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From 3413cb78c4ec87cd97bb42a4a3058cae6b34b673 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 8 Sep 2021 21:54:15 -0700 Subject: [PATCH 075/166] clang: Update to latest 13.x Drop upstreamed patches Brings following changes * Workaround incorre ct types when lowering fixed length gather/scatter * f17d60d62028 Inform pass manager when child loops are deleted * f56129fe78d5 Fine grain control over some sym bol visibility * dc10ff25f54b [AArch64][SME] Fix imm bug in mov vector to tile aliases * b77c810feba0 Revert "[HardwareLoops] Change order of SCEV expression construction for Init LoopCount." * 02dece03f93d [clang] fix transformation of template arguments of 'auto' type constraints * 297e9237db53 [SelectionDAGBuilder] Bugfix in visitInlineAsm() * bc3cbd744d70 [llvm-objdump] Fix 'llvm-objdump -dr' for executables with relocations * 912ad5830cc1 Add llvm-ml to LLVM_TOOLCHAIN_TOOLS (PR50536) * b46abdb7b8fe [clang][Driver] Pick the last --driver-mode in case of multiple ones * 197d9d91aec1 [AArch64][sve] Prevent incorrect function call on fixed width vector * 427df19c4791 Update counter offset to account for binary ids * 09f659449b83 libunwind: add missing break statements in EHABI * a98b397504f8 [SCEV] Fix applyLoopGuards() with range check idiom (PR51760) * 9b3867e959fa [DAGCombine] Prevent the transform of combine for multi-use operand * 49dacda603b3 [tests] precommit tests for D107692 * 8aa8ed9d4b5f Fix for commit d8cd7806310c51af912a647a6ca46de62ff13214. * 2a1d8b5016eb [clang] OpenBSD does not support C11 atomics or threads. * a52b7bf7d123 PR50294: Fix a performance regression from 2c9dbcd. * c30b2813a1d5 [clang] fix error recovery ICE on copy elision when returing invalid variable * 6668e31250ba Support linking against OpenMP runtime on OpenBSD. * be305271bfb6 OpenBSD also needs execinfo * a5e968b66a59 [clang] Allow the OpenBSD driver to link the libclang_rt.profile library. * 181739213aa0 [docs] Update release notes with items related to Flang * c45fa58f171e [libomptarget][amdcgn] Only add opt/llvm-link dependency if TARGET is availab le * 7f3d00c9b49b [libomptarget][amdcgn] Add build dependency for llvm-link and opt * 3b1fa4aef006 [RISCV] Fix reporting of incorrect commutable operand indices * 1c3fcc8ae92e [libc++][NFC] Mark values in gdb pretty print comparison functions as live to prevent values being optimized out. * c8905f1bb304 [Orc] Enable debug object tests only on x86_64 hosts * 7a4a5d413624 [Linker] Support weak symbols in nodeduplicate COMDAT group Signed-off-by: Khem Raj (cherry picked from commit 12c3739c9cc737ceb8a29bf7bbd848d3de4b8d17) --- recipes-devtools/clang/clang.inc | 2 +- recipes-devtools/clang/clang/D108404.diff | 58 ----------------------- recipes-devtools/clang/clang/D108868.diff | 47 ------------------ recipes-devtools/clang/common.inc | 2 - 4 files changed, 1 insertion(+), 108 deletions(-) delete mode 100644 recipes-devtools/clang/clang/D108404.diff delete mode 100644 recipes-devtools/clang/clang/D108868.diff diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 829c03bc..37556b4e 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "9e41dc71b8d4040fa5f0742022d6cf9852096744" +SRCREV ?= "0c2f8599a9cc42014b41aadf7c308b4889d2397f" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" diff --git a/recipes-devtools/clang/clang/D108404.diff b/recipes-devtools/clang/clang/D108404.diff deleted file mode 100644 index 68d8ebc9..00000000 --- a/recipes-devtools/clang/clang/D108404.diff +++ /dev/null @@ -1,58 +0,0 @@ -Backported from https://reviews.llvm.org/D108404 - -diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt ---- a/llvm/runtimes/CMakeLists.txt -+++ b/llvm/runtimes/CMakeLists.txt -@@ -350,15 +350,19 @@ - # Create a runtimes target that uses this file as its top-level CMake file. - # The runtimes target is a configuration of all the runtime libraries - # together in a single CMake invocaiton. -+ if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES) -+ message(STATUS "Adding dependencies opt llvm-link") -+ set(extra_deps opt llvm-link) -+ endif() - if(NOT LLVM_RUNTIME_TARGETS) - runtime_default_target( -- DEPENDS ${deps} -+ DEPENDS ${deps} ${extra_deps} - PREFIXES ${prefixes}) - set(test_targets check-runtimes) - else() - if("default" IN_LIST LLVM_RUNTIME_TARGETS) - runtime_default_target( -- DEPENDS ${deps} -+ DEPENDS ${deps} ${extra_deps} - PREFIXES ${prefixes}) - list(REMOVE_ITEM LLVM_RUNTIME_TARGETS "default") - else() -diff --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt ---- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt -+++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt -@@ -151,6 +151,7 @@ - - # Create target to build all Bitcode libraries. - add_custom_target(omptarget-new-nvptx-bc) -+add_dependencies(omptarget-new-nvptx-bc opt llvm-link) - - # Generate a Bitcode library for all the compute capabilities the user requested - foreach(sm ${nvptx_sm_list}) -@@ -197,6 +198,7 @@ - - add_custom_target(${bclib_target_name} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${bclib_name}_opt) - add_dependencies(omptarget-new-nvptx-bc ${bclib_target_name}) -+ add_dependencies(${bclib_target_name} opt llvm-link) - - # Copy library to destination. - add_custom_command(TARGET ${bclib_target_name} POST_BUILD -diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt ---- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt -+++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt -@@ -157,7 +157,7 @@ - add_custom_command( - OUTPUT ${bc_libname} - COMMAND ${LINK_TOOL} ${bc_files} | ${OPT_TOOL} --always-inline -o ${OUTPUTDIR}/${bc_libname} -- DEPENDS ${bc_files} opt) -+ DEPENDS ${bc_files} llvm-link opt) - - add_custom_target(lib${libname}-${mcpu} ALL DEPENDS ${bc_libname}) - diff --git a/recipes-devtools/clang/clang/D108868.diff b/recipes-devtools/clang/clang/D108868.diff deleted file mode 100644 index a12a3eb8..00000000 --- a/recipes-devtools/clang/clang/D108868.diff +++ /dev/null @@ -1,47 +0,0 @@ -Backported from https://reviews.llvm.org/D108868 - ---- a/llvm/runtimes/CMakeLists.txt -+++ b/llvm/runtimes/CMakeLists.txt -@@ -350,9 +350,14 @@ if(runtimes) - # Create a runtimes target that uses this file as its top-level CMake file. - # The runtimes target is a configuration of all the runtime libraries - # together in a single CMake invocaiton. -+ set(extra_deps "") - if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES) -- message(STATUS "Adding dependencies opt llvm-link") -- set(extra_deps opt llvm-link) -+ if(TARGET opt) -+ list(APPEND extra_deps opt) -+ endif() -+ if(TARGET llvm-link) -+ list(APPEND extra_deps llvm-link) -+ endif() - endif() - if(NOT LLVM_RUNTIME_TARGETS) - runtime_default_target( ---- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt -+++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt -@@ -149,6 +149,14 @@ endmacro() - - set(libname "omptarget-amdgcn") - -+set(toolchain_deps "") -+if(TARGET llvm-link) -+ list(APPEND toolchain_deps llvm-link) -+endif() -+if(TARGET opt) -+ list(APPEND toolchain_deps opt) -+endif() -+ - foreach(mcpu ${mcpus}) - set(bc_files) - add_cuda_bc_library(${cuda_sources}) -@@ -157,7 +165,7 @@ foreach(mcpu ${mcpus}) - add_custom_command( - OUTPUT ${bc_libname} - COMMAND ${LINK_TOOL} ${bc_files} | ${OPT_TOOL} --always-inline -o ${OUTPUTDIR}/${bc_libname} -- DEPENDS ${bc_files} llvm-link opt) -+ DEPENDS ${bc_files} ${toolchain_deps}) - - add_custom_target(lib${libname}-${mcpu} ALL DEPENDS ${bc_libname}) - diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index b11e1806..1a018091 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -46,8 +46,6 @@ SRC_URI = "\ file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ file://0035-Drop-the-git-suffix-from-various-version-variables.patch \ file://0036-clang-Do-not-use-install-relative-libc-headers.patch \ - file://D108404.diff \ - file://D108868.diff \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From 32fcd0a8228c5589a789158a083126fe0ed130bf Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 11 Sep 2021 00:34:02 -0700 Subject: [PATCH 076/166] spirv-llvm-translator: Define explicit SRCREV_FORMAT Since it uses multiple fetch URIs make it explicit to define SRCREV_FORMAT Signed-off-by: Khem Raj (cherry picked from commit 46e154f597b2db2a57a183dadc4a03f59671dde3) --- .../spirv-llvm-translator/spirv-llvm-translator_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb index 87106e35..e7efed99 100644 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb @@ -10,6 +10,8 @@ PV = "13.0.0" SRCREV = "7d3a83f6e81be9e13254e73edd4272fa96ed0d44" SRCREV_headers = "ddf3230c14c71e81fc0eae9b781cc4bcc2d1f0f5" +SRCREV_FORMAT = "default_headers" + S = "${WORKDIR}/git" DEPENDS = "spirv-tools clang" From 0df0e75c75483a2ce4965a31f35f24c5d5d49807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= Date: Tue, 14 Sep 2021 09:42:13 +0200 Subject: [PATCH 077/166] clang: Update to latest 13.x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Brings following changes up to 13.0.0-rc3 f6b09e394a5f [openmp] Apply code change from D109500 1916a1c578f8 [VPlan] Fix crash caused by not updating all users properly. 2aa67b31faf0 [clang-format] Restrict the special handling for K&R C to C/C++ f1342c749ac0 [LLDB] AArch64 SVE restore SVE registers after expression fbb8b41588be Revert "[AArch64][GlobalISel] Legalize bswap <2 x i16>" 1c198b3032e8 Revert [MC][ELF] Emit separate unique sections for different flags 4728892cd336 [LLD] Support compressed input sections on big-endian targets 77f24308fe78 [X86] Don't clobber EBX in stackprobes 1ff9aa2bfe19 [IR] Handle constant expressions in containsUndefinedElement() 84a3be829686 [SimplifyCFG] performBranchToCommonDestFolding(): require block-closed SSA form for bonus instructions (PR51125) bd8cc8543fdc [OpenCL][Docs] Update OpenCL 3.0 implementation status. 9723fc15338e [OpenCL][Docs] Release 13 notes. f53652203e49 scudo: Only add no-omit-frame-pointer flags when the compiler supports them c8d8248488a3 [clang-format] Improve detection of parameter declarations in K&R C 4ab7fe9228db [clang-format] Distinguish K&R C function definition and attribute 748f09fdd5d6 [clang-format] improve distinction of K&R function definitions vs attributes ffd90ed19988 [clang-format] handle trailing comments in function definition detection b685e13d1130 [clan-format] detect function definitions more conservatively e3ec9058aae5 [MemCpyOpt] Fix a variety of scalable-type crashes 718280c8a2d1 [AMDGPU][OpenMP] Use complex definitions from complex_cmath.h Signed-off-by: Zoltán Böszörményi (cherry picked from commit b8463aa66767e0c4e6dee3c90d666a8bd47c6766) --- recipes-devtools/clang/clang.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 37556b4e..dde3eeee 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "0c2f8599a9cc42014b41aadf7c308b4889d2397f" +SRCREV ?= "f6b09e394a5fad4b33f8746195377f4f638e2c8d" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" From a54412790679e86616bff03c420ee6ff59698ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= Date: Tue, 14 Sep 2021 13:12:58 +0200 Subject: [PATCH 078/166] spirv-llvm-translator: Use the latest commit for SPIRV-Headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zoltán Böszörményi (cherry picked from commit edd9f7e580e02242e08d34d35d808171f79d1fc9) --- .../spirv-llvm-translator/spirv-llvm-translator_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb index e7efed99..d1856e95 100644 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb @@ -8,7 +8,7 @@ SRC_URI = "git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;br PV = "13.0.0" SRCREV = "7d3a83f6e81be9e13254e73edd4272fa96ed0d44" -SRCREV_headers = "ddf3230c14c71e81fc0eae9b781cc4bcc2d1f0f5" +SRCREV_headers = "635049b5e1451d846d5d307def8c78328aaeb342" SRCREV_FORMAT = "default_headers" From 7388b98dfc47b757c42868fc3ac35098bafb1b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= Date: Sat, 25 Sep 2021 09:47:06 +0200 Subject: [PATCH 079/166] spirv-llvm-translator: Use latest revisions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use latest revisions for SPIRV-LLVM-Translator and SPIRV-Headers Signed-off-by: Zoltán Böszörményi (cherry picked from commit 11b5b37db1046326b0c0ca067d3f4834d3e5dfe7) --- .../spirv-llvm-translator/spirv-llvm-translator_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb index d1856e95..9942ca0c 100644 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb @@ -7,8 +7,8 @@ SRC_URI = "git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;br " PV = "13.0.0" -SRCREV = "7d3a83f6e81be9e13254e73edd4272fa96ed0d44" -SRCREV_headers = "635049b5e1451d846d5d307def8c78328aaeb342" +SRCREV = "098034eab7d0f92da428465b2fcc76abd8dd4119" +SRCREV_headers = "ae217c17809fadb232ec94b29304b4afcd417bb4" SRCREV_FORMAT = "default_headers" From 157bc38a1bafa606525b0dcfa7b1e04ddb1c2ffe Mon Sep 17 00:00:00 2001 From: Dan McGregor Date: Wed, 21 Apr 2021 14:50:15 -0600 Subject: [PATCH 080/166] clang: use global multilib variants Using regular multilib variants prevents sharing state between machines with dissimilar multilibs, or non-multilib machines. Since there's no harm in having extra multilib triples, use the full set for all builds. Signed-off-by: Dan McGregor (cherry picked from commit 1f40e6439ac7894bf788aa221efc8648d043a0f9) --- recipes-devtools/clang/llvm-project-source.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/llvm-project-source.inc b/recipes-devtools/clang/llvm-project-source.inc index d7b91e05..de7ba8a7 100644 --- a/recipes-devtools/clang/llvm-project-source.inc +++ b/recipes-devtools/clang/llvm-project-source.inc @@ -28,7 +28,7 @@ python add_distro_vendor() { case = "" triple = "" vendors = d.getVar('CLANG_EXTRA_OE_VENDORS') - multilib_variants = d.getVar('MULTILIB_VARIANTS').split() + multilib_variants = (d.getVar("MULTILIB_GLOBAL_VARIANTS") or "").split() vendors_to_add = [] for vendor in vendors.split(): # convert -yoe into yoe From dd6fe507c2c9c89e1aca8a3c237de1e6610584d5 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 24 Sep 2021 23:07:27 -0700 Subject: [PATCH 081/166] clang: Update to 13.0.0-rc4 Changes in this set * d7b669b3a303 [clang] don't mark as Elidable CXXConstruct expressions used in NRVO * ee6913cc8317 [analyzer] Add 13.0.0 release notes * d0f0b5b99262 Thread safety analysis: Warn when demoting locks on back edges * 80f974e40f81 [AArch64][GlobalISel] Use ZExtValue for zext(xor) when invert tb(n)z * 5b95eb0b442e [debuginfo-test][cross-project-tests] Release note for new project name * b96ee8f581f6 [X86] combineX86ShuffleChain - ensure we only peek through bitcasts to vectors (PR51858) * dda88bfc06b5 [clang][scan-build] Use cc/c++ instead of gcc/g++ on OpenBSD. * 08642a395f23 Fix syntax error in Clang release notes * 6a5ccb2ec438 [compiler-rt] Implement __clear_cache() on OpenBSD/riscv64 * 6aa054242d60 [LLD] Add required `ppc` target to the test cases. NFC * 8d78ac26f475 [OpenMP]Fix PR51349: Remove AlwaysInline for if regions. * d811546f803c [compiler-rt] Move -fno-omit-frame-pointer check to common config-ix * 89f2c0c63c22 [clang] disable implicit moves when not in CPlusPLus * 635b7871de93 [clang-repl] Install clang-repl * 1f27fe612876 -Wunused-but-set-parameter/-Wunused-but-set-variable Add to the release notes Signed-off-by: Khem Raj (cherry picked from commit d236deda20383e66e303399d98544fbcc66155a9) --- recipes-devtools/clang/clang.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index dde3eeee..f45d3c92 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "f6b09e394a5fad4b33f8746195377f4f638e2c8d" +SRCREV ?= "d7b669b3a30345cfcdb2fde2af6f48aa4b94845d" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" From f679ca9d709af3599aa8b426c9d758e1d1478f61 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 27 Sep 2021 21:20:49 -0700 Subject: [PATCH 082/166] nativesdk-clang: Fix build when using RUNTIME = llvm We can not use nativesdk variants of libcxx and compiler-rt yet when compiling nativesdk-clang because, it will need this compiler to build them, so solve this catch-22, since we do not use the runtime built during compiler builds, use libgcc/libstdc++ to pass cmake tests during configure, this should be fine as it will be not needed for final builds where nativesdk-clang will be used, it can still default to llvm runtime on SDK host Signed-off-by: Khem Raj (cherry picked from commit 826f7287ffb8ae87bd843ecfe4a21a661bb03294) --- classes/clang.bbclass | 1 + recipes-devtools/clang/clang_git.bb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index b9d045c9..d2340aa8 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -110,6 +110,7 @@ def clang_base_deps(d): BASE_DEFAULT_DEPS:toolchain-clang:class-target = "${@clang_base_deps(d)}" BASE_DEFAULT_DEPS:append:class-native:toolchain-clang:runtime-llvm = " libcxx-native compiler-rt-native" +BASE_DEFAULT_DEPS:append:class-nativesdk:toolchain-clang:runtime-llvm = " clang-native nativesdk-libcxx nativesdk-compiler-rt" cmake_do_generate_toolchain_file:append:toolchain-clang () { cat >> ${WORKDIR}/toolchain.cmake < Date: Wed, 20 Oct 2021 17:28:18 -0700 Subject: [PATCH 083/166] clang_git: disable LLD usage This will resolve issue with SDK relocation. See: https://github.com/kraj/meta-clang/issues/119 Signed-off-by: David Abdurachmanov Signed-off-by: Khem Raj (cherry picked from commit 68b8f9b2425e54518211e2914064a5dd08c3aec6) --- recipes-devtools/clang/clang_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index fcb98857..a87a0ef0 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -15,6 +15,7 @@ BUILD_CXX:class-nativesdk = "clang++" BUILD_AR:class-nativesdk = "llvm-ar" BUILD_RANLIB:class-nativesdk = "llvm-ranlib" BUILD_NM:class-nativesdk = "llvm-nm" +LDFLAGS:remove:class-nativesdk = "-fuse-ld=lld" inherit cmake cmake-native pkgconfig python3native From 555535ca84216c1ff472ea1c8a4a2551b1e6631e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 20 Oct 2021 17:36:48 -0700 Subject: [PATCH 084/166] clang: Add patch to handle RISCV multilibs Signed-off-by: Khem Raj (cherry picked from commit 27d31ea0ee2c4960f3cb1fbd214e99925d80575a) --- ...iver-finds-GCC-installation-path-on-.patch | 100 ++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 2 files changed, 101 insertions(+) create mode 100644 recipes-devtools/clang/clang/0037-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch diff --git a/recipes-devtools/clang/clang/0037-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch b/recipes-devtools/clang/clang/0037-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch new file mode 100644 index 00000000..6b6ad04d --- /dev/null +++ b/recipes-devtools/clang/clang/0037-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch @@ -0,0 +1,100 @@ +From aafdcb50517464cc915da3108e1d7422610a4fde Mon Sep 17 00:00:00 2001 +From: David Abdurachmanov +Date: Wed, 20 Oct 2021 17:30:36 -0700 +Subject: [PATCH 37/37] clang: Fix how driver finds GCC installation path on + OpenEmbedded + +Fix how Clang Driver finds GCC installation path on OpenEmbedded + +- For RISCV (riscv{32,64}) we define new two multi-lib options without any + subdirectories (e.g., lib32/ilp32d or lib64/lp64d). OpenEmbedded GCC + builds don't use them. +- Modify how Clang Driver finds GCC installation path. This is important + because GCC files on OpenEmbedded are in two different directories: + (1) /usr/bin/../lib/gcc/riscv64-oe-linux/9.2.0 + (2) /usr/lib/riscv64-oe-linux/9.2.0 + +Clang Driver will check (1) first. The directory exist, but will produce +no valid multi-libs and there will be no multi-lib selected. (2) contains +actual GCC run-time objects/libraries, but because the path has exact +same GCC version (9.2.0) it will be skipped. + +We modify the approach by allowing to check other directories with the same +GCC version. We also avoid picking GCC installation path if it results in +an empty multi-lib list. + +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(-) + +diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp +index 553cb985737f..355c7798a7aa 100644 +--- a/clang/lib/Driver/ToolChains/Gnu.cpp ++++ b/clang/lib/Driver/ToolChains/Gnu.cpp +@@ -1652,18 +1652,29 @@ 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 = ++ MultilibSet RISCVMultilibs; ++ ++ if (TargetTriple.getVendor() == llvm::Triple::OpenEmbedded) { ++ Multilib OpenEmbeddedIlp32d = makeMultilib("").flag("+m32").flag("+mabi=ilp32d"); ++ Multilib OpenEmbeddedLp64d = makeMultilib("").flag("+m64").flag("+mabi=lp64d"); ++ RISCVMultilibs = ++ MultilibSet() ++ .Either({OpenEmbeddedIlp32d, OpenEmbeddedLp64d}) ++ .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"); ++ RISCVMultilibs = ++ MultilibSet() ++ .Either({Ilp32, Ilp32f, Ilp32d, Lp64, Lp64f, Lp64d}) ++ .FilterOut(NonExistent); ++ } + + Multilib::flags_list Flags; + bool IsRV64 = TargetTriple.getArch() == llvm::Triple::riscv64; +@@ -2561,13 +2572,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; +- if (CandidateVersion <= Version) ++ if (CandidateVersion < Version) + continue; + + if (!ScanGCCForMultilibs(TargetTriple, Args, LI->path(), + NeedsBiarchSuffix)) + continue; + ++ // We might have found existing directory with GCCVersion, but it ++ // might not have GCC libraries we are looking for (i.e. return an ++ // empty Mulilibs) ++ if (Multilibs.size() == 0) ++ continue; ++ + Version = CandidateVersion; + GCCTriple.setTriple(CandidateTriple); + // FIXME: We hack together the directory name here instead of +-- +2.33.1 + diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 1a018091..eb2ff215 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -46,6 +46,7 @@ SRC_URI = "\ file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ file://0035-Drop-the-git-suffix-from-various-version-variables.patch \ file://0036-clang-Do-not-use-install-relative-libc-headers.patch \ + file://0037-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From 7f966d3e53f41807d1ebf2b6b619b89a8a8625a4 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 31 Oct 2021 19:28:25 -0700 Subject: [PATCH 085/166] clang: Update to latest on 13.x release bump minor release to 13.0.1 Drop patch to remove git from PACKAGE_VERSION, this is already eliminated from upstream Following changes are part of this change * 08e3a5ccd952 [IntelJITListener] Fix order in JitListener/multiple.ll * 26e2c97bf14c [openmp] [elf_common] Fix linking against LLVM dylib * eb845520ac3c compiler-rt: Fix arch detection for ppc64le * ec4829efcc94 fixes bug #51926 where dangling comma caused overrun * 73daeb3d507f [CUDA] Make sure is included with original __THROW defined. * 3ee9a2b63cfd [Support][mips] Remove unnecessary includes from Memory.inc * 47f53eec6485 [Mips] Add glue between CopyFromReg, CopyToReg and RDHWR nodes for TLS * 914355ee793c [CMake] Re-enable use --gc-sections on OpenBSD * 2ac023cd540a [clang] Omit most AttributedStatements from the CFG * 30c05f43b662 [runtimes] Properly handle the sysroot/triple/gcc-toolchain * a797306b7721 [clang-format] [PR51640] - New AfterEnum brace wrapping changes have cause C# behaviour to change * 0a5ae011cd23 [HIP] Fix test rcom-detect.hip * 1a40203f8e94 workflows: Update lldb workaround to latest version of Mac OS X * 8a93745a7121 Remove "In Progress" text from release notes * 449f3049b507 [GHA] Cancel intermediate builds on PRs * cf15ccdeb6d5 Bump version to 13.0.1 * fd1d8c2f04dd [cte] Release notes for clangd-13 Signed-off-by: Khem Raj (cherry picked from commit d246141aaf71c739d50e32d0c10e12eecf920e45) --- conf/layer.conf | 2 +- recipes-devtools/clang/clang.inc | 4 +- ...l2-to-linker-cmdline-of-xml-is-found.patch | 2 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 8 +- ...-support-a-new-embedded-linux-target.patch | 2 +- ...lify-cross-compilation.-Don-t-use-na.patch | 2 +- ...ryInfo-Undefine-libc-functions-if-th.patch | 2 +- ...-llvm-allow-env-override-of-exe-path.patch | 2 +- ...g-driver-Check-sysroot-for-ldso-path.patch | 2 +- ...tools.cpp-Add-lssp_nonshared-on-musl.patch | 2 +- ...does-not-support-128-bit-long-double.patch | 2 +- ...10-clang-Prepend-trailing-to-sysroot.patch | 2 +- ...e-the-target-sysroot-for-compiler-ru.patch | 2 +- ...efine-releative-gcc-installation-dir.patch | 2 +- ...ad-and-ldl-along-with-lunwind-for-st.patch | 6 +- ...UTABLE-when-cross-compiling-for-nati.patch | 2 +- ...5-Check-for-atomic-double-intrinsics.patch | 2 +- ...-clang-Enable-SSP-and-PIE-by-default.patch | 2 +- ...ler-runtime-library-to-link-step-for.patch | 2 +- ...-Fix-configure-for-packages-using-fi.patch | 12 +-- ...ce-dir-location-for-cross-toolchains.patch | 4 +- .../clang/clang/0020-fix-path-to-libffi.patch | 2 +- ...-dyld-prefix-when-checking-sysroot-f.patch | 2 +- ...-clang-Use-python3-in-python-scripts.patch | 2 +- ...-Yocto-based-GCC-install-search-path.patch | 2 +- ...-Do-not-use-find_library-for-ncurses.patch | 6 +- ...or-for-adding-OE-distro-vendor-names.patch | 2 +- ...er-rt-Use-mcr-based-barrier-on-armv6.patch | 2 +- ...aults-to-dwarf-5-debug-info-on-Linux.patch | 2 +- ...ot-use-backtrace-APIs-on-non-glibc-l.patch | 2 +- ...iple-for-non-debian-multiarch-linux-.patch | 2 +- ...-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch | 2 +- ...-scudo-standalone-with-libatomic-on-.patch | 6 +- ...libunwind-Added-unw_backtrace-method.patch | 2 +- ...se-uintptr_t-instead-of-_Unwind_Word.patch | 2 +- ...rt-Do-not-force-thumb-mode-directive.patch | 2 +- ...uffix-from-various-version-variables.patch | 93 ------------------- ...t-use-install-relative-libc-headers.patch} | 2 +- ...ver-finds-GCC-installation-path-on-.patch} | 7 +- recipes-devtools/clang/common.inc | 5 +- 40 files changed, 57 insertions(+), 154 deletions(-) delete mode 100644 recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch rename recipes-devtools/clang/clang/{0036-clang-Do-not-use-install-relative-libc-headers.patch => 0035-clang-Do-not-use-install-relative-libc-headers.patch} (95%) rename recipes-devtools/clang/clang/{0037-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch => 0036-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch} (96%) diff --git a/conf/layer.conf b/conf/layer.conf index ebf94460..fdfb8362 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -34,7 +34,7 @@ INHERIT += "clang" # Do not include clang in SDK unless user wants to CLANGSDK ??= "0" -LLVMVERSION = "13.0.0" +LLVMVERSION = "13.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 f45d3c92..3293e1ff 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -6,9 +6,9 @@ LLVM_GIT_PROTOCOL ?= "https" MAJOR_VER = "13" MINOR_VER = "0" -PATCH_VER = "0" +PATCH_VER = "1" -SRCREV ?= "d7b669b3a30345cfcdb2fde2af6f48aa4b94845d" +SRCREV ?= "08e3a5ccd952edee36b3c002e3a29c6b1b5153de" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" diff --git a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch index 03cdf137..999bc5e3 100644 --- a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch +++ b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch @@ -1,4 +1,4 @@ -From 8b3176b08a055a24ea139573b9811658fe4e753c Mon Sep 17 00:00:00 2001 +From 1b71b8fb344a065903ac2fc5b7680e99742be721 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 22 May 2017 17:36:16 -0700 Subject: [PATCH] lldb: Add -lxml2 to linker cmdline of xml is found diff --git a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch index 1013fa2f..0829f186 100644 --- a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch +++ b/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch @@ -1,4 +1,4 @@ -From 99f413f6e186984945d2b06887b04719f8b592c5 Mon Sep 17 00:00:00 2001 +From 581275e8e40784c6a3f30e69bb5cc7513fe3b475 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 27 Aug 2017 10:37:49 -0700 Subject: [PATCH] libcxxabi: Find libunwind headers when @@ -17,10 +17,10 @@ Signed-off-by: Khem Raj 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index 9fb35860d483..971629d81dbe 100644 +index f3060a5d1f93..bca2178f3203 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt -@@ -510,14 +510,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") +@@ -511,14 +511,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") # Setup Source Code #=============================================================================== @@ -36,7 +36,7 @@ index 9fb35860d483..971629d81dbe 100644 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} ${LIBCXXABI_LIBUNWIND_PATH}/include ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES} -@@ -528,15 +523,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) +@@ -529,15 +524,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) NO_CMAKE_FIND_ROOT_PATH ) diff --git a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch index 944effda..10124a63 100644 --- a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch +++ b/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch @@ -1,4 +1,4 @@ -From bc650811b01223a3414803a681d9cc702e913667 Mon Sep 17 00:00:00 2001 +From f02e1904c58e43119ba49c9c8f5831b47e5d6ebe 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/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch index d52945df..5717dce3 100644 --- a/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch +++ b/recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch @@ -1,4 +1,4 @@ -From efe92b1ce720b6fc28653dcec6f1661cc2e28602 Mon Sep 17 00:00:00 2001 +From 02d7443ec851ccdd64953ec49b12018c1f66a292 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 diff --git a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index 9dfd5ef1..6d58e94d 100644 --- a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch @@ -1,4 +1,4 @@ -From 41ffac4cc1d19f415c432c273ccaae37c2e09562 Mon Sep 17 00:00:00 2001 +From 57cc5e82da381cc6a69376dcf9398caa82a59648 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 diff --git a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch index cbedd9c3..9923b543 100644 --- a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From 4b513bf033833ebcd1cbd341ea2f8ecda6cdf22f Mon Sep 17 00:00:00 2001 +From 5d8ea7590df4cb9d1973a137ddf260e1df137010 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 path diff --git a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch index 814ffa7d..61d4761a 100644 --- a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch +++ b/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch @@ -1,4 +1,4 @@ -From f497114b87d7bcd6977d25435caeb3aee305932c Mon Sep 17 00:00:00 2001 +From 964f0d68fe16e003c42c75ebfc17fbd01676f652 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 diff --git a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index 4f356e52..2c298697 100644 --- a/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch +++ b/recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch @@ -1,4 +1,4 @@ -From d46fbb73eb8a9f80e8963a9a5878f8f3ae909b88 Mon Sep 17 00:00:00 2001 +From 7cf3b10fa0664d856d65ac0ad991e1875ac28be5 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 diff --git a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch index eb875fc5..81d18dd5 100644 --- a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch @@ -1,4 +1,4 @@ -From 7370800ae29490b222cf35d6c1fb294d1f280be5 Mon Sep 17 00:00:00 2001 +From db02270329248b6af2e174f12532245eb7f6aaa0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 02:00:11 -0700 Subject: [PATCH] clang: musl/ppc does not support 128-bit long double diff --git a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch index 563690f8..964ecdba 100644 --- a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From 325b576c6429cf0ce727ddae4959d6eb5c1c8c44 Mon Sep 17 00:00:00 2001 +From 9a6c282dd14e88b477593a185822635fee21330e 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 diff --git a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index a1e3ba12..fefa00c8 100644 --- a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From ddd3e53d43af3a935266e801ab872fd9f513afd3 Mon Sep 17 00:00:00 2001 +From c85d06487d397894aa0fd14ff210789b453d78fc 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 diff --git a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch index 4467f4ce..d1a572e7 100644 --- a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch @@ -1,4 +1,4 @@ -From 40e7f980b21498f2716a50b8833480d3b66d68dd Mon Sep 17 00:00:00 2001 +From 71e923b1d1b611ce3a4ae2a08408059a0162b99f 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 diff --git a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index 81bf66f0..baa612c6 100644 --- a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From 1634a9346565ff133cdc74141cfa6c2460ec86a3 Mon Sep 17 00:00:00 2001 +From f033f7183eb509f3b99d8f197eb5d5159f961c0b 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 @@ -20,10 +20,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 83cab3ac00cb..367e8603ff70 100644 +index 0ffe95795381..358eb98cf528 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -1449,6 +1449,8 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, +@@ -1450,6 +1450,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/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index 63551f5c..e6998fba 100644 --- a/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From 2dc51ab94f34186bc4010aa4aced1107b7bcf9d0 Mon Sep 17 00:00:00 2001 +From 6e6960945953dead105f229da0cd34d860ebfe6c 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 diff --git a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch index 420d6686..04e8abc1 100644 --- a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From fcbcc842fb332137484b97247a06c33428f8d9eb Mon Sep 17 00:00:00 2001 +From 806b95e07916c0647957e7ed1ee1d4d6bcf55bc9 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/0016-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch index d4fe8cb9..e1e7cbfd 100644 --- a/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch +++ b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch @@ -1,4 +1,4 @@ -From 3b9e71add277ac2e23f57e839b486c1b69162a52 Mon Sep 17 00:00:00 2001 +From 64d8a913cfee1e8d0cf4019a18ead5edaadb6303 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Thu, 26 Dec 2019 15:46:19 -0800 Subject: [PATCH] clang: Enable SSP and PIE by default diff --git a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index 1d2d8ea3..e089ebb3 100644 --- a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -1,4 +1,4 @@ -From 8c753b4791fb7f736c06218b059377e680c80c88 Mon Sep 17 00:00:00 2001 +From ddbda1f2de59192ff883ba49c68dfac8e2fb98b3 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 diff --git a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index e1f86d43..1c342c69 100644 --- a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -1,4 +1,4 @@ -From 9d505591b46e8a0f37713266efe9ee7a5dd66f41 Mon Sep 17 00:00:00 2001 +From 4c9bb41e62058144e041a0f850a6d2ad5df03e0d 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 5752f4277444..f40ea35faf46 100644 endmacro() diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index 3e009f5061d3..1d40ad3e7ecc 100644 +index 5a9480aa6768..0f199f91e67c 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -1232,7 +1232,6 @@ macro(add_llvm_tool name) +@@ -1233,7 +1233,6 @@ macro(add_llvm_tool name) if( LLVM_BUILD_TOOLS ) get_target_export_arg(${name} LLVM export_to_llvmexports) install(TARGETS ${name} @@ -63,7 +63,7 @@ index 3e009f5061d3..1d40ad3e7ecc 100644 RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR} COMPONENT ${name}) -@@ -1243,9 +1242,6 @@ macro(add_llvm_tool name) +@@ -1244,9 +1243,6 @@ macro(add_llvm_tool name) endif() endif() endif() @@ -73,7 +73,7 @@ index 3e009f5061d3..1d40ad3e7ecc 100644 set_target_properties(${name} PROPERTIES FOLDER "Tools") endmacro(add_llvm_tool name) -@@ -1285,7 +1281,6 @@ macro(add_llvm_utility name) +@@ -1286,7 +1282,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 3e009f5061d3..1d40ad3e7ecc 100644 RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} COMPONENT ${name}) -@@ -1294,7 +1289,6 @@ macro(add_llvm_utility name) +@@ -1295,7 +1290,6 @@ macro(add_llvm_utility name) DEPENDS ${name} COMPONENT ${name}) endif() diff --git a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch index b91209cc..f1cc2a37 100644 --- a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From 2c3bdfd798dbf7de310252d3af93162784affa49 Mon Sep 17 00:00:00 2001 +From 3bb1761c3685792ccbcb96a9106dab6595ea11d2 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 @@ -19,7 +19,7 @@ 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 5c323cb6ea23..c3ae820c06ab 100644 +index 94a7553e273b..5b353e6670f0 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -122,7 +122,13 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath, diff --git a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch index 2695e224..54c93821 100644 --- a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch +++ b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch @@ -1,4 +1,4 @@ -From eda78e4ad137cd8e27f3a22faa22dc43f408e000 Mon Sep 17 00:00:00 2001 +From 4b2b4a51abcc347176f8c1c6bdfa28e1a2c9e57b Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Fri, 3 Apr 2020 15:10:37 +0800 Subject: [PATCH] fix path to libffi diff --git a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index b459b998..5ddc7d6d 100644 --- a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From 705f0ac6e987b1c9776012fd933a94b61a25eacd Mon Sep 17 00:00:00 2001 +From 2d6e13dbd89ab50125e86ef8f240e50d0c8dd576 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 diff --git a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch index fc9a3e28..ac014b1f 100644 --- a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From b3aca4fcbef8ee80cda0305f3682ae99fee56495 Mon Sep 17 00:00:00 2001 +From 40138d88b4371d1e253dc5a86fe517bceba655aa 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/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index baf33677..c46e3dd7 100644 --- a/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From 5d0adaf8fbc52c473134510e1f746468e229e93d Mon Sep 17 00:00:00 2001 +From c23934d24ed6cbb08e3ce6c67c458509c6d46291 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 diff --git a/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch index c34c5223..caaf6681 100644 --- a/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch +++ b/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch @@ -1,4 +1,4 @@ -From 46cf43ff4f206adaeeb7022c598bd7a5eef2fd86 Mon Sep 17 00:00:00 2001 +From 5d9680264c351bc98b1ae385f129deef48ed12a1 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 @@ -17,10 +17,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 6f13acfa2757..0f269835fd17 100644 +index 39b9120f00ad..8ac28303b8ad 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake -@@ -140,7 +140,7 @@ else() +@@ -141,7 +141,7 @@ else() set(MAYBE_REQUIRED) endif() if(LLVM_ENABLE_TERMINFO) diff --git a/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index 8ea914a3..baf4f1f5 100644 --- a/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From 6eae70b44b9e67160891e4206c80b64ab9779dc1 Mon Sep 17 00:00:00 2001 +From 5fd5e653e9662971e62c03353cc7981ab387d5c7 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 diff --git a/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index 8ef564f7..cb5397c3 100644 --- a/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From f55aaf7648c036e0206da45254ff9698c4c5e12c Mon Sep 17 00:00:00 2001 +From 9053e875d68b32c56398a1e07c06cc8575ef6533 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 diff --git a/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch b/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch index be85bd35..af3a9404 100644 --- a/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch +++ b/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch @@ -1,4 +1,4 @@ -From a88d2df9239ae4acd27ae2fa8097e957c9af82c1 Mon Sep 17 00:00:00 2001 +From e636f163882891bc71e45f6cf4051e9909fe624c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 15 Apr 2021 18:58:07 -0700 Subject: [PATCH] clang: Switch defaults to dwarf-5 debug info on Linux diff --git a/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 668cbe92..731df510 100644 --- a/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From 98477da239c066b9630b969c66b6468bbc35a980 Mon Sep 17 00:00:00 2001 +From a1bd4222dea53463bd2c15c6a98842be715a7b8f 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/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index 0cf92926..d58ea765 100644 --- a/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From a7855091d730910093cd3922ec8364b5d7ad9416 Mon Sep 17 00:00:00 2001 +From 24ace165961972b9c228cd580eb5cacfde006c4c 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 diff --git a/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index a20cb7ff..8c0eaa48 100644 --- a/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From a1ef57c134d9a9c8b1914f1d6e462f2cbf47c1ba Mon Sep 17 00:00:00 2001 +From adbadcc16f0dc7c323644bfc2f0e5752644f9e4c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES diff --git a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index a00853e2..94f9272a 100644 --- a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From f94c4a49fecce77c7c217a445e4db0ee840dcdae Mon Sep 17 00:00:00 2001 +From 019c9ff3e7ae0d5710618d1562995359805f9aea Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips @@ -13,10 +13,10 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+) diff --git a/compiler-rt/lib/scudo/standalone/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/CMakeLists.txt -index 8c3708d3a45f..f6687db1a663 100644 +index d6ffa448d7e0..22caf11f6223 100644 --- a/compiler-rt/lib/scudo/standalone/CMakeLists.txt +++ b/compiler-rt/lib/scudo/standalone/CMakeLists.txt -@@ -134,6 +134,10 @@ append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread SCUDO_LINK_FLAGS) +@@ -137,6 +137,10 @@ append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread SCUDO_LINK_FLAGS) append_list_if(FUCHSIA zircon SCUDO_LINK_LIBS) diff --git a/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch index 3fd61c51..5a99074b 100644 --- a/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 9ddf8c26e50067029fbee9072e2066567f3f29b1 Mon Sep 17 00:00:00 2001 +From 014e2f701a92e9cd82a1f1dbccb0037057825ac4 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 23 May 2021 10:27:29 +0000 Subject: [PATCH] libunwind: Added unw_backtrace method diff --git a/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch b/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch index 18697ec3..06514062 100644 --- a/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch +++ b/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch @@ -1,4 +1,4 @@ -From bf3f1e570a08c1d78d025db054fe670512083def Mon Sep 17 00:00:00 2001 +From ad072b670c36eb51cfc20daa53cfe7ba4cd19e25 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 29 May 2021 13:42:25 -0700 Subject: [PATCH] compiler-rt: Use uintptr_t instead of _Unwind_Word diff --git a/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch b/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch index 7034ea6f..515f980e 100644 --- a/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch +++ b/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch @@ -1,4 +1,4 @@ -From 8868489317495de1175cd353e4b793e89f2dbdc6 Mon Sep 17 00:00:00 2001 +From 16736f026aeb9db163fb296e088316252f2578e0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Jun 2021 08:42:36 -0700 Subject: [PATCH] compiler-rt: Do not force thumb mode directive diff --git a/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch b/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch deleted file mode 100644 index 4983d323..00000000 --- a/recipes-devtools/clang/clang/0035-Drop-the-git-suffix-from-various-version-variables.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 5786d2b8541cf95e26e99bd4e6d5d5b094e269c6 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Wed, 23 Jun 2021 16:25:06 +0800 -Subject: [PATCH] Drop the 'git' suffix from various version variables - -Upstream-Status: Backport [cherry-picked from branch 12.0.0] - -Signed-off-by: Changqing Li -Signed-off-by: Khem Raj ---- - libcxx/CMakeLists.txt | 2 +- - libcxxabi/CMakeLists.txt | 2 +- - libunwind/CMakeLists.txt | 2 +- - llvm/CMakeLists.txt | 6 +++--- - .../llvm/include/llvm/Config/llvm-config.h | 2 +- - 5 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt -index b1e25358d41a..0048f3284ac2 100644 ---- a/libcxx/CMakeLists.txt -+++ b/libcxx/CMakeLists.txt -@@ -27,7 +27,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUIL - project(libcxx CXX C) - - set(PACKAGE_NAME libcxx) -- set(PACKAGE_VERSION 13.0.0git) -+ set(PACKAGE_VERSION 13.0.0) - set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") - set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") - -diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index 971629d81dbe..a3e25d8e67ca 100644 ---- a/libcxxabi/CMakeLists.txt -+++ b/libcxxabi/CMakeLists.txt -@@ -28,7 +28,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_B - project(libcxxabi CXX C) - - set(PACKAGE_NAME libcxxabi) -- set(PACKAGE_VERSION 11.0.0git) -+ set(PACKAGE_VERSION 11.0.0) - set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") - set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") - -diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt -index 81eddbc24879..8b6811ac648e 100644 ---- a/libunwind/CMakeLists.txt -+++ b/libunwind/CMakeLists.txt -@@ -24,7 +24,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_B - project(libunwind LANGUAGES C CXX ASM) - - set(PACKAGE_NAME libunwind) -- set(PACKAGE_VERSION 13.0.0git) -+ set(PACKAGE_VERSION 13.0.0) - set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") - set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") - -diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt -index af53a26d2d67..052bdb4e7881 100644 ---- a/llvm/CMakeLists.txt -+++ b/llvm/CMakeLists.txt -@@ -800,8 +800,8 @@ if (TENSORFLOW_C_LIB_PATH) - include_directories(${TENSORFLOW_C_LIB_PATH}/include) - if (NOT TF_PROTO_HEADERS) - message(STATUS "TF_PROTO_HEADERS not defined. Looking for tensorflow pip package.") -- execute_process(COMMAND -- ${Python3_EXECUTABLE} "-m" "pip" "show" "tensorflow" -+ execute_process(COMMAND -+ ${Python3_EXECUTABLE} "-m" "pip" "show" "tensorflow" - OUTPUT_VARIABLE TF_PIP_OUT) - if ("${TF_PIP_OUT}" STREQUAL "") - message(FATAL ERROR "Tensorflow pip package is also required for 'development' mode (protobuf headers)") -@@ -833,7 +833,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "") - include_directories(${TENSORFLOW_AOT_PATH}/include) - add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src - ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime) -- install(TARGETS tf_xla_runtime EXPORT LLVMExports -+ install(TARGETS tf_xla_runtime EXPORT LLVMExports - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime) - set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime) - endif() -diff --git a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h -index ba85df023ae6..f19c22ad13c0 100644 ---- a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h -+++ b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h -@@ -80,7 +80,7 @@ - #define LLVM_VERSION_PATCH 0 - - /* LLVM version string */ --#define LLVM_VERSION_STRING "13.0.0git" -+#define LLVM_VERSION_STRING "13.0.0" - - /* Whether LLVM records statistics for use with GetStatistics(), - * PrintStatistics() or PrintStatisticsJSON() diff --git a/recipes-devtools/clang/clang/0036-clang-Do-not-use-install-relative-libc-headers.patch b/recipes-devtools/clang/clang/0035-clang-Do-not-use-install-relative-libc-headers.patch similarity index 95% rename from recipes-devtools/clang/clang/0036-clang-Do-not-use-install-relative-libc-headers.patch rename to recipes-devtools/clang/clang/0035-clang-Do-not-use-install-relative-libc-headers.patch index 4706f109..f17c35fc 100644 --- a/recipes-devtools/clang/clang/0036-clang-Do-not-use-install-relative-libc-headers.patch +++ b/recipes-devtools/clang/clang/0035-clang-Do-not-use-install-relative-libc-headers.patch @@ -1,4 +1,4 @@ -From 7415c342c26a8cb09ccb7279d3e8cbe958adcc44 Mon Sep 17 00:00:00 2001 +From 75fbe5c2c8f4798dbffca047d18e5831de61aef5 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 diff --git a/recipes-devtools/clang/clang/0037-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch b/recipes-devtools/clang/clang/0036-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch similarity index 96% rename from recipes-devtools/clang/clang/0037-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch rename to recipes-devtools/clang/clang/0036-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch index 6b6ad04d..43efcfb5 100644 --- a/recipes-devtools/clang/clang/0037-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch +++ b/recipes-devtools/clang/clang/0036-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch @@ -1,7 +1,7 @@ -From aafdcb50517464cc915da3108e1d7422610a4fde Mon Sep 17 00:00:00 2001 +From 46b27761196036bc0d076bfe31636bdb43f4df6b Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Wed, 20 Oct 2021 17:30:36 -0700 -Subject: [PATCH 37/37] clang: Fix how driver finds GCC installation path on +Subject: [PATCH] clang: Fix how driver finds GCC installation path on OpenEmbedded Fix how Clang Driver finds GCC installation path on OpenEmbedded @@ -95,6 +95,3 @@ index 553cb985737f..355c7798a7aa 100644 Version = CandidateVersion; GCCTriple.setTriple(CandidateTriple); // FIXME: We hack together the directory name here instead of --- -2.33.1 - diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index eb2ff215..d084900a 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -44,9 +44,8 @@ SRC_URI = "\ file://0032-libunwind-Added-unw_backtrace-method.patch \ file://0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch \ file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ - file://0035-Drop-the-git-suffix-from-various-version-variables.patch \ - file://0036-clang-Do-not-use-install-relative-libc-headers.patch \ - file://0037-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch \ + file://0035-clang-Do-not-use-install-relative-libc-headers.patch \ + file://0036-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " From 3a19923ba9131aaea3a6f9b991b9ab750d0dc80e Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 10 Nov 2021 11:17:23 +0000 Subject: [PATCH 086/166] clang: don't use lnr lnr is deprecated, simply use ln -rs instead. Signed-off-by: Ross Burton (cherry picked from commit 0590f78e1516401bfc32873426132262378c1e3a) --- recipes-devtools/clang/clang_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index a87a0ef0..e58b3bbc 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -201,7 +201,7 @@ endif()\n" ${D}${libdir}/cmake/llvm/LLVMExports-release.cmake if [ -n "${LLVM_LIBDIR_SUFFIX}" ]; then mkdir -p ${D}${nonarch_libdir} mv ${D}${libdir}/clang ${D}${nonarch_libdir}/clang - lnr ${D}${nonarch_libdir}/clang ${D}${libdir}/clang + ln -rs ${D}${nonarch_libdir}/clang ${D}${libdir}/clang rmdir --ignore-fail-on-non-empty ${D}${libdir} fi for t in clang clang++ llvm-nm llvm-ar llvm-as llvm-ranlib llvm-strip; do From 7b6b1c9641bb81ab307f708bf283be993472b059 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Tue, 16 Nov 2021 12:02:52 +0800 Subject: [PATCH 087/166] castxml: add branch and switch to using https Github no longer supports fetching using git protocol and bitbake now requires explicit branch. Signed-off-by: Anuj Mittal (cherry picked from commit b712d7b265d27d388e88ce55b533a8d2d2c260d7) --- recipes-devtools/castxml/castxml_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/castxml/castxml_git.bb b/recipes-devtools/castxml/castxml_git.bb index f2c6b3ed..f295038e 100644 --- a/recipes-devtools/castxml/castxml_git.bb +++ b/recipes-devtools/castxml/castxml_git.bb @@ -2,7 +2,7 @@ SUMMARY = "C-family abstract syntax tree XML output tool." LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI = "git://github.com/CastXML/CastXML" +SRC_URI = "git://github.com/CastXML/CastXML;protocol=https;branch=master" # 0.3.6 is the release for LLVM/Clang v11.0.0 SRCREV = "902ac163f0291fcfc459f58691481e88c9f91dea" From 54e2c2a90001e621018e028ba1bbbb6774d0f356 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Tue, 16 Nov 2021 12:04:14 +0800 Subject: [PATCH 088/166] spirv-llvm-translator: add explicit branch Bitbake now shows warnings if branch parameter is not supplied explicitly. Signed-off-by: Anuj Mittal (cherry picked from commit 4e28225ed669b5ecc35b5e921ae09063fac62280) --- .../spirv-llvm-translator/spirv-llvm-translator_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb index 9942ca0c..bf391ab6 100644 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb @@ -3,7 +3,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=47e311aa9caedd1b3abf098bd7814d1d" BRANCH = "llvm_release_130" SRC_URI = "git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;branch=${BRANCH} \ - git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/SPIRV-Headers;name=headers \ + git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/SPIRV-Headers;name=headers;branch=master \ " PV = "13.0.0" From 621966f1c5b35fc9fb366ae08aafbeb8225899f9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 18 Nov 2021 09:54:36 -0800 Subject: [PATCH 089/166] glibc-tests: Pin compiler to gcc glibc is not yet compilable for clang and glibc-tests is driven out of glibc sources in essense Signed-off-by: Khem Raj (cherry picked from commit 81dca6d47885a35ffe9c05827e83670d500b7535) --- conf/nonclangable.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index 60d48410..7e92d718 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -14,6 +14,7 @@ TOOLCHAIN:pn-glibc-locale = "gcc" TOOLCHAIN:pn-glibc-mtrace = "gcc" TOOLCHAIN:pn-glibc-scripts = "gcc" TOOLCHAIN:pn-glibc-testsuite = "gcc" +TOOLCHAIN:pn-glibc-tests = "gcc" TOOLCHAIN:pn-grub = "gcc" TOOLCHAIN:pn-grub-efi = "gcc" From e60970a3bb87053dab98211fbac1fce020f64596 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Nov 2021 13:36:24 -0800 Subject: [PATCH 090/166] libcxx: Set CMAKE_BUILD_WITH_INSTALL_RPATH cmake 3.22+ is causing install failures e.g. | -- Install configuration: "Debug" | -- Installing: /mnt/b/yoe/master/build/tmp/work/armv7at2hf-neon-yoe-linux-gnueabi/libcxx/13.0.1-r0/image/usr/lib/libc++.so.1.0 | -- Installing: /mnt/b/yoe/master/build/tmp/work/armv7at2hf-neon-yoe-linux-gnueabi/libcxx/13.0.1-r0/image/usr/lib/libc++.so.1 | -- Set runtime path of "/mnt/b/yoe/master/build/tmp/work/armv7at2hf-neon-yoe-linux-gnueabi/libcxx/13.0.1-r0/image/usr/lib/libc++.so.1.0" to "" | -- Installing: /mnt/b/yoe/master/build/tmp/work/armv7at2hf-neon-yoe-linux-gnueabi/libcxx/13.0.1-r0/image/usr/lib/libc++.so | CMake Error at cmake_install.cmake:88 (file): | file RPATH_CHANGE could not write new RPATH: | | | | to the file: | | /mnt/b/yoe/master/build/tmp/work/armv7at2hf-neon-yoe-linux-gnueabi/libcxx/13.0.1-r0/image/usr/lib/libc++.so | | Call Stack (most recent call first): | /mnt/b/yoe/master/build/tmp/work/armv7at2hf-neon-yoe-linux-gnueabi/libcxx/13.0.1-r0/build/projects/libcxx/cmake_install.cmake:56 (include) | Apply a workaround by building install time rpaths directly during build time too. Real fix perhaps will be in cmake somewhere. Signed-off-by: Khem Raj (cherry picked from commit 85fb0a622e0e9a7b2bb7e7035d66dab90e0432b4) --- recipes-devtools/clang/libcxx_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index 4ce6814f..116dbef1 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb @@ -61,6 +61,7 @@ EXTRA_OECMAKE += "\ -DLIBCXX_CXX_ABI_LIBRARY_PATH=${B}/lib${LLVM_LIBDIR_SUFFIX} \ -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi;libunwind' \ -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \ + -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ " EXTRA_OECMAKE:append:class-target = " \ From 85c11d312f22156942161707e6fd01d40611a110 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 2 Dec 2021 18:56:30 -0800 Subject: [PATCH 091/166] clang: Update to 13.0.1-rc1 Changes in this release * 19b8368225dc [X86][VARARG] Assign MMO earlier to avoid prolog insert point been sunk across VASTART_SAVE_XMM_REGS * 41c85bbb43e4 [X86][NFC] Pre-commit test to show prolog insert problem * 9dc7d6d5e326 [SystemZ] Give the EXRL_Pseudo a size value of 6 bytes. * 32bb956916e3 Bad SLPVectorization shufflevector replacement, resulting in write to wrong memory location * 93edfb23b18b [SLP][NFC]Add a test to show an issue with incorrectly extracted pointers. * 162f3f18c945 [Aarch64] Correct register class for pseudo instructions * 8be24d19fefa [MergeICmps] Don't merge icmps derived from pointers with addressspaces * 9e084f4194e6 Fix building with GCC 12: * d5159b99105d MLIR can't support -Bsymbolic link option, fail at CMake time with a helpful message instead of broken ru ntime * ff2cb6e400c3 [clang] Partially revert d8cd7806310c51af912a647a6ca46de62ff13214. * ed38280d006c [ARM] Use hardware TLS register in Thumb2 mode when -mtp=cp15 is passed * 216200aff268 [libc++] Fix hang in counting_semaphore::try_acquire * 00f64ccb49d9 [libc++] Remove non-atomic "platform" semaphore implementations. * 6cf25deec7d0 [libc++] counting_semaphore should not be default-constructible. * d218ef07a072 Re-apply the fix on DwarfEHPrepare and add a test Signed-off-by: Khem Raj (cherry picked from commit 1b1640576a5e299d8675024b083dd794f5f082c9) --- recipes-devtools/clang/clang.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 3293e1ff..19510105 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "1" -SRCREV ?= "08e3a5ccd952edee36b3c002e3a29c6b1b5153de" +SRCREV ?= "19b8368225dc9ec5a0da547eae48c10dae13522d" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" From f127d79fae9ddb0eb0b97b3400564f576f35e170 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 5 Dec 2021 00:45:33 -0800 Subject: [PATCH 092/166] Use GCC runtime on ppc32 and armv5 libcxx does not build for armv5 due to atomic locks issue and compile-rt cross build needs to be fixed for ppc32 Signed-off-by: Khem Raj (cherry picked from commit e411e74db0fff0d1a915855daacff11f37a74e25) --- classes/clang.bbclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index d2340aa8..91f4da38 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -25,6 +25,8 @@ UNWINDLIB:armeb = "--unwindlib=libgcc" UNWINDLIB_libc-klibc = "--unwindlib=libgcc" LIBCPLUSPLUS ??= "" +LIBCPLUSPLUS:powerpc = "-stdlib=libstdc++" +LIBCPLUSPLUS:armv5 = "-stdlib=libstdc++" CXXFLAGS:append:toolchain-clang = " ${LIBCPLUSPLUS}" LDFLAGS:append:toolchain-clang = " ${COMPILER_RT} ${LIBCPLUSPLUS}" @@ -73,6 +75,8 @@ TOOLCHAIN ??= "gcc" RUNTIME ??= "gnu" #RUNTIME:toolchain-gcc = "gnu" RUNTIME:armeb = "gnu" +RUNTIME:armv5 = "gnu" +RUNTIME:powerpc = "gnu" TOOLCHAIN:class-native = "gcc" TOOLCHAIN:class-nativesdk = "gcc" From deb6007ecf06ef9d85266e7825cf58913e8cd76c Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Tue, 7 Dec 2021 05:04:15 +0000 Subject: [PATCH 093/166] clang: for x86_64, correct GCC install search path for OpenEmbedded Host Build on OpenEmbedded Host, compiler-rt-native do_configure failed with following error: compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin/clang -target x86_64-linux -isystem/path/to/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/include -O2 -pipe /path/to/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/share/cmake-3.21/Modules/CMakeCCompilerABI.c` | /build/tmp-glibc/hosttools/ld: cannot find crtbeginS.o: No such file or directory | /build/tmp-glibc/hosttools/ld: cannot find -lgcc | /build/tmp-glibc/hosttools/ld: cannot find -lgcc | clang-13: error: linker command failed with exit code 1 (use -v to see invocation) Since OpenEmbedded Host's gcc install path is different with clang's default search form, patch for OpenEmbedded Host's gcc library install path. Signed-off-by: Changqing Li (cherry picked from commit edca114de1c04bdce4fe6b71ab42f4b0aa2e88e7) --- ...-Fix-lib-paths-for-OpenEmbedded-Host.patch | 81 +++++++++++++++++ ...ry-search-path-for-OpenEmbedded-Host.patch | 86 +++++++++++++++++++ recipes-devtools/clang/common.inc | 2 + .../clang/llvm-project-source.inc | 31 +++++++ 4 files changed, 200 insertions(+) create mode 100644 recipes-devtools/clang/clang/0037-Fix-lib-paths-for-OpenEmbedded-Host.patch create mode 100644 recipes-devtools/clang/clang/0038-Correct-library-search-path-for-OpenEmbedded-Host.patch diff --git a/recipes-devtools/clang/clang/0037-Fix-lib-paths-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0037-Fix-lib-paths-for-OpenEmbedded-Host.patch new file mode 100644 index 00000000..2a2fff3b --- /dev/null +++ b/recipes-devtools/clang/clang/0037-Fix-lib-paths-for-OpenEmbedded-Host.patch @@ -0,0 +1,81 @@ +From 76e66abe135908b9d987e9a96aab0176391ee38a 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 + +Under OpenEmbedded Host, while building with clang-native, it cannot find +the GCCInstallPath, which causing following error: +[snip] +compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin/clang +-target x86_64-linux +-isystem/path/to/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/include +-O2 -pipe +/path/to/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/share/cmake-3.21/Modules/CMakeCCompilerABI.c` +hosttools/ld: cannot find crtbeginS.o: No such file or directory +[snip] + +Before this patch: +compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin/clang +clang version 13.0.1 (https://github.com/llvm/llvm-project 08e3a5ccd952edee36b3c002e3a29c6b1b5153de) +Target: x86_64-unknown-linux-gnu +Thread model: posix +InstalledDir: /build/tmp-glibc/work/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin +Found candidate GCC installation: /usr/lib/gcc/x86_64-wrs-linux/10.2.0 + +After this patch: +compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin/clang +clang version 13.0.1 (https://github.com/llvm/llvm-project 08e3a5ccd952edee36b3c002e3a29c6b1b5153de) +Thread model: posix +InstalledDir: /build/tmp-glibc/work/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin +Found candidate GCC installation: /usr/lib/gcc/x86_64-wrs-linux/10.2.0 +Found candidate GCC installation: /usr/lib/x86_64-wrs-linux/10.2.0 +Selected GCC installation: /usr/lib/x86_64-wrs-linux/10.2.0 +Candidate multilib: .;@m64 +Selected multilib: .;@m64 + +Summary: +For OpenEmbedded Host, sysroots are of the form/usr/lib//x.y.z. +Take x86-64 as example, the default triple is x86_64-unknown-linux-gnu. +For clang-native, the target vendor is '-unknown', need to test current distro +to follow above form. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Changqing Li +--- + 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 3350bda709f5..c03a839d1c72 100644 +--- a/clang/lib/Driver/ToolChains/Gnu.cpp ++++ b/clang/lib/Driver/ToolChains/Gnu.cpp +@@ -22,6 +22,7 @@ + #include "clang/Driver/Options.h" + #include "clang/Driver/Tool.h" + #include "clang/Driver/ToolChain.h" ++#include "clang/Driver/Distro.h" + #include "llvm/Option/ArgList.h" + #include "llvm/Support/CodeGen.h" + #include "llvm/Support/Path.h" +@@ -2530,6 +2531,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) { ++ Distro Distro(D.getVFS(), TargetTriple); + // Locations relative to the system lib directory where GCC's triple-specific + // directories might reside. + struct GCCLibSuffix { +@@ -2547,7 +2549,8 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( + // files in that location, not just GCC installation data. + {CandidateTriple.str(), "..", + TargetTriple.getVendor() == llvm::Triple::Freescale || +- TargetTriple.getVendor() == llvm::Triple::OpenEmbedded}, ++ TargetTriple.getVendor() == llvm::Triple::OpenEmbedded || ++ Distro.IsOpenEmbedded()}, + + // This is the normal place. + {"gcc/" + CandidateTriple.str(), "../..", GCCDirExists}, +-- +2.32.0 + diff --git a/recipes-devtools/clang/clang/0038-Correct-library-search-path-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0038-Correct-library-search-path-for-OpenEmbedded-Host.patch new file mode 100644 index 00000000..b114483b --- /dev/null +++ b/recipes-devtools/clang/clang/0038-Correct-library-search-path-for-OpenEmbedded-Host.patch @@ -0,0 +1,86 @@ +From f790cf664e6d7ac2da4bf24caa82e7f166d592d8 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 + +For OpenEmbedded Host, the gcc install path is +/usr/lib/x86_64-[distroname]-linux/[gcc-version]. +So the library search path is not found with default triple +'x86_64-linux-gnu' for x86_64. Causing following error: +[snip] +compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin/clang +-target x86_64-linux +-isystem/path/to/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/include +-O2 -pipe +/path/to/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/share/cmake-3.21/Modules/CMakeCCompilerABI.c` +| /build/tmp-glibc/hosttools/ld: cannot find -lgcc +| /build/tmp-glibc/hosttools/ld: cannot find -lgcc +| clang-13: error: linker command failed with exit code 1 (use -v to see invocation) +[snip] + +before this patch: +b59da142f2b0:$ /path/to/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin/clang --print-search-dirs +programs: =/build/tmp-glibc/work/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin +libraries: =/build/tmp-glibc/work/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/lib/clang/13.0.1:/build/tmp-glibc/work/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin/../lib://lib://usr/lib + +after this patch: +b59da142f2b0:$ /path/to/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin/clang --print-search-dirs +programs: =/build/tmp-glibc/work/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin +libraries: =/build/tmp-glibc/work/x84_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/lib/clang/13.0.1:/usr/lib/x86_64-wrs-linux/10.2.0://lib/x86_64-wrs-linux://usr/lib/x86_64-wrs-linux:/build/tmp-glibc/work/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin/../lib://lib://usr/lib + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Changqing Li +--- + clang/include/clang/Driver/Distro.h | 2 ++ + clang/lib/Driver/Distro.cpp | 1 + + clang/lib/Driver/ToolChains/Linux.cpp | 1 + + 3 files changed, 4 insertions(+) + +diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h +index 0d2a0939639e..5556f473899f 100644 +--- a/clang/include/clang/Driver/Distro.h ++++ b/clang/include/clang/Driver/Distro.h +@@ -43,6 +43,7 @@ public: + RHEL7, + Fedora, + Gentoo, ++ //CLANG_EXTRA_OE_DISTRO_NAME + OpenSUSE, + UbuntuHardy, + UbuntuIntrepid, +@@ -130,6 +131,7 @@ public: + + bool IsGentoo() const { return DistroVal == Gentoo; } + ++ //CLANG_EXTRA_OE_DISTRO_CHECK + /// @} + }; + +diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp +index c4cf4e48b5b8..2695c0ab85c2 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) { + .Case("sles", Distro::OpenSUSE) + .Case("opensuse", Distro::OpenSUSE) + .Case("exherbo", Distro::Exherbo) ++ //CLANG_EXTRA_OE_DISTRO_CASE + .Default(Distro::UnknownDistro); + return Version; + } +diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp +index 46c83b002e6c..e356616229c1 100644 +--- a/clang/lib/Driver/ToolChains/Linux.cpp ++++ b/clang/lib/Driver/ToolChains/Linux.cpp +@@ -77,6 +77,7 @@ std::string Linux::getMultiarchTriple(const Driver &D, + return "x86_64-linux-android"; + if (TargetEnvironment == llvm::Triple::GNUX32) + return "x86_64-linux-gnux32"; ++ //CLANG_EXTRA_OE_DISTRO_TRIPLE + return "x86_64-linux-gnu"; + case llvm::Triple::aarch64: + if (IsAndroid) +-- +2.32.0 + diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index d084900a..8b827d40 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -46,6 +46,8 @@ SRC_URI = "\ file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ file://0035-clang-Do-not-use-install-relative-libc-headers.patch \ file://0036-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch \ + file://0037-Fix-lib-paths-for-OpenEmbedded-Host.patch \ + file://0038-Correct-library-search-path-for-OpenEmbedded-Host.patch \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " diff --git a/recipes-devtools/clang/llvm-project-source.inc b/recipes-devtools/clang/llvm-project-source.inc index de7ba8a7..a8400305 100644 --- a/recipes-devtools/clang/llvm-project-source.inc +++ b/recipes-devtools/clang/llvm-project-source.inc @@ -22,6 +22,10 @@ PACKAGES = "" # space separated list of additional distro vendor values we want to support e.g. # "yoe webos" or "-yoe -webos" '-' is optional CLANG_EXTRA_OE_VENDORS ?= "${TARGET_VENDOR} ${SDK_VENDOR}" +# Extra OE DISTRO that want to support as build host. space separated list of additional distro. +# ":" separated the ID in "/etc/os-release" and the triple for finding gcc on this OE DISTRO. +# eg: "poky:poky wrlinux:wrs" +CLANG_EXTRA_OE_DISTRO ?= "poky:poky" python add_distro_vendor() { import subprocess @@ -51,6 +55,33 @@ python add_distro_vendor() { subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) cmd = d.expand("sed -i 's#//CLANG_EXTRA_OE_VENDORS_CASES#%s#g' -i ${S}/llvm/lib/Support/Triple.cpp" % (case)) subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) + + + case = "" + triple = "" + name = "" + check = "" + oe_names = "" + distros = d.getVar('CLANG_EXTRA_OE_DISTRO') + for distro in distros.split(): + distro_id = distro.split(":")[0].replace('-','_') + distro_triple = distro.split(":")[1] + case += '\\n .Case("' + distro_id + '", Distro::' + distro_id.upper() + ')' + triple += '\\n if (Distro.Is' + distro_id.upper() + '())\\n return "x86_64-' + distro_triple + '-linux",' + name += '\\n '+ distro_id.upper() + ',' + check += '\\nbool Is' + distro_id.upper() + '() const { return DistroVal == ' + distro_id.upper() + '; }' + oe_names += distro_id.upper() + ' ||' + + check += '\\nbool IsOpenEmbedded() const { return DistroVal == ' + oe_names[0:-3] + '; }' + + cmd = d.expand("sed -i 's#//CLANG_EXTRA_OE_DISTRO_NAME#%s#g' ${S}/clang/include/clang/Driver/Distro.h" % (name)) + subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) + cmd = d.expand("sed -i 's#//CLANG_EXTRA_OE_DISTRO_CHECK#%s#g' ${S}/clang/include/clang/Driver/Distro.h" % (check)) + subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) + cmd = d.expand("sed -i 's#//CLANG_EXTRA_OE_DISTRO_TRIPLES#%s#g' ${S}/clang/lib/Driver/ToolChains/Linux.cpp" % (triple)) + subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) + cmd = d.expand("sed -i 's#//CLANG_EXTRA_OE_DISTRO_CASES#%s#g' -i ${S}/clang/lib/Driver/Distro.cpp" % (case)) + subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) } do_patch[postfuncs] += "add_distro_vendor" From 330e3b1046b538631fdcd20450e704140bd6696c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 14 Dec 2021 09:22:09 -0800 Subject: [PATCH 094/166] clang: Update to latest on 13.x Fixes brought in * f3394dc82c20 [libc++] Fix wrongly non-inline basic_string::shrink_to_fit * 52bfd2c1ccd8 [ELF] Do not report undefined weak references in shared libraries Signed-off-by: Khem Raj (cherry picked from commit 6445e77ab1e645dcb2e27ceb35b64d31a2210114) --- recipes-devtools/clang/clang.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 19510105..c98a7dcf 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "1" -SRCREV ?= "19b8368225dc9ec5a0da547eae48c10dae13522d" +SRCREV ?= "f3394dc82c20feea943293eda162b5aff2930ac9" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" From c0a364ee60ac911ab3a723f7bc5be7db320a7030 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 14 Dec 2021 11:07:49 -0800 Subject: [PATCH 095/166] clang: Set CLANG_DEFAULT_PIE_ON_LINUX to ON This is new variable added in clang 14+ to defaultl to PIE Signed-off-by: Khem Raj (cherry picked from commit b71782147bc6064b52f06b23f9430a18ed39b19f) --- recipes-devtools/clang/clang_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index e58b3bbc..450c1a96 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -120,6 +120,7 @@ LLDB:mipsel = "" EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF \ -DLLVM_ENABLE_PIC=ON \ + -DCLANG_DEFAULT_PIE_ON_LINUX=ON \ -DLLVM_BINDINGS_LIST='' \ -DLLVM_ENABLE_FFI=ON \ -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \ From 4f1171face225e7de18ad932fc9ff1c18bf3ca9f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 14 Dec 2021 23:19:20 -0800 Subject: [PATCH 096/166] clang: Add packageconfig for lldb lua support Ensures right dependencies are added, and keep it off by default Signed-off-by: Khem Raj (cherry picked from commit 6967fccd0bda4508a98e341faaac5becdfdef3b7) --- recipes-devtools/clang/clang_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 450c1a96..6e2fdbaa 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -69,6 +69,7 @@ PACKAGECONFIG[shared-libs] = "-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB= PACKAGECONFIG[terminfo] = "-DLLVM_ENABLE_TERMINFO=ON -DCOMPILER_RT_TERMINFO_LIB=ON,-DLLVM_ENABLE_TERMINFO=OFF -DCOMPILER_RT_TERMINFO_LIB=OFF,ncurses," PACKAGECONFIG[pfm] = "-DLLVM_ENABLE_LIBPFM=ON,-DLLVM_ENABLE_LIBPFM=OFF,libpfm," PACKAGECONFIG[lldb-wchar] = "-DLLDB_EDITLINE_USE_WCHAR=1,-DLLDB_EDITLINE_USE_WCHAR=0," +PACKAGECONFIG[lldb-lua] = "-DLLDB_ENABLE_LUA=ON,-DLLDB_ENABLE_LUA=OFF,lua" PACKAGECONFIG[bootstrap] = "-DCLANG_ENABLE_BOOTSTRAP=On -DCLANG_BOOTSTRAP_PASSTHROUGH='${PASSTHROUGH}' -DBOOTSTRAP_LLVM_ENABLE_LTO=Thin -DBOOTSTRAP_LLVM_ENABLE_LLD=ON,,," PACKAGECONFIG[eh] = "-DLLVM_ENABLE_EH=ON,-DLLVM_ENABLE_EH=OFF,," PACKAGECONFIG[rtti] = "-DLLVM_ENABLE_RTTI=ON,-DLLVM_ENABLE_RTTI=OFF,," From f91a11aeb53a4394c896cad98bb1c972f808f4b9 Mon Sep 17 00:00:00 2001 From: guillaume-pais-siemens <79512275+guillaume-pais-siemens@users.noreply.github.com> Date: Tue, 5 Oct 2021 07:53:45 +0200 Subject: [PATCH 097/166] DEPENDS on virtual/${TARGET_PREFIX}binutils ```virtual/${TARGET_PREFIX}binutils``` shall be used and not ```binutils-cross-${TARGET_ARCH}``` In the case of an external arm toolchain, ```binutils-cross-aarch64``` does not exist and creates following error: ``` Missing or unbuildable dependency chain was: ['tisdk-base-image', 'packagegroup-core-standalone-sdk-target', 'libcxx-dev', 'compiler-rt', 'clang-cross-aarch64', 'binutils-cross-aarch64'] ``` Signed-off-by: Guillaume Pais (cherry picked from commit 0304ff4e533698a036b4df7307d0a2af29441414) --- recipes-devtools/clang/clang-cross_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang-cross_git.bb b/recipes-devtools/clang/clang-cross_git.bb index fd8ece58..abceb3d0 100644 --- a/recipes-devtools/clang/clang-cross_git.bb +++ b/recipes-devtools/clang/clang-cross_git.bb @@ -11,7 +11,7 @@ PN = "clang-cross-${TARGET_ARCH}" require clang.inc require common-source.inc inherit cross -DEPENDS += "clang-native binutils-cross-${TARGET_ARCH}" +DEPENDS += "clang-native virtual/${TARGET_PREFIX}binutils" do_install() { install -d ${D}${bindir} From 1519dcdc3d94f69a2979acbdf678ce8c3248f9dd Mon Sep 17 00:00:00 2001 From: "Hsia-Jun(Randy) Li" Date: Wed, 4 Aug 2021 17:12:31 +0800 Subject: [PATCH 098/166] clang: support android runtime Signed-off-by: Hsia-Jun(Randy) Li (cherry picked from commit a494bbb6ec44a723703951a061c2adde5bca6852) --- classes/clang.bbclass | 7 ++++--- conf/layer.conf | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 91f4da38..7ad5ccbd 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -95,15 +95,16 @@ def clang_base_deps(d): if not d.getVar('INHIBIT_DEFAULT_DEPS', False): if not oe.utils.inherits(d, 'allarch') : ret = " clang-cross-${TARGET_ARCH} virtual/libc " + if (d.getVar('RUNTIME').find('android') != -1): + ret += " libcxx" + return ret if (d.getVar('RUNTIME').find('llvm') != -1): ret += " compiler-rt libcxx" elif (d.getVar('COMPILER_RT').find('-rtlib=compiler-rt') != -1): ret += " compiler-rt " else: ret += " libgcc " - if (d.getVar('RUNTIME').find('llvm') != -1): - ret += " libcxx" - elif (d.getVar('COMPILER_RT').find('--unwindlib=libunwind') != -1): + if (d.getVar('COMPILER_RT').find('--unwindlib=libunwind') != -1): ret += " libcxx " elif (d.getVar('LIBCPLUSPLUS').find('-stdlib=libc++') != -1): ret += " libcxx " diff --git a/conf/layer.conf b/conf/layer.conf index fdfb8362..0736baf9 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -28,7 +28,7 @@ PREFERRED_PROVIDER_libgcc-initial = "libgcc-initial" PREFERRED_PROVIDER_llvm = "clang" PREFERRED_PROVIDER_llvm-native = "clang-native" PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang" -PREFERRED_PROVIDER_libunwind = "${@bb.utils.contains("RUNTIME", "llvm", "libcxx", "libunwind", d)}" +PREFERRED_PROVIDER_libunwind = "${@bb.utils.contains_any("RUNTIME", "llvm android", "libcxx", "libunwind", d)}" INHERIT += "clang" # Do not include clang in SDK unless user wants to From f00fa0c9a229fa973fdaeb19f1b2d33fc1e89ed9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 15 Dec 2021 13:38:28 -0800 Subject: [PATCH 099/166] clang: Create cross symlinks for more binutils This helps in creating cross utilities to be used during OE cross builds as noted in Issue #491 Signed-off-by: Khem Raj (cherry picked from commit fd587eaf0340faba2f85cf7b2e254a290500c48c) --- recipes-devtools/clang/clang_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 6e2fdbaa..0201d44a 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -206,7 +206,8 @@ endif()\n" ${D}${libdir}/cmake/llvm/LLVMExports-release.cmake ln -rs ${D}${nonarch_libdir}/clang ${D}${libdir}/clang rmdir --ignore-fail-on-non-empty ${D}${libdir} fi - for t in clang clang++ llvm-nm llvm-ar llvm-as llvm-ranlib llvm-strip; do + for t in clang clang++ llvm-nm llvm-ar llvm-as llvm-ranlib llvm-strip llvm-objcopy llvm-objdump llvm-readelf \ + llvm-addr2line llvm-dwp llvm-size llvm-strings llvm-cov; do ln -sf $t ${D}${bindir}/${TARGET_PREFIX}$t done } From cfc36aa437d25e6b0629b18b556f531c4c34da39 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 27 Dec 2021 14:27:47 -0800 Subject: [PATCH 100/166] clang: Update to latest 13.x relase This brings in * 9468a0f95385 [PowerPC] Define XL-compatible macros only for AIX and Linux * ae24102617c9 [X86] Don't add implicit REP prefix to VIA PadLock xstore * c95753ff5c11 [NFC][X86] Add MC tests for all untested VIA PadLock instructions * d9f927f2cfe8 [sanitizer] Disable test incompartible with recert GLIBC * abc0cf92bb14 [sanitizer] Intercept lstat on Linux * b40f07b048c4 [msan] Add stat-family interceptors on Linux * 59289a837b00 [AA] Handle callbr instructions in alias analysis * 5b2990a6ff77 [ELF] #undef PPC to support GCC powerpc32 build * bdd28a2a138f [sanitizer] Don't test __pthread_mutex_lock with GLIBC 2.34 * 2c6c3e4b713b [asan] Fix "no matching function" on GCC * c1b51f098751 [msan] Disabled test failing on new GLIBC * 578e500fe5ba [Sparc] Create an error when `__builtin_longjmp` is used * cd4ebb2918ae [LazyCallGraph] Skip blockaddresses * d4a57c84834c workflows: Update workaround for lldb on Mac OS * d96358a28193 [compiler-rt] Increase kDlsymAllocPoolSize to fix test failures * c446ac46746e [Passes] Fix relative lookup table converter pass * 9fb79e6940b2 [PowerPC] Handle base load with reservation mnemonic * e68f640deecc [ELF][PPC32] Make R_PPC32_PLTREL retain .got * 87ca22cba2fa [Support] Attempt to fix deadlock in ThreadGroup * d904698b53e4 [Analysis] Ignore casts and unary ops for uninitialized values * 5932c004778c [MC][ELF] Fix accepting abbreviated form with Type change * 29276490d13c [MC][ELF] Do not error on parsing .debug_* section directive for MIPS * 724ed207b760 [ELF] Hint -z nostart-stop-gc for __start_ undefined references Signed-off-by: Khem Raj (cherry picked from commit e59b8f560a9e436f13588223c8f30c63d02ca3d8) --- recipes-devtools/clang/clang.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index c98a7dcf..753dbd8e 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "1" -SRCREV ?= "f3394dc82c20feea943293eda162b5aff2930ac9" +SRCREV ?= "9468a0f953858c696fc5a454420ef4c96e35637c" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" From 71c6b6c517f68cdf15f845561b9d55a6ebae1158 Mon Sep 17 00:00:00 2001 From: Serikzhan Kazi Date: Sun, 9 Jan 2022 12:50:12 +0100 Subject: [PATCH 101/166] clang-tools-extra: apply upstream patch run-clang-tidy.py is being run on unique files only when using this patch Signed-off-by: Serikzhan Kazi (cherry picked from commit 414445a701a68a46627d2aa072ee737c50ceb751) --- ...-run-clang-tidy-on-unique-files-only.patch | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 recipes-devtools/clang/clang/0039-run-clang-tidy-on-unique-files-only.patch diff --git a/recipes-devtools/clang/clang/0039-run-clang-tidy-on-unique-files-only.patch b/recipes-devtools/clang/clang/0039-run-clang-tidy-on-unique-files-only.patch new file mode 100644 index 00000000..500be31b --- /dev/null +++ b/recipes-devtools/clang/clang/0039-run-clang-tidy-on-unique-files-only.patch @@ -0,0 +1,31 @@ +From 0dc856ed20e0fb64dd7cb0a10db35c58c3ef95e6 Mon Sep 17 00:00:00 2001 +From: Serikzhan Kazi +Date: Sat, 6 Nov 2021 19:53:18 +1300 +Subject: [PATCH] [clang-tidy] run-clang-tidy.py: analyze unique files only + +The files in compile-commands.json can potentially include duplicates. +Change run-clang-tidy.py so that it does not run on the duplicate entries. + +Differential Revision: https://reviews.llvm.org/D112926 +--- + clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py +index acd1ed6979c0..e6cff6a7414d 100755 +--- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py ++++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py +@@ -273,8 +273,8 @@ def main(): + + # Load the database and extract all files. + database = json.load(open(os.path.join(build_path, db_path))) +- files = [make_absolute(entry['file'], entry['directory']) +- for entry in database] ++ files = set([make_absolute(entry['file'], entry['directory']) ++ for entry in database]) + + max_task = args.j + if max_task == 0: +-- +2.34.1 + From a4e83108aa094de307cd0dae8f5df80640de839e Mon Sep 17 00:00:00 2001 From: Andres Beltran Date: Mon, 10 Jan 2022 23:51:48 +0000 Subject: [PATCH 102/166] nativesdk-clang-glue: delete spdx tasks Extending poky's create-spdx class for SDKs results in a dependency loop: nativesdk-clang-glue.bb:do_create_spdx ->clang_git.bb:do_create_spdx -> clang-crosssdk_git.bb:do_create_spdx -> nativesdk-clang-glue.bb:do_create_spdx. Delete spdx tasks from nativesdk-clang-blue.bb Signed-off-by: Andres Beltran (cherry picked from commit 02ed1fbaff0e4a101908adb710f0bff7d6ec189d) --- recipes-devtools/clang/nativesdk-clang-glue.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-devtools/clang/nativesdk-clang-glue.bb b/recipes-devtools/clang/nativesdk-clang-glue.bb index f1f34d5f..4e0c6faa 100644 --- a/recipes-devtools/clang/nativesdk-clang-glue.bb +++ b/recipes-devtools/clang/nativesdk-clang-glue.bb @@ -31,3 +31,5 @@ deltask do_compile deltask do_patch deltask do_fetch deltask do_unpack +deltask do_create_spdx +deltask do_create_runtime_spdx From f291c4df56cc28d368c2734ca87e1a636e622950 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 27 Jan 2022 11:18:14 -0800 Subject: [PATCH 103/166] clang: Update to 13.0.1-rc3 Changes in this uprev * 75e33f71c2da [X86] combineVectorHADDSUB - remove the broken HOP(x,x) merging code (PR51974) * 6349865a8f37 [CMake] Don't use -fno-semantic-interposition with Clang<=13 * b3dcd156472f [ARM] Define ComplexPatternFuncMutatesDAG * 1f1854ce0fe5 [Driver][test] Fix undefined-libs.cpp when CLANG_DEFAULT_UNWINDLIB is libunwind * fc043d8a256b Revert "[lld][CMake] Add LLD_DEFAULT_NOSTART_STOP_GC" * 5869ea6c6254 [sanitizer] msan build fix on non linux platforms * b9a243d1cac2 (tag: llvmorg-13.0.1-rc2) [Coroutines] Enhance symmetric transfer for constant CmpInst * 9d9efb1f67ff [lld][CMake] Add LLD_DEFAULT_NOSTART_STOP_GC * 52a400d8e4c4 [InlineCost] model calls to llvm.is.constant* more carefully * eaeb7dcf3249 ARM: make FastISel & GISel pass -1 to ADJCALLSTACKUP to signal no callee pop. * eecd0f055baa Have lit preserve SOURCE_DATE_EPOCH * bfb1bd1b9906 [Clang][Sema] Avoid crashing for va_arg expressions with bool argument * 1ac6bb3c4dd4 [Clang][CFG] check children statements of asm goto * 12aaa8553f82 [InstCombine] Remove attributes after hoisting free above null check * 35df3f98639e [DIArgList] Re-unique after changing operands to fix non-determinism * 0f915e755eae [RegAllocFast] Fix nondeterminism in debuginfo generation * 33f7aa65f5d7 [DSE] Fix invalid removal of store instruction * 426297cce9d5 [DSE] Add test case showing bug PR52774. * 0d44201451f0 [MachineOutliner] Don't outline functions starting with PATCHABLE_FUNCTION_ENTER/FENTRL_CALL * 69fcfdedc505 [AArch64][GlobalISel] Fix an crash in RBS due to a new regclass being added. * d31f8cc6884b [AArch64] Avoid crashing on invalid -Wa,-march= values * 67b5bc26bde8 [DebugInfo] Check DIEnumerator bit width when comparing for equality Signed-off-by: Khem Raj (cherry picked from commit 8030ce2de1167a5a047b7d39c3058fa105fc8164) --- recipes-devtools/clang/clang.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 753dbd8e..8b1cc80d 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "1" -SRCREV ?= "9468a0f953858c696fc5a454420ef4c96e35637c" +SRCREV ?= "75e33f71c2dae584b13a7d1186ae0a038ba98838" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" From 4c79b3f4b8de794224405660da7d4e900613a98c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 4 Feb 2022 09:09:47 -0800 Subject: [PATCH 104/166] spirv-llvm-translator: Upgrade to latest master to support clang14 Signed-off-by: Khem Raj (cherry picked from commit 72337b33b8a78a87a01dc867a26748035c7bba6d) --- .../spirv-llvm-translator/spirv-llvm-translator_git.bb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb index bf391ab6..eb2618cb 100644 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb @@ -1,14 +1,14 @@ LICENSE = "NCSA" LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=47e311aa9caedd1b3abf098bd7814d1d" -BRANCH = "llvm_release_130" +BRANCH = "master" SRC_URI = "git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;branch=${BRANCH} \ - git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/SPIRV-Headers;name=headers;branch=master \ + git://github.com/KhronosGroup/SPIRV-Headers;protocol=https;destsuffix=git/SPIRV-Headers;name=headers;branch=master \ " -PV = "13.0.0" -SRCREV = "098034eab7d0f92da428465b2fcc76abd8dd4119" -SRCREV_headers = "ae217c17809fadb232ec94b29304b4afcd417bb4" +PV = "14.0.0" +SRCREV = "8937ecf4698c9283c92c35b65e5b97e6e0acf869" +SRCREV_headers = "b42ba6d92faf6b4938e6f22ddd186dbdacc98d78" SRCREV_FORMAT = "default_headers" From 21b8094f437a7c13ea7016e00ca019061a3ecba6 Mon Sep 17 00:00:00 2001 From: Esben Haabendal Date: Tue, 18 Jan 2022 15:57:26 +0100 Subject: [PATCH 105/166] clang: Remove unintended dependency on gcc-runtime Commit a494bbb6ec44 ("clang: support android runtime") introduced an unrelated change causing builds with RUNTIME="llvm" and COMPILER_RT not set to get a dependency on virtual/${TARGET_PREFIX}compilerlibs. This is clearly unrelated to addition of support for android runtime, and causing unwanted depdencies to gcc-runtime for LLVM builds. Signed-off-by: Esben Haabendal (cherry picked from commit 03648d617e04ec46c227a52e35f5eff766f79814) --- classes/clang.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 7ad5ccbd..9f1f210c 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -104,7 +104,9 @@ def clang_base_deps(d): ret += " compiler-rt " else: ret += " libgcc " - if (d.getVar('COMPILER_RT').find('--unwindlib=libunwind') != -1): + if (d.getVar('RUNTIME').find('llvm') != -1): + ret += " libcxx" + elif (d.getVar('COMPILER_RT').find('--unwindlib=libunwind') != -1): ret += " libcxx " elif (d.getVar('LIBCPLUSPLUS').find('-stdlib=libc++') != -1): ret += " libcxx " From 51e34453a22f9da220683e8ef67187bb44ad43ef Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Thu, 27 Jul 2023 14:06:18 +0200 Subject: [PATCH 106/166] Remove chromium-browser-layer workarounds They seem to be necessary with clang 12. The recent cherry-picks have introduced native versions of the libc++ and libc++abi recipes, and I have managed to finish a full build of chromium-ozone-wayland-114.0.5735.198 without these changes. Signed-off-by: Raphael Kubo da Costa --- conf/layer.conf | 2 -- .../recipes-browser/chromium-ozone-wayland_%.bbappend | 10 ---------- .../recipes-browser/chromium-x11_%.bbappend | 10 ---------- .../chromium/chromium-ozone-wayland_%.bbappend | 6 ------ .../recipes-browser/chromium/chromium-x11_%.bbappend | 6 ------ .../recipes-browser/chromium/gn-native_%.bbappend | 6 ------ .../recipes-browser/gn-native_%.bbappend | 6 ------ 7 files changed, 46 deletions(-) delete mode 100644 dynamic-layers/chromium-browser-layer/recipes-browser/chromium-ozone-wayland_%.bbappend delete mode 100644 dynamic-layers/chromium-browser-layer/recipes-browser/chromium-x11_%.bbappend delete mode 100644 dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend delete mode 100644 dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-x11_%.bbappend delete mode 100644 dynamic-layers/chromium-browser-layer/recipes-browser/chromium/gn-native_%.bbappend delete mode 100644 dynamic-layers/chromium-browser-layer/recipes-browser/gn-native_%.bbappend diff --git a/conf/layer.conf b/conf/layer.conf index 0736baf9..2b81b648 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -11,8 +11,6 @@ LAYERSERIES_COMPAT_clang-layer = "dunfell hardknott honister" LAYERDEPENDS_clang-layer = "core" BBFILES_DYNAMIC += " \ - chromium-browser-layer:${LAYERDIR}/dynamic-layers/chromium-browser-layer/*/*.bb \ - chromium-browser-layer:${LAYERDIR}/dynamic-layers/chromium-browser-layer/*/*.bbappend \ openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \ openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \ networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bb \ diff --git a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium-ozone-wayland_%.bbappend b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium-ozone-wayland_%.bbappend deleted file mode 100644 index ff82a797..00000000 --- a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium-ozone-wayland_%.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -GN_ARGS += "use_lld=true use_gold=false" - -UNWINDLIB_toolchain-clang = "--unwindlib=libgcc" - -DEPENDS_remove = "compiler-rt-native libcxx-native" - -BUILD_CPPFLAGS_remove = "-isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++" -BUILD_LDFLAGS_remove = "-rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}" diff --git a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium-x11_%.bbappend b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium-x11_%.bbappend deleted file mode 100644 index ff82a797..00000000 --- a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium-x11_%.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -GN_ARGS += "use_lld=true use_gold=false" - -UNWINDLIB_toolchain-clang = "--unwindlib=libgcc" - -DEPENDS_remove = "compiler-rt-native libcxx-native" - -BUILD_CPPFLAGS_remove = "-isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++" -BUILD_LDFLAGS_remove = "-rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}" diff --git a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend deleted file mode 100644 index 554578e7..00000000 --- a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -DEPENDS_remove = "compiler-rt-native libcxx-native" - -BUILD_CPPFLAGS_remove = "-isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++" -BUILD_LDFLAGS_remove = "-rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}" diff --git a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-x11_%.bbappend b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-x11_%.bbappend deleted file mode 100644 index 554578e7..00000000 --- a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-x11_%.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -DEPENDS_remove = "compiler-rt-native libcxx-native" - -BUILD_CPPFLAGS_remove = "-isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++" -BUILD_LDFLAGS_remove = "-rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}" diff --git a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/gn-native_%.bbappend b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/gn-native_%.bbappend deleted file mode 100644 index cd60c58d..00000000 --- a/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/gn-native_%.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -DEPENDS_remove = "compiler-rt-native libcxx-native" - -CXXFLAGS_remove = "-isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++" -LDFLAGS_remove = "-rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}" diff --git a/dynamic-layers/chromium-browser-layer/recipes-browser/gn-native_%.bbappend b/dynamic-layers/chromium-browser-layer/recipes-browser/gn-native_%.bbappend deleted file mode 100644 index cd60c58d..00000000 --- a/dynamic-layers/chromium-browser-layer/recipes-browser/gn-native_%.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -DEPENDS_remove = "compiler-rt-native libcxx-native" - -CXXFLAGS_remove = "-isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++" -LDFLAGS_remove = "-rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}" From aeefa94b35974b8a72faad79056d4f9de3be86a9 Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Thu, 27 Jul 2023 14:07:28 +0200 Subject: [PATCH 107/166] nss: Add upstream patches to fix the build with clang Signed-off-by: Raphael Kubo da Costa --- ...ix-Do-not-use-NULL-where-0-is-needed.patch | 44 +++++++++++++++++ ...d-a-clang-13-unused-variable-warning.patch | 49 +++++++++++++++++++ .../recipes-support/nss/nss_3.51.1.bbappend | 6 +++ 3 files changed, 99 insertions(+) create mode 100644 dynamic-layers/openembedded-layer/recipes-support/nss/nss/0001-Bug-1661378-pkix-Do-not-use-NULL-where-0-is-needed.patch create mode 100644 dynamic-layers/openembedded-layer/recipes-support/nss/nss/0001-Bug-1738028-avoid-a-clang-13-unused-variable-warning.patch create mode 100644 dynamic-layers/openembedded-layer/recipes-support/nss/nss_3.51.1.bbappend diff --git a/dynamic-layers/openembedded-layer/recipes-support/nss/nss/0001-Bug-1661378-pkix-Do-not-use-NULL-where-0-is-needed.patch b/dynamic-layers/openembedded-layer/recipes-support/nss/nss/0001-Bug-1661378-pkix-Do-not-use-NULL-where-0-is-needed.patch new file mode 100644 index 00000000..65158b3e --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/nss/nss/0001-Bug-1661378-pkix-Do-not-use-NULL-where-0-is-needed.patch @@ -0,0 +1,44 @@ +From b2ad4a0d31083a5fc1dbfb65b51bff14b2b7942f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 2 Sep 2020 10:45:48 -0700 +Subject: [PATCH] Bug 1661378 - pkix: Do not use NULL where 0 is needed Clang + finds this error + +pkix_logger.c:316:32: error: cast to smaller integer type 'PKIX_ERRORCLASS' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast] + logger->logComponent = (PKIX_ERRORCLASS)NULL; + ^~~~~~~~~~~~~~~~~~~~~ +pkix_logger.c:617:32: error: cast to smaller integer type 'PKIX_ERRORCLASS' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast] + logger->logComponent = (PKIX_ERRORCLASS)NULL; + ^~~~~~~~~~~~~~~~~~~~~ +2 errors generated. + +Signed-off-by: Khem Raj +--- + lib/nss/libpkix/pkix/util/pkix_logger.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/nss/lib/nss/libpkix/pkix/util/pkix_logger.c b/nss/lib/libpkix/pkix/util/pkix_logger.c +index a916e6e4f..10f537a31 100644 +--- a/nss/lib/nss/libpkix/pkix/util/pkix_logger.c ++++ b/nss/lib/libpkix/pkix/util/pkix_logger.c +@@ -313,7 +313,7 @@ pkix_Logger_Destroy( + + logger->callback = NULL; + PKIX_DECREF(logger->context); +- logger->logComponent = (PKIX_ERRORCLASS)NULL; ++ logger->logComponent = (PKIX_ERRORCLASS)0; + + cleanup: + +@@ -614,7 +614,7 @@ PKIX_Logger_Create( + + logger->callback = callback; + logger->maxLevel = 0; +- logger->logComponent = (PKIX_ERRORCLASS)NULL; ++ logger->logComponent = (PKIX_ERRORCLASS)0; + + PKIX_INCREF(loggerContext); + logger->context = loggerContext; +-- +2.41.0 + diff --git a/dynamic-layers/openembedded-layer/recipes-support/nss/nss/0001-Bug-1738028-avoid-a-clang-13-unused-variable-warning.patch b/dynamic-layers/openembedded-layer/recipes-support/nss/nss/0001-Bug-1738028-avoid-a-clang-13-unused-variable-warning.patch new file mode 100644 index 00000000..ff7829e7 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/nss/nss/0001-Bug-1738028-avoid-a-clang-13-unused-variable-warning.patch @@ -0,0 +1,49 @@ +Upstream-status: Backport + +The warnings below are actual errors when building. + +Signed-off-by: Raphael Kubo da Costa +--- +From 99c69dc3ca363ce9ff909531f8581252189905d0 Mon Sep 17 00:00:00 2001 +From: "John M. Schanck" +Date: Mon, 13 Dec 2021 16:35:17 +0000 +Subject: [PATCH] Bug 1738028: avoid a clang 13 unused variable warning in opt + build. r=bbeurdouche + +Differential Revision: https://phabricator.services.mozilla.com/D130309 + +--HG-- +extra : moz-landing-system : lando +--- + lib/certhigh/certvfypkix.c | 2 ++ + lib/freebl/shvfy.c | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/nss/lib/certhigh/certvfypkix.c b/nss/lib/certhigh/certvfypkix.c +index 95d88b53f..7c8784f4e 100644 +--- a/nss/lib/certhigh/certvfypkix.c ++++ b/nss/lib/certhigh/certvfypkix.c +@@ -817,6 +817,8 @@ cert_PkixErrorToNssCode( + void *plContext) + { + int errLevel = 0; ++ (void)errLevel; /* Suppress unused var warning (Bug 1738028) */ ++ + PKIX_Int32 nssErr = 0; + PKIX_Error *errPtr = error; + +diff --git a/nss/lib/freebl/shvfy.c b/nss/lib/freebl/shvfy.c +index da42467fd..0428bf6c0 100644 +--- a/nss/lib/freebl/shvfy.c ++++ b/nss/lib/freebl/shvfy.c +@@ -335,6 +335,7 @@ blapi_SHVerifyFile(const char *shName, PRBool self) + SECStatus rv; + DSAPublicKey key; + int count; ++ (void)count; /* Suppress unused var warning (Bug 1738028) */ + #ifdef FREEBL_USE_PRELINK + int pid = 0; + #endif +-- +2.41.0 + diff --git a/dynamic-layers/openembedded-layer/recipes-support/nss/nss_3.51.1.bbappend b/dynamic-layers/openembedded-layer/recipes-support/nss/nss_3.51.1.bbappend new file mode 100644 index 00000000..a4731ff3 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/nss/nss_3.51.1.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append:toolchain-clang = "\ +file://0001-Bug-1738028-avoid-a-clang-13-unused-variable-warning.patch \ +file://0001-Bug-1661378-pkix-Do-not-use-NULL-where-0-is-needed.patch \ +" From 97e720c38b247f70791cab013c7efce4db68ab5b Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Thu, 27 Jul 2023 14:07:49 +0200 Subject: [PATCH 108/166] harfbuzz: Add upstream patch to fix the build with clang Signed-off-by: Raphael Kubo da Costa --- ...ariable-supp_size-from-plan_subset_e.patch | 50 +++++++++++++++++++ .../harfbuzz/harfbuzz_2.6.4.bbappend | 5 ++ 2 files changed, 55 insertions(+) create mode 100644 recipes-graphics/harfbuzz/harfbuzz/0001-Removed-unused-variable-supp_size-from-plan_subset_e.patch create mode 100644 recipes-graphics/harfbuzz/harfbuzz_2.6.4.bbappend diff --git a/recipes-graphics/harfbuzz/harfbuzz/0001-Removed-unused-variable-supp_size-from-plan_subset_e.patch b/recipes-graphics/harfbuzz/harfbuzz/0001-Removed-unused-variable-supp_size-from-plan_subset_e.patch new file mode 100644 index 00000000..67455b86 --- /dev/null +++ b/recipes-graphics/harfbuzz/harfbuzz/0001-Removed-unused-variable-supp_size-from-plan_subset_e.patch @@ -0,0 +1,50 @@ +Upstream-status: Backport + +Fixes the following build error: + +| ../../harfbuzz-2.6.4/src/hb-subset-cff1.cc:472:33: error: variable 'supp_size' set but not used [-Werror,-Wunused-but-set-variable] +| unsigned int size0, size1, supp_size; +| ^ +| 1 error generated. + +Signed-off-by: Raphael Kubo da Costa +--- +From 243d056ff1c2af583ceb67e5dfbfaac51dc96e63 Mon Sep 17 00:00:00 2001 +From: Andi-Bogdan Postelnicu +Date: Wed, 2 Jun 2021 14:08:11 +0300 +Subject: [PATCH] Removed unused variable `supp_size` from + plan_subset_encoding(...). + +--- + src/hb-subset-cff1.cc | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/hb-subset-cff1.cc b/src/hb-subset-cff1.cc +index df322f845..35dae7b1f 100644 +--- a/src/hb-subset-cff1.cc ++++ b/src/hb-subset-cff1.cc +@@ -469,12 +469,11 @@ struct cff_subset_plan { + unsigned int plan_subset_encoding (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan) + { + const Encoding *encoding = acc.encoding; +- unsigned int size0, size1, supp_size; ++ unsigned int size0, size1; + hb_codepoint_t code, last_code = CFF_UNDEF_CODE; + hb_vector_t supp_codes; + + subset_enc_code_ranges.resize (0); +- supp_size = 0; + supp_codes.init (); + + subset_enc_num_codes = plan->num_output_glyphs () - 1; +@@ -510,7 +509,6 @@ struct cff_subset_plan { + code_pair_t pair = { supp_codes[i], sid }; + subset_enc_supp_codes.push (pair); + } +- supp_size += SuppEncoding::static_size * supp_codes.length; + } + } + supp_codes.fini (); +-- +2.41.0 + diff --git a/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bbappend b/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bbappend new file mode 100644 index 00000000..9d02c11a --- /dev/null +++ b/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append:toolchain-clang = "\ + file://0001-Removed-unused-variable-supp_size-from-plan_subset_e.patch \ +" From 9edce5fbfa686906b84214f7beb20feee4b54570 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 4 Feb 2022 09:08:36 -0800 Subject: [PATCH 109/166] clang: Upgrade to upcoming clang14 release branch Signed-off-by: Khem Raj (cherry picked from commit 6b79646f85f3293e0fbedf07592a94860d659053) --- conf/layer.conf | 2 +- recipes-devtools/clang/clang.inc | 8 +- ...bunwind-headers-when-LIBCXXABI_LIBU.patch} | 8 +- ...l2-to-linker-cmdline-of-xml-is-found.patch | 37 -- ...support-a-new-embedded-linux-target.patch} | 2 +- ...ify-cross-compilation.-Don-t-use-na.patch} | 6 +- ...yInfo-Undefine-libc-functions-if-th.patch} | 8 +- ...llvm-allow-env-override-of-exe-path.patch} | 4 +- ...-driver-Check-sysroot-for-ldso-path.patch} | 10 +- ...ools.cpp-Add-lssp_nonshared-on-musl.patch} | 6 +- ...oes-not-support-128-bit-long-double.patch} | 6 +- ...9-clang-Prepend-trailing-to-sysroot.patch} | 4 +- ...-the-target-sysroot-for-compiler-ru.patch} | 8 +- ...fine-releative-gcc-installation-dir.patch} | 6 +- ...d-and-ldl-along-with-lunwind-for-st.patch} | 6 +- ...TABLE-when-cross-compiling-for-nati.patch} | 8 +- ...-Check-for-atomic-double-intrinsics.patch} | 4 +- ...er-runtime-library-to-link-step-for.patch} | 12 +- ...-clang-Enable-SSP-and-PIE-by-default.patch | 312 ----------------- ...Fix-configure-for-packages-using-fi.patch} | 26 +- ...e-dir-location-for-cross-toolchains.patch} | 6 +- ...dyld-prefix-when-checking-sysroot-f.patch} | 12 +- ...clang-Use-python3-in-python-scripts.patch} | 23 +- ...Yocto-based-GCC-install-search-path.patch} | 8 +- .../clang/clang/0020-fix-path-to-libffi.patch | 26 -- ...Do-not-use-find_library-for-ncurses.patch} | 38 +-- ...r-for-adding-OE-distro-vendor-names.patch} | 6 +- ...r-rt-Use-mcr-based-barrier-on-armv6.patch} | 6 +- ...t-use-backtrace-APIs-on-non-glibc-l.patch} | 2 +- ...ple-for-non-debian-multiarch-linux-.patch} | 6 +- ...scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch} | 6 +- ...aults-to-dwarf-5-debug-info-on-Linux.patch | 28 -- ...scudo-standalone-with-libatomic-on-.patch} | 4 +- ...ibunwind-Added-unw_backtrace-method.patch} | 8 +- ...9-Do-not-force-thumb-mode-directive.patch} | 4 +- ...t-use-install-relative-libc-headers.patch} | 6 +- ...ver-finds-GCC-installation-path-on-.patch} | 8 +- ...Fix-lib-paths-for-OpenEmbedded-Host.patch} | 12 +- ...y-search-path-for-OpenEmbedded-Host.patch} | 16 +- ...se-uintptr_t-instead-of-_Unwind_Word.patch | 35 -- ...e-find-modules-for-terminfo-and-libf.patch | 321 ------------------ ...0034-lldb-Link-with-libatomic-on-x86.patch | 33 ++ ...enembedded-distributions-from-settin.patch | 35 ++ ...standard-search-paths-in-find_librar.patch | 27 -- ...-run-clang-tidy-on-unique-files-only.patch | 31 -- recipes-devtools/clang/clang_git.bb | 20 +- recipes-devtools/clang/common.inc | 75 ++-- recipes-devtools/clang/openmp_git.bb | 4 +- 48 files changed, 266 insertions(+), 1023 deletions(-) rename recipes-devtools/clang/clang/{0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch => 0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch} (90%) delete mode 100644 recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch rename recipes-devtools/clang/clang/{0003-compiler-rt-support-a-new-embedded-linux-target.patch => 0002-compiler-rt-support-a-new-embedded-linux-target.patch} (99%) rename recipes-devtools/clang/clang/{0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch => 0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch} (90%) rename recipes-devtools/clang/clang/{0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch => 0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch} (92%) rename recipes-devtools/clang/clang/{0006-llvm-allow-env-override-of-exe-path.patch => 0005-llvm-allow-env-override-of-exe-path.patch} (92%) rename recipes-devtools/clang/clang/{0007-clang-driver-Check-sysroot-for-ldso-path.patch => 0006-clang-driver-Check-sysroot-for-ldso-path.patch} (87%) rename recipes-devtools/clang/clang/{0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch => 0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch} (86%) rename recipes-devtools/clang/clang/{0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch => 0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch} (84%) rename recipes-devtools/clang/clang/{0010-clang-Prepend-trailing-to-sysroot.patch => 0009-clang-Prepend-trailing-to-sysroot.patch} (92%) rename recipes-devtools/clang/clang/{0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch => 0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch} (86%) rename recipes-devtools/clang/clang/{0012-clang-Define-releative-gcc-installation-dir.patch => 0011-clang-Define-releative-gcc-installation-dir.patch} (91%) rename recipes-devtools/clang/clang/{0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch => 0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch} (87%) rename recipes-devtools/clang/clang/{0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch => 0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch} (78%) rename recipes-devtools/clang/clang/{0015-Check-for-atomic-double-intrinsics.patch => 0014-Check-for-atomic-double-intrinsics.patch} (91%) rename recipes-devtools/clang/clang/{0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch => 0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch} (79%) delete mode 100644 recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch rename recipes-devtools/clang/clang/{0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch => 0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch} (85%) rename recipes-devtools/clang/clang/{0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch => 0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch} (90%) rename recipes-devtools/clang/clang/{0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch => 0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch} (89%) rename recipes-devtools/clang/clang/{0022-clang-Use-python3-in-python-scripts.patch => 0019-clang-Use-python3-in-python-scripts.patch} (84%) rename recipes-devtools/clang/clang/{0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch => 0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch} (93%) delete mode 100644 recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch rename recipes-devtools/clang/clang/{0024-llvm-Do-not-use-find_library-for-ncurses.patch => 0021-llvm-Do-not-use-find_library-for-ncurses.patch} (52%) rename recipes-devtools/clang/clang/{0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch => 0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch} (86%) rename recipes-devtools/clang/clang/{0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch => 0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch} (96%) rename recipes-devtools/clang/clang/{0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch => 0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch} (97%) rename recipes-devtools/clang/clang/{0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch => 0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch} (85%) rename recipes-devtools/clang/clang/{0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch => 0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch} (88%) delete mode 100644 recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch rename recipes-devtools/clang/clang/{0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch => 0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch} (90%) rename recipes-devtools/clang/clang/{0032-libunwind-Added-unw_backtrace-method.patch => 0028-libunwind-Added-unw_backtrace-method.patch} (88%) rename recipes-devtools/clang/clang/{0034-compiler-rt-Do-not-force-thumb-mode-directive.patch => 0029-Do-not-force-thumb-mode-directive.patch} (95%) rename recipes-devtools/clang/clang/{0035-clang-Do-not-use-install-relative-libc-headers.patch => 0030-clang-Do-not-use-install-relative-libc-headers.patch} (88%) rename recipes-devtools/clang/clang/{0036-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch => 0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch} (94%) rename recipes-devtools/clang/clang/{0037-Fix-lib-paths-for-OpenEmbedded-Host.patch => 0032-Fix-lib-paths-for-OpenEmbedded-Host.patch} (92%) rename recipes-devtools/clang/clang/{0038-Correct-library-search-path-for-OpenEmbedded-Host.patch => 0033-Correct-library-search-path-for-OpenEmbedded-Host.patch} (92%) delete mode 100644 recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch delete mode 100644 recipes-devtools/clang/clang/0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch create mode 100644 recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch create mode 100644 recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch delete mode 100644 recipes-devtools/clang/clang/0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch delete mode 100644 recipes-devtools/clang/clang/0039-run-clang-tidy-on-unique-files-only.patch diff --git a/conf/layer.conf b/conf/layer.conf index 2b81b648..718a345c 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -32,7 +32,7 @@ INHERIT += "clang" # Do not include clang in SDK unless user wants to CLANGSDK ??= "0" -LLVMVERSION = "13.0.1" +LLVMVERSION = "14.0.0" require conf/nonclangable.conf require conf/nonscanable.conf diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 8b1cc80d..7e90e2de 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -4,14 +4,14 @@ LLVM_DIR = "llvm${LLVM_RELEASE}" LLVM_GIT ?= "git://github.com/llvm" LLVM_GIT_PROTOCOL ?= "https" -MAJOR_VER = "13" +MAJOR_VER = "14" MINOR_VER = "0" -PATCH_VER = "1" +PATCH_VER = "0" -SRCREV ?= "75e33f71c2dae584b13a7d1186ae0a038ba98838" +SRCREV ?= "b2ca48a8412270e323ac8441772d0d69190a8417" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" -BRANCH = "release/13.x" +BRANCH = "release/14.x" LLVMMD5SUM = "8a15a0759ef07f2682d2ba4b893c9afe" CLANGMD5SUM = "ff42885ed2ab98f1ecb8c1fc41205343" diff --git a/recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch similarity index 90% rename from recipes-devtools/clang/clang/0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch rename to recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch index 0829f186..1bf74805 100644 --- a/recipes-devtools/clang/clang/0002-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 581275e8e40784c6a3f30e69bb5cc7513fe3b475 Mon Sep 17 00:00:00 2001 +From 5b502aa8a8a8e33082912e46e48ba43d7eb0f196 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 27 Aug 2017 10:37:49 -0700 Subject: [PATCH] libcxxabi: Find libunwind headers when @@ -17,10 +17,10 @@ Signed-off-by: Khem Raj 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index f3060a5d1f93..bca2178f3203 100644 +index 58c21059c602..7709aedf0bde 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt -@@ -511,14 +511,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}") +@@ -525,14 +525,9 @@ endif() # Setup Source Code #=============================================================================== @@ -36,7 +36,7 @@ index f3060a5d1f93..bca2178f3203 100644 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} ${LIBCXXABI_LIBUNWIND_PATH}/include ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES} -@@ -529,15 +524,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) +@@ -543,15 +538,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) NO_CMAKE_FIND_ROOT_PATH ) diff --git a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch deleted file mode 100644 index 999bc5e3..00000000 --- a/recipes-devtools/clang/clang/0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 1b71b8fb344a065903ac2fc5b7680e99742be721 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 22 May 2017 17:36:16 -0700 -Subject: [PATCH] lldb: Add -lxml2 to linker cmdline of xml is found - -When cross compiling for systems where static libs -for libxml are not available cmake's detection mechanism -resort to linking with libxml.so but doesnt use -lxml2 -liblldbHost.a however requires libxml on linker -cmdline _after_ itself so its use of symbols from libxml2 -can be resolved. Here check for libxml2 being detected and -add it if its found. - -Fixes - -| ../../../../lib/liblldbHost.a(XML.cpp.o): In function `lldb_private::XMLDocument::Clear()': -| /usr/src/debug/lldb/5.0.0+gitAUTOINC+69edad7913_08d6b47db9_cf6c5b3386-r0/git/tools/lldb/source/Host/common/XML.cpp:29: undefined reference to `xmlFreeDoc' -| /usr/src/debug/lldb/5.0.0+gitAUTOINC+69edad7913_08d6b47db9_cf6c5b3386-r0/git/tools/lldb/source/Host/common/XML.cpp:29: undefined reference to `xmlFreeDoc' - -Signed-off-by: Khem Raj ---- - lldb/source/Host/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt -index a018fd6c183d..936bdd461350 100644 ---- a/lldb/source/Host/CMakeLists.txt -+++ b/lldb/source/Host/CMakeLists.txt -@@ -137,7 +137,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "NetBSD") - list(APPEND EXTRA_LIBS kvm) - endif() - if (LLDB_ENABLE_LIBXML2) -- list(APPEND EXTRA_LIBS ${LIBXML2_LIBRARIES}) -+ list(APPEND EXTRA_LIBS xml2) - endif() - if (HAVE_LIBDL) - list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS}) diff --git a/recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch similarity index 99% rename from recipes-devtools/clang/clang/0003-compiler-rt-support-a-new-embedded-linux-target.patch rename to recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch index 10124a63..89ac3d12 100644 --- a/recipes-devtools/clang/clang/0003-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 f02e1904c58e43119ba49c9c8f5831b47e5d6ebe Mon Sep 17 00:00:00 2001 +From a21dbb76c8ef5812b2e05cf93682da02650b6166 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/0004-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 similarity index 90% rename from recipes-devtools/clang/clang/0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch rename to recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch index 5717dce3..b573ad83 100644 --- a/recipes-devtools/clang/clang/0004-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 02d7443ec851ccdd64953ec49b12018c1f66a292 Mon Sep 17 00:00:00 2001 +From 1a7e174cddac6738c5bc28fd642be8cc687138bf 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 @@ -20,10 +20,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 e12d1eb1cebf..522a3a6a421c 100644 +index 3a41aa43e406..3bbfbca1f645 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt -@@ -78,7 +78,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOL +@@ -67,7 +67,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOL "Build for a bare-metal target.") if (COMPILER_RT_STANDALONE_BUILD) diff --git a/recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch similarity index 92% rename from recipes-devtools/clang/clang/0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch rename to recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index 6d58e94d..897b4c39 100644 --- a/recipes-devtools/clang/clang/0005-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 57cc5e82da381cc6a69376dcf9398caa82a59648 Mon Sep 17 00:00:00 2001 +From cac469f7a8ea6fe4bfb4e6151a5dd058dfa62947 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 @@ -13,7 +13,7 @@ Signed-off-by: Khem Raj 1 file changed, 21 insertions(+) diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def -index ded53617b304..da612e9b4352 100644 +index 9c1abef33b28..29d2a79ddecc 100644 --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def +++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def @@ -815,6 +815,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") @@ -66,7 +66,7 @@ index ded53617b304..da612e9b4352 100644 TLI_DEFINE_ENUM_INTERNAL(lstat64) TLI_DEFINE_STRING_INTERNAL("lstat64") /// void *malloc(size_t size); -@@ -1256,6 +1271,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") +@@ -1262,6 +1277,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf") TLI_DEFINE_ENUM_INTERNAL(stat) TLI_DEFINE_STRING_INTERNAL("stat") /// int stat64(const char *path, struct stat64 *buf); @@ -76,7 +76,7 @@ index ded53617b304..da612e9b4352 100644 TLI_DEFINE_ENUM_INTERNAL(stat64) TLI_DEFINE_STRING_INTERNAL("stat64") /// int statvfs(const char *path, struct statvfs *buf); -@@ -1391,6 +1409,9 @@ TLI_DEFINE_STRING_INTERNAL("times") +@@ -1397,6 +1415,9 @@ TLI_DEFINE_STRING_INTERNAL("times") TLI_DEFINE_ENUM_INTERNAL(tmpfile) TLI_DEFINE_STRING_INTERNAL("tmpfile") /// FILE *tmpfile64(void) diff --git a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch similarity index 92% rename from recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch rename to recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch index 9923b543..beb00919 100644 --- a/recipes-devtools/clang/clang/0006-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From 5d8ea7590df4cb9d1973a137ddf260e1df137010 Mon Sep 17 00:00:00 2001 +From 8402337515bc0c75af621551dca9eb1cfc4ae611 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 path @@ -15,7 +15,7 @@ Signed-off-by: Khem Raj 1 file changed, 7 insertions(+) diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp -index 1a2f04552d13..019d8f2b5c5e 100644 +index 8ed88f33ead4..0b9ee0ee0008 100644 --- a/llvm/tools/llvm-config/llvm-config.cpp +++ b/llvm/tools/llvm-config/llvm-config.cpp @@ -247,6 +247,13 @@ Typical components:\n\ diff --git a/recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch similarity index 87% rename from recipes-devtools/clang/clang/0007-clang-driver-Check-sysroot-for-ldso-path.patch rename to recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch index 61d4761a..b32f18e2 100644 --- a/recipes-devtools/clang/clang/0007-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 964f0d68fe16e003c42c75ebfc17fbd01676f652 Mon Sep 17 00:00:00 2001 +From 5c8b6edfe03a72a75e698db7cbc7c409f08e3c45 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 @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 1 file changed, 16 insertions(+) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index c9360fc67165..4b1d6bff7231 100644 +index f85c04df4f6c..97e987c37e4a 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -476,11 +476,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -493,11 +493,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = "lib64"; Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; @@ -37,7 +37,7 @@ index c9360fc67165..4b1d6bff7231 100644 break; case llvm::Triple::riscv32: { StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple); -@@ -502,6 +510,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -519,6 +527,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { case llvm::Triple::sparcv9: LibDir = "lib64"; Loader = "ld-linux.so.2"; @@ -48,7 +48,7 @@ index c9360fc67165..4b1d6bff7231 100644 break; case llvm::Triple::systemz: LibDir = "lib"; -@@ -516,6 +528,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -533,6 +545,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/0008-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 similarity index 86% rename from recipes-devtools/clang/clang/0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch rename to recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index 2c298697..fccc41d9 100644 --- a/recipes-devtools/clang/clang/0008-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 7cf3b10fa0664d856d65ac0ad991e1875ac28be5 Mon Sep 17 00:00:00 2001 +From 00484dc7cdf327f97fe09389fe5fe2ebd9e8fba4 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 @@ -13,10 +13,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 da39f29e4619..9103b153d461 100644 +index 7a9570a686f4..633daa58590d 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -630,6 +630,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, +@@ -622,6 +622,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (IsIAMCU) CmdArgs.push_back("-lgloss"); diff --git a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch similarity index 84% rename from recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch rename to recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch index 81d18dd5..a8f6335e 100644 --- a/recipes-devtools/clang/clang/0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch @@ -1,4 +1,4 @@ -From db02270329248b6af2e174f12532245eb7f6aaa0 Mon Sep 17 00:00:00 2001 +From bcf28119ce4c70e6d9c140d3393d556af897ddce Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 02:00:11 -0700 Subject: [PATCH] clang: musl/ppc does not support 128-bit long double @@ -9,10 +9,10 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+) diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h -index 7c14a4eb9410..b182ef53348f 100644 +index ac52eb219f54..ff2eb80b7d64 100644 --- a/clang/lib/Basic/Targets/PPC.h +++ b/clang/lib/Basic/Targets/PPC.h -@@ -392,6 +392,10 @@ public: +@@ -395,6 +395,10 @@ public: LongDoubleFormat = &llvm::APFloat::IEEEdouble(); } diff --git a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch similarity index 92% rename from recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch rename to recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch index 964ecdba..5f41f6ab 100644 --- a/recipes-devtools/clang/clang/0010-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From 9a6c282dd14e88b477593a185822635fee21330e Mon Sep 17 00:00:00 2001 +From 6ee100ac3386d411e03855c5cdb9df7545a127de 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 @@ -24,7 +24,7 @@ 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 4b1d6bff7231..9daf35aefc4e 100644 +index 97e987c37e4a..f9e233f15dfc 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp @@ -181,7 +181,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) diff --git a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch similarity index 86% rename from recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch rename to recipes-devtools/clang/clang/0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index fefa00c8..c735b401 100644 --- a/recipes-devtools/clang/clang/0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From c85d06487d397894aa0fd14ff210789b453d78fc Mon Sep 17 00:00:00 2001 +From 17bf3579a12359af825ca2815e273470a483ebb7 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 @@ -15,18 +15,18 @@ 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 6c1b88141c45..ee6a257a6cb4 100644 +index d657d21bfcdb..e83a556b708c 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -13,6 +13,7 @@ - #include "ToolChains/Flang.h" + #include "ToolChains/InterfaceStubs.h" #include "clang/Basic/ObjCRuntime.h" #include "clang/Basic/Sanitizers.h" +#include "clang/Basic/Version.h" #include "clang/Config/config.h" #include "clang/Driver/Action.h" #include "clang/Driver/Driver.h" -@@ -410,7 +411,10 @@ StringRef ToolChain::getOSLibName() const { +@@ -419,7 +420,10 @@ StringRef ToolChain::getOSLibName() const { } std::string ToolChain::getCompilerRTPath() const { diff --git a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch similarity index 91% rename from recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch rename to recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch index d1a572e7..bbe4eb76 100644 --- a/recipes-devtools/clang/clang/0012-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch @@ -1,4 +1,4 @@ -From 71e923b1d1b611ce3a4ae2a08408059a0162b99f Mon Sep 17 00:00:00 2001 +From 8f44109cb3b837966d401233daf2887a0a0d579b 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 @@ -14,10 +14,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 9103b153d461..4f12262bbf47 100644 +index 633daa58590d..d22eaf698eb8 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2529,19 +2529,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2517,19 +2517,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/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch similarity index 87% rename from recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch rename to recipes-devtools/clang/clang/0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index baa612c6..4d91a7ae 100644 --- a/recipes-devtools/clang/clang/0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From f033f7183eb509f3b99d8f197eb5d5159f961c0b Mon Sep 17 00:00:00 2001 +From 7d99f8a3c0ddd74d188d54f82f957843456bcdde 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 @@ -20,10 +20,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 0ffe95795381..358eb98cf528 100644 +index 6364cd133e0b..60ba461ea0f5 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -1450,6 +1450,8 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, +@@ -1472,6 +1472,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/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch similarity index 78% rename from recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch rename to recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index e6998fba..4bbe6b5f 100644 --- a/recipes-devtools/clang/clang/0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From 6e6960945953dead105f229da0cd34d860ebfe6c Mon Sep 17 00:00:00 2001 +From b6b764295a5d003264dd5b843ff1f513a3c40991 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 @@ -10,11 +10,11 @@ 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 01cd37124841..f50be9d967df 100644 +index 2a39b6a40a28..8a441729c943 100644 --- a/llvm/cmake/modules/CrossCompile.cmake +++ b/llvm/cmake/modules/CrossCompile.cmake -@@ -79,6 +79,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) - -DLLVM_EXTERNAL_PROJECTS="${llvm_external_projects_arg}" +@@ -84,6 +84,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) + -DLLVM_ENABLE_RUNTIMES="${llvm_enable_runtimes_arg}" ${external_project_source_dirs} -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}" + -DPYTHON_EXECUTABLE="${PYTHON_EXECUTABLE}" diff --git a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch similarity index 91% rename from recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch rename to recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch index 04e8abc1..4e5ad633 100644 --- a/recipes-devtools/clang/clang/0015-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From 806b95e07916c0647957e7ed1ee1d4d6bcf55bc9 Mon Sep 17 00:00:00 2001 +From 1b1bcc66f885233a3378ba9819c9a20323490cea 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 @@ -15,7 +15,7 @@ Signed-off-by: Khem Raj 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/cmake/modules/CheckAtomic.cmake b/llvm/cmake/modules/CheckAtomic.cmake -index 04eed1448482..e890cfecd139 100644 +index 3c5ba72993a3..34a1b950bbed 100644 --- a/llvm/cmake/modules/CheckAtomic.cmake +++ b/llvm/cmake/modules/CheckAtomic.cmake @@ -30,10 +30,11 @@ function(check_working_cxx_atomics64 varname) diff --git a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch similarity index 79% rename from recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch rename to recipes-devtools/clang/clang/0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index e089ebb3..cc223668 100644 --- a/recipes-devtools/clang/clang/0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -1,4 +1,4 @@ -From ddbda1f2de59192ff883ba49c68dfac8e2fb98b3 Mon Sep 17 00:00:00 2001 +From cc0a281fbf68db9fadc74cee24d63b12a0b4d1eb 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,21 +14,21 @@ 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 496429f3841e..99ca892533b1 100644 +index 12dcdf954405..54e446e2aecd 100644 --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt -@@ -194,7 +194,7 @@ split_list(LIBCXX_LINK_FLAGS) - if (LIBCXX_ENABLE_SHARED) +@@ -212,7 +212,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 - PRIVATE ${LIBCXX_LIBRARIES}) + PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)") set_target_properties(cxx_shared PROPERTIES COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}" -@@ -272,7 +272,7 @@ set(CMAKE_STATIC_LIBRARY_PREFIX "lib") - if (LIBCXX_ENABLE_STATIC) +@@ -290,7 +290,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 - PRIVATE ${LIBCXX_LIBRARIES}) + PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)") diff --git a/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch deleted file mode 100644 index e1e7cbfd..00000000 --- a/recipes-devtools/clang/clang/0016-clang-Enable-SSP-and-PIE-by-default.patch +++ /dev/null @@ -1,312 +0,0 @@ -From 64d8a913cfee1e8d0cf4019a18ead5edaadb6303 Mon Sep 17 00:00:00 2001 -From: Evangelos Foutras -Date: Thu, 26 Dec 2019 15:46:19 -0800 -Subject: [PATCH] clang: Enable SSP and PIE by default - -This is a minimal set of changes needed to make clang use SSP and PIE by -default on Arch Linux. Tests that were easy to adjust have been changed -accordingly; only test/Driver/linux-ld.c has been marked as "expected -failure" due to the number of changes it would require (mostly replacing -crtbegin.o with crtbeginS.o). - -Doing so is needed in order to align clang with the new default GCC -behavior in Arch which generates PIE executables by default and also -defaults to -fstack-protector-strong. It is not meant to be a long term -solution, but a simple temporary fix. - -Hopefully these changes will be obsoleted by the introduction upstream -of a compile-time option (https://bugs.llvm.org/show_bug.cgi?id=13410) - -Taken from ArchLinux - https://git.archlinux.org/svntogit/packages.git/plain/trunk/enable-SSP-and-PIE-by-default.patch?h=packages/clang - -Signed-off-by: Khem Raj ---- - clang/lib/Driver/ToolChains/Linux.cpp | 10 ++++++++-- - clang/lib/Driver/ToolChains/Linux.h | 4 ++++ - clang/test/Driver/cross-linux.c | 16 ++++++++-------- - clang/test/Driver/env.c | 2 +- - clang/test/Driver/fsanitize.c | 14 +++++++------- - clang/test/Driver/gcc-toolchain.cpp | 2 +- - clang/test/Driver/hexagon-toolchain-elf.c | 2 +- - clang/test/Driver/linux-as.c | 4 ++-- - clang/test/Driver/linux-ld.c | 2 ++ - clang/test/Driver/ppc-abi.c | 4 ++-- - clang/test/Driver/riscv32-toolchain.c | 4 ++-- - clang/test/Driver/riscv64-toolchain.c | 4 ++-- - clang/test/Driver/stack-protector.c | 4 ++-- - 13 files changed, 42 insertions(+), 30 deletions(-) - -diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 9daf35aefc4e..8c6102f47192 100644 ---- a/clang/lib/Driver/ToolChains/Linux.cpp -+++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -668,8 +668,14 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs, - } - - bool Linux::isPIEDefault() const { -- return (getTriple().isAndroid() && !getTriple().isAndroidVersionLT(16)) || -- getTriple().isMusl() || getSanitizerArgs().requiresPIE(); -+ const bool IsMips = getTriple().isMIPS(); -+ const bool IsAndroid = getTriple().isAndroid(); -+ -+ if (IsMips || IsAndroid) -+ return (getTriple().isAndroid() && !getTriple().isAndroidVersionLT(16)) || -+ getTriple().isMusl() || getSanitizerArgs().requiresPIE(); -+ -+ return true; - } - - bool Linux::IsAArch64OutlineAtomicsDefault(const ArgList &Args) const { -diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h -index 169a37c44072..b3544a0c7681 100644 ---- a/clang/lib/Driver/ToolChains/Linux.h -+++ b/clang/lib/Driver/ToolChains/Linux.h -@@ -46,6 +46,10 @@ public: - bool isPIEDefault() const override; - bool isNoExecStackDefault() const override; - bool IsMathErrnoDefault() const override; -+ virtual LangOptions::StackProtectorMode -+ GetDefaultStackProtectorLevel(bool KernelOrKext) const override { -+ return LangOptions::SSPStrong; -+ } - SanitizerMask getSupportedSanitizers() const override; - void addProfileRTLibs(const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs) const override; -diff --git a/clang/test/Driver/cross-linux.c b/clang/test/Driver/cross-linux.c -index 59f5a97d2d9d..8d0e9e724aa0 100644 ---- a/clang/test/Driver/cross-linux.c -+++ b/clang/test/Driver/cross-linux.c -@@ -43,8 +43,8 @@ - // CHECK-MULTI32-I386: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/10.2.0/../../../../i386-unknown-linux/bin{{/|\\\\}}ld" - // CHECK-MULTI32-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" - // CHECK-MULTI32-I386: "-m" "elf_i386" --// CHECK-MULTI32-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/10.2.0]]{{/|\\\\}}crtbegin.o" --// CHECK-MULTI32-I386: "-L[[gcc_install]]" -+// CHECK-MULTI32-I386: "crti.o" "crtbeginS.o" -+// CHECK-MULTI32-I386: "-L[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/10.2.0]]" - // CHECK-MULTI32-I386: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib/../lib32" - // CHECK-MULTI32-I386: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib" - // CHECK-MULTI32-I386: "-L[[sysroot]]/lib" -@@ -61,8 +61,8 @@ - // CHECK-MULTI32-X86-64: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/10.2.0/../../../../i386-unknown-linux/bin{{/|\\\\}}ld" - // CHECK-MULTI32-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" - // CHECK-MULTI32-X86-64: "-m" "elf_x86_64" --// CHECK-MULTI32-X86-64: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/10.2.0]]/64{{/|\\\\}}crtbegin.o" --// CHECK-MULTI32-X86-64: "-L[[gcc_install]]/64" -+// CHECK-MULTI32-X86-64: "crti.o" "crtbeginS.o" -+// CHECK-MULTI32-X86-64: "-L[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/10.2.0]]/64" - // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib/../lib64" - // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib" - // CHECK-MULTI32-X86-64: "-L[[sysroot]]/lib" -@@ -79,8 +79,8 @@ - // CHECK-MULTI64-I386: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}ld" - // CHECK-MULTI64-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" - // CHECK-MULTI64-I386: "-m" "elf_i386" --// CHECK-MULTI64-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0]]/32{{/|\\\\}}crtbegin.o" --// CHECK-MULTI64-I386: "-L[[gcc_install]]/32" -+// CHECK-MULTI64-I386: "crti.o" "crtbeginS.o" -+// CHECK-MULTI64-I386: "-L[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0]]/32" - // CHECK-MULTI64-I386: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib32" - // CHECK-MULTI64-I386: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib" - // CHECK-MULTI64-I386: "-L[[sysroot]]/lib" -@@ -97,8 +97,8 @@ - // CHECK-MULTI64-X86-64: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}ld" - // CHECK-MULTI64-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" - // CHECK-MULTI64-X86-64: "-m" "elf_x86_64" --// CHECK-MULTI64-X86-64: "crti.o" "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0]]{{/|\\\\}}crtbegin.o" --// CHECK-MULTI64-X86-64: "-L[[gcc_install]]" -+// CHECK-MULTI64-X86-64: "crti.o" "crtbeginS.o" -+// CHECK-MULTI64-X86-64: "-L[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0]]" - // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib64" - // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib" - // CHECK-MULTI64-X86-64: "-L[[sysroot]]/lib" -diff --git a/clang/test/Driver/env.c b/clang/test/Driver/env.c -index e9b86cbcf428..47f304c0420d 100644 ---- a/clang/test/Driver/env.c -+++ b/clang/test/Driver/env.c -@@ -22,7 +22,7 @@ - // - // CHECK-LD-32-NOT: warning: - // CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" --// CHECK-LD-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/10.2.0{{/|\\\\}}crtbegin.o" -+// CHECK-LD-32: "crtbeginS.o" - // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/10.2.0" - // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/10.2.0/../../../../i386-unknown-linux/lib" - // CHECK-LD-32: "-L[[SYSROOT]]/lib" -diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c -index b7d61abe7ec5..461b69b0ac15 100644 ---- a/clang/test/Driver/fsanitize.c -+++ b/clang/test/Driver/fsanitize.c -@@ -344,15 +344,15 @@ - // RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fno-sanitize=vptr -fsanitize=undefined,address %s -### 2>&1 - // OK - --// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PIE --// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PIE -+// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE -+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE - // RUN: %clang -target x86_64-unknown-freebsd -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE - // RUN: %clang -target aarch64-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE - // RUN: %clang -target arm-linux-androideabi -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIC-NO-PIE - // RUN: %clang -target arm-linux-androideabi24 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE - // RUN: %clang -target aarch64-linux-android -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE --// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PIE --// RUN: %clang -target i386-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PIE -+// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE -+// RUN: %clang -target i386-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIE - - // CHECK-NO-PIE-NOT: "-pie" - // CHECK-NO-PIE: "-mrelocation-model" "static" -@@ -687,12 +687,12 @@ - // RUN: %clang -fno-sanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NOSP - // NOSP-NOT: "-fsanitize=safe-stack" - --// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP -+// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP - // RUN: %clang -target x86_64-linux-gnu -fsanitize=address,safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP-ASAN - // RUN: %clang -target x86_64-linux-gnu -fstack-protector -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP - // RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SP --// RUN: %clang -target arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP --// RUN: %clang -target aarch64-linux-android -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP -+// RUN: %clang -target arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP -+// RUN: %clang -target aarch64-linux-android -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP - // RUN: %clang -target i386-contiki-unknown -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP - // NO-SP-NOT: stack-protector - // NO-SP: "-fsanitize=safe-stack" -diff --git a/clang/test/Driver/gcc-toolchain.cpp b/clang/test/Driver/gcc-toolchain.cpp -index 7cdba0841b8c..e2b3c6b04f08 100644 ---- a/clang/test/Driver/gcc-toolchain.cpp -+++ b/clang/test/Driver/gcc-toolchain.cpp -@@ -23,7 +23,7 @@ - // the same precise formatting of the path as the '-internal-system' flags - // above, so we just blanket wildcard match the 'crtbegin.o'. - // CHECK: "{{[^"]*}}ld{{(.exe)?}}" --// CHECK-SAME: "{{[^"]*}}/usr/lib/gcc/x86_64-linux-gnu/4.8{{/|\\\\}}crtbegin.o" -+// CHECK-SAME: "crtbeginS.o" - // CHECK-SAME: "-L[[TOOLCHAIN]]/usr/lib/gcc/x86_64-linux-gnu/4.8" - /// On x86_64, there is an extra usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu but we should not test it. - -diff --git a/clang/test/Driver/hexagon-toolchain-elf.c b/clang/test/Driver/hexagon-toolchain-elf.c -index cc11f9fcba9e..1fe8b5db587b 100644 ---- a/clang/test/Driver/hexagon-toolchain-elf.c -+++ b/clang/test/Driver/hexagon-toolchain-elf.c -@@ -487,7 +487,7 @@ - // RUN: %s 2>&1 \ - // RUN: | FileCheck -check-prefix=CHECK042 %s - // CHECK042: "-cc1" --// CHECK042: "-mrelocation-model" "static" -+// CHECK042: "-mrelocation-model" "pic" - // CHECK042: "-mllvm" "-hexagon-small-data-threshold=8" - // CHECK042-NEXT: llvm-mc - // CHECK042: "-gpsize=8" -diff --git a/clang/test/Driver/linux-as.c b/clang/test/Driver/linux-as.c -index 0959bd7ba0a1..4056a672b6f9 100644 ---- a/clang/test/Driver/linux-as.c -+++ b/clang/test/Driver/linux-as.c -@@ -164,7 +164,7 @@ - // CHECK-PPC-NO-MCPU-NOT: as{{.*}} "-mcpu=invalid-cpu" - // - // RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \ --// RUN: -no-integrated-as -c %s 2>&1 \ -+// RUN: -no-integrated-as -fno-pic -c %s 2>&1 \ - // RUN: | FileCheck -check-prefix=CHECK-SPARCV9 %s - // CHECK-SPARCV9: as - // CHECK-SPARCV9: -64 -@@ -173,7 +173,7 @@ - // CHECK-SPARCV9: -o - // - // RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \ --// RUN: -no-integrated-as -fpic -c %s 2>&1 \ -+// RUN: -no-integrated-as -c %s 2>&1 \ - // RUN: | FileCheck -check-prefix=CHECK-SPARCV9PIC %s - // CHECK-SPARCV9PIC: as - // CHECK-SPARCV9PIC: -64 -diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c -index cc505588331b..c7f81d2c5e49 100644 ---- a/clang/test/Driver/linux-ld.c -+++ b/clang/test/Driver/linux-ld.c -@@ -1,4 +1,6 @@ - // UNSUPPORTED: system-windows -+// XFAIL: linux -+ - // General tests that ld invocations on Linux targets sane. Note that we use - // sysroot to make these tests independent of the host system. - // -diff --git a/clang/test/Driver/ppc-abi.c b/clang/test/Driver/ppc-abi.c -index a74a19953ca2..0ba4a14ab74f 100644 ---- a/clang/test/Driver/ppc-abi.c -+++ b/clang/test/Driver/ppc-abi.c -@@ -26,9 +26,9 @@ - - // CHECK-ELFv1: "-mrelocation-model" "static" - // CHECK-ELFv1: "-target-abi" "elfv1" --// CHECK-ELFv1-LE: "-mrelocation-model" "static" -+// CHECK-ELFv1-LE: "-mrelocation-model" "pic" "-pic-level" "2" - // CHECK-ELFv1-LE: "-target-abi" "elfv1" --// CHECK-ELFv2: "-mrelocation-model" "static" -+// CHECK-ELFv2: "-mrelocation-model" "pic" "-pic-level" "2" - // CHECK-ELFv2: "-target-abi" "elfv2" - // CHECK-ELFv2-BE: "-mrelocation-model" "static" - // CHECK-ELFv2-BE: "-target-abi" "elfv2" -diff --git a/clang/test/Driver/riscv32-toolchain.c b/clang/test/Driver/riscv32-toolchain.c -index a5852f5f3997..233d9ef003cf 100644 ---- a/clang/test/Driver/riscv32-toolchain.c -+++ b/clang/test/Driver/riscv32-toolchain.c -@@ -84,7 +84,7 @@ - // C-RV32-LINUX-MULTI-ILP32: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot" - // C-RV32-LINUX-MULTI-ILP32: "-m" "elf32lriscv" - // C-RV32-LINUX-MULTI-ILP32: "-dynamic-linker" "/lib/ld-linux-riscv32-ilp32.so.1" --// C-RV32-LINUX-MULTI-ILP32: "{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib32/ilp32{{/|\\\\}}crtbegin.o" -+// C-RV32-LINUX-MULTI-ILP32: "crtbeginS.o" - // C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib32/ilp32" - // C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib32/ilp32" - // C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib32/ilp32" -@@ -99,7 +99,7 @@ - // C-RV32-LINUX-MULTI-ILP32D: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot" - // C-RV32-LINUX-MULTI-ILP32D: "-m" "elf32lriscv" - // C-RV32-LINUX-MULTI-ILP32D: "-dynamic-linker" "/lib/ld-linux-riscv32-ilp32d.so.1" --// C-RV32-LINUX-MULTI-ILP32D: "{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib32/ilp32d{{/|\\\\}}crtbegin.o" -+// C-RV32-LINUX-MULTI-ILP32D: "crtbeginS.o" - // C-RV32-LINUX-MULTI-ILP32D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib32/ilp32d" - // C-RV32-LINUX-MULTI-ILP32D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib32/ilp32d" - // C-RV32-LINUX-MULTI-ILP32D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib32/ilp32d" -diff --git a/clang/test/Driver/riscv64-toolchain.c b/clang/test/Driver/riscv64-toolchain.c -index e727f20bb601..a801e5eee462 100644 ---- a/clang/test/Driver/riscv64-toolchain.c -+++ b/clang/test/Driver/riscv64-toolchain.c -@@ -84,7 +84,7 @@ - // C-RV64-LINUX-MULTI-LP64: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot" - // C-RV64-LINUX-MULTI-LP64: "-m" "elf64lriscv" - // C-RV64-LINUX-MULTI-LP64: "-dynamic-linker" "/lib/ld-linux-riscv64-lp64.so.1" --// C-RV64-LINUX-MULTI-LP64: "{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib64/lp64{{/|\\\\}}crtbegin.o" -+// C-RV64-LINUX-MULTI-LP64: "crtbeginS.o" - // C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib64/lp64" - // C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib64/lp64" - // C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib64/lp64" -@@ -99,7 +99,7 @@ - // C-RV64-LINUX-MULTI-LP64D: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot" - // C-RV64-LINUX-MULTI-LP64D: "-m" "elf64lriscv" - // C-RV64-LINUX-MULTI-LP64D: "-dynamic-linker" "/lib/ld-linux-riscv64-lp64d.so.1" --// C-RV64-LINUX-MULTI-LP64D: "{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib64/lp64d{{/|\\\\}}crtbegin.o" -+// C-RV64-LINUX-MULTI-LP64D: "crtbeginS.o" - // C-RV64-LINUX-MULTI-LP64D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib64/lp64d" - // C-RV64-LINUX-MULTI-LP64D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib64/lp64d" - // C-RV64-LINUX-MULTI-LP64D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib64/lp64d" -diff --git a/clang/test/Driver/stack-protector.c b/clang/test/Driver/stack-protector.c -index a3e40b50eed8..dfffe0d6cf85 100644 ---- a/clang/test/Driver/stack-protector.c -+++ b/clang/test/Driver/stack-protector.c -@@ -3,11 +3,11 @@ - // NOSSP-NOT: "-stack-protector-buffer-size" - - // RUN: %clang -target i386-unknown-linux -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=SSP --// SSP: "-stack-protector" "1" -+// SSP: "-stack-protector" "2" - // SSP-NOT: "-stack-protector-buffer-size" - - // RUN: %clang -target i386-unknown-linux -fstack-protector --param ssp-buffer-size=16 -### %s 2>&1 | FileCheck %s -check-prefix=SSP-BUF --// SSP-BUF: "-stack-protector" "1" -+// SSP-BUF: "-stack-protector" "2" - // SSP-BUF: "-stack-protector-buffer-size" "16" - - // RUN: %clang -target i386-pc-openbsd -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD diff --git a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch similarity index 85% rename from recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch rename to recipes-devtools/clang/clang/0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index 1c342c69..ba988e0b 100644 --- a/recipes-devtools/clang/clang/0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -1,4 +1,4 @@ -From 4c9bb41e62058144e041a0f850a6d2ad5df03e0d Mon Sep 17 00:00:00 2001 +From ce947e2ae1759e393b387ac115d5540ec6f471f1 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 @@ -32,18 +32,18 @@ Signed-off-by: Ovidiu Panait 3 files changed, 15 deletions(-) diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake -index 5752f4277444..f40ea35faf46 100644 +index 9bbbfc032b7d..7ee5170bbc71 100644 --- a/clang/cmake/modules/AddClang.cmake +++ b/clang/cmake/modules/AddClang.cmake -@@ -158,7 +158,6 @@ macro(add_clang_tool name) +@@ -159,7 +159,6 @@ macro(add_clang_tool name) if (CLANG_BUILD_TOOLS) get_target_export_arg(${name} Clang export_to_clangtargets) install(TARGETS ${name} - ${export_to_clangtargets} - RUNTIME DESTINATION bin + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name}) -@@ -167,7 +166,6 @@ macro(add_clang_tool name) +@@ -168,7 +167,6 @@ macro(add_clang_tool name) DEPENDS ${name} COMPONENT ${name}) endif() @@ -52,10 +52,10 @@ index 5752f4277444..f40ea35faf46 100644 endmacro() diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index 5a9480aa6768..0f199f91e67c 100644 +index 37bc98f9e021..d34083fa52ec 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -1233,7 +1233,6 @@ macro(add_llvm_tool name) +@@ -1251,7 +1251,6 @@ macro(add_llvm_tool name) if( LLVM_BUILD_TOOLS ) get_target_export_arg(${name} LLVM export_to_llvmexports) install(TARGETS ${name} @@ -63,7 +63,7 @@ index 5a9480aa6768..0f199f91e67c 100644 RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR} COMPONENT ${name}) -@@ -1244,9 +1243,6 @@ macro(add_llvm_tool name) +@@ -1262,9 +1261,6 @@ macro(add_llvm_tool name) endif() endif() endif() @@ -73,7 +73,7 @@ index 5a9480aa6768..0f199f91e67c 100644 set_target_properties(${name} PROPERTIES FOLDER "Tools") endmacro(add_llvm_tool name) -@@ -1286,7 +1282,6 @@ macro(add_llvm_utility name) +@@ -1304,7 +1300,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 5a9480aa6768..0f199f91e67c 100644 RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} COMPONENT ${name}) -@@ -1295,7 +1290,6 @@ macro(add_llvm_utility name) +@@ -1313,7 +1308,6 @@ macro(add_llvm_utility name) DEPENDS ${name} COMPONENT ${name}) endif() @@ -90,10 +90,10 @@ index 5a9480aa6768..0f199f91e67c 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 5e9e2674405e..3c72df35b308 100644 +index 59fd0d3b0733..3b9ac56ed37f 100644 --- a/llvm/cmake/modules/TableGen.cmake +++ b/llvm/cmake/modules/TableGen.cmake -@@ -179,14 +179,8 @@ macro(add_tablegen target project) +@@ -183,14 +183,8 @@ macro(add_tablegen target project) endif() if ((${project} STREQUAL LLVM OR ${project} STREQUAL MLIR) AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS) @@ -108,7 +108,7 @@ index 5e9e2674405e..3c72df35b308 100644 COMPONENT ${target} RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}) if(NOT LLVM_ENABLE_IDE) -@@ -195,5 +189,4 @@ macro(add_tablegen target project) +@@ -199,5 +193,4 @@ macro(add_tablegen target project) COMPONENT ${target}) endif() endif() diff --git a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch similarity index 90% rename from recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch rename to recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch index f1cc2a37..3a2b1797 100644 --- a/recipes-devtools/clang/clang/0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From 3bb1761c3685792ccbcb96a9106dab6595ea11d2 Mon Sep 17 00:00:00 2001 +From 85a600c78bcb5befd0f51e5551d0dd2f4c6b6f54 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 @@ -19,10 +19,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 94a7553e273b..5b353e6670f0 100644 +index 3bfddeefc7b2..8a806efb292b 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp -@@ -122,7 +122,13 @@ std::string Driver::GetResourcesPath(StringRef BinaryPath, +@@ -176,7 +176,13 @@ 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/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch similarity index 89% rename from recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch rename to recipes-devtools/clang/clang/0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index 5ddc7d6d..70de0a32 100644 --- a/recipes-devtools/clang/clang/0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From 2d6e13dbd89ab50125e86ef8f240e50d0c8dd576 Mon Sep 17 00:00:00 2001 +From 26c596cf7f4c3fbac5df62a8f19ebca083fd4d2c 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 @@ -18,10 +18,10 @@ Signed-off-by: Khem Raj 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 8c6102f47192..4b39c2bdf14d 100644 +index f9e233f15dfc..bf73b1ef27db 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -476,8 +476,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -493,8 +493,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = "lib64"; Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; @@ -32,7 +32,7 @@ index 8c6102f47192..4b39c2bdf14d 100644 LibDir = "lib"; } break; -@@ -485,8 +485,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -502,8 +502,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { LibDir = "lib64"; Loader = (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; @@ -43,7 +43,7 @@ index 8c6102f47192..4b39c2bdf14d 100644 LibDir = "lib"; } break; -@@ -510,8 +510,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -527,8 +527,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { case llvm::Triple::sparcv9: LibDir = "lib64"; Loader = "ld-linux.so.2"; @@ -54,7 +54,7 @@ index 8c6102f47192..4b39c2bdf14d 100644 LibDir = "lib"; } break; -@@ -528,8 +528,8 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -545,8 +545,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/0022-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch similarity index 84% rename from recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch rename to recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch index ac014b1f..078bc61e 100644 --- a/recipes-devtools/clang/clang/0022-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From 40138d88b4371d1e253dc5a86fe517bceba655aa Mon Sep 17 00:00:00 2001 +From df4a3eb433329f68dc6ba74b9bd03664c3a62299 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 @@ -16,8 +16,7 @@ Signed-off-by: Khem Raj clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | 2 +- clang/tools/clang-format/git-clang-format | 2 +- clang/tools/scan-view/bin/scan-view | 2 +- - clang/utils/hmaptool/hmaptool | 2 +- - 8 files changed, 8 insertions(+), 8 deletions(-) + 7 files changed, 7 insertions(+), 7 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 8655af137bb2..e95ba59a421c 100755 @@ -30,7 +29,7 @@ index 8655af137bb2..e95ba59a421c 100755 #=- run-find-all-symbols.py - Parallel find-all-symbols runner -*- python -*-=# # diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py -index 14fcfe8d49ff..ee7e682690b7 100755 +index 50a220b3f975..ea40cbc48dd2 100755 --- a/clang-tools-extra/clang-tidy/add_new_check.py +++ b/clang-tools-extra/clang-tidy/add_new_check.py @@ -1,4 +1,4 @@ @@ -40,7 +39,7 @@ index 14fcfe8d49ff..ee7e682690b7 100755 #===- add_new_check.py - clang-tidy check generator ---------*- python -*--===# # diff --git a/clang-tools-extra/clang-tidy/rename_check.py b/clang-tools-extra/clang-tidy/rename_check.py -index 2410041fd5d2..976a02100cd6 100755 +index 9c2021751e0e..4bb9af8cbe0a 100755 --- a/clang-tools-extra/clang-tidy/rename_check.py +++ b/clang-tools-extra/clang-tidy/rename_check.py @@ -1,4 +1,4 @@ @@ -60,7 +59,7 @@ index 6bd05531333b..9e134123ef44 100755 #===- clang-tidy-diff.py - ClangTidy Diff Checker -----------*- python -*--===# # diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -index acd1ed6979c0..12bd7f9c7dc3 100755 +index e6cff6a7414d..582c113fb173 100755 --- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py +++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py @@ -1,4 +1,4 @@ @@ -70,7 +69,7 @@ index acd1ed6979c0..12bd7f9c7dc3 100755 #===- run-clang-tidy.py - Parallel clang-tidy runner --------*- python -*--===# # diff --git a/clang/tools/clang-format/git-clang-format b/clang/tools/clang-format/git-clang-format -index 0233ceb3a868..16bc55f98762 100755 +index 7968c4387574..268e4dd14782 100755 --- a/clang/tools/clang-format/git-clang-format +++ b/clang/tools/clang-format/git-clang-format @@ -1,4 +1,4 @@ @@ -89,13 +88,3 @@ index 6165432e7af8..07effbca5969 100755 from __future__ import print_function -diff --git a/clang/utils/hmaptool/hmaptool b/clang/utils/hmaptool/hmaptool -index e647cde6bc46..7ed2fdf674b1 100755 ---- a/clang/utils/hmaptool/hmaptool -+++ b/clang/utils/hmaptool/hmaptool -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - from __future__ import absolute_import, division, print_function - - import json diff --git a/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch similarity index 93% rename from recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch rename to recipes-devtools/clang/clang/0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index c46e3dd7..640562fc 100644 --- a/recipes-devtools/clang/clang/0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From c23934d24ed6cbb08e3ce6c67c458509c6d46291 Mon Sep 17 00:00:00 2001 +From abd7f4b0e7e10c7102685012cb9db0551be7037c 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,14 +57,14 @@ 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 4f12262bbf47..9750c42e1f56 100644 +index d22eaf698eb8..6fcd5abe7211 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2111,6 +2111,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( +@@ -2105,6 +2105,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", + "x86_64-oe-linux",//CLANG_EXTRA_OE_VENDORS_TRIPLES - "x86_64-amazon-linux", "x86_64-linux-android"}; + "x86_64-amazon-linux"}; static const char *const X32Triples[] = {"x86_64-linux-gnux32", "x86_64-pc-linux-gnux32"}; diff --git a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch b/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch deleted file mode 100644 index 54c93821..00000000 --- a/recipes-devtools/clang/clang/0020-fix-path-to-libffi.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 4b2b4a51abcc347176f8c1c6bdfa28e1a2c9e57b Mon Sep 17 00:00:00 2001 -From: Anuj Mittal -Date: Fri, 3 Apr 2020 15:10:37 +0800 -Subject: [PATCH] fix path to libffi - -FFI_LIBRARY_PATH is the full path to libffi so when building something that links to -libLLVMInterpreter, we were looking for libffi in clang's recipe-sysroot instead of -the recipe's sysroot. - -Signed-off-by: Anuj Mittal -Signed-off-by: Khem Raj ---- - llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt -index 976219830d5e..9930e01559e9 100644 ---- a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt -+++ b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt -@@ -22,5 +22,5 @@ add_llvm_component_library(LLVMInterpreter - ) - - if( LLVM_ENABLE_FFI ) -- target_link_libraries( LLVMInterpreter PRIVATE ${FFI_LIBRARY_PATH} ) -+ target_link_libraries( LLVMInterpreter PRIVATE ffi ) - endif() diff --git a/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch similarity index 52% rename from recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch rename to recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch index caaf6681..28ef7ab6 100644 --- a/recipes-devtools/clang/clang/0024-llvm-Do-not-use-find_library-for-ncurses.patch +++ b/recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch @@ -1,4 +1,4 @@ -From 5d9680264c351bc98b1ae385f129deef48ed12a1 Mon Sep 17 00:00:00 2001 +From e06d9bce947249e18bd17f55852dad4e3ea671ac 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 @@ -12,33 +12,33 @@ clang-12: error: linker command failed with exit code 1 (use -v to see invocatio Signed-off-by: Khem Raj --- - compiler-rt/cmake/config-ix.cmake | 2 +- - llvm/cmake/config-ix.cmake | 2 +- + compiler-rt/cmake/config-ix.cmake | 2 +- + llvm/cmake/modules/FindTerminfo.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake -index 39b9120f00ad..8ac28303b8ad 100644 +index 4299a0589a7b..cb53b6fd14bd 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake -@@ -141,7 +141,7 @@ else() +@@ -149,7 +149,7 @@ else() set(MAYBE_REQUIRED) endif() if(LLVM_ENABLE_TERMINFO) - find_library(COMPILER_RT_TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED}) -+ set(TERMINFO_LIB tinfo curses ncurses ncursesw) ++ find_library(COMPILER_RT_TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) endif() if(COMPILER_RT_TERMINFO_LIB) set(LLVM_ENABLE_TERMINFO 1) -diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake -index dd0aaadb47c7..66a50cf01230 100644 ---- a/llvm/cmake/config-ix.cmake -+++ b/llvm/cmake/config-ix.cmake -@@ -176,7 +176,7 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") - set(MAYBE_REQUIRED) - endif() - if(LLVM_ENABLE_TERMINFO) -- find_library(TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED}) -+ set(TERMINFO_LIB tinfo curses ncurses ncursesw) - endif() - if(TERMINFO_LIB) - set(LLVM_ENABLE_TERMINFO 1) +diff --git a/llvm/cmake/modules/FindTerminfo.cmake b/llvm/cmake/modules/FindTerminfo.cmake +index 65edb80fa69a..a58180be8926 100644 +--- a/llvm/cmake/modules/FindTerminfo.cmake ++++ b/llvm/cmake/modules/FindTerminfo.cmake +@@ -11,7 +11,7 @@ + # Additionally, the following import target will be defined: + # Terminfo::terminfo + +-find_library(Terminfo_LIBRARIES NAMES terminfo tinfo curses ncurses ncursesw) ++find_library(Terminfo_LIBRARIES NAMES terminfo tinfo curses ncurses ncursesw NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + + if(Terminfo_LIBRARIES) + include(CMakePushCheckState) diff --git a/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch similarity index 86% rename from recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch rename to recipes-devtools/clang/clang/0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index baf4f1f5..c0d2b6da 100644 --- a/recipes-devtools/clang/clang/0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From 5fd5e653e9662971e62c03353cc7981ab387d5c7 Mon Sep 17 00:00:00 2001 +From 4a0571cc9e2401504c0675051c3e66143d0d87f6 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/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp -index 88311546354b..8b2745deae88 100644 +index a9afcc9db96a..dc48caf02616 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/lib/Support/Triple.cpp -@@ -496,7 +496,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) { +@@ -506,7 +506,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/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch similarity index 96% rename from recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch rename to recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index cb5397c3..b67d8d2c 100644 --- a/recipes-devtools/clang/clang/0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From 9053e875d68b32c56398a1e07c06cc8575ef6533 Mon Sep 17 00:00:00 2001 +From c4a8eebdbaea9eef3f4422497196627485de920e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 @@ -51,10 +51,10 @@ index c9623249e5d2..7a26170741ad 100644 #define MINMAX_4(rD, rN, rM, cmp_kind) \ diff --git a/compiler-rt/lib/builtins/assembly.h b/compiler-rt/lib/builtins/assembly.h -index 9c015059af5a..aec4ff59beb7 100644 +index 69a3d8620f92..60bac86df218 100644 --- a/compiler-rt/lib/builtins/assembly.h +++ b/compiler-rt/lib/builtins/assembly.h -@@ -183,6 +183,14 @@ +@@ -189,6 +189,14 @@ JMP(ip) #endif diff --git a/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch similarity index 97% rename from recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch rename to recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 731df510..639563d3 100644 --- a/recipes-devtools/clang/clang/0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From a1bd4222dea53463bd2c15c6a98842be715a7b8f Mon Sep 17 00:00:00 2001 +From 5ffa9adacd28053b6ff42d30907991fedb2ce75a 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/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch similarity index 85% rename from recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch rename to recipes-devtools/clang/clang/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index d58ea765..56c97b61 100644 --- a/recipes-devtools/clang/clang/0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From 24ace165961972b9c228cd580eb5cacfde006c4c Mon Sep 17 00:00:00 2001 +From a92c1148c71e0152d6b2027bf59c8eb46ecee800 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 @@ -12,10 +12,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 4b39c2bdf14d..46c83b002e6c 100644 +index bf73b1ef27db..eb92a037c930 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -619,6 +619,9 @@ void Linux::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, +@@ -636,6 +636,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/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch similarity index 88% rename from recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch rename to recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index 8c0eaa48..da038e22 100644 --- a/recipes-devtools/clang/clang/0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From adbadcc16f0dc7c323644bfc2f0e5752644f9e4c Mon Sep 17 00:00:00 2001 +From 1caf16b9a0a6d195bc66da996d6bcd3f66eeff07 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES @@ -15,10 +15,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+) diff --git a/compiler-rt/lib/scudo/CMakeLists.txt b/compiler-rt/lib/scudo/CMakeLists.txt -index e580d6d1408b..c14d7636e291 100644 +index 995e853e2a4d..25b79a8d17e8 100644 --- a/compiler-rt/lib/scudo/CMakeLists.txt +++ b/compiler-rt/lib/scudo/CMakeLists.txt -@@ -12,6 +12,7 @@ append_list_if(COMPILER_RT_HAS_LIBDL dl SCUDO_MINIMAL_DYNAMIC_LIBS) +@@ -15,6 +15,7 @@ append_list_if(COMPILER_RT_HAS_LIBDL dl SCUDO_MINIMAL_DYNAMIC_LIBS) append_list_if(COMPILER_RT_HAS_LIBRT rt SCUDO_MINIMAL_DYNAMIC_LIBS) append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread SCUDO_MINIMAL_DYNAMIC_LIBS) append_list_if(COMPILER_RT_HAS_LIBLOG log SCUDO_MINIMAL_DYNAMIC_LIBS) diff --git a/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch b/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch deleted file mode 100644 index af3a9404..00000000 --- a/recipes-devtools/clang/clang/0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e636f163882891bc71e45f6cf4051e9909fe624c Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 15 Apr 2021 18:58:07 -0700 -Subject: [PATCH] clang: Switch defaults to dwarf-5 debug info on Linux - -GCC 11 has defaulted to DWARF-5 as well, this matches -debug info formats, so mix and match of components with GCC 11 -works. - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - clang/lib/Driver/ToolChains/Linux.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h -index b3544a0c7681..ae421580a017 100644 ---- a/clang/lib/Driver/ToolChains/Linux.h -+++ b/clang/lib/Driver/ToolChains/Linux.h -@@ -65,6 +65,8 @@ public: - const llvm::opt::ArgList &DriverArgs, const JobAction &JA, - const llvm::fltSemantics *FPType = nullptr) const override; - -+ unsigned GetDefaultDwarfVersion() const override { return 5; } -+ - protected: - Tool *buildAssembler() const override; - Tool *buildLinker() const override; diff --git a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch similarity index 90% rename from recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch rename to recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index 94f9272a..4585eed1 100644 --- a/recipes-devtools/clang/clang/0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From 019c9ff3e7ae0d5710618d1562995359805f9aea Mon Sep 17 00:00:00 2001 +From 8653885e3f7f0a90fe49b8d0bfbffc011ff44407 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips @@ -13,7 +13,7 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+) diff --git a/compiler-rt/lib/scudo/standalone/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/CMakeLists.txt -index d6ffa448d7e0..22caf11f6223 100644 +index 739f131bdefd..5862545b842b 100644 --- a/compiler-rt/lib/scudo/standalone/CMakeLists.txt +++ b/compiler-rt/lib/scudo/standalone/CMakeLists.txt @@ -137,6 +137,10 @@ append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread SCUDO_LINK_FLAGS) diff --git a/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch similarity index 88% rename from recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch rename to recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch index 5a99074b..f4a7c099 100644 --- a/recipes-devtools/clang/clang/0032-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 014e2f701a92e9cd82a1f1dbccb0037057825ac4 Mon Sep 17 00:00:00 2001 +From 2ee8622a6471cfd38878e8f83f72338c275cee8b 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, 19 insertions(+) diff --git a/libunwind/include/libunwind.h b/libunwind/include/libunwind.h -index 0feecd7bd6fc..670cfa3ed71d 100644 +index 9a74faa48d6f..f7480c9cf27a 100644 --- a/libunwind/include/libunwind.h +++ b/libunwind/include/libunwind.h @@ -127,6 +127,7 @@ extern int unw_is_fpreg(unw_cursor_t *, unw_regnum_t) LIBUNWIND_AVAIL; @@ -24,10 +24,10 @@ index 0feecd7bd6fc..670cfa3ed71d 100644 extern unw_addr_space_t unw_local_addr_space; diff --git a/libunwind/src/libunwind.cpp b/libunwind/src/libunwind.cpp -index 1faf000ce44a..1edbdea6a19e 100644 +index 03f8b75b5bba..730e2393a8f8 100644 --- a/libunwind/src/libunwind.cpp +++ b/libunwind/src/libunwind.cpp -@@ -295,7 +295,25 @@ void __unw_remove_dynamic_fde(unw_word_t fde) { +@@ -326,7 +326,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__) diff --git a/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch b/recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch similarity index 95% rename from recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch rename to recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch index 515f980e..f22fd5c8 100644 --- a/recipes-devtools/clang/clang/0034-compiler-rt-Do-not-force-thumb-mode-directive.patch +++ b/recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch @@ -1,7 +1,7 @@ -From 16736f026aeb9db163fb296e088316252f2578e0 Mon Sep 17 00:00:00 2001 +From 026dc43875ab8c0c3a28ae4650c5685cd530bb37 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Jun 2021 08:42:36 -0700 -Subject: [PATCH] compiler-rt: Do not force thumb mode directive +Subject: [PATCH] Do not force thumb mode directive .thumb_func was not switching mode until [1] so it did not show up but now that .thumb_func (without argument) is diff --git a/recipes-devtools/clang/clang/0035-clang-Do-not-use-install-relative-libc-headers.patch b/recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch similarity index 88% rename from recipes-devtools/clang/clang/0035-clang-Do-not-use-install-relative-libc-headers.patch rename to recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch index f17c35fc..6f17144a 100644 --- a/recipes-devtools/clang/clang/0035-clang-Do-not-use-install-relative-libc-headers.patch +++ b/recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch @@ -1,4 +1,4 @@ -From 75fbe5c2c8f4798dbffca047d18e5831de61aef5 Mon Sep 17 00:00:00 2001 +From d60663adf9941780ed5365a5a919cbcd8946ff74 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 9750c42e1f56..553cb985737f 100644 +index 6fcd5abe7211..0d04a199a7af 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2928,7 +2928,9 @@ Generic_GCC::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, +@@ -2919,7 +2919,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/0036-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch b/recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch similarity index 94% rename from recipes-devtools/clang/clang/0036-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch rename to recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch index 43efcfb5..8bc5dee2 100644 --- a/recipes-devtools/clang/clang/0036-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch +++ b/recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch @@ -1,4 +1,4 @@ -From 46b27761196036bc0d076bfe31636bdb43f4df6b Mon Sep 17 00:00:00 2001 +From 9b9306ec9e11864631d64d8717763eaec4e25e8f 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, 28 insertions(+), 11 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 553cb985737f..355c7798a7aa 100644 +index 0d04a199a7af..1e5a3cc2c1f1 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -1652,18 +1652,29 @@ static void findRISCVMultilibs(const Driver &D, +@@ -1641,18 +1641,29 @@ static void findRISCVMultilibs(const Driver &D, return findRISCVBareMetalMultilibs(D, TargetTriple, Path, Args, Result); FilterNonExistent NonExistent(Path, "/crtbegin.o", D.getVFS()); @@ -74,7 +74,7 @@ index 553cb985737f..355c7798a7aa 100644 Multilib::flags_list Flags; bool IsRV64 = TargetTriple.getArch() == llvm::Triple::riscv64; -@@ -2561,13 +2572,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2549,13 +2560,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/0037-Fix-lib-paths-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch similarity index 92% rename from recipes-devtools/clang/clang/0037-Fix-lib-paths-for-OpenEmbedded-Host.patch rename to recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch index 2a2fff3b..1668dd5e 100644 --- a/recipes-devtools/clang/clang/0037-Fix-lib-paths-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From 76e66abe135908b9d987e9a96aab0176391ee38a Mon Sep 17 00:00:00 2001 +From 6c066a1d1930ddaa95b0530c678bac71f47378b5 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 @@ -42,12 +42,13 @@ to follow above form. Upstream-Status: Inappropriate [oe specific] Signed-off-by: Changqing Li +Signed-off-by: Khem Raj --- 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 3350bda709f5..c03a839d1c72 100644 +index 1e5a3cc2c1f1..d3574b86cb26 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -22,6 +22,7 @@ @@ -58,7 +59,7 @@ index 3350bda709f5..c03a839d1c72 100644 #include "llvm/Option/ArgList.h" #include "llvm/Support/CodeGen.h" #include "llvm/Support/Path.h" -@@ -2530,6 +2531,7 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2518,6 +2519,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) { @@ -66,7 +67,7 @@ index 3350bda709f5..c03a839d1c72 100644 // Locations relative to the system lib directory where GCC's triple-specific // directories might reside. struct GCCLibSuffix { -@@ -2547,7 +2549,8 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( +@@ -2535,7 +2537,8 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( // files in that location, not just GCC installation data. {CandidateTriple.str(), "..", TargetTriple.getVendor() == llvm::Triple::Freescale || @@ -76,6 +77,3 @@ index 3350bda709f5..c03a839d1c72 100644 // This is the normal place. {"gcc/" + CandidateTriple.str(), "../..", GCCDirExists}, --- -2.32.0 - diff --git a/recipes-devtools/clang/clang/0038-Correct-library-search-path-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch similarity index 92% rename from recipes-devtools/clang/clang/0038-Correct-library-search-path-for-OpenEmbedded-Host.patch rename to recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch index b114483b..4c365dd8 100644 --- a/recipes-devtools/clang/clang/0038-Correct-library-search-path-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From f790cf664e6d7ac2da4bf24caa82e7f166d592d8 Mon Sep 17 00:00:00 2001 +From 504d643d31a52421c6dc03f617c17e287a1c4ff0 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 @@ -31,6 +31,7 @@ libraries: =/build/tmp-glibc/work/x84_64-linux/compiler-rt-native/13.0.1-r0/reci Upstream-Status: Inappropriate [oe specific] Signed-off-by: Changqing Li +Signed-off-by: Khem Raj --- clang/include/clang/Driver/Distro.h | 2 ++ clang/lib/Driver/Distro.cpp | 1 + @@ -38,10 +39,10 @@ Signed-off-by: Changqing Li 3 files changed, 4 insertions(+) diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h -index 0d2a0939639e..5556f473899f 100644 +index 2723f75e8945..cd43e8f11574 100644 --- a/clang/include/clang/Driver/Distro.h +++ b/clang/include/clang/Driver/Distro.h -@@ -43,6 +43,7 @@ public: +@@ -44,6 +44,7 @@ public: RHEL7, Fedora, Gentoo, @@ -49,7 +50,7 @@ index 0d2a0939639e..5556f473899f 100644 OpenSUSE, UbuntuHardy, UbuntuIntrepid, -@@ -130,6 +131,7 @@ public: +@@ -132,6 +133,7 @@ public: bool IsGentoo() const { return DistroVal == Gentoo; } @@ -58,7 +59,7 @@ index 0d2a0939639e..5556f473899f 100644 }; diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp -index c4cf4e48b5b8..2695c0ab85c2 100644 +index 5ac38c34d112..f20dd4b526e5 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) { @@ -70,7 +71,7 @@ index c4cf4e48b5b8..2695c0ab85c2 100644 return Version; } diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 46c83b002e6c..e356616229c1 100644 +index eb92a037c930..c92cef442005 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp @@ -77,6 +77,7 @@ std::string Linux::getMultiarchTriple(const Driver &D, @@ -81,6 +82,3 @@ index 46c83b002e6c..e356616229c1 100644 return "x86_64-linux-gnu"; case llvm::Triple::aarch64: if (IsAndroid) --- -2.32.0 - diff --git a/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch b/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch deleted file mode 100644 index 06514062..00000000 --- a/recipes-devtools/clang/clang/0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch +++ /dev/null @@ -1,35 +0,0 @@ -From ad072b670c36eb51cfc20daa53cfe7ba4cd19e25 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 29 May 2021 13:42:25 -0700 -Subject: [PATCH] compiler-rt: Use uintptr_t instead of _Unwind_Word - -_Unwind_Word is defined in compiler specific unwind.h but not in -libunwind provided unwind.h header, it works in most cases because -compilers search compiler headers ahead of system headers but for some -systems e.g. musl bases systems the compiler provided versions are not -preferred over system headers and therefore relying on _Unwind_Word -means its expecting this define in all unwind.h headers which is not the -case, using uintptr_t means we don't need this from unwind.h - -See https://reviews.llvm.org/D65699 - -Signed-off-by: Khem Raj ---- - compiler-rt/lib/hwasan/hwasan_exceptions.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/compiler-rt/lib/hwasan/hwasan_exceptions.cpp b/compiler-rt/lib/hwasan/hwasan_exceptions.cpp -index 169e7876cb58..6ed1da335428 100644 ---- a/compiler-rt/lib/hwasan/hwasan_exceptions.cpp -+++ b/compiler-rt/lib/hwasan/hwasan_exceptions.cpp -@@ -29,8 +29,8 @@ typedef _Unwind_Reason_Code PersonalityFn(int version, _Unwind_Action actions, - // is statically linked and the sanitizer runtime and the program are linked - // against different unwinders. The _Unwind_Context data structure is opaque so - // it may be incompatible between unwinders. --typedef _Unwind_Word GetGRFn(_Unwind_Context* context, int index); --typedef _Unwind_Word GetCFAFn(_Unwind_Context* context); -+typedef uintptr_t GetGRFn(_Unwind_Context* context, int index); -+typedef uintptr_t GetCFAFn(_Unwind_Context* context); - - extern "C" SANITIZER_INTERFACE_ATTRIBUTE _Unwind_Reason_Code - __hwasan_personality_wrapper(int version, _Unwind_Action actions, diff --git a/recipes-devtools/clang/clang/0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch b/recipes-devtools/clang/clang/0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch deleted file mode 100644 index 68b8e44d..00000000 --- a/recipes-devtools/clang/clang/0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch +++ /dev/null @@ -1,321 +0,0 @@ -From 81360dd267eae6c34c4ab1000a1343b6488d84d5 Mon Sep 17 00:00:00 2001 -From: Jack Andersen -Date: Sun, 5 Dec 2021 14:45:33 -0500 -Subject: [PATCH] Installable find modules for terminfo and libffi - -Improves cross-distro portability of LLVM cmake package by resolving paths for -terminfo and libffi via import targets. - -When LLVMExports.cmake is generated for installation, it contains absolute -library paths which are likely to be a common cause of portability issues. To -mitigate this, the discovery logic for these dependencies is refactored into -find modules which get installed alongside LLVMConfig.cmake. The result is -cleaner, cmake-friendly management of these dependencies that respect the -environment of the LLVM package importer. - -Reviewed By: JDevlieghere - -Differential Revision: https://reviews.llvm.org/D114327 - ---- - llvm/cmake/config-ix.cmake | 50 +++--------- - llvm/cmake/modules/FindFFI.cmake | 81 +++++++++++++++++++ - llvm/cmake/modules/FindTerminfo.cmake | 43 ++++++++++ - llvm/cmake/modules/LLVMConfig.cmake.in | 11 +++ - .../Interpreter/CMakeLists.txt | 10 +-- - llvm/lib/Support/CMakeLists.txt | 7 +- - 6 files changed, 154 insertions(+), 48 deletions(-) - create mode 100644 llvm/cmake/modules/FindFFI.cmake - create mode 100644 llvm/cmake/modules/FindTerminfo.cmake - -diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake -index a320cf97b306..21cadf1893c6 100644 ---- a/llvm/cmake/config-ix.cmake -+++ b/llvm/cmake/config-ix.cmake -@@ -169,18 +169,13 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") - else() - set(HAVE_LIBEDIT 0) - endif() -- if(LLVM_ENABLE_TERMINFO STREQUAL FORCE_ON) -- set(MAYBE_REQUIRED REQUIRED) -- else() -- set(MAYBE_REQUIRED) -- endif() - if(LLVM_ENABLE_TERMINFO) -- set(TERMINFO_LIB tinfo curses ncurses ncursesw) -- endif() -- if(TERMINFO_LIB) -- set(LLVM_ENABLE_TERMINFO 1) -- else() -- set(LLVM_ENABLE_TERMINFO 0) -+ if(LLVM_ENABLE_TERMINFO STREQUAL FORCE_ON) -+ find_package(Terminfo REQUIRED) -+ else() -+ find_package(Terminfo) -+ endif() -+ set(LLVM_ENABLE_TERMINFO "${Terminfo_FOUND}") - endif() - else() - set(LLVM_ENABLE_TERMINFO 0) -@@ -325,38 +320,19 @@ if (LLVM_ENABLE_DOXYGEN) - llvm_find_program(dot) - endif () - --if( LLVM_ENABLE_FFI ) -- find_path(FFI_INCLUDE_PATH ffi.h PATHS ${FFI_INCLUDE_DIR}) -- if( EXISTS "${FFI_INCLUDE_PATH}/ffi.h" ) -- set(FFI_HEADER ffi.h CACHE INTERNAL "") -- set(HAVE_FFI_H 1 CACHE INTERNAL "") -+if(LLVM_ENABLE_FFI) -+ set(FFI_REQUIRE_INCLUDE On) -+ if(LLVM_ENABLE_FFI STREQUAL FORCE_ON) -+ find_package(FFI REQUIRED) - else() -- find_path(FFI_INCLUDE_PATH ffi/ffi.h PATHS ${FFI_INCLUDE_DIR}) -- if( EXISTS "${FFI_INCLUDE_PATH}/ffi/ffi.h" ) -- set(FFI_HEADER ffi/ffi.h CACHE INTERNAL "") -- set(HAVE_FFI_FFI_H 1 CACHE INTERNAL "") -- endif() -+ find_package(FFI) - endif() -- -- if( NOT FFI_HEADER ) -- message(FATAL_ERROR "libffi includes are not found.") -- endif() -- -- find_library(FFI_LIBRARY_PATH ffi PATHS ${FFI_LIBRARY_DIR}) -- if( NOT FFI_LIBRARY_PATH ) -- message(FATAL_ERROR "libffi is not found.") -- endif() -- -- list(APPEND CMAKE_REQUIRED_LIBRARIES ${FFI_LIBRARY_PATH}) -- list(APPEND CMAKE_REQUIRED_INCLUDES ${FFI_INCLUDE_PATH}) -- check_symbol_exists(ffi_call ${FFI_HEADER} HAVE_FFI_CALL) -- list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${FFI_INCLUDE_PATH}) -- list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${FFI_LIBRARY_PATH}) -+ set(LLVM_ENABLE_FFI "${FFI_FOUND}") - else() - unset(HAVE_FFI_FFI_H CACHE) - unset(HAVE_FFI_H CACHE) - unset(HAVE_FFI_CALL CACHE) --endif( LLVM_ENABLE_FFI ) -+endif() - - check_symbol_exists(proc_pid_rusage "libproc.h" HAVE_PROC_PID_RUSAGE) - -diff --git a/llvm/cmake/modules/FindFFI.cmake b/llvm/cmake/modules/FindFFI.cmake -new file mode 100644 -index 000000000000..b0d859af8959 ---- /dev/null -+++ b/llvm/cmake/modules/FindFFI.cmake -@@ -0,0 +1,81 @@ -+# Attempts to discover ffi library with a linkable ffi_call function. -+# -+# Example usage: -+# -+# find_package(FFI) -+# -+# FFI_REQUIRE_INCLUDE may be set to consider ffi found if the includes -+# are present in addition to the library. This is useful to keep off -+# for the imported package on platforms that install the library but -+# not the headers. -+# -+# FFI_LIBRARY_DIR may be set to define search paths for the ffi library. -+# -+# If successful, the following variables will be defined: -+# FFI_FOUND -+# FFI_INCLUDE_DIRS -+# FFI_LIBRARIES -+# HAVE_FFI_CALL -+# -+# HAVE_FFI_H or HAVE_FFI_FFI_H is defined depending on the ffi.h include path. -+# -+# Additionally, the following import target will be defined: -+# FFI::ffi -+ -+find_path(FFI_INCLUDE_DIRS ffi.h PATHS ${FFI_INCLUDE_DIR}) -+if( EXISTS "${FFI_INCLUDE_DIRS}/ffi.h" ) -+ set(FFI_HEADER ffi.h CACHE INTERNAL "") -+ set(HAVE_FFI_H 1 CACHE INTERNAL "") -+else() -+ find_path(FFI_INCLUDE_DIRS ffi/ffi.h PATHS ${FFI_INCLUDE_DIR}) -+ if( EXISTS "${FFI_INCLUDE_DIRS}/ffi/ffi.h" ) -+ set(FFI_HEADER ffi/ffi.h CACHE INTERNAL "") -+ set(HAVE_FFI_FFI_H 1 CACHE INTERNAL "") -+ endif() -+endif() -+ -+find_library(FFI_LIBRARIES ffi PATHS ${FFI_LIBRARY_DIR}) -+ -+if(FFI_LIBRARIES) -+ include(CMakePushCheckState) -+ include(CheckCSourceCompiles) -+ cmake_push_check_state() -+ list(APPEND CMAKE_REQUIRED_LIBRARIES ${FFI_LIBRARIES}) -+ check_c_source_compiles(" -+ struct ffi_cif; -+ typedef struct ffi_cif ffi_cif; -+ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue); -+ int main() { ffi_call(0, 0, 0, 0); }" -+ HAVE_FFI_CALL) -+ cmake_pop_check_state() -+endif() -+ -+unset(required_includes) -+if(FFI_REQUIRE_INCLUDE) -+ set(required_includes FFI_INCLUDE_DIRS) -+endif() -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(FFI -+ FOUND_VAR -+ FFI_FOUND -+ REQUIRED_VARS -+ FFI_LIBRARIES -+ ${required_includes} -+ HAVE_FFI_CALL) -+mark_as_advanced(FFI_LIBRARIES -+ FFI_INCLUDE_DIRS -+ HAVE_FFI_CALL -+ FFI_HEADER -+ HAVE_FFI_H -+ HAVE_FFI_FFI_H) -+ -+if(FFI_FOUND) -+ if(NOT TARGET FFI::ffi) -+ add_library(FFI::ffi UNKNOWN IMPORTED) -+ set_target_properties(FFI::ffi PROPERTIES IMPORTED_LOCATION "${FFI_LIBRARIES}") -+ if(FFI_INCLUDE_DIRS) -+ set_target_properties(FFI::ffi PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFI_INCLUDE_DIRS}") -+ endif() -+ endif() -+endif() -diff --git a/llvm/cmake/modules/FindTerminfo.cmake b/llvm/cmake/modules/FindTerminfo.cmake -new file mode 100644 -index 000000000000..65edb80fa69a ---- /dev/null -+++ b/llvm/cmake/modules/FindTerminfo.cmake -@@ -0,0 +1,43 @@ -+# Attempts to discover terminfo library with a linkable setupterm function. -+# -+# Example usage: -+# -+# find_package(Terminfo) -+# -+# If successful, the following variables will be defined: -+# Terminfo_FOUND -+# Terminfo_LIBRARIES -+# -+# Additionally, the following import target will be defined: -+# Terminfo::terminfo -+ -+find_library(Terminfo_LIBRARIES NAMES terminfo tinfo curses ncurses ncursesw) -+ -+if(Terminfo_LIBRARIES) -+ include(CMakePushCheckState) -+ include(CheckCSourceCompiles) -+ cmake_push_check_state() -+ list(APPEND CMAKE_REQUIRED_LIBRARIES ${Terminfo_LIBRARIES}) -+ check_c_source_compiles(" -+ int setupterm(char *term, int filedes, int *errret); -+ int main() { return setupterm(0, 0, 0); }" -+ Terminfo_LINKABLE) -+ cmake_pop_check_state() -+endif() -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(Terminfo -+ FOUND_VAR -+ Terminfo_FOUND -+ REQUIRED_VARS -+ Terminfo_LIBRARIES -+ Terminfo_LINKABLE) -+mark_as_advanced(Terminfo_LIBRARIES -+ Terminfo_LINKABLE) -+ -+if(Terminfo_FOUND) -+ if(NOT TARGET Terminfo::terminfo) -+ add_library(Terminfo::terminfo UNKNOWN IMPORTED) -+ set_target_properties(Terminfo::terminfo PROPERTIES IMPORTED_LOCATION "${Terminfo_LIBRARIES}") -+ endif() -+endif() -diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in -index a71bef19fd0c..5a2fea5be399 100644 ---- a/llvm/cmake/modules/LLVMConfig.cmake.in -+++ b/llvm/cmake/modules/LLVMConfig.cmake.in -@@ -2,6 +2,9 @@ - - @LLVM_CONFIG_CODE@ - -+# For finding self-installed Find*.cmake packages. -+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") -+ - set(LLVM_VERSION_MAJOR @LLVM_VERSION_MAJOR@) - set(LLVM_VERSION_MINOR @LLVM_VERSION_MINOR@) - set(LLVM_VERSION_PATCH @LLVM_VERSION_PATCH@) -@@ -46,9 +49,17 @@ set(LLVM_ENABLE_ASSERTIONS @LLVM_ENABLE_ASSERTIONS@) - - set(LLVM_ENABLE_EH @LLVM_ENABLE_EH@) - -+set(LLVM_ENABLE_FFI @LLVM_ENABLE_FFI@) -+if(LLVM_ENABLE_FFI) -+ find_package(FFI) -+endif() -+ - set(LLVM_ENABLE_RTTI @LLVM_ENABLE_RTTI@) - - set(LLVM_ENABLE_TERMINFO @LLVM_ENABLE_TERMINFO@) -+if(LLVM_ENABLE_TERMINFO) -+ find_package(Terminfo) -+endif() - - set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@) - -diff --git a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt -index 9930e01559e9..14522ba2a1bf 100644 ---- a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt -+++ b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt -@@ -1,11 +1,3 @@ --# Make sure that the path to libffi headers is on the command --# line. That path can be a compiler's non-default path even when --# FFI_INCLUDE_DIR was not used, because cmake has its own paths for --# searching for headers (CMAKE_SYSTEM_INCLUDE_PATH, for instance): --if( FFI_INCLUDE_PATH ) -- include_directories( ${FFI_INCLUDE_PATH} ) --endif() -- - add_llvm_component_library(LLVMInterpreter - Execution.cpp - ExternalFunctions.cpp -@@ -22,5 +14,5 @@ add_llvm_component_library(LLVMInterpreter - ) - - if( LLVM_ENABLE_FFI ) -- target_link_libraries( LLVMInterpreter PRIVATE ffi ) -+ target_link_libraries( LLVMInterpreter PRIVATE FFI::ffi ) - endif() -diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt -index 2242b0ec60ab..5cf80c1bb59d 100644 ---- a/llvm/lib/Support/CMakeLists.txt -+++ b/llvm/lib/Support/CMakeLists.txt -@@ -24,7 +24,7 @@ elseif( CMAKE_HOST_UNIX ) - set(system_libs ${system_libs} ${Backtrace_LIBFILE}) - endif() - if( LLVM_ENABLE_TERMINFO ) -- set(imported_libs ${imported_libs} "${TERMINFO_LIB}") -+ set(imported_libs ${imported_libs} Terminfo::terminfo) - endif() - if( LLVM_ENABLE_THREADS AND (HAVE_LIBATOMIC OR HAVE_CXX_LIBATOMICS64) ) - set(system_libs ${system_libs} atomic) -@@ -256,7 +256,10 @@ if(LLVM_ENABLE_ZLIB) - endif() - - if(LLVM_ENABLE_TERMINFO) -- get_library_name(${TERMINFO_LIB} terminfo_library) -+ if(NOT terminfo_library) -+ get_property(terminfo_library TARGET Terminfo::terminfo PROPERTY LOCATION) -+ endif() -+ get_library_name(${terminfo_library} terminfo_library) - set(llvm_system_libs ${llvm_system_libs} "${terminfo_library}") - endif() - diff --git a/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch b/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch new file mode 100644 index 00000000..9b142b54 --- /dev/null +++ b/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch @@ -0,0 +1,33 @@ +From 31902cb8d8d5df41295b489a47a6010e05a02ad7 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 + +cmake atomic check is not sufficient for i686 target where clang14 still +generates __atomic_store calls but the check does not entail this +function and happily thinks that compiler can resolve all atomic via intrinsics +on i686, but thats not the case, ideally the check for determining +atomic operation should be make more robust but until then lets ask to +link with libatomic on i686/linux + +Upstream-Status: Inappropriate [OE-Specific] +Signed-off-by: Khem Raj +--- + lldb/source/Utility/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lldb/source/Utility/CMakeLists.txt b/lldb/source/Utility/CMakeLists.txt +index cc0bf5fdb61a..5228bf01c276 100644 +--- a/lldb/source/Utility/CMakeLists.txt ++++ b/lldb/source/Utility/CMakeLists.txt +@@ -19,6 +19,10 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows") + list(APPEND LLDB_SYSTEM_LIBS ws2_32 rpcrt4) + endif () + ++if (CMAKE_SYSTEM_PROCESSOR MATCHES "i686" AND CMAKE_SYSTEM_NAME MATCHES "Linux") ++ list(APPEND LLDB_SYSTEM_LIBS atomic) ++endif() ++ + if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB ) + list(APPEND LLDB_SYSTEM_LIBS atomic) + endif() diff --git a/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch b/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch new file mode 100644 index 00000000..3c2f314e --- /dev/null +++ b/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch @@ -0,0 +1,35 @@ +From ff6112490dcfa323f8ffe36d822fda2025003b6e 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 60ba461ea0f5..67d446c0998a 100644 +--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp ++++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp +@@ -648,6 +648,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/0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch b/recipes-devtools/clang/clang/0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch deleted file mode 100644 index 0bd32d1c..00000000 --- a/recipes-devtools/clang/clang/0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 78560720a00c1a9b9e8ab416c4cae0eb1f2d1352 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 27 Sep 2022 12:03:15 -0700 -Subject: [PATCH] llvm: Do not use standard search paths in find_library for - ncurses - -This helps it find it in yocto sysroots - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - llvm/cmake/modules/FindTerminfo.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/llvm/cmake/modules/FindTerminfo.cmake b/llvm/cmake/modules/FindTerminfo.cmake -index 65edb80fa69a..a58180be8926 100644 ---- a/llvm/cmake/modules/FindTerminfo.cmake -+++ b/llvm/cmake/modules/FindTerminfo.cmake -@@ -11,7 +11,7 @@ - # Additionally, the following import target will be defined: - # Terminfo::terminfo - --find_library(Terminfo_LIBRARIES NAMES terminfo tinfo curses ncurses ncursesw) -+find_library(Terminfo_LIBRARIES NAMES terminfo tinfo curses ncurses ncursesw NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) - - if(Terminfo_LIBRARIES) - include(CMakePushCheckState) diff --git a/recipes-devtools/clang/clang/0039-run-clang-tidy-on-unique-files-only.patch b/recipes-devtools/clang/clang/0039-run-clang-tidy-on-unique-files-only.patch deleted file mode 100644 index 500be31b..00000000 --- a/recipes-devtools/clang/clang/0039-run-clang-tidy-on-unique-files-only.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0dc856ed20e0fb64dd7cb0a10db35c58c3ef95e6 Mon Sep 17 00:00:00 2001 -From: Serikzhan Kazi -Date: Sat, 6 Nov 2021 19:53:18 +1300 -Subject: [PATCH] [clang-tidy] run-clang-tidy.py: analyze unique files only - -The files in compile-commands.json can potentially include duplicates. -Change run-clang-tidy.py so that it does not run on the duplicate entries. - -Differential Revision: https://reviews.llvm.org/D112926 ---- - clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -index acd1ed6979c0..e6cff6a7414d 100755 ---- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -+++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -@@ -273,8 +273,8 @@ def main(): - - # Load the database and extract all files. - database = json.load(open(os.path.join(build_path, db_path))) -- files = [make_absolute(entry['file'], entry['directory']) -- for entry in database] -+ files = set([make_absolute(entry['file'], entry['directory']) -+ for entry in database]) - - max_task = args.j - if max_task == 0: --- -2.34.1 - diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 0201d44a..b282d837 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -90,8 +90,8 @@ LLVM_ENABLE_RTTI;LLVM_ENABLE_EH;LLVM_BUILD_EXTERNAL_COMPILER_RT;CMAKE_SYSTEM_NAM CMAKE_BUILD_TYPE;BUILD_SHARED_LIBS;LLVM_ENABLE_PROJECTS;LLVM_BINUTILS_INCDIR;\ LLVM_TARGETS_TO_BUILD;LLVM_EXPERIMENTAL_TARGETS_TO_BUILD;PYTHON_EXECUTABLE;\ PYTHON_LIBRARY;PYTHON_INCLUDE_DIR;LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN;LLDB_EDITLINE_USE_WCHAR;\ -LLVM_ENABLE_LIBEDIT;LLDB_ENABLE_LIBEDIT;LLDB_PYTHON_RELATIVE_PATH;\ -CMAKE_C_FLAGS_RELEASE;CMAKE_CXX_FLAGS_RELEASE;CMAKE_ASM_FLAGS_RELEASE;\ +LLVM_ENABLE_LIBEDIT;LLDB_ENABLE_LIBEDIT;LLDB_PYTHON_RELATIVE_PATH;LLDB_PYTHON_EXE_RELATIVE_PATH;\ +LLDB_PYTHON_EXT_SUFFIX;CMAKE_C_FLAGS_RELEASE;CMAKE_CXX_FLAGS_RELEASE;CMAKE_ASM_FLAGS_RELEASE;\ CLANG_DEFAULT_CXX_STDLIB;CLANG_DEFAULT_RTLIB;CLANG_DEFAULT_UNWINDLIB;\ CLANG_DEFAULT_OPENMP_RUNTIME;\ " @@ -116,6 +116,9 @@ LLDB:riscv64 = "" LLDB:mips = "" LLDB:mipsel = "" +# linux hosts (.so) on Windows .pyd +SOLIBSDEV:mingw32 = ".pyd" + #CMAKE_VERBOSE = "VERBOSE=1" EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ @@ -144,7 +147,10 @@ EXTRA_OECMAKE:append:class-native = "\ " EXTRA_OECMAKE:append:class-nativesdk = "\ -DCMAKE_CROSSCOMPILING:BOOL=ON \ - -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR} -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \ + -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR} \ + -DLLDB_PYTHON_EXE_RELATIVE_PATH=${PYTHON} \ + -DLLDB_PYTHON_EXT_SUFFIX=${SOLIBSDEV} \ + -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \ -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ @@ -154,12 +160,16 @@ EXTRA_OECMAKE:append:class-nativesdk = "\ -DLLDB_TABLEGEN=${STAGING_BINDIR_NATIVE}/lldb-tblgen \ -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \ -DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR} \ + -DLLDB_PYTHON_EXE_RELATIVE_PATH=${PYTHON} \ + -DLLDB_PYTHON_EXT_SUFFIX=${SOLIBSDEV} \ -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ -DPYTHON_EXECUTABLE='${PYTHON}' \ " EXTRA_OECMAKE:append:class-target = "\ -DCMAKE_CROSSCOMPILING:BOOL=ON \ - -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR}' \ + -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR} \ + -DLLDB_PYTHON_EXT_SUFFIX=${SOLIBSDEV} \ + -DLLDB_PYTHON_EXE_RELATIVE_PATH=${PYTHON}' \ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ -DLLDB_TABLEGEN=${STAGING_BINDIR_NATIVE}/lldb-tblgen \ @@ -171,6 +181,8 @@ EXTRA_OECMAKE:append:class-target = "\ -DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_SYS}${HF} \ -DLLVM_HOST_TRIPLE=${TARGET_SYS}${HF} \ -DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR} \ + -DLLDB_PYTHON_EXE_RELATIVE_PATH=${PYTHON} \ + -DLLDB_PYTHON_EXT_SUFFIX=${SOLIBSDEV} \ -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \ -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ -DLLVM_LIBDIR_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 8b827d40..b8489eb9 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -10,46 +10,41 @@ SRC_URI = "\ ${BASEURI} \ file://llvm-config \ file://libunwind.pc.in \ - file://0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch \ - file://0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \ - file://0003-compiler-rt-support-a-new-embedded-linux-target.patch \ - file://0004-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch \ - file://0005-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ - file://0006-llvm-allow-env-override-of-exe-path.patch \ - file://0007-clang-driver-Check-sysroot-for-ldso-path.patch \ - file://0008-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch \ - file://0009-clang-musl-ppc-does-not-support-128-bit-long-double.patch \ - file://0010-clang-Prepend-trailing-to-sysroot.patch \ - file://0011-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch \ - file://0012-clang-Define-releative-gcc-installation-dir.patch \ - file://0013-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch \ - file://0014-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch \ - file://0015-Check-for-atomic-double-intrinsics.patch \ - file://0016-clang-Enable-SSP-and-PIE-by-default.patch \ - file://0017-libcxx-Add-compiler-runtime-library-to-link-step-for.patch \ - file://0018-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch \ - file://0019-clang-Fix-resource-dir-location-for-cross-toolchains.patch \ - file://0020-fix-path-to-libffi.patch \ - file://0021-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch \ - file://0022-clang-Use-python3-in-python-scripts.patch \ - file://0023-For-x86_64-set-Yocto-based-GCC-install-search-path.patch \ - file://0024-llvm-Do-not-use-find_library-for-ncurses.patch \ - file://0025-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch \ - file://0026-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \ - file://0027-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch \ - file://0028-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch \ - file://0029-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch \ - file://0030-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ - file://0031-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch \ - file://0032-libunwind-Added-unw_backtrace-method.patch \ - file://0033-compiler-rt-Use-uintptr_t-instead-of-_Unwind_Word.patch \ - file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ - file://0035-clang-Do-not-use-install-relative-libc-headers.patch \ - file://0036-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch \ - file://0037-Fix-lib-paths-for-OpenEmbedded-Host.patch \ - file://0038-Correct-library-search-path-for-OpenEmbedded-Host.patch \ - file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ - file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ + file://0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \ + file://0002-compiler-rt-support-a-new-embedded-linux-target.patch \ + file://0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch \ + file://0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ + file://0005-llvm-allow-env-override-of-exe-path.patch \ + file://0006-clang-driver-Check-sysroot-for-ldso-path.patch \ + file://0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch \ + file://0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch \ + file://0009-clang-Prepend-trailing-to-sysroot.patch \ + file://0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch \ + file://0011-clang-Define-releative-gcc-installation-dir.patch \ + file://0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch \ + file://0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch \ + file://0014-Check-for-atomic-double-intrinsics.patch \ + file://0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch \ + file://0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch \ + file://0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch \ + file://0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch \ + file://0019-clang-Use-python3-in-python-scripts.patch \ + file://0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch \ + file://0021-llvm-Do-not-use-find_library-for-ncurses.patch \ + file://0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch \ + file://0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \ + file://0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch \ + file://0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch \ + file://0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ + file://0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch \ + file://0028-libunwind-Added-unw_backtrace-method.patch \ + file://0029-Do-not-force-thumb-mode-directive.patch \ + file://0030-clang-Do-not-use-install-relative-libc-headers.patch \ + file://0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch \ + file://0032-Fix-lib-paths-for-OpenEmbedded-Host.patch \ + file://0033-Correct-library-search-path-for-OpenEmbedded-Host.patch \ + file://0034-lldb-Link-with-libatomic-on-x86.patch \ + file://0035-clang-exclude-openembedded-distributions-from-settin.patch \ " # Fallback to no-PIE if not set GCCPIE ??= "" diff --git a/recipes-devtools/clang/openmp_git.bb b/recipes-devtools/clang/openmp_git.bb index 7ce89eb5..b1f1a8d8 100644 --- a/recipes-devtools/clang/openmp_git.bb +++ b/recipes-devtools/clang/openmp_git.bb @@ -35,10 +35,10 @@ PACKAGECONFIG[ompt-tools] = "-DOPENMP_ENABLE_OMPT_TOOLS=ON,-DOPENMP_ENABLE_OMPT_ PACKAGECONFIG[aliases] = "-DLIBOMP_INSTALL_ALIASES=ON,-DLIBOMP_INSTALL_ALIASES=OFF," PACKAGECONFIG[offloading-plugin] = ",,elfutils libffi,libelf libffi" -PACKAGES += "${PN}-libomptarget-amdgcn" +PACKAGES += "${PN}-libomptarget" FILES_SOLIBSDEV = "" FILES:${PN} += "${libdir}/lib*${SOLIBSDEV}" -FILES:${PN}-libomptarget-amdgcn = "${libdir}/libomptarget-amdgcn-*.bc" +FILES:${PN}-libomptarget = "${libdir}/libomptarget-*.bc" INSANE_SKIP:${PN} = "dev-so" COMPATIBLE_HOST:mips64 = "null" From a586b64c701c3e0f28e1a6567e3eda94e5dd9d0a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 4 Feb 2022 23:13:02 -0800 Subject: [PATCH 110/166] libcxx: Install unwind_itanium.h and unwind_arm_ehabi.h When building libunwind, install new headers which are refactored from unwind.h in clang 14.0.0 onwards Signed-off-by: Khem Raj (cherry picked from commit 64b5dcde5522a0db5682278afd614dd6719580c8) --- recipes-devtools/clang/libcxx_git.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index 116dbef1..cc88fc16 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb @@ -91,8 +91,10 @@ PROVIDES:append:runtime-llvm = " libunwind" do_install:append() { if ${@bb.utils.contains("RUNTIME", "llvm", "true", "false", d)} then - install -Dm 0644 ${S}/libunwind/include/libunwind.h ${S}/libunwind/include/__libunwind_config.h ${D}${includedir} - install -Dm 0644 ${S}/libunwind/include/unwind.h ${D}${includedir}/unwind.h + for f in libunwind.h __libunwind_config.h unwind.h unwind_itanium.h unwind_arm_ehabi.h + do + install -Dm 0644 ${S}/libunwind/include/$f ${D}${includedir}/$f + done install -d ${D}${libdir}/pkgconfig sed -e 's,@LIBDIR@,${libdir},g;s,@VERSION@,${PV},g' ${S}/../libunwind.pc.in > ${D}${libdir}/pkgconfig/libunwind.pc fi From 2a4f5d0d2c3a780df1895ee86e526e80e5e81fff Mon Sep 17 00:00:00 2001 From: Dan McGregor Date: Tue, 9 Nov 2021 14:51:39 -0600 Subject: [PATCH 111/166] castxml: bump to 0.4.4 This version supports llvm main, llvm 13.x, and llvm 14.x. Signed-off-by: Dan McGregor (cherry picked from commit 94c0812f45df2e39b3b49e4d9260c6ed5ee7bd93) --- recipes-devtools/castxml/castxml_git.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes-devtools/castxml/castxml_git.bb b/recipes-devtools/castxml/castxml_git.bb index f295038e..d9e6ce0e 100644 --- a/recipes-devtools/castxml/castxml_git.bb +++ b/recipes-devtools/castxml/castxml_git.bb @@ -4,9 +4,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" SRC_URI = "git://github.com/CastXML/CastXML;protocol=https;branch=master" -# 0.3.6 is the release for LLVM/Clang v11.0.0 -SRCREV = "902ac163f0291fcfc459f58691481e88c9f91dea" -PV = "0.3.6" +# 0.4.4 is the release for LLVM/Clang v13.0.0 +SRCREV = "2095c10a25610a8ccf6c7ef819440bdac6b13c59" +PV = "0.4.4" S = "${WORKDIR}/git" From 2c9d56e4acb5541a512b7f827bed2876762a8ee9 Mon Sep 17 00:00:00 2001 From: yangpeng1995 <1336781165@qq.com> Date: Sun, 20 Feb 2022 01:32:11 +0800 Subject: [PATCH 112/166] clang.bbclass: Fix typo about big.LITTLE tune options Signed-off-by: yangpeng1995 <1336781165@qq.com> (cherry picked from commit 6a447c0fcb1dc8dae08eb6bf2c12b0f0d7bdf637) --- classes/clang.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 9f1f210c..050b6678 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -40,7 +40,7 @@ TUNE_CCARGS:remove:toolchain-clang = "-mtune=cortex-a57.cortex-a53 -mtune=cortex TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa72-cortexa53 cortexa57-cortexa53 cortexa73-cortexa53", " -mcpu=cortex-a53", "", d)}" TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa15-cortexa7 cortexa17-cortexa7", " -mcpu=cortex-a7", "", d)}" TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa72-cortexa35", " -mcpu=cortex-a35", "", d)}" -TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa75-cortex-a55 cortexa76-cortex-a55", " -mcpu=cortex-a55", "", d)}" +TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains_any("TUNE_FEATURES", "cortexa75-cortexa55 cortexa76-cortexa55", " -mcpu=cortex-a55", "", d)}" # Clang does not support octeontx2 processor TUNE_CCARGS:remove:toolchain-clang = "-mcpu=octeontx2" From 06db107c681467a4db4d2bf0efe0ca5e367c2a56 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 17 Feb 2022 18:07:25 -0800 Subject: [PATCH 113/166] clang: Provide cross names for common llvm binutils These provide the cross tool prefixed with CROSS_COMPILE tuples Signed-off-by: Khem Raj (cherry picked from commit 5cf945b3c830a49ef6858bc059f4b8da2cba35b5) --- recipes-devtools/clang/clang-cross-canadian_git.bb | 8 ++++++-- recipes-devtools/clang/clang-cross_git.bb | 10 +++++++--- recipes-devtools/clang/clang-crosssdk_git.bb | 10 +++++++--- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/recipes-devtools/clang/clang-cross-canadian_git.bb b/recipes-devtools/clang/clang-cross-canadian_git.bb index 2e00bd90..e3ae393c 100644 --- a/recipes-devtools/clang/clang-cross-canadian_git.bb +++ b/recipes-devtools/clang/clang-cross-canadian_git.bb @@ -20,13 +20,17 @@ TARGET_ARCH[vardepsexclude] = "TUNE_ARCH" do_install() { install -d ${D}${bindir} - for tool in clang clang++ clang-tidy lld ld.lld llvm-profdata llvm-ar llvm-ranlib llvm-nm + for tool in clang clang++ clang-tidy lld ld.lld llvm-profdata \ + llvm-nm llvm-ar llvm-as llvm-ranlib llvm-strip llvm-objcopy llvm-objdump llvm-readelf \ + llvm-addr2line llvm-dwp llvm-size llvm-strings llvm-cov do ln -sf ../$tool ${D}${bindir}/${TARGET_PREFIX}$tool done } SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-llvm-ar \ - *-llvm-ranlib *-llvm-nm *-lld *-ld.lld" + *-llvm-ranlib *-llvm-nm *-lld *-ld.lld *-llvm-as *-llvm-strip \ + *-llvm-objcopy *-llvm-objdump *-llvm-readelf *-llvm-addr2line \ + *-llvm-dwp *-llvm-size *-llvm-strings *-llvm-cov" do_install:append() { cross_canadian_bindirlinks } diff --git a/recipes-devtools/clang/clang-cross_git.bb b/recipes-devtools/clang/clang-cross_git.bb index abceb3d0..8aee5cd8 100644 --- a/recipes-devtools/clang/clang-cross_git.bb +++ b/recipes-devtools/clang/clang-cross_git.bb @@ -15,13 +15,17 @@ DEPENDS += "clang-native virtual/${TARGET_PREFIX}binutils" do_install() { install -d ${D}${bindir} - for tool in clang clang++ clang-tidy lld ld.lld llvm-profdata llvm-ar llvm-ranlib llvm-nm + for tool in clang clang++ clang-tidy lld ld.lld llvm-profdata \ + llvm-nm llvm-ar llvm-as llvm-ranlib llvm-strip llvm-objcopy llvm-objdump llvm-readelf \ + llvm-addr2line llvm-dwp llvm-size llvm-strings llvm-cov do ln -sf ../$tool ${D}${bindir}/${TARGET_PREFIX}$tool done } -SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-llvm-ar \ - *-llvm-ranlib *-llvm-nm *-lld *-ld.lld" +SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-lld *-ld.lld \ + *-llvm-nm *-llvm-ar *-llvm-as *-llvm-ranlib *-llvm-strip \ + *-llvm-objcopy *-llvm-objdump *-llvm-readelf *-llvm-addr2line \ + *-llvm-dwp *-llvm-size *-llvm-strings *-llvm-cov" SYSROOT_PREPROCESS_FUNCS += "clangcross_sysroot_preprocess" diff --git a/recipes-devtools/clang/clang-crosssdk_git.bb b/recipes-devtools/clang/clang-crosssdk_git.bb index eaea7659..906bc873 100644 --- a/recipes-devtools/clang/clang-crosssdk_git.bb +++ b/recipes-devtools/clang/clang-crosssdk_git.bb @@ -15,13 +15,17 @@ DEPENDS += "clang-native nativesdk-clang-glue virtual/${TARGET_PREFIX}binutils-c do_install() { install -d ${D}${bindir} - for tool in clang clang++ clang-tidy lld ld.lld llvm-profdata llvm-ar llvm-ranlib llvm-nm + for tool in clang clang++ clang-tidy lld ld.lld llvm-profdata \ + llvm-nm llvm-ar llvm-as llvm-ranlib llvm-strip llvm-objcopy llvm-objdump llvm-readelf \ + llvm-addr2line llvm-dwp llvm-size llvm-strings llvm-cov do ln -sf ../$tool ${D}${bindir}/${TARGET_PREFIX}$tool done } -SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-llvm-ar \ - *-llvm-ranlib *-llvm-nm *-lld *-ld.lld" +SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-lld *-ld.lld \ + *-llvm-nm *-llvm-ar *-llvm-as *-llvm-ranlib *-llvm-strip \ + *-llvm-objcopy *-llvm-objdump *-llvm-readelf *-llvm-addr2line \ + *-llvm-dwp *-llvm-size *-llvm-strings *-llvm-cov" sysroot_stage_all () { sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir} } From 820baa4f7f55fb77bd65b7955900e95007b79036 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 20 Feb 2022 17:30:08 -0800 Subject: [PATCH 114/166] clang: Update to latest 14.x * 42a797ef011b [ELF] Fix .strtab corruption when a symbol name is empty * 4dc3cb8e3255 ReleaseNotes: add BOLT subsection * 192d9680c1b1 [RISCV] add the MC layer support of Zfinx extension * 1e348e6042fc [OpenCL] Guard atomic_double with cl_khr_int64_* * 880717cc801d clang-analyzer plugins require LLVM_ENABLE_PLUGINS also * 9bc22aa50780 [OpenMP][CUDA] Refine the logic to determine grid size * ecdd25c86511 [Debuginfod] [Symbolizer] Break debuginfod out of libLLVM. * b0ae8076cf4c [SDAG] enable binop identity constant folds for fmul/fdiv * 6311bae1b424 [X86] Add test cases for fmul/fdiv with select. * 812894f74a8a [runtimes] Move warning messages for FOO_SYSROOT & friends above their default value * c561bf0daa95 [runtimes] Add release note for deprecation of FOO_SYSROOT & friends * 8b10e0a84047 [runtimes] Deprecate FOO_SYSROOT & friends * 89309e187631 [lld] One more formatting fix for the release notes * 9e1f13d14e19 [lld] Fix RST formatting in release notes * 5264342c242b [Docs][OpenCL] Update OpenCL 3.0 status in docs. * e8712accba11 [Docs][OpenCL] Release 14 notes. * b54c95790b8a [Docs] Release 14 notes for SPIR-V in clang. * fc2dbf90d12a [libc++] Mark test as unsupported with apple-clang * edf64474d662 [ELF][PPC64] Fix assertion failure for branches to hidden undefined weak for -no-pie * 2fc17e919f0c [libc++] Temporarily silence failing debug mode test * dfc24b8522ba [libc++][NFC] Work around false positive ODR violations from ASan. * 199e05e34bb8 [libc++] Add missing UNSUPPORTED for the has-no-incomplete-ranges test * 7fdca71be63a [libc++] Guard much of std::ranges under _LIBCPP_HAS_NO_INCOMPLETE_RANGES. * e493f08f8222 [lld-macho] Fill out release notes for 14.x * ea97fc6b564e [OpenMP][FIX] The `llvm.amdgcn.s.barrier` is actually not aligned * 062111fe8073 InferAddressSpaces: Fix assert on inferred source for inttoptr/ptrtoint Signed-off-by: Khem Raj (cherry picked from commit 51a8c792b73803e679527359af2d051c42c0d7f0) --- recipes-devtools/clang/clang.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 7e90e2de..85702cfb 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "14" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "b2ca48a8412270e323ac8441772d0d69190a8417" +SRCREV ?= "42a797ef011bd920bb7b781a752b925362b9754c" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/14.x" From ab54994af6026b9635a2b0f6c869b8a610eac3ab Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 19 Feb 2022 11:16:38 -0800 Subject: [PATCH 115/166] nonclangable.conf: Disable llvm-objcopy/llvm-strip on selected recipes This is until upstream bugs are fixed, linux-firmware change however is legit and will be permanent Signed-off-by: Khem Raj (cherry picked from commit 9ad53591eaf522f8fcbc0c8e0e9e6c55ccdf8272) --- conf/nonclangable.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index 7e92d718..9da32608 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -336,3 +336,18 @@ TOOLCHAIN_pn-u-boot-seco-imx = "gcc" # see https://bugs.llvm.org/show_bug.cgi?id=50443 this is in clang-13, until it is fixed do not use -O2 SELECTED_OPTIMIZATION:remove:pn-poke:toolchain-clang = "-O2" + +# see https://github.com/llvm/llvm-project/issues/53948 +OBJCOPY:pn-opensbi:toolchain-clang = "${HOST_PREFIX}objcopy" +OBJCOPY:pn-libc-bench:toolchain-clang = "${HOST_PREFIX}objcopy" +STRIP:pn-libc-bench:toolchain-clang = "${HOST_PREFIX}strip" +OBJCOPY:pn-aufs-util:toolchain-clang = "${HOST_PREFIX}objcopy" +STRIP:pn-aufs-util:toolchain-clang = "${HOST_PREFIX}strip" + +# Depend on GNU objcopy option missing in llvm-objcopy +# llvm-objcopy: error: unknown argument '--section-alignment=512' +OBJCOPY:pn-systemd-boot:toolchain-clang = "${HOST_PREFIX}objcopy" + +# Need OBJDUMP during do_package_qa which is set to llvm-objdump with meta-clang +# it might work with GNU objdump since it falls back to one from build host +DEPENDS:pn-linux-firmware:append:toolchain-clang = " clang-native" From d96ffaa1e9329eaaa65c1a9d70b66791f0864ff7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 17 Feb 2022 18:14:04 -0800 Subject: [PATCH 116/166] clang.bbclass: Use llvm provided binutils when using toolchain-clang These tools are better integrated with clang produced output consumption pipeline, therefore use them when using clang as compiler Signed-off-by: Khem Raj (cherry picked from commit 9bcf8e4c708e208b5f94633b94262f62a94d5162) --- classes/clang.bbclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 050b6678..f5a49b76 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -8,6 +8,11 @@ CCLD:toolchain-clang = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_ RANLIB:toolchain-clang = "${HOST_PREFIX}llvm-ranlib" AR:toolchain-clang = "${HOST_PREFIX}llvm-ar" NM:toolchain-clang = "${HOST_PREFIX}llvm-nm" +OBJDUMP:toolchain-clang = "${HOST_PREFIX}llvm-objdump" +OBJCOPY:toolchain-clang = "${HOST_PREFIX}llvm-objcopy" +STRIP:toolchain-clang = "${HOST_PREFIX}llvm-strip" +STRINGS:toolchain-clang = "${HOST_PREFIX}llvm-strings" +READELF:toolchain-clang = "${HOST_PREFIX}llvm-readelf" LTO:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'thin-lto', '-flto=thin', '-flto -fuse-ld=lld', d)}" PACKAGE_DEBUG_SPLIT_STYLE:toolchain-clang = "debug-without-src" From 509b3e2b192d285301ebae62a02f8b134c688d86 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 23 Feb 2022 19:23:43 +0000 Subject: [PATCH 117/166] clang: set POPULATESYSROOTDEPS so that strip is present do_populate_sysroot will execute the cross STRIP as part of the processing. In non-clang builds this is present via POPULATESYSROOTDEPS pulling in binutils, but in clang builds STRIP is set to llvm-strip which obviously isn't part of binutils. Set POPULATESYSROOTDEPS correctly to ensure that do_populate_sysroot has the strip binary available. Signed-off-by: Ross Burton (cherry picked from commit bf344026d9798d8a9077aa7d52ba29e83cc4dd42) --- classes/clang.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index f5a49b76..914c2084 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -124,6 +124,9 @@ BASE_DEFAULT_DEPS:toolchain-clang:class-target = "${@clang_base_deps(d)}" BASE_DEFAULT_DEPS:append:class-native:toolchain-clang:runtime-llvm = " libcxx-native compiler-rt-native" BASE_DEFAULT_DEPS:append:class-nativesdk:toolchain-clang:runtime-llvm = " clang-native nativesdk-libcxx nativesdk-compiler-rt" +# do_populate_sysroot needs STRIP +POPULATESYSROOTDEPS:toolchain-clang:class-target = "clang-cross-${TARGET_ARCH}:do_populate_sysroot" + cmake_do_generate_toolchain_file:append:toolchain-clang () { cat >> ${WORKDIR}/toolchain.cmake < Date: Tue, 22 Feb 2022 12:22:15 -0800 Subject: [PATCH 118/166] clang: Use GNU objdump on mips There are missing features in llvm-objdump especially for gnu-hash sections for mips Signed-off-by: Khem Raj (cherry picked from commit a6cea51ab2b0923340012655ac0f13afba899e57) --- classes/clang.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 914c2084..f3c9cefd 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -13,6 +13,9 @@ OBJCOPY:toolchain-clang = "${HOST_PREFIX}llvm-objcopy" STRIP:toolchain-clang = "${HOST_PREFIX}llvm-strip" STRINGS:toolchain-clang = "${HOST_PREFIX}llvm-strings" READELF:toolchain-clang = "${HOST_PREFIX}llvm-readelf" +# see https://github.com/llvm/llvm-project/issues/53996 +OBJDUMP:mips:toolchain-clang = "${HOST_PREFIX}objdump" +OBJDUMP:mipsel:toolchain-clang = "${HOST_PREFIX}objdump" LTO:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'thin-lto', '-flto=thin', '-flto -fuse-ld=lld', d)}" PACKAGE_DEBUG_SPLIT_STYLE:toolchain-clang = "debug-without-src" From f8dc120f5f6c1710ea93ee02583d9acffecb3f87 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 23 Feb 2022 11:59:49 -0800 Subject: [PATCH 119/166] clang: Update to latest 14.x Backport a fix to avoid compiler hangs on RISCV [1] This brings following changes * 2fe5bf57172c [Driver] Use libatomic for 32-bit SPARC atomics support * 46266b3518b6 [mlir][sparse] Rename index_t to index_type again * 03d9a4094763 [AArch64][SVE] Fix selection failure during lowering of shuffle_vector * 8b5b29c4c2c5 Fix incorrect TypeSize->uint64_t cast in InductionDescriptor::isInductionPHI * 8c33ea3ab0ef [SVE][CodeGen] Bail out for scalable vectors in AArch64TargetLowering::ReconstructShuffle * 1362f8bdfce7 [AArch64][SVE] Fix selection failure caused by fp/int convert using non-Neon types * 88f8980a4d95 [AArch64][SVE] Add structured load/store opcodes to getMemOpInfo * cefe6876d6e5 [llvm-objcopy][COFF] Fix section name encoding * 3367c24735c3 [COFF] Move section name encoding into BinaryFormat * 9672d11441fd [MLIR][Presburger] Disambiguate call to floor * 08ad9ae10f32 [InstSimplify] Strip offsets once in computePointerICmp() * 5593af72d0c5 [Attributor][FIX] Heap2Stack needs to use the alloca AS * b3d3501aa128 [OpenMP][FIX] Eliminate race on the IsSPMD global * 9bf8897c84f7 [OpenMP] Add RTL function to externalization RAII * 56ac6dbc7369 [RuntimeDyld] Fix building on OpenBSD * fef110bf8b2b [clangd] Fix building SerializationTests unit test on OpenBSD * 13fdc7afa856 [Attributor][FIX] Reachability needs to account for readonly callees * f3cfaf8bc8eb [MemoryBuiltins][FIX] Adjust index type size properly wrt. AS casts * c06cc1c3a7f8 [libc++] Fix std::__debug_less in c++17. * 7d8e83dab37a [funcattrs] check reachability to improve noreturn * e1b3afbbdef1 [SLP] Simplify indices processing for insertelements * 1e340705f142 [PowerPC] Add default handling for single element vectors, and split/promote vNi1 vectors. * 908c1bae6e7f [RISCV] Fix incorrect extend type in vwmulsu combine. [1] https://github.com/llvmbot/llvm-project/pull/95 Signed-off-by: Khem Raj (cherry picked from commit eb7d0bc2afa76850b3dc25799a33f313f4f8ee8f) --- recipes-devtools/clang/clang.inc | 2 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 8 +-- ...-support-a-new-embedded-linux-target.patch | 2 +- ...lify-cross-compilation.-Don-t-use-na.patch | 2 +- ...ryInfo-Undefine-libc-functions-if-th.patch | 2 +- ...-llvm-allow-env-override-of-exe-path.patch | 2 +- ...g-driver-Check-sysroot-for-ldso-path.patch | 2 +- ...tools.cpp-Add-lssp_nonshared-on-musl.patch | 2 +- ...does-not-support-128-bit-long-double.patch | 2 +- ...09-clang-Prepend-trailing-to-sysroot.patch | 2 +- ...e-the-target-sysroot-for-compiler-ru.patch | 2 +- ...efine-releative-gcc-installation-dir.patch | 2 +- ...ad-and-ldl-along-with-lunwind-for-st.patch | 4 +- ...UTABLE-when-cross-compiling-for-nati.patch | 2 +- ...4-Check-for-atomic-double-intrinsics.patch | 2 +- ...ler-runtime-library-to-link-step-for.patch | 2 +- ...-Fix-configure-for-packages-using-fi.patch | 2 +- ...ce-dir-location-for-cross-toolchains.patch | 2 +- ...-dyld-prefix-when-checking-sysroot-f.patch | 2 +- ...-clang-Use-python3-in-python-scripts.patch | 2 +- ...-Yocto-based-GCC-install-search-path.patch | 2 +- ...-Do-not-use-find_library-for-ncurses.patch | 2 +- ...or-for-adding-OE-distro-vendor-names.patch | 2 +- ...er-rt-Use-mcr-based-barrier-on-armv6.patch | 2 +- ...ot-use-backtrace-APIs-on-non-glibc-l.patch | 2 +- ...iple-for-non-debian-multiarch-linux-.patch | 2 +- ...-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch | 2 +- ...-scudo-standalone-with-libatomic-on-.patch | 2 +- ...libunwind-Added-unw_backtrace-method.patch | 2 +- ...29-Do-not-force-thumb-mode-directive.patch | 2 +- ...ot-use-install-relative-libc-headers.patch | 2 +- ...iver-finds-GCC-installation-path-on-.patch | 2 +- ...-Fix-lib-paths-for-OpenEmbedded-Host.patch | 2 +- ...ry-search-path-for-OpenEmbedded-Host.patch | 2 +- ...0034-lldb-Link-with-libatomic-on-x86.patch | 2 +- ...enembedded-distributions-from-settin.patch | 4 +- ...oop-between-DAGCombiner-visitMUL-and.patch | 61 +++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 38 files changed, 103 insertions(+), 41 deletions(-) create mode 100644 recipes-devtools/clang/clang/0036-Avoid-infinite-loop-between-DAGCombiner-visitMUL-and.patch diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 85702cfb..978bc31b 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "14" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "42a797ef011bd920bb7b781a752b925362b9754c" +SRCREV ?= "2fe5bf57172cebf5a3f0b3f82552cf5c2122eca2" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/14.x" 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 1bf74805..b8fa1c34 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 5b502aa8a8a8e33082912e46e48ba43d7eb0f196 Mon Sep 17 00:00:00 2001 +From 0417616e62aaed9438d86bc5b9cd0255378de665 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 27 Aug 2017 10:37:49 -0700 Subject: [PATCH] libcxxabi: Find libunwind headers when @@ -17,10 +17,10 @@ Signed-off-by: Khem Raj 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index 58c21059c602..7709aedf0bde 100644 +index 8e8cdf8ad737..9a0edc701752 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt -@@ -525,14 +525,9 @@ endif() +@@ -535,14 +535,9 @@ endif() # Setup Source Code #=============================================================================== @@ -36,7 +36,7 @@ index 58c21059c602..7709aedf0bde 100644 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES} ${LIBCXXABI_LIBUNWIND_PATH}/include ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES} -@@ -543,15 +538,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) +@@ -553,15 +548,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 89ac3d12..c009cd94 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 a21dbb76c8ef5812b2e05cf93682da02650b6166 Mon Sep 17 00:00:00 2001 +From 923f84c5142703f22faf22a5886f1d8735460e66 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 b573ad83..a7b4a464 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 1a7e174cddac6738c5bc28fd642be8cc687138bf Mon Sep 17 00:00:00 2001 +From a7afbe16631bd2846353f92e8d8f9c91c02539b8 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 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 897b4c39..b354c29d 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 cac469f7a8ea6fe4bfb4e6151a5dd058dfa62947 Mon Sep 17 00:00:00 2001 +From 3430cb43036fe464c62d97c79fa6a5b2885f1c8b 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 diff --git a/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch index beb00919..03f58e85 100644 --- a/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From 8402337515bc0c75af621551dca9eb1cfc4ae611 Mon Sep 17 00:00:00 2001 +From 8c02d0f6f5fedb5b7bbbdbf5fcd8763481f3b606 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 path diff --git a/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch index b32f18e2..1d48ba47 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 5c8b6edfe03a72a75e698db7cbc7c409f08e3c45 Mon Sep 17 00:00:00 2001 +From d63cfd77ccd45ca5cc927135fcc0367b4949672a 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 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 fccc41d9..bd66784a 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 00484dc7cdf327f97fe09389fe5fe2ebd9e8fba4 Mon Sep 17 00:00:00 2001 +From 9b79e071bedb6427134a336da8bd9a6c13b04595 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 diff --git a/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch index a8f6335e..1ab63b64 100644 --- a/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch @@ -1,4 +1,4 @@ -From bcf28119ce4c70e6d9c140d3393d556af897ddce Mon Sep 17 00:00:00 2001 +From 537fcb8e264af0e8f84ae75d6b98eb8e70d01500 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 02:00:11 -0700 Subject: [PATCH] clang: musl/ppc does not support 128-bit long double diff --git a/recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch index 5f41f6ab..f277df4e 100644 --- a/recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From 6ee100ac3386d411e03855c5cdb9df7545a127de Mon Sep 17 00:00:00 2001 +From d06565e3abf15ebf436de330b69934d1126f7683 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 diff --git a/recipes-devtools/clang/clang/0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index c735b401..92aab239 100644 --- a/recipes-devtools/clang/clang/0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From 17bf3579a12359af825ca2815e273470a483ebb7 Mon Sep 17 00:00:00 2001 +From 1415af655aee9c5c4eff7d76b66c5633f95515f3 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 diff --git a/recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch index bbe4eb76..8d88377b 100644 --- a/recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch @@ -1,4 +1,4 @@ -From 8f44109cb3b837966d401233daf2887a0a0d579b Mon Sep 17 00:00:00 2001 +From 7aeee55cfc8c33ce0c1d3a77a4ac1bca28916eb1 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 diff --git a/recipes-devtools/clang/clang/0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index 4d91a7ae..bde750fc 100644 --- a/recipes-devtools/clang/clang/0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From 7d99f8a3c0ddd74d188d54f82f957843456bcdde Mon Sep 17 00:00:00 2001 +From e0b95871ba134b6c22845a08985e801cbe525dda 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 @@ -20,7 +20,7 @@ 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 6364cd133e0b..60ba461ea0f5 100644 +index dfcef2304040..dbc91e427dfb 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -1472,6 +1472,8 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, diff --git a/recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index 4bbe6b5f..76a568e5 100644 --- a/recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From b6b764295a5d003264dd5b843ff1f513a3c40991 Mon Sep 17 00:00:00 2001 +From d82dd9efbc79492276b481c24261489ae72dbd87 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 diff --git a/recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch index 4e5ad633..592c968d 100644 --- a/recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From 1b1bcc66f885233a3378ba9819c9a20323490cea Mon Sep 17 00:00:00 2001 +From 70d54f8ef8d98974c553ccac0f846d15c66c2c3c 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/0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index cc223668..ff318cb0 100644 --- a/recipes-devtools/clang/clang/0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -1,4 +1,4 @@ -From cc0a281fbf68db9fadc74cee24d63b12a0b4d1eb Mon Sep 17 00:00:00 2001 +From 35c3cd4c8e9135c29e6a32f453711ad3b98271dd 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 diff --git a/recipes-devtools/clang/clang/0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index ba988e0b..fe96ce7b 100644 --- a/recipes-devtools/clang/clang/0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -1,4 +1,4 @@ -From ce947e2ae1759e393b387ac115d5540ec6f471f1 Mon Sep 17 00:00:00 2001 +From 4efe98f8c26712edee6b103be6a4279d7b47d251 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 diff --git a/recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch index 3a2b1797..897d50f2 100644 --- a/recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From 85a600c78bcb5befd0f51e5551d0dd2f4c6b6f54 Mon Sep 17 00:00:00 2001 +From 24730a64a41a28d0716a7b013760eaea94f9b9bb 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 diff --git a/recipes-devtools/clang/clang/0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index 70de0a32..6451c9cb 100644 --- a/recipes-devtools/clang/clang/0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From 26c596cf7f4c3fbac5df62a8f19ebca083fd4d2c Mon Sep 17 00:00:00 2001 +From 9751d930cb00597199337a2776aa49542aed77ca 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 diff --git a/recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch index 078bc61e..d4815006 100644 --- a/recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From df4a3eb433329f68dc6ba74b9bd03664c3a62299 Mon Sep 17 00:00:00 2001 +From d12bbca6d0ea401559e7c97e6afadc2f153b1ab7 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/0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index 640562fc..c41cf495 100644 --- a/recipes-devtools/clang/clang/0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From abd7f4b0e7e10c7102685012cb9db0551be7037c Mon Sep 17 00:00:00 2001 +From 04a38139422e5ec7d03709725b3474e976989287 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 diff --git a/recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch index 28ef7ab6..fc614cbc 100644 --- a/recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch +++ b/recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch @@ -1,4 +1,4 @@ -From e06d9bce947249e18bd17f55852dad4e3ea671ac Mon Sep 17 00:00:00 2001 +From 138373ea249af22b94f5fee87a25a1151649a4e7 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 diff --git a/recipes-devtools/clang/clang/0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index c0d2b6da..97c530f7 100644 --- a/recipes-devtools/clang/clang/0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From 4a0571cc9e2401504c0675051c3e66143d0d87f6 Mon Sep 17 00:00:00 2001 +From 2aba65b9a02c484283927fc3273dddd633c54e63 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 diff --git a/recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index b67d8d2c..c6285c59 100644 --- a/recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From c4a8eebdbaea9eef3f4422497196627485de920e Mon Sep 17 00:00:00 2001 +From 839eebdbd31760e4bbc77ca047a4c593c3a8b722 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 diff --git a/recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 639563d3..4e3f75a5 100644 --- a/recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From 5ffa9adacd28053b6ff42d30907991fedb2ce75a Mon Sep 17 00:00:00 2001 +From 56d26beabeb171daddc2f55cf07cd16599c8132a 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/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index 56c97b61..d7afd155 100644 --- a/recipes-devtools/clang/clang/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From a92c1148c71e0152d6b2027bf59c8eb46ecee800 Mon Sep 17 00:00:00 2001 +From 6bfee9c0356ef862635d60d33a117bdcb4d92e07 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 diff --git a/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index da038e22..13b13b8f 100644 --- a/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From 1caf16b9a0a6d195bc66da996d6bcd3f66eeff07 Mon Sep 17 00:00:00 2001 +From c672d84ae78cd4baf447149a0fd6a5586445b1af Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES diff --git a/recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index 4585eed1..86e693e9 100644 --- a/recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From 8653885e3f7f0a90fe49b8d0bfbffc011ff44407 Mon Sep 17 00:00:00 2001 +From e7b99b5a52d64229196c01d79ef21bdb634434d1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips diff --git a/recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch index f4a7c099..3a1f8109 100644 --- a/recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 2ee8622a6471cfd38878e8f83f72338c275cee8b Mon Sep 17 00:00:00 2001 +From 3e95203ee02d7b5d9d45ee157cf76478b52d36df Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 23 May 2021 10:27:29 +0000 Subject: [PATCH] libunwind: Added unw_backtrace method diff --git a/recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch b/recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch index f22fd5c8..098e0ee6 100644 --- a/recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch +++ b/recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch @@ -1,4 +1,4 @@ -From 026dc43875ab8c0c3a28ae4650c5685cd530bb37 Mon Sep 17 00:00:00 2001 +From ce1a02de2daedf9377fd825e0a0a7524794469bb Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Jun 2021 08:42:36 -0700 Subject: [PATCH] Do not force thumb mode directive diff --git a/recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch b/recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch index 6f17144a..7211cf9f 100644 --- a/recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch +++ b/recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch @@ -1,4 +1,4 @@ -From d60663adf9941780ed5365a5a919cbcd8946ff74 Mon Sep 17 00:00:00 2001 +From 372c112411b2095c193eb972e0303dfa1173ad13 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 diff --git a/recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch b/recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch index 8bc5dee2..608edc14 100644 --- a/recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch +++ b/recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch @@ -1,4 +1,4 @@ -From 9b9306ec9e11864631d64d8717763eaec4e25e8f Mon Sep 17 00:00:00 2001 +From 560d906295a0d72ee71f336bb3d01f05ffacc143 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 diff --git a/recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch index 1668dd5e..6ff2d519 100644 --- a/recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From 6c066a1d1930ddaa95b0530c678bac71f47378b5 Mon Sep 17 00:00:00 2001 +From cb561e04416a281222a0b8989ec95f4c9bca4d85 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 diff --git a/recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch index 4c365dd8..4d29ad9d 100644 --- a/recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From 504d643d31a52421c6dc03f617c17e287a1c4ff0 Mon Sep 17 00:00:00 2001 +From a0bdadeaffa94de5b03de7896d04c36114994ffb 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 diff --git a/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch b/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch index 9b142b54..4c1840b1 100644 --- a/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch +++ b/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch @@ -1,4 +1,4 @@ -From 31902cb8d8d5df41295b489a47a6010e05a02ad7 Mon Sep 17 00:00:00 2001 +From 99cec6623e51de5a8e0edb1c8c36096368644168 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 diff --git a/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch b/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch index 3c2f314e..399e1b67 100644 --- a/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch +++ b/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch @@ -1,4 +1,4 @@ -From ff6112490dcfa323f8ffe36d822fda2025003b6e Mon Sep 17 00:00:00 2001 +From c86a1eee2554d972f71930c4233203a1e1072540 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 @@ -18,7 +18,7 @@ Signed-off-by: Khem Raj 1 file changed, 5 insertions(+) diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp -index 60ba461ea0f5..67d446c0998a 100644 +index dbc91e427dfb..b2cbfca9898c 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -648,6 +648,11 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, diff --git a/recipes-devtools/clang/clang/0036-Avoid-infinite-loop-between-DAGCombiner-visitMUL-and.patch b/recipes-devtools/clang/clang/0036-Avoid-infinite-loop-between-DAGCombiner-visitMUL-and.patch new file mode 100644 index 00000000..040fbc7c --- /dev/null +++ b/recipes-devtools/clang/clang/0036-Avoid-infinite-loop-between-DAGCombiner-visitMUL-and.patch @@ -0,0 +1,61 @@ +From 58d93601653d8fb3698b9792a45e5661bbc87924 Mon Sep 17 00:00:00 2001 +From: Alex Bradbury +Date: Wed, 23 Feb 2022 11:05:46 +0000 +Subject: [PATCH] Avoid infinite loop between DAGCombiner::visitMUL and + RISCVISelLowering::transformAddImmMulImm + +See https://github.com/llvm/llvm-project/issues/53831 for a full discussion. + +The basic issue is that DAGCombiner::visitMUL and +RISCVISelLowering;:transformAddImmMullImm get stuck in a loop, as the +current checks in transformAddImmMulImm aren't sufficient to avoid all +cases where DAGCombiner::isMulAddWithConstProfitable might trigger a +transformation. This patch makes transformAddImmMulImm bail out if C0 +(the constant used for multiplication) has more than one use. + +Differential Revision: https://reviews.llvm.org/D120332 + +(cherry picked from commit c5bcfb983e47167a8a1826c1a64d7aa1849add06) +Signed-off-by: Khem Raj +--- + llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 5 +++++ + llvm/test/CodeGen/RISCV/addimm-mulimm.ll | 13 +++++++++++++ + 2 files changed, 18 insertions(+) + +diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp +index 2fe491ad5ea4..7f5555b9b7a8 100644 +--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp ++++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp +@@ -7203,6 +7203,11 @@ static SDValue transformAddImmMulImm(SDNode *N, SelectionDAG &DAG, + auto *N1C = dyn_cast(N->getOperand(1)); + if (!N0C || !N1C) + return SDValue(); ++ // If N0C has multiple uses it's possible one of the cases in ++ // DAGCombiner::isMulAddWithConstProfitable will be true, which would result ++ // in an infinite loop. ++ if (!N0C->hasOneUse()) ++ return SDValue(); + int64_t C0 = N0C->getSExtValue(); + int64_t C1 = N1C->getSExtValue(); + int64_t CA, CB; +diff --git a/llvm/test/CodeGen/RISCV/addimm-mulimm.ll b/llvm/test/CodeGen/RISCV/addimm-mulimm.ll +index 4706f3904701..adf0b98742e1 100644 +--- a/llvm/test/CodeGen/RISCV/addimm-mulimm.ll ++++ b/llvm/test/CodeGen/RISCV/addimm-mulimm.ll +@@ -872,3 +872,16 @@ define i64 @mulneg3000_sub8990_c(i64 %x) { + %tmp1 = add i64 %tmp0, -8990 + ret i64 %tmp1 + } ++ ++; This test case previously caused an infinite loop between transformations ++; performed in RISCVISelLowering;:transformAddImmMulImm and ++; DAGCombiner::visitMUL. ++define i1 @pr53831(i32 %x) { ++ %tmp0 = add i32 %x, 1 ++ %tmp1 = mul i32 %tmp0, 24 ++ %tmp2 = add i32 %tmp1, 1 ++ %tmp3 = mul i32 %x, 24 ++ %tmp4 = add i32 %tmp3, 2048 ++ %tmp5 = icmp eq i32 %tmp4, %tmp2 ++ ret i1 %tmp5 ++} diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index b8489eb9..e8db32c1 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -45,6 +45,7 @@ SRC_URI = "\ file://0033-Correct-library-search-path-for-OpenEmbedded-Host.patch \ file://0034-lldb-Link-with-libatomic-on-x86.patch \ file://0035-clang-exclude-openembedded-distributions-from-settin.patch \ + file://0036-Avoid-infinite-loop-between-DAGCombiner-visitMUL-and.patch \ " # Fallback to no-PIE if not set GCCPIE ??= "" From d14cb19b70ebf15adf5d6befe6e734e9766ba42c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 3 Mar 2022 08:54:22 -0800 Subject: [PATCH 120/166] clang: Update to 14.0.0-rc2+ * 65d53279b1fd RISCV] More correctly ignore Zfinx register classes in getRegForInlineAsmConstraint. * f1e7f848bf3e [clang][tests] Fix ve-toolchain tests with CLANG_DEFAULT_UNWINDLIB * 6d5afef3a7e6 [examples][BuildingAJIT] Use the right layer when adding code in Chapter 3. * 4fde843cd5c0 [ORC] Set ResolverBlockAddr in EPCIndirectionUtils::writeResolverBlock. * a98c04d58930 [Attributor][FIX] Use liveness information of the right function * 261253aa60cc [Clang][docs] Add preprocessor changes to ReleaseNotes. * 967296bfefee [RISCV] Fix inline asm errors in zfinx * 4c9110a5f37b [MIPS] Recognize DT_MIPS_XHASH dynamic table tag * ce3d57ad61db Revert "[BPF] Fix a BTF type pruning bug" * 19149538e9a9 [BPF] Fix a BTF type pruning bug * da33d400682a [SLP] Don't try to vectorize pair with insertelement * 3001b0d51963 [fir] Fix FlangOptimizerTests link on Solaris * 41d4f89e38b7 [X86ISelLowering] permit BlockAddressSDNode "i" constraints for PIC * d245bcf536a3 [Mangler] Mangle aliases to fastcall/vectorcall functions correctly * 0372676278dd [AArch64][SME] Remove term 'streaming-sve' from assembler diagnostics. * f58ab3285021 [Attributor][FIX] Pipe UsedAssumedInformation through more interfaces * 4327d39b15b2 [libcxx] Add an explicit option to build against system-libcxxabi * 3d913ec92308 [llvm] [cmake] Fix finding modern ounit2 * b3e9abd9683b [libunwind] Further fix for 32-bit PowerPC processors without AltiVec * d09f84adff1e [compiler-rt] Force ABI to libcxxabi when building cxustom libc++ * e08bab88c900 [Driver][DragonFly] -r: imply -nostdlib like GCC * 21f87ad9f590 [Driver][NetBSD] -r: imply -nostdlib like GCC * 779871c3515a [mlir-tblgen] Fix non-deterministic generating static verifier in DRR. * 4de8e5698278 [RISCV] Fix parseBareSymbol to not double-parse top-level operators * b29813fbbbaf [OpenMP] Use executable path when searching for lld * 14c432b6a17a [OpenMP] Add search path for llvm-strip * 453361d5ac01 [DSE] Fall back to CFG scan for unreachable terminators. * 03cf88fc94da [DSE] Extract a common PDT check (NFC) * ee0ae47691d3 [RISCV] Avoid infinite loop between DAGCombiner::visitMUL and RISCVISelLowering::transformAddImmMulImm * 61e78c64a38a [libunwind] Only include cet.h if __CET__ defined * 5f5b687460c3 Fix warning introduced by 47eff645d8e873ba531014751c1c06a716a367e9 * 64534d2f406c [InstCombine] Bail out of load-store forwarding for scalable vector types * 4fe93c000b20 [SLP] Fix assert from non-constant index in insertelement * a2398c560144 [Driver][OpenBSD] Enable unwind tables on all architectures * aadd03a2accd [clang][ASTReader] Fix memory leak while reading FriendTemplateDecls * 8a323ada234b [clang][SemaTemplate] Fix a stack use after scope * d61805a8b686 [libc++] Fix double file closing in `std::filesystem::remove_all()`. * f8ca5fabdb54 [ELF][X86] Don't create IBT .plt if there is no PLT entry * 8400036358c8 [libunwind][test] remember_state_leak.pass.sh.s: link with -no-pie * df3182a7df19 [clang] [test] Skip hip-fpie-option.hip if default-pie * cdd8cca0c33c [ELF] Support some absolute/PC-relative relocation types for REL format * e89602b7b2ec [clang-tidy] Fix `readability-suspicious-call-argument` crash for arguments without name-like identifier * 1f7e8b1c6893 [Docs] Added note about LLDB Win/Arm64 binary release * bdbca8f3d0b2 [asan][test] asan_prelink_test.cpp: use -fno-pie -no-pie * 3e10605abcb2 [Driver][test] Remove soon irrelevant pie tests * 2a492dfd6b4e [Driver][test] Make hexagon-toolchain-elf.c work with CLANG_DEFAULT_PIE_ON_LINUX=on * 443f68c280ac [clang][test] Make mips-vector-return.c work with CLANG_DEFAULT_PIE_ON_LINUX=on * 500889f56bce [MIPS] Add `-no-pie` option to the clang driver's tests depend on it Drop 0036-Avoid-infinite-loop-between-DAGCombiner-visitMUL-and.patch which is upstreamed now. Signed-off-by: Khem Raj (cherry picked from commit b19d5f6ab906bc3ddaa5c98bc871ecc8f98d4eeb) --- recipes-devtools/clang/clang.inc | 2 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 2 +- ...-support-a-new-embedded-linux-target.patch | 2 +- ...lify-cross-compilation.-Don-t-use-na.patch | 2 +- ...ryInfo-Undefine-libc-functions-if-th.patch | 2 +- ...-llvm-allow-env-override-of-exe-path.patch | 2 +- ...g-driver-Check-sysroot-for-ldso-path.patch | 2 +- ...tools.cpp-Add-lssp_nonshared-on-musl.patch | 2 +- ...does-not-support-128-bit-long-double.patch | 2 +- ...09-clang-Prepend-trailing-to-sysroot.patch | 2 +- ...e-the-target-sysroot-for-compiler-ru.patch | 2 +- ...efine-releative-gcc-installation-dir.patch | 2 +- ...ad-and-ldl-along-with-lunwind-for-st.patch | 2 +- ...UTABLE-when-cross-compiling-for-nati.patch | 2 +- ...4-Check-for-atomic-double-intrinsics.patch | 2 +- ...ler-runtime-library-to-link-step-for.patch | 2 +- ...-Fix-configure-for-packages-using-fi.patch | 2 +- ...ce-dir-location-for-cross-toolchains.patch | 2 +- ...-dyld-prefix-when-checking-sysroot-f.patch | 2 +- ...-clang-Use-python3-in-python-scripts.patch | 2 +- ...-Yocto-based-GCC-install-search-path.patch | 2 +- ...-Do-not-use-find_library-for-ncurses.patch | 2 +- ...or-for-adding-OE-distro-vendor-names.patch | 2 +- ...er-rt-Use-mcr-based-barrier-on-armv6.patch | 2 +- ...ot-use-backtrace-APIs-on-non-glibc-l.patch | 2 +- ...iple-for-non-debian-multiarch-linux-.patch | 2 +- ...-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch | 2 +- ...-scudo-standalone-with-libatomic-on-.patch | 2 +- ...libunwind-Added-unw_backtrace-method.patch | 2 +- ...29-Do-not-force-thumb-mode-directive.patch | 2 +- ...ot-use-install-relative-libc-headers.patch | 2 +- ...iver-finds-GCC-installation-path-on-.patch | 2 +- ...-Fix-lib-paths-for-OpenEmbedded-Host.patch | 2 +- ...ry-search-path-for-OpenEmbedded-Host.patch | 2 +- ...0034-lldb-Link-with-libatomic-on-x86.patch | 2 +- ...enembedded-distributions-from-settin.patch | 2 +- ...oop-between-DAGCombiner-visitMUL-and.patch | 61 ------------------- 37 files changed, 36 insertions(+), 97 deletions(-) delete mode 100644 recipes-devtools/clang/clang/0036-Avoid-infinite-loop-between-DAGCombiner-visitMUL-and.patch diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 978bc31b..7fb914af 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "14" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "2fe5bf57172cebf5a3f0b3f82552cf5c2122eca2" +SRCREV ?= "65d53279b1fddeae4bd455d588ea7527aed50bb9" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/14.x" 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 b8fa1c34..8c4d9793 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 0417616e62aaed9438d86bc5b9cd0255378de665 Mon Sep 17 00:00:00 2001 +From c158da8da9876522e23e15e5c21ac7bd45650c3d 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 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 c009cd94..60d85d46 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 923f84c5142703f22faf22a5886f1d8735460e66 Mon Sep 17 00:00:00 2001 +From 59c803e2c49b4add4b73a72844dd02faa3b62c92 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 a7b4a464..221fff12 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 a7afbe16631bd2846353f92e8d8f9c91c02539b8 Mon Sep 17 00:00:00 2001 +From e96506e267151bd88a47b9f8582d182b5295e94c 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 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 b354c29d..72e641ed 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 3430cb43036fe464c62d97c79fa6a5b2885f1c8b Mon Sep 17 00:00:00 2001 +From 521d1e4ff1bb60afd61e297e27d58e320de8675b 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 diff --git a/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch index 03f58e85..812cbe0e 100644 --- a/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From 8c02d0f6f5fedb5b7bbbdbf5fcd8763481f3b606 Mon Sep 17 00:00:00 2001 +From 8bb24d5fb76c78cc99c5f086081963e3d93a09d3 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 path diff --git a/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch index 1d48ba47..a6a03e50 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 d63cfd77ccd45ca5cc927135fcc0367b4949672a Mon Sep 17 00:00:00 2001 +From 030eb6411a016cf1ba3081d2e5ba330f8d4acca6 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 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 bd66784a..70d56107 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 9b79e071bedb6427134a336da8bd9a6c13b04595 Mon Sep 17 00:00:00 2001 +From b5b6e5e0cf456c99d18eb3dbe8e6a945e12c2ba6 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 diff --git a/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch index 1ab63b64..eea3d16f 100644 --- a/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch @@ -1,4 +1,4 @@ -From 537fcb8e264af0e8f84ae75d6b98eb8e70d01500 Mon Sep 17 00:00:00 2001 +From ac686a30478e35d458a463b98a7e54b38a4ab5c4 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 May 2016 02:00:11 -0700 Subject: [PATCH] clang: musl/ppc does not support 128-bit long double diff --git a/recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch index f277df4e..f7c04ff6 100644 --- a/recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From d06565e3abf15ebf436de330b69934d1126f7683 Mon Sep 17 00:00:00 2001 +From 227331cfc2a56186ba53a583fcab8351ebbec3a0 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 diff --git a/recipes-devtools/clang/clang/0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index 92aab239..d4bcc6c8 100644 --- a/recipes-devtools/clang/clang/0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From 1415af655aee9c5c4eff7d76b66c5633f95515f3 Mon Sep 17 00:00:00 2001 +From 6226652ca539faf02f7834a3c2c158b5ae1e5f05 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 diff --git a/recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch index 8d88377b..243e8e16 100644 --- a/recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch @@ -1,4 +1,4 @@ -From 7aeee55cfc8c33ce0c1d3a77a4ac1bca28916eb1 Mon Sep 17 00:00:00 2001 +From 1324a97b610567a2ddad82b14bb48ac6f34a6bda 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 diff --git a/recipes-devtools/clang/clang/0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index bde750fc..18495c00 100644 --- a/recipes-devtools/clang/clang/0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From e0b95871ba134b6c22845a08985e801cbe525dda Mon Sep 17 00:00:00 2001 +From 11fbe1b772f545864dde456f2e40e4bd09e05485 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 diff --git a/recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index 76a568e5..e43f0ac2 100644 --- a/recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From d82dd9efbc79492276b481c24261489ae72dbd87 Mon Sep 17 00:00:00 2001 +From b11f3702657190ee638bddebd5be6b57b58953cf 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 diff --git a/recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch index 592c968d..da1f3ebe 100644 --- a/recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From 70d54f8ef8d98974c553ccac0f846d15c66c2c3c Mon Sep 17 00:00:00 2001 +From 0158d01d328ad50f963272aea10b181694626679 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/0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index ff318cb0..cf6b75b0 100644 --- a/recipes-devtools/clang/clang/0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ b/recipes-devtools/clang/clang/0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -1,4 +1,4 @@ -From 35c3cd4c8e9135c29e6a32f453711ad3b98271dd Mon Sep 17 00:00:00 2001 +From 013959ef2f407c0254a14d448d17e5e4a8c9875b 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 diff --git a/recipes-devtools/clang/clang/0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index fe96ce7b..faa07f0e 100644 --- a/recipes-devtools/clang/clang/0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ b/recipes-devtools/clang/clang/0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -1,4 +1,4 @@ -From 4efe98f8c26712edee6b103be6a4279d7b47d251 Mon Sep 17 00:00:00 2001 +From a720606d47f1a97c489496e1f041d0dd331ed54c 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 diff --git a/recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch index 897d50f2..37ccb3e1 100644 --- a/recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch @@ -1,4 +1,4 @@ -From 24730a64a41a28d0716a7b013760eaea94f9b9bb Mon Sep 17 00:00:00 2001 +From d1a52c37ff430a99a0e3b1e8a3a4236081c46709 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 diff --git a/recipes-devtools/clang/clang/0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/recipes-devtools/clang/clang/0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index 6451c9cb..f39a01f5 100644 --- a/recipes-devtools/clang/clang/0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/recipes-devtools/clang/clang/0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch @@ -1,4 +1,4 @@ -From 9751d930cb00597199337a2776aa49542aed77ca Mon Sep 17 00:00:00 2001 +From f2424f39c50b3c64eb87f7f2d6fa6c7196ae8c04 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 diff --git a/recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch index d4815006..8e350e6b 100644 --- a/recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch +++ b/recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch @@ -1,4 +1,4 @@ -From d12bbca6d0ea401559e7c97e6afadc2f153b1ab7 Mon Sep 17 00:00:00 2001 +From 0079be23503a86ae7162afe63baa00175fee6d02 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/0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch b/recipes-devtools/clang/clang/0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index c41cf495..c21b0609 100644 --- a/recipes-devtools/clang/clang/0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch +++ b/recipes-devtools/clang/clang/0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch @@ -1,4 +1,4 @@ -From 04a38139422e5ec7d03709725b3474e976989287 Mon Sep 17 00:00:00 2001 +From b2cde48417f6c7a0674d38ad20b3537b9ac11740 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 diff --git a/recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch index fc614cbc..90e8d717 100644 --- a/recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch +++ b/recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch @@ -1,4 +1,4 @@ -From 138373ea249af22b94f5fee87a25a1151649a4e7 Mon Sep 17 00:00:00 2001 +From 6db17ef4389d01843f2dd586f3f203ee2663da64 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 diff --git a/recipes-devtools/clang/clang/0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch b/recipes-devtools/clang/clang/0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index 97c530f7..463c2516 100644 --- a/recipes-devtools/clang/clang/0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch +++ b/recipes-devtools/clang/clang/0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch @@ -1,4 +1,4 @@ -From 2aba65b9a02c484283927fc3273dddd633c54e63 Mon Sep 17 00:00:00 2001 +From f9d98db5149a83e5bc4ecb69b750f06ad248c9da 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 diff --git a/recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index c6285c59..5566cc64 100644 --- a/recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From 839eebdbd31760e4bbc77ca047a4c593c3a8b722 Mon Sep 17 00:00:00 2001 +From df5edef2aed06a61fb6c79dddd1cfcfc036f6eb4 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 diff --git a/recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 4e3f75a5..344cf697 100644 --- a/recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From 56d26beabeb171daddc2f55cf07cd16599c8132a Mon Sep 17 00:00:00 2001 +From 12da843779b64d902575c988466d609398ad87ea 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/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index d7afd155..de9d1408 100644 --- a/recipes-devtools/clang/clang/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From 6bfee9c0356ef862635d60d33a117bdcb4d92e07 Mon Sep 17 00:00:00 2001 +From 3ce002f1254a071a0cd70c7302949e9ec99ee56f 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 diff --git a/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index 13b13b8f..d81f7a3c 100644 --- a/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From c672d84ae78cd4baf447149a0fd6a5586445b1af Mon Sep 17 00:00:00 2001 +From c1ac3d62106f9cfe8644c7f167297012b7bbe198 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES diff --git a/recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index 86e693e9..95d7b400 100644 --- a/recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From e7b99b5a52d64229196c01d79ef21bdb634434d1 Mon Sep 17 00:00:00 2001 +From c1635bb9812f275b55f77960c609cedc6c4ac405 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips diff --git a/recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch index 3a1f8109..af9d5e17 100644 --- a/recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 3e95203ee02d7b5d9d45ee157cf76478b52d36df Mon Sep 17 00:00:00 2001 +From 4f97a54738b626f970682d0922b466fb608deb75 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 23 May 2021 10:27:29 +0000 Subject: [PATCH] libunwind: Added unw_backtrace method diff --git a/recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch b/recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch index 098e0ee6..58ce5fd4 100644 --- a/recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch +++ b/recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch @@ -1,4 +1,4 @@ -From ce1a02de2daedf9377fd825e0a0a7524794469bb Mon Sep 17 00:00:00 2001 +From a62207f89f1bea871bb9aff23872d02a9197e467 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Jun 2021 08:42:36 -0700 Subject: [PATCH] Do not force thumb mode directive diff --git a/recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch b/recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch index 7211cf9f..48073a64 100644 --- a/recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch +++ b/recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch @@ -1,4 +1,4 @@ -From 372c112411b2095c193eb972e0303dfa1173ad13 Mon Sep 17 00:00:00 2001 +From edbbdb9fd9b4bd781a950be5349afc78d495e251 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 diff --git a/recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch b/recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch index 608edc14..1c31632c 100644 --- a/recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch +++ b/recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch @@ -1,4 +1,4 @@ -From 560d906295a0d72ee71f336bb3d01f05ffacc143 Mon Sep 17 00:00:00 2001 +From 3badef231c62bcd5b9909b545a1ab6df732c99ca 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 diff --git a/recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch index 6ff2d519..53e32795 100644 --- a/recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From cb561e04416a281222a0b8989ec95f4c9bca4d85 Mon Sep 17 00:00:00 2001 +From 10fd1fea36b270ac6a942b36b76f97e6a9b699b3 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 diff --git a/recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch index 4d29ad9d..098c17e8 100644 --- a/recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From a0bdadeaffa94de5b03de7896d04c36114994ffb Mon Sep 17 00:00:00 2001 +From ae279cdbcc87bdfa06beb3b5cb43075d8943822a 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 diff --git a/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch b/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch index 4c1840b1..9988b4fc 100644 --- a/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch +++ b/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch @@ -1,4 +1,4 @@ -From 99cec6623e51de5a8e0edb1c8c36096368644168 Mon Sep 17 00:00:00 2001 +From aa57af181849b91d28f2320d6fc83e239594664c 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 diff --git a/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch b/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch index 399e1b67..cf3d0e8b 100644 --- a/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch +++ b/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch @@ -1,4 +1,4 @@ -From c86a1eee2554d972f71930c4233203a1e1072540 Mon Sep 17 00:00:00 2001 +From 644311972806760b1d98304fe4dcd9c1c8f21f8e 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 diff --git a/recipes-devtools/clang/clang/0036-Avoid-infinite-loop-between-DAGCombiner-visitMUL-and.patch b/recipes-devtools/clang/clang/0036-Avoid-infinite-loop-between-DAGCombiner-visitMUL-and.patch deleted file mode 100644 index 040fbc7c..00000000 --- a/recipes-devtools/clang/clang/0036-Avoid-infinite-loop-between-DAGCombiner-visitMUL-and.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 58d93601653d8fb3698b9792a45e5661bbc87924 Mon Sep 17 00:00:00 2001 -From: Alex Bradbury -Date: Wed, 23 Feb 2022 11:05:46 +0000 -Subject: [PATCH] Avoid infinite loop between DAGCombiner::visitMUL and - RISCVISelLowering::transformAddImmMulImm - -See https://github.com/llvm/llvm-project/issues/53831 for a full discussion. - -The basic issue is that DAGCombiner::visitMUL and -RISCVISelLowering;:transformAddImmMullImm get stuck in a loop, as the -current checks in transformAddImmMulImm aren't sufficient to avoid all -cases where DAGCombiner::isMulAddWithConstProfitable might trigger a -transformation. This patch makes transformAddImmMulImm bail out if C0 -(the constant used for multiplication) has more than one use. - -Differential Revision: https://reviews.llvm.org/D120332 - -(cherry picked from commit c5bcfb983e47167a8a1826c1a64d7aa1849add06) -Signed-off-by: Khem Raj ---- - llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 5 +++++ - llvm/test/CodeGen/RISCV/addimm-mulimm.ll | 13 +++++++++++++ - 2 files changed, 18 insertions(+) - -diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp -index 2fe491ad5ea4..7f5555b9b7a8 100644 ---- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp -+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp -@@ -7203,6 +7203,11 @@ static SDValue transformAddImmMulImm(SDNode *N, SelectionDAG &DAG, - auto *N1C = dyn_cast(N->getOperand(1)); - if (!N0C || !N1C) - return SDValue(); -+ // If N0C has multiple uses it's possible one of the cases in -+ // DAGCombiner::isMulAddWithConstProfitable will be true, which would result -+ // in an infinite loop. -+ if (!N0C->hasOneUse()) -+ return SDValue(); - int64_t C0 = N0C->getSExtValue(); - int64_t C1 = N1C->getSExtValue(); - int64_t CA, CB; -diff --git a/llvm/test/CodeGen/RISCV/addimm-mulimm.ll b/llvm/test/CodeGen/RISCV/addimm-mulimm.ll -index 4706f3904701..adf0b98742e1 100644 ---- a/llvm/test/CodeGen/RISCV/addimm-mulimm.ll -+++ b/llvm/test/CodeGen/RISCV/addimm-mulimm.ll -@@ -872,3 +872,16 @@ define i64 @mulneg3000_sub8990_c(i64 %x) { - %tmp1 = add i64 %tmp0, -8990 - ret i64 %tmp1 - } -+ -+; This test case previously caused an infinite loop between transformations -+; performed in RISCVISelLowering;:transformAddImmMulImm and -+; DAGCombiner::visitMUL. -+define i1 @pr53831(i32 %x) { -+ %tmp0 = add i32 %x, 1 -+ %tmp1 = mul i32 %tmp0, 24 -+ %tmp2 = add i32 %tmp1, 1 -+ %tmp3 = mul i32 %x, 24 -+ %tmp4 = add i32 %tmp3, 2048 -+ %tmp5 = icmp eq i32 %tmp4, %tmp2 -+ ret i1 %tmp5 -+} From 2f58c209d93682602ef00a5c8b4e6ad16e2c0d02 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 9 Mar 2022 17:18:06 -0800 Subject: [PATCH 121/166] clang: Upgrade to latest on 14.x Enable __int128 for compiler-rt/ppc32 Drop redundant ppc patch which is fixed upstream already Brings these fixes * e879b2bf82ef [libcxxabi] [test] Depend on unwind only if available * 569b773323a3 [libcxx][CI] Set Arm triples to match native clang build's default * f7007c570a21 Lambdas are not necessarily locals. This resolves DR48250. * eb84577cbc23 Revert "[release] Use the Bootstrapping build for building LLVM releases" * d843bde69aab [clang][driver] Fix float128 diagnostics with glibc >= 2.32 * ba9ff030d302 [SimplifyCFG][PhaseOrdering] Defer lowering switch into an integer range comparison and branch until after at least the IPSCCP * da3953fb0315 [NFC][PhaseOrdering] Add some tests from D119839 * 8b51e5ee0a2e [NewPM][Inliner] Make inlined calls to functions in same SCC as callee exponentially expensive * 6a713120502a [llvm] [bindings/OCaml] Remove unused dep on ounit2 * 2de2a2bba998 [LICM][PhaseOrder] Don't speculate in LICM until after running loop rotate * 7d1cd3380add [NFC][PhaseOrdering] Improve test coverage for D119975 * 1f4613675051 [NFC][PhaseOrdering] spurious-peeling.ll: also test -O1/-O2 results * 36bf1a9e628d [NFC][PhaseOrdering] Precommit tests from D119965 * 67555104d23a [MachineSink] Disable if there are any irreducible cycles * 1e4fd59253c6 [CodeGen] Add test for PR53990 (NFC) * bfaed485756a [BOLT][CMAKE] Remove CMake 3.13.4 incompatible parameter * 43b4544023b7 [LLD] [COFF] Order .debug_* sections at the end, to avoid leaving gaps if stripped * e6d2aa9b0f13 [MC][WebAssembly] Fix crash when relocation addend underlows U32 * f6a4df3a0a3d [WebAssembly] Covert llvm/test/MC/WebAssembly/reloc-code.ll to asm. NFC * 9d54fe21c67f [docs] Add RISC-V release notes for LLVM 14 * 1e3d5ccab6b6 Add cmake to source release tarballs * 0205cc086e50 [OpenMP][FIX] Ensure custom state machine works * 0826716786cd [Mips] support "sp" named register * 09546e1b5103 [libc++][doc] Update the release notes. * 8f9f84c6873e [docs] clang/docs/ReleaseNotes.rst: Add blank line * aab33202d239 [docs] PowerPC release notes formatting/grammar fixes * acf67b7a0dfc [docs] Tweak wording of note re: LTO on AIX * ce1e90fc8dba [docs] Add PowerPC release notes for LLVM 14 Signed-off-by: Khem Raj (cherry picked from commit b3e3eeea3d64a7443ff7253f8ce4609b17ed5e3f) --- classes/clang.bbclass | 13 +++-- recipes-devtools/clang/clang.inc | 2 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 2 +- ...-support-a-new-embedded-linux-target.patch | 2 +- ...lify-cross-compilation.-Don-t-use-na.patch | 2 +- ...ryInfo-Undefine-libc-functions-if-th.patch | 2 +- ...-llvm-allow-env-override-of-exe-path.patch | 2 +- ...g-driver-Check-sysroot-for-ldso-path.patch | 2 +- ...tools.cpp-Add-lssp_nonshared-on-musl.patch | 2 +- ...8-clang-Prepend-trailing-to-sysroot.patch} | 2 +- ...does-not-support-128-bit-long-double.patch | 25 -------- ...-the-target-sysroot-for-compiler-ru.patch} | 2 +- ...fine-releative-gcc-installation-dir.patch} | 2 +- ...d-and-ldl-along-with-lunwind-for-st.patch} | 2 +- ...TABLE-when-cross-compiling-for-nati.patch} | 2 +- ...-Check-for-atomic-double-intrinsics.patch} | 2 +- ...er-runtime-library-to-link-step-for.patch} | 2 +- ...Fix-configure-for-packages-using-fi.patch} | 2 +- ...e-dir-location-for-cross-toolchains.patch} | 2 +- ...dyld-prefix-when-checking-sysroot-f.patch} | 2 +- ...clang-Use-python3-in-python-scripts.patch} | 2 +- ...Yocto-based-GCC-install-search-path.patch} | 2 +- ...Do-not-use-find_library-for-ncurses.patch} | 2 +- ...r-for-adding-OE-distro-vendor-names.patch} | 2 +- ...r-rt-Use-mcr-based-barrier-on-armv6.patch} | 2 +- ...t-use-backtrace-APIs-on-non-glibc-l.patch} | 2 +- ...ple-for-non-debian-multiarch-linux-.patch} | 2 +- ...scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch} | 2 +- ...scudo-standalone-with-libatomic-on-.patch} | 2 +- ...ibunwind-Added-unw_backtrace-method.patch} | 2 +- ...8-Do-not-force-thumb-mode-directive.patch} | 2 +- ...t-use-install-relative-libc-headers.patch} | 2 +- ...ver-finds-GCC-installation-path-on-.patch} | 2 +- ...Fix-lib-paths-for-OpenEmbedded-Host.patch} | 2 +- ...y-search-path-for-OpenEmbedded-Host.patch} | 2 +- ...033-lldb-Link-with-libatomic-on-x86.patch} | 2 +- ...nembedded-distributions-from-settin.patch} | 2 +- ...ompiler-rt-Enable-__int128-for-ppc32.patch | 58 +++++++++++++++++++ recipes-devtools/clang/common.inc | 57 +++++++++--------- 39 files changed, 128 insertions(+), 95 deletions(-) rename recipes-devtools/clang/clang/{0009-clang-Prepend-trailing-to-sysroot.patch => 0008-clang-Prepend-trailing-to-sysroot.patch} (95%) delete mode 100644 recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch rename recipes-devtools/clang/clang/{0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch => 0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch} (95%) rename recipes-devtools/clang/clang/{0011-clang-Define-releative-gcc-installation-dir.patch => 0010-clang-Define-releative-gcc-installation-dir.patch} (96%) rename recipes-devtools/clang/clang/{0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch => 0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch} (95%) rename recipes-devtools/clang/clang/{0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch => 0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch} (94%) rename recipes-devtools/clang/clang/{0014-Check-for-atomic-double-intrinsics.patch => 0013-Check-for-atomic-double-intrinsics.patch} (94%) rename recipes-devtools/clang/clang/{0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch => 0014-libcxx-Add-compiler-runtime-library-to-link-step-for.patch} (96%) rename recipes-devtools/clang/clang/{0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch => 0015-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch} (98%) rename recipes-devtools/clang/clang/{0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch => 0016-clang-Fix-resource-dir-location-for-cross-toolchains.patch} (96%) rename recipes-devtools/clang/clang/{0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch => 0017-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch} (98%) rename recipes-devtools/clang/clang/{0019-clang-Use-python3-in-python-scripts.patch => 0018-clang-Use-python3-in-python-scripts.patch} (98%) rename recipes-devtools/clang/clang/{0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch => 0019-For-x86_64-set-Yocto-based-GCC-install-search-path.patch} (98%) rename recipes-devtools/clang/clang/{0021-llvm-Do-not-use-find_library-for-ncurses.patch => 0020-llvm-Do-not-use-find_library-for-ncurses.patch} (96%) rename recipes-devtools/clang/clang/{0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch => 0021-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch} (94%) rename recipes-devtools/clang/clang/{0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch => 0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch} (98%) rename recipes-devtools/clang/clang/{0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch => 0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch} (97%) rename recipes-devtools/clang/clang/{0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch => 0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch} (94%) rename recipes-devtools/clang/clang/{0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch => 0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch} (95%) rename recipes-devtools/clang/clang/{0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch => 0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch} (94%) rename recipes-devtools/clang/clang/{0028-libunwind-Added-unw_backtrace-method.patch => 0027-libunwind-Added-unw_backtrace-method.patch} (96%) rename recipes-devtools/clang/clang/{0029-Do-not-force-thumb-mode-directive.patch => 0028-Do-not-force-thumb-mode-directive.patch} (97%) rename recipes-devtools/clang/clang/{0030-clang-Do-not-use-install-relative-libc-headers.patch => 0029-clang-Do-not-use-install-relative-libc-headers.patch} (95%) rename recipes-devtools/clang/clang/{0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch => 0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch} (98%) rename recipes-devtools/clang/clang/{0032-Fix-lib-paths-for-OpenEmbedded-Host.patch => 0031-Fix-lib-paths-for-OpenEmbedded-Host.patch} (98%) rename recipes-devtools/clang/clang/{0033-Correct-library-search-path-for-OpenEmbedded-Host.patch => 0032-Correct-library-search-path-for-OpenEmbedded-Host.patch} (98%) rename recipes-devtools/clang/clang/{0034-lldb-Link-with-libatomic-on-x86.patch => 0033-lldb-Link-with-libatomic-on-x86.patch} (95%) rename recipes-devtools/clang/clang/{0035-clang-exclude-openembedded-distributions-from-settin.patch => 0034-clang-exclude-openembedded-distributions-from-settin.patch} (96%) create mode 100644 recipes-devtools/clang/clang/0035-compiler-rt-Enable-__int128-for-ppc32.patch diff --git a/classes/clang.bbclass b/classes/clang.bbclass index f3c9cefd..b696f622 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -22,18 +22,18 @@ PACKAGE_DEBUG_SPLIT_STYLE:toolchain-clang = "debug-without-src" COMPILER_RT ??= "" COMPILER_RT:class-native = "-rtlib=libgcc ${UNWINDLIB}" -COMPILER_RT:powerpc = "-rtlib=libgcc ${UNWINDLIB}" +#COMPILER_RT:powerpc = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT:armeb = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT:libc-klibc = "-rtlib=libgcc ${UNWINDLIB}" UNWINDLIB ??= "" UNWINDLIB:class-native = "--unwindlib=libgcc" -UNWINDLIB:powerpc = "--unwindlib=libgcc" +#UNWINDLIB:powerpc = "--unwindlib=libgcc" UNWINDLIB:armeb = "--unwindlib=libgcc" UNWINDLIB_libc-klibc = "--unwindlib=libgcc" LIBCPLUSPLUS ??= "" -LIBCPLUSPLUS:powerpc = "-stdlib=libstdc++" +#LIBCPLUSPLUS:powerpc = "-stdlib=libstdc++" LIBCPLUSPLUS:armv5 = "-stdlib=libstdc++" CXXFLAGS:append:toolchain-clang = " ${LIBCPLUSPLUS}" @@ -61,8 +61,9 @@ TUNE_CCARGS:remove:toolchain-clang:powerpc = "-mhard-float" TUNE_CCARGS:remove:toolchain-clang:powerpc = "-mno-spe" TUNE_CCARGS:append:toolchain-clang = " -Qunused-arguments" -TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc64 = " -mlong-double-64" -TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc64le = " -mlong-double-64" +TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc64 = " -mlong-double-64 -fno-force-enable-int128" +TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc64le = " -mlong-double-64 -fno-force-enable-int128" +TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc = " -mlong-double-64 -fno-force-enable-int128" # usrmerge workaround TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains("DISTRO_FEATURES", "usrmerge", " --dyld-prefix=/usr", "", d)}" @@ -84,7 +85,7 @@ RUNTIME ??= "gnu" #RUNTIME:toolchain-gcc = "gnu" RUNTIME:armeb = "gnu" RUNTIME:armv5 = "gnu" -RUNTIME:powerpc = "gnu" +#RUNTIME:powerpc = "gnu" TOOLCHAIN:class-native = "gcc" TOOLCHAIN:class-nativesdk = "gcc" diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 7fb914af..46a85262 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "14" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "65d53279b1fddeae4bd455d588ea7527aed50bb9" +SRCREV ?= "e879b2bf82ef2d096d2c0e5147ebac541a7b8828" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/14.x" 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 8c4d9793..83f09a38 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 c158da8da9876522e23e15e5c21ac7bd45650c3d Mon Sep 17 00:00:00 2001 +From b823a37835767fa1adb3d992d93f97fef748822a 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 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 60d85d46..643bdd83 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 59c803e2c49b4add4b73a72844dd02faa3b62c92 Mon Sep 17 00:00:00 2001 +From 8d5dee6f4286fe343b5178e03a5fbd1c6a013dbf 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 221fff12..5347d0a1 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 e96506e267151bd88a47b9f8582d182b5295e94c Mon Sep 17 00:00:00 2001 +From 114f3b0c10f9693d0b5db21689d50d498e98165f 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 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 72e641ed..76315755 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 521d1e4ff1bb60afd61e297e27d58e320de8675b Mon Sep 17 00:00:00 2001 +From 728eeaa231d3da4e150a773b6823e74f5f823add 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 diff --git a/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch index 812cbe0e..92e6864a 100644 --- a/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From 8bb24d5fb76c78cc99c5f086081963e3d93a09d3 Mon Sep 17 00:00:00 2001 +From a853cb73337e6bf88a7368cec873206619fc8103 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 path diff --git a/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch index a6a03e50..bcb980bc 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 030eb6411a016cf1ba3081d2e5ba330f8d4acca6 Mon Sep 17 00:00:00 2001 +From 6e918991053943e4194f17798bfcf2eebe8114c8 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 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 70d56107..94fcf96b 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 b5b6e5e0cf456c99d18eb3dbe8e6a945e12c2ba6 Mon Sep 17 00:00:00 2001 +From c7774d37208517f25f60f6d78bdbbb4041ca1a9f 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 diff --git a/recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch similarity index 95% rename from recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch rename to recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch index f7c04ff6..6f997336 100644 --- a/recipes-devtools/clang/clang/0009-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From 227331cfc2a56186ba53a583fcab8351ebbec3a0 Mon Sep 17 00:00:00 2001 +From d3bba128b26cef0bdf8703d74aaedf767575f980 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 diff --git a/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch deleted file mode 100644 index eea3d16f..00000000 --- a/recipes-devtools/clang/clang/0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ac686a30478e35d458a463b98a7e54b38a4ab5c4 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 10 May 2016 02:00:11 -0700 -Subject: [PATCH] clang: musl/ppc does not support 128-bit long double - -Signed-off-by: Khem Raj ---- - clang/lib/Basic/Targets/PPC.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h -index ac52eb219f54..ff2eb80b7d64 100644 ---- a/clang/lib/Basic/Targets/PPC.h -+++ b/clang/lib/Basic/Targets/PPC.h -@@ -395,6 +395,10 @@ public: - LongDoubleFormat = &llvm::APFloat::IEEEdouble(); - } - -+ if (getTriple().isMusl()) { -+ LongDoubleWidth = LongDoubleAlign = 64; -+ LongDoubleFormat = &llvm::APFloat::IEEEdouble(); -+ } - // PPC32 supports atomics up to 4 bytes. - MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32; - } diff --git a/recipes-devtools/clang/clang/0010-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 similarity index 95% rename from recipes-devtools/clang/clang/0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch rename to recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index d4bcc6c8..7c08b379 100644 --- a/recipes-devtools/clang/clang/0010-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 6226652ca539faf02f7834a3c2c158b5ae1e5f05 Mon Sep 17 00:00:00 2001 +From 8e05f66620f1b46348348e5e835a1ecd258922bd 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 diff --git a/recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch similarity index 96% rename from recipes-devtools/clang/clang/0011-clang-Define-releative-gcc-installation-dir.patch rename to recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch index 243e8e16..33ea8524 100644 --- a/recipes-devtools/clang/clang/0011-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 1324a97b610567a2ddad82b14bb48ac6f34a6bda Mon Sep 17 00:00:00 2001 +From 45c334c76a1010d525ee4b1bd4cc135bc9f8279d 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 diff --git a/recipes-devtools/clang/clang/0012-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 similarity index 95% rename from recipes-devtools/clang/clang/0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch rename to recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index 18495c00..9fd89096 100644 --- a/recipes-devtools/clang/clang/0012-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 11fbe1b772f545864dde456f2e40e4bd09e05485 Mon Sep 17 00:00:00 2001 +From 44339dbae2aa20c99bf77d9b9d16d37e5f822c76 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 diff --git a/recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch similarity index 94% rename from recipes-devtools/clang/clang/0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch rename to recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index e43f0ac2..608ef109 100644 --- a/recipes-devtools/clang/clang/0013-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 b11f3702657190ee638bddebd5be6b57b58953cf Mon Sep 17 00:00:00 2001 +From 405b2bafb072f8cb873c2a0bf5bd4b78ce425379 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 diff --git a/recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch similarity index 94% rename from recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch rename to recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch index da1f3ebe..5778aba1 100644 --- a/recipes-devtools/clang/clang/0014-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From 0158d01d328ad50f963272aea10b181694626679 Mon Sep 17 00:00:00 2001 +From 3d4effc5db71a4729b5d0152e030bbda2ceabd1c 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/0015-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 similarity index 96% rename from recipes-devtools/clang/clang/0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch rename to recipes-devtools/clang/clang/0014-libcxx-Add-compiler-runtime-library-to-link-step-for.patch index cf6b75b0..0d85b84a 100644 --- a/recipes-devtools/clang/clang/0015-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 013959ef2f407c0254a14d448d17e5e4a8c9875b Mon Sep 17 00:00:00 2001 +From 46c511cf138cfc16dd41dbbd112a10491f5e4131 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 diff --git a/recipes-devtools/clang/clang/0016-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 similarity index 98% rename from recipes-devtools/clang/clang/0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch rename to recipes-devtools/clang/clang/0015-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch index faa07f0e..71c6fe2d 100644 --- a/recipes-devtools/clang/clang/0016-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 a720606d47f1a97c489496e1f041d0dd331ed54c Mon Sep 17 00:00:00 2001 +From 266cd0acf4ade95c61d3a78c0bb70b13e40042a6 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 diff --git a/recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/recipes-devtools/clang/clang/0016-clang-Fix-resource-dir-location-for-cross-toolchains.patch similarity index 96% rename from recipes-devtools/clang/clang/0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch rename to recipes-devtools/clang/clang/0016-clang-Fix-resource-dir-location-for-cross-toolchains.patch index 37ccb3e1..8df82654 100644 --- a/recipes-devtools/clang/clang/0017-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 d1a52c37ff430a99a0e3b1e8a3a4236081c46709 Mon Sep 17 00:00:00 2001 +From e11c45b496affd182880dfa13e983086c3f5c0b0 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 diff --git a/recipes-devtools/clang/clang/0018-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 similarity index 98% rename from recipes-devtools/clang/clang/0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch rename to recipes-devtools/clang/clang/0017-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index f39a01f5..f05460a3 100644 --- a/recipes-devtools/clang/clang/0018-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 f2424f39c50b3c64eb87f7f2d6fa6c7196ae8c04 Mon Sep 17 00:00:00 2001 +From e59e9871fb6255a215ce4aa7304d3ff9ecd4a8b3 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 diff --git a/recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0018-clang-Use-python3-in-python-scripts.patch similarity index 98% rename from recipes-devtools/clang/clang/0019-clang-Use-python3-in-python-scripts.patch rename to recipes-devtools/clang/clang/0018-clang-Use-python3-in-python-scripts.patch index 8e350e6b..569e546f 100644 --- a/recipes-devtools/clang/clang/0019-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 0079be23503a86ae7162afe63baa00175fee6d02 Mon Sep 17 00:00:00 2001 +From 8dc8ebe9c9af24a38dd4010098921ddc58304d7b 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/0020-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 similarity index 98% rename from recipes-devtools/clang/clang/0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch rename to recipes-devtools/clang/clang/0019-For-x86_64-set-Yocto-based-GCC-install-search-path.patch index c21b0609..e5a7afce 100644 --- a/recipes-devtools/clang/clang/0020-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 b2cde48417f6c7a0674d38ad20b3537b9ac11740 Mon Sep 17 00:00:00 2001 +From b109042e841cceab53232c217b36c0b081b821ba 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 diff --git a/recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0020-llvm-Do-not-use-find_library-for-ncurses.patch similarity index 96% rename from recipes-devtools/clang/clang/0021-llvm-Do-not-use-find_library-for-ncurses.patch rename to recipes-devtools/clang/clang/0020-llvm-Do-not-use-find_library-for-ncurses.patch index 90e8d717..017b7de1 100644 --- a/recipes-devtools/clang/clang/0021-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 6db17ef4389d01843f2dd586f3f203ee2663da64 Mon Sep 17 00:00:00 2001 +From 056c7077148b1c44d8a076a79eb8275203ce51ba 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 diff --git a/recipes-devtools/clang/clang/0022-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 similarity index 94% rename from recipes-devtools/clang/clang/0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch rename to recipes-devtools/clang/clang/0021-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch index 463c2516..cb918776 100644 --- a/recipes-devtools/clang/clang/0022-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 f9d98db5149a83e5bc4ecb69b750f06ad248c9da Mon Sep 17 00:00:00 2001 +From a214aa5b9af68f3a1eaf3dc4dda3f390c2a22380 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 diff --git a/recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch similarity index 98% rename from recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch rename to recipes-devtools/clang/clang/0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index 5566cc64..e3894d6c 100644 --- a/recipes-devtools/clang/clang/0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From df5edef2aed06a61fb6c79dddd1cfcfc036f6eb4 Mon Sep 17 00:00:00 2001 +From cc592ef34f9bdb011223d4fce8010023591a8724 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 diff --git a/recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch similarity index 97% rename from recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch rename to recipes-devtools/clang/clang/0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 344cf697..12e12dde 100644 --- a/recipes-devtools/clang/clang/0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From 12da843779b64d902575c988466d609398ad87ea Mon Sep 17 00:00:00 2001 +From a0d6ea278c70dfdcd448af0d13ba9f2397712d93 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/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch similarity index 94% rename from recipes-devtools/clang/clang/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch rename to recipes-devtools/clang/clang/0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index de9d1408..d3b3a183 100644 --- a/recipes-devtools/clang/clang/0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From 3ce002f1254a071a0cd70c7302949e9ec99ee56f Mon Sep 17 00:00:00 2001 +From bec11d41e5a9c8810652f55a5774acd060a96cef 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 diff --git a/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch similarity index 95% rename from recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch rename to recipes-devtools/clang/clang/0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index d81f7a3c..39c5a5a4 100644 --- a/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From c1ac3d62106f9cfe8644c7f167297012b7bbe198 Mon Sep 17 00:00:00 2001 +From 47dead61e4b1bb7eefeb9885604dc28adcb58d8c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES diff --git a/recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch similarity index 94% rename from recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch rename to recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index 95d7b400..514114c6 100644 --- a/recipes-devtools/clang/clang/0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From c1635bb9812f275b55f77960c609cedc6c4ac405 Mon Sep 17 00:00:00 2001 +From 292fcadd76c98e94d418f91f3f3b799f09434a7c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips diff --git a/recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0027-libunwind-Added-unw_backtrace-method.patch similarity index 96% rename from recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch rename to recipes-devtools/clang/clang/0027-libunwind-Added-unw_backtrace-method.patch index af9d5e17..3ad6b4f3 100644 --- a/recipes-devtools/clang/clang/0028-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0027-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 4f97a54738b626f970682d0922b466fb608deb75 Mon Sep 17 00:00:00 2001 +From 0177c3239a1b44e123ab656b46d62fe0ce740936 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 23 May 2021 10:27:29 +0000 Subject: [PATCH] libunwind: Added unw_backtrace method diff --git a/recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch b/recipes-devtools/clang/clang/0028-Do-not-force-thumb-mode-directive.patch similarity index 97% rename from recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch rename to recipes-devtools/clang/clang/0028-Do-not-force-thumb-mode-directive.patch index 58ce5fd4..87a0caea 100644 --- a/recipes-devtools/clang/clang/0029-Do-not-force-thumb-mode-directive.patch +++ b/recipes-devtools/clang/clang/0028-Do-not-force-thumb-mode-directive.patch @@ -1,4 +1,4 @@ -From a62207f89f1bea871bb9aff23872d02a9197e467 Mon Sep 17 00:00:00 2001 +From 3b37d5cba75fa66e2fc50a457256b1db8b575c9b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Jun 2021 08:42:36 -0700 Subject: [PATCH] Do not force thumb mode directive diff --git a/recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch b/recipes-devtools/clang/clang/0029-clang-Do-not-use-install-relative-libc-headers.patch similarity index 95% rename from recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch rename to recipes-devtools/clang/clang/0029-clang-Do-not-use-install-relative-libc-headers.patch index 48073a64..68e9023a 100644 --- a/recipes-devtools/clang/clang/0030-clang-Do-not-use-install-relative-libc-headers.patch +++ b/recipes-devtools/clang/clang/0029-clang-Do-not-use-install-relative-libc-headers.patch @@ -1,4 +1,4 @@ -From edbbdb9fd9b4bd781a950be5349afc78d495e251 Mon Sep 17 00:00:00 2001 +From 9dbb503008ecf894d71ec49bfcf4e88380084eb7 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 diff --git a/recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch b/recipes-devtools/clang/clang/0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch similarity index 98% rename from recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch rename to recipes-devtools/clang/clang/0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch index 1c31632c..62bae0bc 100644 --- a/recipes-devtools/clang/clang/0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch +++ b/recipes-devtools/clang/clang/0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch @@ -1,4 +1,4 @@ -From 3badef231c62bcd5b9909b545a1ab6df732c99ca Mon Sep 17 00:00:00 2001 +From e18e3a2f7a74ad8fe4bf8f42ce2fc07105f6647b 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 diff --git a/recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0031-Fix-lib-paths-for-OpenEmbedded-Host.patch similarity index 98% rename from recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch rename to recipes-devtools/clang/clang/0031-Fix-lib-paths-for-OpenEmbedded-Host.patch index 53e32795..0bb5b5c1 100644 --- a/recipes-devtools/clang/clang/0032-Fix-lib-paths-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0031-Fix-lib-paths-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From 10fd1fea36b270ac6a942b36b76f97e6a9b699b3 Mon Sep 17 00:00:00 2001 +From 318d1ce6f4bb51ab5fb16504d2143cd27628ffcd 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 diff --git a/recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0032-Correct-library-search-path-for-OpenEmbedded-Host.patch similarity index 98% rename from recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch rename to recipes-devtools/clang/clang/0032-Correct-library-search-path-for-OpenEmbedded-Host.patch index 098c17e8..b6b53732 100644 --- a/recipes-devtools/clang/clang/0033-Correct-library-search-path-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0032-Correct-library-search-path-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From ae279cdbcc87bdfa06beb3b5cb43075d8943822a Mon Sep 17 00:00:00 2001 +From 39ae2f79f41eaf7b699ba677b0b827a489920537 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 diff --git a/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch b/recipes-devtools/clang/clang/0033-lldb-Link-with-libatomic-on-x86.patch similarity index 95% rename from recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch rename to recipes-devtools/clang/clang/0033-lldb-Link-with-libatomic-on-x86.patch index 9988b4fc..1483c7ad 100644 --- a/recipes-devtools/clang/clang/0034-lldb-Link-with-libatomic-on-x86.patch +++ b/recipes-devtools/clang/clang/0033-lldb-Link-with-libatomic-on-x86.patch @@ -1,4 +1,4 @@ -From aa57af181849b91d28f2320d6fc83e239594664c Mon Sep 17 00:00:00 2001 +From 986c994d2fdf0979711f2440cca119a6d4d1575f 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 diff --git a/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch b/recipes-devtools/clang/clang/0034-clang-exclude-openembedded-distributions-from-settin.patch similarity index 96% rename from recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch rename to recipes-devtools/clang/clang/0034-clang-exclude-openembedded-distributions-from-settin.patch index cf3d0e8b..a5116e28 100644 --- a/recipes-devtools/clang/clang/0035-clang-exclude-openembedded-distributions-from-settin.patch +++ b/recipes-devtools/clang/clang/0034-clang-exclude-openembedded-distributions-from-settin.patch @@ -1,4 +1,4 @@ -From 644311972806760b1d98304fe4dcd9c1c8f21f8e Mon Sep 17 00:00:00 2001 +From f6edd0e89b89fcf73c46b858fe5c3303b4b2e2a8 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 diff --git a/recipes-devtools/clang/clang/0035-compiler-rt-Enable-__int128-for-ppc32.patch b/recipes-devtools/clang/clang/0035-compiler-rt-Enable-__int128-for-ppc32.patch new file mode 100644 index 00000000..4eca3095 --- /dev/null +++ b/recipes-devtools/clang/clang/0035-compiler-rt-Enable-__int128-for-ppc32.patch @@ -0,0 +1,58 @@ +From 8f8877d8b16a59ef308bc9ad7f77a2f645ee3af3 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 | 7 +++---- + compiler-rt/lib/builtins/int_types.h | 2 +- + 2 files changed, 4 insertions(+), 5 deletions(-) + +diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt +index ea5ad9cdb864..4d1efc690d71 100644 +--- a/compiler-rt/lib/builtins/CMakeLists.txt ++++ b/compiler-rt/lib/builtins/CMakeLists.txt +@@ -607,8 +607,6 @@ 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 +@@ -634,6 +632,7 @@ if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "AIX") + ) + endif() + set(powerpc64le_SOURCES ${powerpc64_SOURCES}) ++set(powerpc_SOURCES ${powerpc64_SOURCES}) + + set(riscv_SOURCES + riscv/save.S +@@ -740,9 +739,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 7a72de480676..9ee5a327b28a 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(__riscv) || defined(_WIN64) ++ defined(__riscv) || defined(_WIN64) || defined(__powerpc__) + #define CRT_HAS_128BIT + #endif + diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index e8db32c1..aed7e32c 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -17,35 +17,34 @@ SRC_URI = "\ file://0005-llvm-allow-env-override-of-exe-path.patch \ file://0006-clang-driver-Check-sysroot-for-ldso-path.patch \ file://0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch \ - file://0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch \ - file://0009-clang-Prepend-trailing-to-sysroot.patch \ - file://0010-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch \ - file://0011-clang-Define-releative-gcc-installation-dir.patch \ - file://0012-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch \ - file://0013-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch \ - file://0014-Check-for-atomic-double-intrinsics.patch \ - file://0015-libcxx-Add-compiler-runtime-library-to-link-step-for.patch \ - file://0016-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch \ - file://0017-clang-Fix-resource-dir-location-for-cross-toolchains.patch \ - file://0018-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch \ - file://0019-clang-Use-python3-in-python-scripts.patch \ - file://0020-For-x86_64-set-Yocto-based-GCC-install-search-path.patch \ - file://0021-llvm-Do-not-use-find_library-for-ncurses.patch \ - file://0022-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch \ - file://0023-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \ - file://0024-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch \ - file://0025-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch \ - file://0026-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ - file://0027-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch \ - file://0028-libunwind-Added-unw_backtrace-method.patch \ - file://0029-Do-not-force-thumb-mode-directive.patch \ - file://0030-clang-Do-not-use-install-relative-libc-headers.patch \ - file://0031-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch \ - file://0032-Fix-lib-paths-for-OpenEmbedded-Host.patch \ - file://0033-Correct-library-search-path-for-OpenEmbedded-Host.patch \ - file://0034-lldb-Link-with-libatomic-on-x86.patch \ - file://0035-clang-exclude-openembedded-distributions-from-settin.patch \ - file://0036-Avoid-infinite-loop-between-DAGCombiner-visitMUL-and.patch \ + file://0008-clang-Prepend-trailing-to-sysroot.patch \ + file://0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch \ + file://0010-clang-Define-releative-gcc-installation-dir.patch \ + file://0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch \ + file://0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch \ + file://0013-Check-for-atomic-double-intrinsics.patch \ + file://0014-libcxx-Add-compiler-runtime-library-to-link-step-for.patch \ + file://0015-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch \ + file://0016-clang-Fix-resource-dir-location-for-cross-toolchains.patch \ + file://0017-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch \ + file://0018-clang-Use-python3-in-python-scripts.patch \ + file://0019-For-x86_64-set-Yocto-based-GCC-install-search-path.patch \ + file://0020-llvm-Do-not-use-find_library-for-ncurses.patch \ + file://0021-llvm-Insert-anchor-for-adding-OE-distro-vendor-names.patch \ + file://0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \ + file://0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch \ + file://0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch \ + file://0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ + file://0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch \ + file://0027-libunwind-Added-unw_backtrace-method.patch \ + file://0028-Do-not-force-thumb-mode-directive.patch \ + file://0029-clang-Do-not-use-install-relative-libc-headers.patch \ + file://0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch \ + file://0031-Fix-lib-paths-for-OpenEmbedded-Host.patch \ + file://0032-Correct-library-search-path-for-OpenEmbedded-Host.patch \ + file://0033-lldb-Link-with-libatomic-on-x86.patch \ + file://0034-clang-exclude-openembedded-distributions-from-settin.patch \ + file://0035-compiler-rt-Enable-__int128-for-ppc32.patch \ " # Fallback to no-PIE if not set GCCPIE ??= "" From 5aa29b4fdba4480e649baca21ddafe6959f522db Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 9 Mar 2022 19:24:02 -0800 Subject: [PATCH 122/166] lldb: Disable builds for ppc32 ppc32 build fails, disable for now NativeThreadLinux.cpp:(.text._ZN12lldb_private13process_linux17NativeThreadLinuxC2ERNS0_18NativeProcessLinuxEy+0x84): undefined reference to `lldb_private::process_linux::NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(lldb_private::ArchSpec const&, lldb_private::process_linux::NativeThreadLinux&)' Signed-off-by: Khem Raj (cherry picked from commit 8efb230dd73cfd19e575ff42fea979d977b05c97) --- recipes-devtools/clang/clang_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index b282d837..2ba01591 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -115,6 +115,7 @@ LLDB:riscv32 = "" LLDB:riscv64 = "" LLDB:mips = "" LLDB:mipsel = "" +LLDB:powerpc = "" # linux hosts (.so) on Windows .pyd SOLIBSDEV:mingw32 = ".pyd" From 412e76d10043268cce842b7964fbace3304903c3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Mar 2022 15:16:44 -0800 Subject: [PATCH 123/166] clang: Use -mno-altivec for ppc 7400 Workaround qemuppc illegal instruction trap on vxor instruction emulation this instruction is emitted by clang with -mcpu=7400 on ppc32 when compiling musl/strspn.c file The crash shows up running qemu-ppc via gobject-introspection, so a long unwieldy path but we know whats happening Signed-off-by: Khem Raj (cherry picked from commit 321edad13fd9275fb08700252d58a38b2b400670) --- classes/clang.bbclass | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index b696f622..5517ca68 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -42,6 +42,10 @@ LDFLAGS:append:toolchain-clang = " ${COMPILER_RT} ${LIBCPLUSPLUS}" TUNE_CCARGS:remove:toolchain-clang = "-meb" TUNE_CCARGS:remove:toolchain-clang = "-mel" TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -mbig-endian", " -mlittle-endian", d)}" +# Qemu uses 7400 but fails to emulate VSX/altivec instrs e.g. xor and fails with illegal instructions especially on musl/strspn.c +# Workaround the qemu limitation by disable altivec in code generation, gcc does not use altivec, so code generated with clang is +# superior but sadly qemu starts to puke :(, maybe it will work ok on real hardware !! +TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains("TUNE_FEATURES", "ppc7400", " -mno-altivec", "", d)}" # Clang does not yet support big.LITTLE performance tunes, so use the LITTLE for tunes TUNE_CCARGS:remove:toolchain-clang = "-mtune=cortex-a57.cortex-a53 -mtune=cortex-a72.cortex-a53 -mtune=cortex-a15.cortex-a7 -mtune=cortex-a17.cortex-a7 -mtune=cortex-a72.cortex-a35 -mtune=cortex-a73.cortex-a53 -mtune=cortex-a75.cortex-a55 -mtune=cortex-a76.cortex-a55" @@ -57,16 +61,16 @@ TUNE_CCARGS:remove:toolchain-clang = "-mcpu=octeontx2" TUNE_CCARGS:append:toolchain-clang:riscv32 = " -mno-relax" TUNE_CCARGS:append:toolchain-clang:riscv64 = " -mno-relax" -TUNE_CCARGS:remove:toolchain-clang:powerpc = "-mhard-float" -TUNE_CCARGS:remove:toolchain-clang:powerpc = "-mno-spe" - -TUNE_CCARGS:append:toolchain-clang = " -Qunused-arguments" -TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc64 = " -mlong-double-64 -fno-force-enable-int128" -TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc64le = " -mlong-double-64 -fno-force-enable-int128" -TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc = " -mlong-double-64 -fno-force-enable-int128" +# Reconcile some ppc anamolies +TUNE_CCARGS:remove:toolchain-clang:powerpc = "-mhard-float -mno-spe" +TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc64 = " -mlong-double-64" +TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc64le = " -mlong-double-64" +TUNE_CCARGS:append:toolchain-clang:libc-musl:powerpc = " -mlong-double-64" # usrmerge workaround TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains("DISTRO_FEATURES", "usrmerge", " --dyld-prefix=/usr", "", d)}" +TUNE_CCARGS:append:toolchain-clang = " -Qunused-arguments" + LDFLAGS:append:toolchain-clang:class-nativesdk:x86-64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-x86-64.so.2" LDFLAGS:append:toolchain-clang:class-nativesdk:x86 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux.so.2" LDFLAGS:append:toolchain-clang:class-nativesdk:aarch64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-aarch64.so.1" From 71e0e854a8214316433037d84ae08d2095d14425 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Mar 2022 15:19:45 -0800 Subject: [PATCH 124/166] clang: Update to 14.0.0 RC4 Brings in these changes * 69ba522c58d0 [Hexagon] Fix crash with shuffle_vector of v128f16 * ac3398a0b003 Revert "[CMake] Include runtimes test suites in check-all" * df2fcea78fb8 Revert "Revert "Revert "[release] Use the Bootstrapping build for building LLVM releases""" * 893b864cb855 Revert "GCC ABI Compatibility: Preserve alignment of non-pod members in packed structs" * a9415df334f0 Revert "Revert "[release] Use the Bootstrapping build for building LLVM releases"" * e54a7bf0c0f1 [CMake] Include runtimes test suites in check-all Signed-off-by: Khem Raj (cherry picked from commit 0a441ca6de399e7ee48aad68417599365ff0df9f) --- recipes-devtools/clang/clang.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 46a85262..cde36979 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "14" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "e879b2bf82ef2d096d2c0e5147ebac541a7b8828" +SRCREV ?= "69ba522c58d0cf43097a08087b1b31d6edb46706" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/14.x" From 47e4a4dc308947f39804d04c375cb4ea223f5aaf Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Mar 2022 20:09:31 -0800 Subject: [PATCH 125/166] clang.bbclass: Remove commented code Signed-off-by: Khem Raj (cherry picked from commit 1eb90320efec7c904e4e71454f5239dda173c40d) --- classes/clang.bbclass | 4 ---- 1 file changed, 4 deletions(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 5517ca68..5ce69f5c 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -22,18 +22,15 @@ PACKAGE_DEBUG_SPLIT_STYLE:toolchain-clang = "debug-without-src" COMPILER_RT ??= "" COMPILER_RT:class-native = "-rtlib=libgcc ${UNWINDLIB}" -#COMPILER_RT:powerpc = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT:armeb = "-rtlib=libgcc ${UNWINDLIB}" COMPILER_RT:libc-klibc = "-rtlib=libgcc ${UNWINDLIB}" UNWINDLIB ??= "" UNWINDLIB:class-native = "--unwindlib=libgcc" -#UNWINDLIB:powerpc = "--unwindlib=libgcc" UNWINDLIB:armeb = "--unwindlib=libgcc" UNWINDLIB_libc-klibc = "--unwindlib=libgcc" LIBCPLUSPLUS ??= "" -#LIBCPLUSPLUS:powerpc = "-stdlib=libstdc++" LIBCPLUSPLUS:armv5 = "-stdlib=libstdc++" CXXFLAGS:append:toolchain-clang = " ${LIBCPLUSPLUS}" @@ -89,7 +86,6 @@ RUNTIME ??= "gnu" #RUNTIME:toolchain-gcc = "gnu" RUNTIME:armeb = "gnu" RUNTIME:armv5 = "gnu" -#RUNTIME:powerpc = "gnu" TOOLCHAIN:class-native = "gcc" TOOLCHAIN:class-nativesdk = "gcc" From 81835f6813f01533b0e2301eeb36f895e6aee563 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Mar 2022 20:36:16 -0800 Subject: [PATCH 126/166] musl: Use gcc for ppc32 arch Signed-off-by: Khem Raj (cherry picked from commit 10b32c6112b617d9f54d3521205c26af467cd1ab) --- recipes-core/musl/musl_%.bbappend | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes-core/musl/musl_%.bbappend b/recipes-core/musl/musl_%.bbappend index d9e95498..e08e4a7a 100644 --- a/recipes-core/musl/musl_%.bbappend +++ b/recipes-core/musl/musl_%.bbappend @@ -1,4 +1,10 @@ DEPENDS:append:toolchain-clang = " clang-cross-${TARGET_ARCH}" DEPENDS:remove:toolchain-clang = "virtual/${TARGET_PREFIX}gcc" TOOLCHAIN:x86-x32 = "gcc" + +# crashes seen in malloc@plt +# Dump of assembler code for function malloc@got.plt: +# => 0x3f7fc2e8 <+0>: addis r27,r20,-22264 + +TOOLCHAIN:powerpc = "gcc" TOOLCHAIN:powerpc64 = "gcc" From 7f1f4974f3886afd950c82c79b7441cbb97e60b4 Mon Sep 17 00:00:00 2001 From: Esben Haabendal Date: Wed, 16 Mar 2022 17:28:23 +0100 Subject: [PATCH 127/166] clang: Avoid double libcxx in BASE_DEFAULT_DEPS When RUNTIME=="llvm" the libcxx entry will be added in a separate if clause right after this. We don't need it twice. Signed-off-by: Esben Haabendal (cherry picked from commit c63c71b03b413a590825861e3fcb1ebed42eb98a) --- classes/clang.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 5ce69f5c..bf8c98d0 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -108,7 +108,7 @@ def clang_base_deps(d): ret += " libcxx" return ret if (d.getVar('RUNTIME').find('llvm') != -1): - ret += " compiler-rt libcxx" + ret += " compiler-rt" elif (d.getVar('COMPILER_RT').find('-rtlib=compiler-rt') != -1): ret += " compiler-rt " else: From de32e5887f57cbf86830fe9312b9c41b3a811863 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 18 Mar 2022 01:45:00 -0700 Subject: [PATCH 128/166] llvm-project-source: Emit all default MULTILIB_GLOBAL_VARIANTS This ensures that signature of do_patch does not change between multilib and non-multilib builds of clang-native, this essentially hardcodes the multilib variants to lib32 lib64 libx32 which is 99.9% usecase, if you fall into 0.1% then go ahead and modify MULTILIB_VARIANTS in a bbappend file and it will be fine. Signed-off-by: Khem Raj (cherry picked from commit 2979956a6925c5a167de451fc804738e96d41637) --- recipes-devtools/clang/llvm-project-source.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes-devtools/clang/llvm-project-source.inc b/recipes-devtools/clang/llvm-project-source.inc index a8400305..4afd1bb9 100644 --- a/recipes-devtools/clang/llvm-project-source.inc +++ b/recipes-devtools/clang/llvm-project-source.inc @@ -26,13 +26,14 @@ CLANG_EXTRA_OE_VENDORS ?= "${TARGET_VENDOR} ${SDK_VENDOR}" # ":" separated the ID in "/etc/os-release" and the triple for finding gcc on this OE DISTRO. # eg: "poky:poky wrlinux:wrs" CLANG_EXTRA_OE_DISTRO ?= "poky:poky" - +# Match with MULTILIB_GLOBAL_VARIANTS +MULTILIB_VARIANTS = "lib32 lib64 libx32" python add_distro_vendor() { import subprocess case = "" triple = "" vendors = d.getVar('CLANG_EXTRA_OE_VENDORS') - multilib_variants = (d.getVar("MULTILIB_GLOBAL_VARIANTS") or "").split() + multilib_variants = (d.getVar("MULTILIB_VARIANTS") or "").split() vendors_to_add = [] for vendor in vendors.split(): # convert -yoe into yoe From 961ae2af87d2e8f06b114e833ba80f05b79c5f28 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 18 Mar 2022 01:47:14 -0700 Subject: [PATCH 129/166] clang.bbclass: Be mindful of multilibs when adding tools dependencies This ensures that multilib prefix is respected in dependencies and can be handled when distro enables multilib Signed-off-by: Khem Raj (cherry picked from commit 1d8389b120231a2a1bfde478ec2910b14a808c7c) --- classes/clang.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index bf8c98d0..02dbfe12 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -103,7 +103,7 @@ OVERRIDES[vardepsexclude] += "TOOLCHAIN RUNTIME" def clang_base_deps(d): if not d.getVar('INHIBIT_DEFAULT_DEPS', False): if not oe.utils.inherits(d, 'allarch') : - ret = " clang-cross-${TARGET_ARCH} virtual/libc " + ret = " ${MLPREFIX}clang-cross-${TARGET_ARCH} virtual/libc " if (d.getVar('RUNTIME').find('android') != -1): ret += " libcxx" return ret @@ -129,7 +129,7 @@ BASE_DEFAULT_DEPS:append:class-native:toolchain-clang:runtime-llvm = " libcxx-na BASE_DEFAULT_DEPS:append:class-nativesdk:toolchain-clang:runtime-llvm = " clang-native nativesdk-libcxx nativesdk-compiler-rt" # do_populate_sysroot needs STRIP -POPULATESYSROOTDEPS:toolchain-clang:class-target = "clang-cross-${TARGET_ARCH}:do_populate_sysroot" +POPULATESYSROOTDEPS:toolchain-clang:class-target = "${MLPREFIX}clang-cross-${TARGET_ARCH}:do_populate_sysroot" cmake_do_generate_toolchain_file:append:toolchain-clang () { cat >> ${WORKDIR}/toolchain.cmake < Date: Tue, 22 Mar 2022 00:09:38 -0700 Subject: [PATCH 130/166] libcxx: Drop duplicate setting of LLVM_LIBDIR_SUFFIX LLVM_LIBDIR_SUFFIX is already computed fine in clang.inc Signed-off-by: Khem Raj (cherry picked from commit ee587d0bace8a5a33d0c141e253d7a95f5dad97f) --- recipes-devtools/clang/libcxx_git.bb | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index cc88fc16..f7fcd1a4 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb @@ -42,8 +42,6 @@ LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da39 file://libunwind/LICENSE.TXT;md5=f66970035d12f196030658b11725e1a1 \ " -LLVM_LIBDIR_SUFFIX:powerpc64 = "64" - OECMAKE_TARGET_COMPILE = "cxxabi cxx" OECMAKE_TARGET_INSTALL = "install-cxx install-cxxabi ${@bb.utils.contains("RUNTIME", "llvm", "install-unwind", "", d)}" From 895cac3f4e55cc28fe2b1857274156a61f0fa5c5 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 22 Mar 2022 16:36:41 -0700 Subject: [PATCH 131/166] clang: Add env override for libdir This is useful when using clang cross compiler and the packages rely on llvm-config to detect paths and various attributes of clang/llvm install Update to latest on 14.x as well * 3f43d803382d [libc++] Re-enable workaround for pre-ranges CTAD in std::span * add3ab7f4c8a [libc++] Add workaround to avoid breaking users of when are disabled * 329fda39c507 NFC: Mention auto-vec support for SVE in release notes. Signed-off-by: Khem Raj (cherry picked from commit fb382a5da9de491277f72e46e0466749c607aac9) --- recipes-devtools/clang/clang.inc | 2 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 2 +- ...-support-a-new-embedded-linux-target.patch | 2 +- ...lify-cross-compilation.-Don-t-use-na.patch | 2 +- ...ryInfo-Undefine-libc-functions-if-th.patch | 2 +- ...-env-override-of-exe-and-libdir-path.patch | 66 +++++++++++++++++++ ...-llvm-allow-env-override-of-exe-path.patch | 34 ---------- ...g-driver-Check-sysroot-for-ldso-path.patch | 2 +- ...tools.cpp-Add-lssp_nonshared-on-musl.patch | 2 +- ...08-clang-Prepend-trailing-to-sysroot.patch | 2 +- ...e-the-target-sysroot-for-compiler-ru.patch | 2 +- ...efine-releative-gcc-installation-dir.patch | 2 +- ...ad-and-ldl-along-with-lunwind-for-st.patch | 2 +- ...UTABLE-when-cross-compiling-for-nati.patch | 2 +- ...3-Check-for-atomic-double-intrinsics.patch | 2 +- ...ler-runtime-library-to-link-step-for.patch | 2 +- ...-Fix-configure-for-packages-using-fi.patch | 2 +- ...ce-dir-location-for-cross-toolchains.patch | 2 +- ...-dyld-prefix-when-checking-sysroot-f.patch | 2 +- ...-clang-Use-python3-in-python-scripts.patch | 2 +- ...-Yocto-based-GCC-install-search-path.patch | 2 +- ...-Do-not-use-find_library-for-ncurses.patch | 2 +- ...or-for-adding-OE-distro-vendor-names.patch | 2 +- ...er-rt-Use-mcr-based-barrier-on-armv6.patch | 2 +- ...ot-use-backtrace-APIs-on-non-glibc-l.patch | 2 +- ...iple-for-non-debian-multiarch-linux-.patch | 2 +- ...-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch | 2 +- ...-scudo-standalone-with-libatomic-on-.patch | 2 +- ...libunwind-Added-unw_backtrace-method.patch | 2 +- ...28-Do-not-force-thumb-mode-directive.patch | 2 +- ...ot-use-install-relative-libc-headers.patch | 2 +- ...iver-finds-GCC-installation-path-on-.patch | 2 +- ...-Fix-lib-paths-for-OpenEmbedded-Host.patch | 2 +- ...ry-search-path-for-OpenEmbedded-Host.patch | 2 +- ...0033-lldb-Link-with-libatomic-on-x86.patch | 2 +- ...enembedded-distributions-from-settin.patch | 2 +- ...ompiler-rt-Enable-__int128-for-ppc32.patch | 2 +- recipes-devtools/clang/common.inc | 2 +- 38 files changed, 102 insertions(+), 70 deletions(-) create mode 100644 recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch delete mode 100644 recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index cde36979..9929a363 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "14" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "69ba522c58d0cf43097a08087b1b31d6edb46706" +SRCREV ?= "3f43d803382d57e3fc010ca19833077d1023e9c9" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/14.x" 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 83f09a38..0935b77d 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 b823a37835767fa1adb3d992d93f97fef748822a Mon Sep 17 00:00:00 2001 +From 360c30626c575dc28290bb9620f66cb646946db8 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 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 643bdd83..83c62685 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 8d5dee6f4286fe343b5178e03a5fbd1c6a013dbf Mon Sep 17 00:00:00 2001 +From aaa3dba672041e638fb473f5e4b8354fc8f48eaa 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 5347d0a1..672618b2 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 114f3b0c10f9693d0b5db21689d50d498e98165f Mon Sep 17 00:00:00 2001 +From bf8be3b144296a76076729826456b697af4f7c71 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 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 76315755..a284354f 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 728eeaa231d3da4e150a773b6823e74f5f823add Mon Sep 17 00:00:00 2001 +From 543e00c52d9c9b9a521c59c017622d6378283c41 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 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 new file mode 100644 index 00000000..4e111ff7 --- /dev/null +++ b/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch @@ -0,0 +1,66 @@ +From cf0b61822c7c92c1b64dba78a68d798276e70d23 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 + +When using a native llvm-config from inside a sysroot, we need llvm-config to +return the libraries, include directories, etc. from inside the sysroot rather +than from the native sysroot. Thus provide an env override for calling +llvm-config from a target sysroot. + +Add YOCTO_ALTERNATE_LIBDIR and YOCTO_ALTERNATE_EXE_PATH env variables + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Martin Kelly +Signed-off-by: Khem Raj +--- + llvm/tools/llvm-config/llvm-config.cpp | 21 +++++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp +index 8ed88f33ead4..9e26a2b41409 100644 +--- a/llvm/tools/llvm-config/llvm-config.cpp ++++ b/llvm/tools/llvm-config/llvm-config.cpp +@@ -247,6 +247,13 @@ Typical components:\n\ + + /// Compute the path to the main executable. + std::string GetExecutablePath(const char *Argv0) { ++ // Hack for Yocto: we need to override the root path when we are using ++ // llvm-config from within a target sysroot. ++ const char *Sysroot = std::getenv("YOCTO_ALTERNATE_EXE_PATH"); ++ if (Sysroot != nullptr) { ++ return Sysroot; ++ } ++ + // This just needs to be some symbol in the binary; C++ doesn't + // allow taking the address of ::main however. + void *P = (void *)(intptr_t)GetExecutablePath; +@@ -326,7 +333,7 @@ int main(int argc, char **argv) { + // Compute various directory locations based on the derived location + // information. + std::string ActivePrefix, ActiveBinDir, ActiveIncludeDir, ActiveLibDir, +- ActiveCMakeDir; ++ ActiveCMakeDir, BaseLibDir; + std::string ActiveIncludeOption; + if (IsInDevelopmentTree) { + ActiveIncludeDir = std::string(LLVM_SRC_ROOT) + "/include"; +@@ -367,7 +374,17 @@ int main(int argc, char **argv) { + sys::fs::make_absolute(ActivePrefix, Path); + ActiveBinDir = std::string(Path.str()); + } +- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; ++ // 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 ++ // x86_64 Libdir = lib ++ const char *YoctoLibDir = std::getenv("YOCTO_ALTERNATE_LIBDIR"); ++ if (YoctoLibDir != nullptr) { ++ BaseLibDir = std::string(YoctoLibDir); ++ } else { ++ BaseLibDir = std::string("/lib") + LLVM_LIBDIR_SUFFIX; ++ } ++ ActiveLibDir = ActivePrefix + BaseLibDir; + ActiveCMakeDir = ActiveLibDir + "/cmake/llvm"; + ActiveIncludeOption = "-I" + ActiveIncludeDir; + } diff --git a/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch deleted file mode 100644 index 92e6864a..00000000 --- a/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-path.patch +++ /dev/null @@ -1,34 +0,0 @@ -From a853cb73337e6bf88a7368cec873206619fc8103 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 path - -When using a native llvm-config from inside a sysroot, we need llvm-config to -return the libraries, include directories, etc. from inside the sysroot rather -than from the native sysroot. Thus provide an env override for calling -llvm-config from a target sysroot. - -Signed-off-by: Martin Kelly -Signed-off-by: Khem Raj ---- - llvm/tools/llvm-config/llvm-config.cpp | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp -index 8ed88f33ead4..0b9ee0ee0008 100644 ---- a/llvm/tools/llvm-config/llvm-config.cpp -+++ b/llvm/tools/llvm-config/llvm-config.cpp -@@ -247,6 +247,13 @@ Typical components:\n\ - - /// Compute the path to the main executable. - std::string GetExecutablePath(const char *Argv0) { -+ // Hack for Yocto: we need to override the root path when we are using -+ // llvm-config from within a target sysroot. -+ const char *Sysroot = std::getenv("YOCTO_ALTERNATE_EXE_PATH"); -+ if (Sysroot != nullptr) { -+ return Sysroot; -+ } -+ - // This just needs to be some symbol in the binary; C++ doesn't - // allow taking the address of ::main however. - void *P = (void *)(intptr_t)GetExecutablePath; 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 bcb980bc..6cb2532a 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 6e918991053943e4194f17798bfcf2eebe8114c8 Mon Sep 17 00:00:00 2001 +From 776d78fdc7bd26178db8523b5e44e3bf1595c486 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 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 94fcf96b..5227612d 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 c7774d37208517f25f60f6d78bdbbb4041ca1a9f Mon Sep 17 00:00:00 2001 +From 43cf70a997d2cd8324037d5c66c52640671ba81f 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 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 6f997336..da2a5bbe 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 d3bba128b26cef0bdf8703d74aaedf767575f980 Mon Sep 17 00:00:00 2001 +From a114db284f5afd0219843c528db3c3e654244745 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 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 7c08b379..8f2bc642 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 8e05f66620f1b46348348e5e835a1ecd258922bd Mon Sep 17 00:00:00 2001 +From 75737cc8cb40e2d5e04692738009743fe6b53e04 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 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 33ea8524..d3001544 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 45c334c76a1010d525ee4b1bd4cc135bc9f8279d Mon Sep 17 00:00:00 2001 +From 3a9d57c6376695fef554bb2ef98cca953b5f93a2 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 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 9fd89096..d1b0d80a 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 44339dbae2aa20c99bf77d9b9d16d37e5f822c76 Mon Sep 17 00:00:00 2001 +From f72dd3b58c536212bfbaaffad02c26556c79ce14 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 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 608ef109..ca002209 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 405b2bafb072f8cb873c2a0bf5bd4b78ce425379 Mon Sep 17 00:00:00 2001 +From 64c0fc8c06c324f630bfec9a70f33c98e4a6d69b 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 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 5778aba1..69753699 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 3d4effc5db71a4729b5d0152e030bbda2ceabd1c Mon Sep 17 00:00:00 2001 +From e90f4b11f8df22a623b2249f38eefe753890eda1 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 0d85b84a..b9d8b5b4 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 46c511cf138cfc16dd41dbbd112a10491f5e4131 Mon Sep 17 00:00:00 2001 +From 3a01eb974d289dc167d3f9fb819c14cd7ae36baf 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 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 71c6fe2d..db3538bd 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 266cd0acf4ade95c61d3a78c0bb70b13e40042a6 Mon Sep 17 00:00:00 2001 +From 17f4d549d9d60d6bc0c9ada529c7edbe4ef1b00e 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 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 8df82654..0499343a 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 e11c45b496affd182880dfa13e983086c3f5c0b0 Mon Sep 17 00:00:00 2001 +From 764342ff2da8c77d322decbbb3ba1d83681897a7 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 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 f05460a3..5695ac29 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 e59e9871fb6255a215ce4aa7304d3ff9ecd4a8b3 Mon Sep 17 00:00:00 2001 +From 69e09b3f538dd48c0a84ba25584bf748cc379516 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 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 569e546f..19e8c4ce 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 8dc8ebe9c9af24a38dd4010098921ddc58304d7b Mon Sep 17 00:00:00 2001 +From 1b6f68acb45ebb7006b1791a0423792bbbcf18d8 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 e5a7afce..5cd4d99f 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 b109042e841cceab53232c217b36c0b081b821ba Mon Sep 17 00:00:00 2001 +From 2f66f32ef2152e81a218d90310d878121ef2bfa7 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 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 017b7de1..025fd35f 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 056c7077148b1c44d8a076a79eb8275203ce51ba Mon Sep 17 00:00:00 2001 +From 45840497991bdf88040ff8e1e116080c3400fa0d 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 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 cb918776..26a8fcd0 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 a214aa5b9af68f3a1eaf3dc4dda3f390c2a22380 Mon Sep 17 00:00:00 2001 +From 3823225acbf0c859fca230c2e88609c013faf6e3 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 diff --git a/recipes-devtools/clang/clang/0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index e3894d6c..5d507052 100644 --- a/recipes-devtools/clang/clang/0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From cc592ef34f9bdb011223d4fce8010023591a8724 Mon Sep 17 00:00:00 2001 +From 9ee84db64a54b14998de7e17ffdd761c6e7de548 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 diff --git a/recipes-devtools/clang/clang/0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 12e12dde..4a12fca9 100644 --- a/recipes-devtools/clang/clang/0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From a0d6ea278c70dfdcd448af0d13ba9f2397712d93 Mon Sep 17 00:00:00 2001 +From fd56b4938927ec1fb9798c30fd87149864df5cdf 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/0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index d3b3a183..74489999 100644 --- a/recipes-devtools/clang/clang/0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From bec11d41e5a9c8810652f55a5774acd060a96cef Mon Sep 17 00:00:00 2001 +From cbb0692285cd60f5d2f7eb71aa98d35956cf945e 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 diff --git a/recipes-devtools/clang/clang/0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index 39c5a5a4..78f086ef 100644 --- a/recipes-devtools/clang/clang/0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From 47dead61e4b1bb7eefeb9885604dc28adcb58d8c Mon Sep 17 00:00:00 2001 +From cb012e5ef770465bcd2380309a259122f6ddb37e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES diff --git a/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index 514114c6..b6ae0bfd 100644 --- a/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From 292fcadd76c98e94d418f91f3f3b799f09434a7c Mon Sep 17 00:00:00 2001 +From 801322d66949ccc72fdf770839d2fe4d680214b2 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips diff --git a/recipes-devtools/clang/clang/0027-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0027-libunwind-Added-unw_backtrace-method.patch index 3ad6b4f3..627d83f6 100644 --- a/recipes-devtools/clang/clang/0027-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0027-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 0177c3239a1b44e123ab656b46d62fe0ce740936 Mon Sep 17 00:00:00 2001 +From 49c22dcb059283bd41aeb8871d300ebbdb44611f Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 23 May 2021 10:27:29 +0000 Subject: [PATCH] libunwind: Added unw_backtrace method diff --git a/recipes-devtools/clang/clang/0028-Do-not-force-thumb-mode-directive.patch b/recipes-devtools/clang/clang/0028-Do-not-force-thumb-mode-directive.patch index 87a0caea..7631e4f5 100644 --- a/recipes-devtools/clang/clang/0028-Do-not-force-thumb-mode-directive.patch +++ b/recipes-devtools/clang/clang/0028-Do-not-force-thumb-mode-directive.patch @@ -1,4 +1,4 @@ -From 3b37d5cba75fa66e2fc50a457256b1db8b575c9b Mon Sep 17 00:00:00 2001 +From f520eab8602ebdebd44f227c8f2c0cd0713aa398 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Jun 2021 08:42:36 -0700 Subject: [PATCH] Do not force thumb mode directive diff --git a/recipes-devtools/clang/clang/0029-clang-Do-not-use-install-relative-libc-headers.patch b/recipes-devtools/clang/clang/0029-clang-Do-not-use-install-relative-libc-headers.patch index 68e9023a..c45ee315 100644 --- a/recipes-devtools/clang/clang/0029-clang-Do-not-use-install-relative-libc-headers.patch +++ b/recipes-devtools/clang/clang/0029-clang-Do-not-use-install-relative-libc-headers.patch @@ -1,4 +1,4 @@ -From 9dbb503008ecf894d71ec49bfcf4e88380084eb7 Mon Sep 17 00:00:00 2001 +From 68700040f123c962a972863fc551f8631ec9ee0c 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 diff --git a/recipes-devtools/clang/clang/0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch b/recipes-devtools/clang/clang/0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch index 62bae0bc..0e461549 100644 --- a/recipes-devtools/clang/clang/0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch +++ b/recipes-devtools/clang/clang/0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch @@ -1,4 +1,4 @@ -From e18e3a2f7a74ad8fe4bf8f42ce2fc07105f6647b Mon Sep 17 00:00:00 2001 +From 5afbe8d04a5d70ed6af0b94e9c2252af27c25165 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 diff --git a/recipes-devtools/clang/clang/0031-Fix-lib-paths-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0031-Fix-lib-paths-for-OpenEmbedded-Host.patch index 0bb5b5c1..9356fefd 100644 --- a/recipes-devtools/clang/clang/0031-Fix-lib-paths-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0031-Fix-lib-paths-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From 318d1ce6f4bb51ab5fb16504d2143cd27628ffcd Mon Sep 17 00:00:00 2001 +From 25a1484bd5e180c4e89f7bfa0cdc18eae1744fe3 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 diff --git a/recipes-devtools/clang/clang/0032-Correct-library-search-path-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0032-Correct-library-search-path-for-OpenEmbedded-Host.patch index b6b53732..8fb4ba4f 100644 --- a/recipes-devtools/clang/clang/0032-Correct-library-search-path-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0032-Correct-library-search-path-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From 39ae2f79f41eaf7b699ba677b0b827a489920537 Mon Sep 17 00:00:00 2001 +From 34b0c0644c78f12e9f7107e119cdc1248840b231 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 diff --git a/recipes-devtools/clang/clang/0033-lldb-Link-with-libatomic-on-x86.patch b/recipes-devtools/clang/clang/0033-lldb-Link-with-libatomic-on-x86.patch index 1483c7ad..0975f837 100644 --- a/recipes-devtools/clang/clang/0033-lldb-Link-with-libatomic-on-x86.patch +++ b/recipes-devtools/clang/clang/0033-lldb-Link-with-libatomic-on-x86.patch @@ -1,4 +1,4 @@ -From 986c994d2fdf0979711f2440cca119a6d4d1575f Mon Sep 17 00:00:00 2001 +From 76f806cd0a30fdccccd8915f891cd6bd17a7dbab 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 diff --git a/recipes-devtools/clang/clang/0034-clang-exclude-openembedded-distributions-from-settin.patch b/recipes-devtools/clang/clang/0034-clang-exclude-openembedded-distributions-from-settin.patch index a5116e28..2f7e5826 100644 --- a/recipes-devtools/clang/clang/0034-clang-exclude-openembedded-distributions-from-settin.patch +++ b/recipes-devtools/clang/clang/0034-clang-exclude-openembedded-distributions-from-settin.patch @@ -1,4 +1,4 @@ -From f6edd0e89b89fcf73c46b858fe5c3303b4b2e2a8 Mon Sep 17 00:00:00 2001 +From 8ad10677d1bbf350992bd1354895afaac01977dc 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 diff --git a/recipes-devtools/clang/clang/0035-compiler-rt-Enable-__int128-for-ppc32.patch b/recipes-devtools/clang/clang/0035-compiler-rt-Enable-__int128-for-ppc32.patch index 4eca3095..7771de40 100644 --- a/recipes-devtools/clang/clang/0035-compiler-rt-Enable-__int128-for-ppc32.patch +++ b/recipes-devtools/clang/clang/0035-compiler-rt-Enable-__int128-for-ppc32.patch @@ -1,4 +1,4 @@ -From 8f8877d8b16a59ef308bc9ad7f77a2f645ee3af3 Mon Sep 17 00:00:00 2001 +From af95376f07071e6fe8faf492726cc23dca84d59a 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 diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index aed7e32c..b61d239d 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -14,7 +14,7 @@ SRC_URI = "\ file://0002-compiler-rt-support-a-new-embedded-linux-target.patch \ file://0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch \ file://0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ - file://0005-llvm-allow-env-override-of-exe-path.patch \ + file://0005-llvm-allow-env-override-of-exe-and-libdir-path.patch \ file://0006-clang-driver-Check-sysroot-for-ldso-path.patch \ file://0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch \ file://0008-clang-Prepend-trailing-to-sysroot.patch \ From ea213ccc3ea27f5a9fc2e80c2da6ec49ed748bd2 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 22 Mar 2022 16:39:50 -0700 Subject: [PATCH 132/166] llvm-config: Set YOCTO_ALTERNATE_LIBDIR and YOCTO_ALTERNATE_EXE_PATH If they are set by recipe in env, respect that Signed-off-by: Khem Raj (cherry picked from commit 3f7efaef4ba5b312737eeaa8c73ce84dd5271d08) --- recipes-devtools/clang/clang/llvm-config | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes-devtools/clang/clang/llvm-config b/recipes-devtools/clang/clang/llvm-config index a139514d..7788bd5b 100644 --- a/recipes-devtools/clang/clang/llvm-config +++ b/recipes-devtools/clang/clang/llvm-config @@ -5,11 +5,10 @@ # is needed because arguments like --ldflags, --cxxflags, etc. are set by the # native compile rather than the target compile. # - SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" NEXT_LLVM_CONFIG="$(which -a llvm-config | sed -n 2p)" -export YOCTO_ALTERNATE_EXE_PATH="$(readlink -f "$SCRIPT_DIR/../llvm-config")" - +export YOCTO_ALTERNATE_EXE_PATH="${YOCTO_ALTERNATE_EXE_PATH:="$(readlink -f "$SCRIPT_DIR/../llvm-config")"}" +export YOCTO_ALTERNATE_LIBDIR="${YOCTO_ALTERNATE_LIBDIR:="/lib"}" if [[ $# == 0 ]]; then exec "$NEXT_LLVM_CONFIG" fi From 5eb88a84e1cfdea187ef7ed165cf0f9ca6203696 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 22 Mar 2022 16:46:57 -0700 Subject: [PATCH 133/166] clang.bbclass: Export YOCTO_ALTERNATE_LIBDIR and YOCTO_ALTERNATE_EXE_PATH These variables are used during target package compiles in packages which user llvm-config e.g. libclc Signed-off-by: Khem Raj (cherry picked from commit 7008a2e1ee0755d5c35210f0bf5077f37126bf23) --- classes/clang.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 02dbfe12..2a19e2fe 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -97,6 +97,15 @@ OVERRIDES =. "${@['', 'toolchain-${TOOLCHAIN}:']['${TOOLCHAIN}' != '']}" OVERRIDES =. "${@['', 'runtime-${RUNTIME}:']['${RUNTIME}' != '']}" OVERRIDES[vardepsexclude] += "TOOLCHAIN RUNTIME" +YOCTO_ALTERNATE_EXE_PATH[export] = "0" +YOCTO_ALTERNATE_LIBDIR[export] = "0" + +YOCTO_ALTERNATE_EXE_PATH:class-target = "${STAGING_BINDIR}/llvm-config" +YOCTO_ALTERNATE_LIBDIR:class-target = "${base_libdir}" + +YOCTO_ALTERNATE_EXE_PATH:class-target[export] = "1" +YOCTO_ALTERNATE_LIBDIR:class-target[export] = "1" + #DEPENDS:append:toolchain-clang:class-target = " clang-cross-${TARGET_ARCH} " #DEPENDS:remove:toolchain-clang:allarch = "clang-cross-${TARGET_ARCH}" From e1a0567da59325dd7842fa1b78c4330085e85fcb Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 25 Mar 2022 14:33:38 -0700 Subject: [PATCH 134/166] clang: Add a patch to fix llvm-objdump Signed-off-by: Khem Raj (cherry picked from commit 42dd5484867b772767a33340ee219fb9f42799e4) --- recipes-devtools/clang/clang/D122505.diff | 135 ++++++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 2 files changed, 136 insertions(+) create mode 100644 recipes-devtools/clang/clang/D122505.diff diff --git a/recipes-devtools/clang/clang/D122505.diff b/recipes-devtools/clang/clang/D122505.diff new file mode 100644 index 00000000..fa154d79 --- /dev/null +++ b/recipes-devtools/clang/clang/D122505.diff @@ -0,0 +1,135 @@ +Upstream-Status: https://reviews.llvm.org/D122505 + +diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp +--- a/llvm/lib/Object/ELF.cpp ++++ b/llvm/lib/Object/ELF.cpp +@@ -568,11 +568,9 @@ + } + + if (Dyn.empty()) +- // TODO: this error is untested. + return createError("invalid empty dynamic section"); + + if (Dyn.back().d_tag != ELF::DT_NULL) +- // TODO: this error is untested. + return createError("dynamic sections must be DT_NULL terminated"); + + return Dyn; +diff --git a/llvm/test/tools/llvm-objdump/ELF/dynamic-malformed.test b/llvm/test/tools/llvm-objdump/ELF/dynamic-malformed.test +new file mode 100644 +--- /dev/null ++++ b/llvm/test/tools/llvm-objdump/ELF/dynamic-malformed.test +@@ -0,0 +1,39 @@ ++## An empty dynamic section is invalid. Test we report a warning instead of an ++## error. objcopy --only-keep-debug may produce an empty dynamic section, it is ++## excessive to use an error. ++# RUN: yaml2obj %s --docnum=1 -o %t.empty ++# RUN: llvm-objdump -p %t.empty 2>&1 | FileCheck %s -DFILE=%t.empty --check-prefix=EMPTY ++ ++# EMPTY: Program Header: ++# EMPTY-NEXT: warning: '[[FILE]]': invalid empty dynamic section ++# EMPTY-EMPTY: ++ ++--- !ELF ++FileHeader: ++ Class: ELFCLASS64 ++ Data: ELFDATA2LSB ++ Type: ET_EXEC ++ Machine: EM_X86_64 ++Sections: ++ - Name: .dynamic ++ Type: SHT_DYNAMIC ++ ++# RUN: yaml2obj %s --docnum=2 -o %t.nonull ++# RUN: llvm-objdump -p %t.nonull 2>&1 | FileCheck %s -DFILE=%t.nonull --check-prefix=NONULL ++ ++# NONULL: Program Header: ++# NONULL-NEXT: warning: '[[FILE]]': dynamic sections must be DT_NULL terminated ++# NONULL-EMPTY: ++ ++--- !ELF ++FileHeader: ++ Class: ELFCLASS64 ++ Data: ELFDATA2LSB ++ Type: ET_EXEC ++ Machine: EM_X86_64 ++Sections: ++ - Name: .dynamic ++ Type: SHT_DYNAMIC ++ Entries: ++ - Tag: DT_SONAME ++ Value: 1 +diff --git a/llvm/test/tools/llvm-objdump/ELF/invalid-phdr.test b/llvm/test/tools/llvm-objdump/ELF/invalid-phdr.test +--- a/llvm/test/tools/llvm-objdump/ELF/invalid-phdr.test ++++ b/llvm/test/tools/llvm-objdump/ELF/invalid-phdr.test +@@ -1,11 +1,11 @@ + ## Test how we handle the case when the e_phoff field is invalid. + # RUN: yaml2obj %s -o %t +-# RUN: not llvm-objdump --private-headers %t 2>&1 | \ ++# RUN: llvm-objdump --private-headers %t 2>&1 | \ + # RUN: FileCheck -DFILE=%t %s --check-prefix=INVALID-PHOFF + + # INVALID-PHOFF: Program Header: + # INVALID-PHOFF-NEXT: warning: '[[FILE]]': unable to read program headers: program headers are longer than binary of size 280: e_phoff = 0xffffff, e_phnum = 0, e_phentsize = 0 +-# INVALID-PHOFF-NEXT: error: '[[FILE]]': program headers are longer than binary of size 280: e_phoff = 0xffffff, e_phnum = 0, e_phentsize = 0 ++# INVALID-PHOFF-NEXT: warning: '[[FILE]]': program headers are longer than binary of size 280: e_phoff = 0xffffff, e_phnum = 0, e_phentsize = 0 + + --- !ELF + FileHeader: +diff --git a/llvm/test/tools/llvm-objdump/ELF/program-headers.test b/llvm/test/tools/llvm-objdump/ELF/program-headers.test +--- a/llvm/test/tools/llvm-objdump/ELF/program-headers.test ++++ b/llvm/test/tools/llvm-objdump/ELF/program-headers.test +@@ -278,12 +278,12 @@ + ## Check we report an error / warning when we are unable to read program headers. + ## Case A: the e_phentsize field is invalid. + # RUN: yaml2obj --docnum=2 -DPHENTSIZE=1 %s -o %t.phdr.err +-# RUN: not llvm-objdump --private-headers %t.phdr.err 2>&1 | \ ++# RUN: llvm-objdump --private-headers %t.phdr.err 2>&1 | \ + # RUN: FileCheck %s -DFILE=%t.phdr.err --check-prefix=PHENTSIZE + + # PHENTSIZE: Program Header: + # PHENTSIZE-NEXT: warning: '[[FILE]]': unable to read program headers: invalid e_phentsize: 1 +-# PHENTSIZE-NEXT: error: '[[FILE]]': invalid e_phentsize: 1 ++# PHENTSIZE-NEXT: warning: '[[FILE]]': invalid e_phentsize: 1 + + --- !ELF + FileHeader: +@@ -309,16 +309,16 @@ + + ## Check we report a warning / error when e_phoff goes 1 byte past the end of the file. + # RUN: yaml2obj --docnum=2 -DPHOFF=0x161 %s -o %t.phdr.err2 +-# RUN: not llvm-objdump --private-headers %t.phdr.err2 2>&1 | \ ++# RUN: llvm-objdump --private-headers %t.phdr.err2 2>&1 | \ + # RUN: FileCheck %s -DFILE=%t.phdr.err2 --check-prefix=PHOFF -DOFF=0x161 + + # PHOFF: Program Header: + # PHOFF-NEXT: warning: '[[FILE]]': unable to read program headers: program headers are longer than binary of size 408: e_phoff = [[OFF]], e_phnum = 1, e_phentsize = 56 +-# PHOFF-NEXT: error: '[[FILE]]': program headers are longer than binary of size 408: e_phoff = [[OFF]], e_phnum = 1, e_phentsize = 56 ++# PHOFF-NEXT: warning: '[[FILE]]': program headers are longer than binary of size 408: e_phoff = [[OFF]], e_phnum = 1, e_phentsize = 56 + + + ## Check we report a warning / error when the value of e_phoff is so large that + ## e_phoff + e_phnum * e_phentsize > UINT64_MAX. + # RUN: yaml2obj --docnum=2 -DPHOFF=0xffffffffffffffff %s -o %t.phdr.err3 +-# RUN: not llvm-objdump --private-headers %t.phdr.err3 2>&1 | \ ++# RUN: llvm-objdump --private-headers %t.phdr.err3 2>&1 | \ + # RUN: FileCheck %s -DFILE=%t.phdr.err3 --check-prefix=PHOFF -DOFF=0xffffffffffffffff +diff --git a/llvm/tools/llvm-objdump/ELFDump.cpp b/llvm/tools/llvm-objdump/ELFDump.cpp +--- a/llvm/tools/llvm-objdump/ELFDump.cpp ++++ b/llvm/tools/llvm-objdump/ELFDump.cpp +@@ -171,8 +171,12 @@ + + template + static void printDynamicSection(const ELFFile &Elf, StringRef Filename) { +- ArrayRef DynamicEntries = +- unwrapOrError(Elf.dynamicEntries(), Filename); ++ auto DynamicEntriesOrErr = Elf.dynamicEntries(); ++ if (!DynamicEntriesOrErr) { ++ reportWarning(toString(DynamicEntriesOrErr.takeError()), Filename); ++ return; ++ } ++ ArrayRef DynamicEntries = *DynamicEntriesOrErr; + + // Find the maximum tag name length to format the value column properly. + size_t MaxLen = 0; + diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index b61d239d..ba47dd1e 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -45,6 +45,7 @@ SRC_URI = "\ file://0033-lldb-Link-with-libatomic-on-x86.patch \ file://0034-clang-exclude-openembedded-distributions-from-settin.patch \ file://0035-compiler-rt-Enable-__int128-for-ppc32.patch \ + file://D122505.diff \ " # Fallback to no-PIE if not set GCCPIE ??= "" From 4af45723f386ef0b692d1bbeea43b44d206ffa8f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 28 Mar 2022 00:01:43 -0700 Subject: [PATCH 135/166] clang.bbclass: Do not export llvm-config variables exporting them changes signatures of the tasks for all recipes includeing native ones, so when meta-clang is not used it ends up building all native recipes too. Defining these variables is good enought for clang to see them in do_compile shell for target recipes Signed-off-by: Khem Raj (cherry picked from commit 17a6480b5e03a73d38b2d26c072aa51957ae747d) --- classes/clang.bbclass | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 2a19e2fe..a8f5dbe0 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -97,14 +97,12 @@ OVERRIDES =. "${@['', 'toolchain-${TOOLCHAIN}:']['${TOOLCHAIN}' != '']}" OVERRIDES =. "${@['', 'runtime-${RUNTIME}:']['${RUNTIME}' != '']}" OVERRIDES[vardepsexclude] += "TOOLCHAIN RUNTIME" -YOCTO_ALTERNATE_EXE_PATH[export] = "0" -YOCTO_ALTERNATE_LIBDIR[export] = "0" -YOCTO_ALTERNATE_EXE_PATH:class-target = "${STAGING_BINDIR}/llvm-config" -YOCTO_ALTERNATE_LIBDIR:class-target = "${base_libdir}" +YOCTO_ALTERNATE_EXE_PATH:toolchain-clang:class-target = "${STAGING_BINDIR}/llvm-config" +YOCTO_ALTERNATE_LIBDIR:toolchain-clang:class-target = "${base_libdir}" -YOCTO_ALTERNATE_EXE_PATH:class-target[export] = "1" -YOCTO_ALTERNATE_LIBDIR:class-target[export] = "1" +#YOCTO_ALTERNATE_EXE_PATH:toolchain-clang:class-target[export] = "1" +#YOCTO_ALTERNATE_LIBDIR:toolchain-clang:class-target[export] = "1" #DEPENDS:append:toolchain-clang:class-target = " clang-cross-${TARGET_ARCH} " #DEPENDS:remove:toolchain-clang:allarch = "clang-cross-${TARGET_ARCH}" From b5742a4d7b625cae08e004a9ca406f123ccfaa34 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 3 Apr 2022 12:30:56 -0700 Subject: [PATCH 136/166] nonclangable: Enable clang for several packages pinned to gcc-only with clang-14 more packages are now buildable from the exlcusion list, therefore enable clang for them. Signed-off-by: Khem Raj (cherry picked from commit aa770155dcfee2caf575f28ecef26acfbe1060b3) --- conf/nonclangable.conf | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index 9da32608..ce7d63ff 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -37,19 +37,6 @@ TOOLCHAIN:pn-libgcc-initial = "gcc" TOOLCHAIN:pn-libgfortran = "gcc" TOOLCHAIN:pn-libssp-nonshared = "gcc" -# Dunfell is not affected by the ell and iwd breakages. -# Once we update past dunfell, patches to fix it properly -# can be found in OpenMandriva packages. -# ell 0.39 introduced nested functions sadly -#TOOLCHAIN:pn-ell = "gcc" -# iwd 1.13 introduced nested functions sadly -#TOOLCHAIN:pn-iwd = "gcc" - -#| cargo:warning=/mnt/a/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/libstd-rs/1.27.1-r0/re -#cipe-sysroot/usr/include/bits/stdlib.h:90:3: error: "Assumed value of MB_LEN_MAX wrong" -#| cargo:warning=# error "Assumed value of MB_LEN_MAX wrong" -#| cargo:warning= ^ -TOOLCHAIN:pn-libstd-rs = "gcc" TOOLCHAIN:pn-m4:powerpc = "gcc" # clang does not have 64bit atomics on mips32 #TOOLCHAIN:pn-mesa:mips = "gcc" @@ -63,14 +50,6 @@ TOOLCHAIN:pn-openflow:mipsarch = "gcc" TOOLCHAIN:pn-opensbi = "gcc" TOOLCHAIN:pn-openjdk-8 = "gcc" TOOLCHAIN:pn-openjre-8 = "gcc" -TOOLCHAIN:pn-piglit = "gcc" -TOOLCHAIN:pn-prelink = "gcc" -# Qemu cant run profile tests run during build -# | *** stack smashing detected ***: terminated -# | ./pgo-wrapper: line 3: 3372346 Aborted -#TOOLCHAIN:pn-python3 = "gcc" -# has dpkg source which does not compile -TOOLCHAIN:pn-start-stop-daemon = "gcc" TOOLCHAIN:pn-syslinux = "gcc" TOOLCHAIN:pn-systemtap = "gcc" # v4l-utils uses nested functions @@ -110,12 +89,8 @@ DEBUG_FLAGS:remove:pn-pixman:toolchain-clang:arm = "-g" #| ^ #| ./ports/linux/pseudo_wrappers.c:80:57: error: use of unknown builtin '__builtin_apply_args' [-Wimplicit-function-declaration] #| void *res = __builtin_apply((void (*)()) real_syscall, __builtin_apply_args(), sizeof(long) * 7); - TOOLCHAIN:pn-pseudo = "gcc" -#| ../../pulseaudio-10.0/src/pulsecore/mix_neon.c../../pulseaudio-10.0/src/pulsecore/sconv_neon.c:49::27: error: unknown register name 'q0' in asm -#| : "memory", "cc", "q0" /* clobber list */ -#| ^ -TOOLCHAIN:pn-pulseaudio:aarch64 = "gcc" + # mix_neon.c:179:9: error: invalid operand in inline asm: 'vld1.s32 ${0:h}, [$2] # vld1.s32 ${1:h}, [$3] ' TOOLCHAIN:pn-pulseaudio:armv7ve = "gcc" @@ -138,7 +113,7 @@ TOOLCHAIN:pn-caps = "gcc" # Fails to build with clang-13 errors with .export.sym file # Mismatch between symbols in shared library and lists in .exported_symbols.* files: dm_bit_get_prev -TOOLCHAIN:pn-lvm2 = "gcc" +#TOOLCHAIN:pn-lvm2 = "gcc" TOOLCHAIN:pn-libdevmapper = "gcc" TOOLCHAIN:pn-lttng-ust:riscv64 = "gcc" From e6c62926a5298d2451e191a3b3fe33adba1af35b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 3 Apr 2022 20:12:06 -0700 Subject: [PATCH 137/166] python3: Use gcc for riscv/aarch64 and all musl Configure test crashes while using clang on riscv aarch64 needs to use gcc until [1] is merged [1] https://lists.openembedded.org/g/openembedded-core/message/164192 Signed-off-by: Khem Raj (cherry picked from commit 3882c27310b16e6fc097cca1966cea591769cc5c) --- conf/nonclangable.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index ce7d63ff..d93c7440 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -91,6 +91,14 @@ DEBUG_FLAGS:remove:pn-pixman:toolchain-clang:arm = "-g" #| void *res = __builtin_apply((void (*)()) real_syscall, __builtin_apply_args(), sizeof(long) * 7); TOOLCHAIN:pn-pseudo = "gcc" +#| checking for multiarch... riscv64-yoe-linux +#| configure: error: internal configure error for the platform triplet, please file a bug report +TOOLCHAIN:pn-python3:riscv64 = "gcc" +TOOLCHAIN:pn-python3:riscv32 = "gcc" +TOOLCHAIN:pn-python3:libc-musl = "gcc" +# Use until OE-core merges https://lists.openembedded.org/g/openembedded-core/message/164192 +TOOLCHAIN:pn-python3:aarch64 = "gcc" + # mix_neon.c:179:9: error: invalid operand in inline asm: 'vld1.s32 ${0:h}, [$2] # vld1.s32 ${1:h}, [$3] ' TOOLCHAIN:pn-pulseaudio:armv7ve = "gcc" From 73fc59e70e2cfca9077c2dea782e269735d7d506 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 9 Apr 2022 12:45:18 -0700 Subject: [PATCH 138/166] clang: Upgrade to latest on 14.x release branch brings in these fixes * ec13fed5867f [X86] lowerV8I16Shuffle - use explicit SmallVector width to avoid MSVC AVX alignment bug * aaf0c921a54a [clang-repl] Add an accessor to our underlying execution engine * d150523f0776 [AArch64] Use correct calling convention for each vararg * fd98b0f1a6a1 [SelectionDAG] Don't create illegally-typed nodes while constant folding * d53e2603383a [AArch64] Allow .variant_pcs before the symbol is registered * 67a290460c37 [VectorCombine] Insert addrspacecast when crossing address space boundaries * 353068233f21 [ELF] Fix llvm_unreachable failure when COMMON is placed in SHT_PROGBITS output section * 311a622edd31 [Object][test] Fix invalid.test * 1007cb795a3c [llvm-objdump] --private-headers: change errors to warnings for dynamic section dumping * c9ec4902c3e3 [llvm-objdump][test] dos2unix some files * 5b9dd016bec7 [SelectionDAG][RISCV] Make RegsForValue::getCopyToRegs explicitly zero_extend constants. * e9b26b5b2a70 [RISCV] Add test case for miscompile caused by treating ANY_EXTEND of constants as SIGN_EXTEND. * a4681df0202c [libcxx] [test] Avoid spurious test breakage in clang-cl-dll configs with newer CMake * db07d9f098b3 [MC] Fix llvm_unreachable when a STB_GNU_UNIQUE symbol needs a relocation * 22d7bee01a5a [PPCISelLowering] Avoid emitting calls to __multi3, __muloti4 * 23d08271a4b2 Add cmake/ to release tarballs via concatenation * b69247dcbd80 [libcxx] random_device, specify optimal entropy properties for all OS's using arc4random() * 63e7af77ec42 [Clang][NeonEmitter] emit ret decl first for -Wdeclaration-after-statement * f3b89727716a [Driver][OpenBSD] Disable unwind tables on Arm * fe5c24e93754 [docs] Fix typo in tutorial * 99c0f85ef992 Re-commit: Driver: Don't warn on -mbranch-protection when linking * 0547ffef5d39 workflows: Consolidate tests to reduce the number of build jobs * bd8dc965cff1 Bump version to 14.0.1 Signed-off-by: Khem Raj (cherry picked from commit f50840f34d5fb9529da5354e0e6796752b03ca5f) --- conf/layer.conf | 2 +- recipes-devtools/clang/clang.inc | 4 +- ...ibunwind-headers-when-LIBCXXABI_LIBU.patch | 4 +- ...-support-a-new-embedded-linux-target.patch | 2 +- ...lify-cross-compilation.-Don-t-use-na.patch | 2 +- ...ryInfo-Undefine-libc-functions-if-th.patch | 2 +- ...-env-override-of-exe-and-libdir-path.patch | 2 +- ...g-driver-Check-sysroot-for-ldso-path.patch | 2 +- ...tools.cpp-Add-lssp_nonshared-on-musl.patch | 2 +- ...08-clang-Prepend-trailing-to-sysroot.patch | 2 +- ...e-the-target-sysroot-for-compiler-ru.patch | 2 +- ...efine-releative-gcc-installation-dir.patch | 2 +- ...ad-and-ldl-along-with-lunwind-for-st.patch | 2 +- ...UTABLE-when-cross-compiling-for-nati.patch | 2 +- ...3-Check-for-atomic-double-intrinsics.patch | 2 +- ...ler-runtime-library-to-link-step-for.patch | 2 +- ...-Fix-configure-for-packages-using-fi.patch | 2 +- ...ce-dir-location-for-cross-toolchains.patch | 2 +- ...-dyld-prefix-when-checking-sysroot-f.patch | 2 +- ...-clang-Use-python3-in-python-scripts.patch | 2 +- ...-Yocto-based-GCC-install-search-path.patch | 2 +- ...-Do-not-use-find_library-for-ncurses.patch | 2 +- ...or-for-adding-OE-distro-vendor-names.patch | 2 +- ...er-rt-Use-mcr-based-barrier-on-armv6.patch | 2 +- ...ot-use-backtrace-APIs-on-non-glibc-l.patch | 2 +- ...iple-for-non-debian-multiarch-linux-.patch | 2 +- ...-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch | 2 +- ...-scudo-standalone-with-libatomic-on-.patch | 2 +- ...libunwind-Added-unw_backtrace-method.patch | 2 +- ...28-Do-not-force-thumb-mode-directive.patch | 2 +- ...ot-use-install-relative-libc-headers.patch | 2 +- ...iver-finds-GCC-installation-path-on-.patch | 2 +- ...-Fix-lib-paths-for-OpenEmbedded-Host.patch | 2 +- ...ry-search-path-for-OpenEmbedded-Host.patch | 2 +- ...0033-lldb-Link-with-libatomic-on-x86.patch | 2 +- ...enembedded-distributions-from-settin.patch | 2 +- ...ompiler-rt-Enable-__int128-for-ppc32.patch | 2 +- recipes-devtools/clang/clang/D122505.diff | 135 ------------------ recipes-devtools/clang/common.inc | 1 - 39 files changed, 39 insertions(+), 175 deletions(-) delete mode 100644 recipes-devtools/clang/clang/D122505.diff diff --git a/conf/layer.conf b/conf/layer.conf index 718a345c..d18e5adb 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -32,7 +32,7 @@ INHERIT += "clang" # Do not include clang in SDK unless user wants to CLANGSDK ??= "0" -LLVMVERSION = "14.0.0" +LLVMVERSION = "14.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 9929a363..8c5cedf8 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -6,9 +6,9 @@ LLVM_GIT_PROTOCOL ?= "https" MAJOR_VER = "14" MINOR_VER = "0" -PATCH_VER = "0" +PATCH_VER = "1" -SRCREV ?= "3f43d803382d57e3fc010ca19833077d1023e9c9" +SRCREV ?= "ec13fed5867f674bb96ab5502629ec209ef5a73a" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/14.x" 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 0935b77d..f81f714d 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 360c30626c575dc28290bb9620f66cb646946db8 Mon Sep 17 00:00:00 2001 +From 655270f8c4caa717e10d97013ffd9ed88e06699b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 27 Aug 2017 10:37:49 -0700 Subject: [PATCH] libcxxabi: Find libunwind headers when @@ -17,7 +17,7 @@ Signed-off-by: Khem Raj 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt -index 8e8cdf8ad737..9a0edc701752 100644 +index 5ef85c9cfc40..1afdb5a17970 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -535,14 +535,9 @@ endif() 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 83c62685..74d0c1e2 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 aaa3dba672041e638fb473f5e4b8354fc8f48eaa Mon Sep 17 00:00:00 2001 +From 5a1cf5bd6eb5b7ee299c11b7a39ada74fd60be1d 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 672618b2..b93f68a6 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 bf8be3b144296a76076729826456b697af4f7c71 Mon Sep 17 00:00:00 2001 +From 3bc3328f89915cde33c26cec91a57b79109420f0 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 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 a284354f..8da23bda 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 543e00c52d9c9b9a521c59c017622d6378283c41 Mon Sep 17 00:00:00 2001 +From 2da0422b45b2b9842a2ceb6840beba05356057d2 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 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 4e111ff7..8521d7fe 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 cf0b61822c7c92c1b64dba78a68d798276e70d23 Mon Sep 17 00:00:00 2001 +From affcd7f14bca2d9ee95352cd979f66f55901272a Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Fri, 19 May 2017 00:22:57 -0700 Subject: [PATCH] llvm: allow env override of exe and libdir path diff --git a/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch index 6cb2532a..d08c50a6 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 776d78fdc7bd26178db8523b5e44e3bf1595c486 Mon Sep 17 00:00:00 2001 +From 7ff4f134a5e5e1f6ffe31637a474cf118ae0079b 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 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 5227612d..1c3f9aad 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 43cf70a997d2cd8324037d5c66c52640671ba81f Mon Sep 17 00:00:00 2001 +From 12b2de3db9a53a25610f3c61fef10fe877e765c4 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 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 da2a5bbe..4752daf7 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 a114db284f5afd0219843c528db3c3e654244745 Mon Sep 17 00:00:00 2001 +From 610d6a7c8c9d21f10b225f971a377be49bbaea4f 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 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 8f2bc642..02d702c6 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 75737cc8cb40e2d5e04692738009743fe6b53e04 Mon Sep 17 00:00:00 2001 +From da2647d56a98cc708a6b13e3586e7fb364ef77a0 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 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 d3001544..55924c95 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 3a9d57c6376695fef554bb2ef98cca953b5f93a2 Mon Sep 17 00:00:00 2001 +From 6e17f402773f9408a62c8d03a39db5af6f637653 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 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 d1b0d80a..b2539f14 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 f72dd3b58c536212bfbaaffad02c26556c79ce14 Mon Sep 17 00:00:00 2001 +From 718bc533b5d621ee5eb24a87ed882bf82360807c 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 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 ca002209..c8738300 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 64c0fc8c06c324f630bfec9a70f33c98e4a6d69b Mon Sep 17 00:00:00 2001 +From d26acd3f09d6796c35b29a70480142e70ec74d51 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 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 69753699..c5920210 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 e90f4b11f8df22a623b2249f38eefe753890eda1 Mon Sep 17 00:00:00 2001 +From 8bee07de2d0078373f0f1a72e924d7808ddf03e0 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 b9d8b5b4..55875f24 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 3a01eb974d289dc167d3f9fb819c14cd7ae36baf Mon Sep 17 00:00:00 2001 +From 3d7469e6d46dd19a20500fdb56f21a0cc7198e9d 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 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 db3538bd..30deb5b3 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 17f4d549d9d60d6bc0c9ada529c7edbe4ef1b00e Mon Sep 17 00:00:00 2001 +From 728e023a8d2dc85402fbe1295e87023fdb7c4c1b 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 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 0499343a..aca23d27 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 764342ff2da8c77d322decbbb3ba1d83681897a7 Mon Sep 17 00:00:00 2001 +From e12e426d3c67b17d74879d7dec434eb64310881e 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 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 5695ac29..ddd52dd3 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 69e09b3f538dd48c0a84ba25584bf748cc379516 Mon Sep 17 00:00:00 2001 +From 554002679332300b789cf44384c2274840ed24d9 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 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 19e8c4ce..f54cffd3 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 1b6f68acb45ebb7006b1791a0423792bbbcf18d8 Mon Sep 17 00:00:00 2001 +From 5ce5ec34d618d694a862d345c89eaa2d12e2bfc6 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 5cd4d99f..44b4828a 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 2f66f32ef2152e81a218d90310d878121ef2bfa7 Mon Sep 17 00:00:00 2001 +From d720595723c92fe8e2d17887bab85c6fd154825e 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 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 025fd35f..46f151ae 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 45840497991bdf88040ff8e1e116080c3400fa0d Mon Sep 17 00:00:00 2001 +From fd5760df7696cd9c6ec9ef38ed6cbab19d70e3ac 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 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 26a8fcd0..33a351db 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 3823225acbf0c859fca230c2e88609c013faf6e3 Mon Sep 17 00:00:00 2001 +From ef4ee8181adc48116a563adafae014409e9432d0 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 diff --git a/recipes-devtools/clang/clang/0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch b/recipes-devtools/clang/clang/0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch index 5d507052..a407a4be 100644 --- a/recipes-devtools/clang/clang/0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch +++ b/recipes-devtools/clang/clang/0022-compiler-rt-Use-mcr-based-barrier-on-armv6.patch @@ -1,4 +1,4 @@ -From 9ee84db64a54b14998de7e17ffdd761c6e7de548 Mon Sep 17 00:00:00 2001 +From 759dff74b297c8bf35d222b17cee3047c0df10b8 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Mar 2021 00:32:09 -0700 Subject: [PATCH] compiler-rt: Use mcr based barrier on armv6 diff --git a/recipes-devtools/clang/clang/0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/recipes-devtools/clang/clang/0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 4a12fca9..bb247c94 100644 --- a/recipes-devtools/clang/clang/0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/recipes-devtools/clang/clang/0023-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch @@ -1,4 +1,4 @@ -From fd56b4938927ec1fb9798c30fd87149864df5cdf Mon Sep 17 00:00:00 2001 +From e350e74522f03ed6d202b8130cf615e58a2ea714 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/0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index 74489999..880f500d 100644 --- a/recipes-devtools/clang/clang/0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/recipes-devtools/clang/clang/0024-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch @@ -1,4 +1,4 @@ -From cbb0692285cd60f5d2f7eb71aa98d35956cf945e Mon Sep 17 00:00:00 2001 +From a310ecc416f38d81c13af43cdecaaf001cf06274 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 diff --git a/recipes-devtools/clang/clang/0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch b/recipes-devtools/clang/clang/0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch index 78f086ef..cce7b610 100644 --- a/recipes-devtools/clang/clang/0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch +++ b/recipes-devtools/clang/clang/0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch @@ -1,4 +1,4 @@ -From cb012e5ef770465bcd2380309a259122f6ddb37e Mon Sep 17 00:00:00 2001 +From 4bbb4ab9d4cd3ff1424bed6346dd8e47cd4bcb24 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 May 2021 21:49:18 -0700 Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES diff --git a/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch b/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch index b6ae0bfd..4eac4e39 100644 --- a/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch +++ b/recipes-devtools/clang/clang/0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch @@ -1,4 +1,4 @@ -From 801322d66949ccc72fdf770839d2fe4d680214b2 Mon Sep 17 00:00:00 2001 +From 0806d2c4a56116b99413c506e8ff5ebe11bf270f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 21 May 2021 08:14:29 -0700 Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips diff --git a/recipes-devtools/clang/clang/0027-libunwind-Added-unw_backtrace-method.patch b/recipes-devtools/clang/clang/0027-libunwind-Added-unw_backtrace-method.patch index 627d83f6..6244cd29 100644 --- a/recipes-devtools/clang/clang/0027-libunwind-Added-unw_backtrace-method.patch +++ b/recipes-devtools/clang/clang/0027-libunwind-Added-unw_backtrace-method.patch @@ -1,4 +1,4 @@ -From 49c22dcb059283bd41aeb8871d300ebbdb44611f Mon Sep 17 00:00:00 2001 +From a71fda827da45c357d92d07ea491c208c1e044fe Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 23 May 2021 10:27:29 +0000 Subject: [PATCH] libunwind: Added unw_backtrace method diff --git a/recipes-devtools/clang/clang/0028-Do-not-force-thumb-mode-directive.patch b/recipes-devtools/clang/clang/0028-Do-not-force-thumb-mode-directive.patch index 7631e4f5..6db1e875 100644 --- a/recipes-devtools/clang/clang/0028-Do-not-force-thumb-mode-directive.patch +++ b/recipes-devtools/clang/clang/0028-Do-not-force-thumb-mode-directive.patch @@ -1,4 +1,4 @@ -From f520eab8602ebdebd44f227c8f2c0cd0713aa398 Mon Sep 17 00:00:00 2001 +From f69f7529bc8b561ddc32a5057da6d74d90dd9c94 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Jun 2021 08:42:36 -0700 Subject: [PATCH] Do not force thumb mode directive diff --git a/recipes-devtools/clang/clang/0029-clang-Do-not-use-install-relative-libc-headers.patch b/recipes-devtools/clang/clang/0029-clang-Do-not-use-install-relative-libc-headers.patch index c45ee315..8bae1a39 100644 --- a/recipes-devtools/clang/clang/0029-clang-Do-not-use-install-relative-libc-headers.patch +++ b/recipes-devtools/clang/clang/0029-clang-Do-not-use-install-relative-libc-headers.patch @@ -1,4 +1,4 @@ -From 68700040f123c962a972863fc551f8631ec9ee0c Mon Sep 17 00:00:00 2001 +From 71a195e5ed96e47a21fe3f55708046350ebabdfe 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 diff --git a/recipes-devtools/clang/clang/0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch b/recipes-devtools/clang/clang/0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch index 0e461549..b814803a 100644 --- a/recipes-devtools/clang/clang/0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch +++ b/recipes-devtools/clang/clang/0030-clang-Fix-how-driver-finds-GCC-installation-path-on-.patch @@ -1,4 +1,4 @@ -From 5afbe8d04a5d70ed6af0b94e9c2252af27c25165 Mon Sep 17 00:00:00 2001 +From d7b262b22c16436c836de7f39591eaafd28a4e21 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 diff --git a/recipes-devtools/clang/clang/0031-Fix-lib-paths-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0031-Fix-lib-paths-for-OpenEmbedded-Host.patch index 9356fefd..c5eb168d 100644 --- a/recipes-devtools/clang/clang/0031-Fix-lib-paths-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0031-Fix-lib-paths-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From 25a1484bd5e180c4e89f7bfa0cdc18eae1744fe3 Mon Sep 17 00:00:00 2001 +From 4dab11c8abdd1a48cd0df4475ef2f82732c7f7e3 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 diff --git a/recipes-devtools/clang/clang/0032-Correct-library-search-path-for-OpenEmbedded-Host.patch b/recipes-devtools/clang/clang/0032-Correct-library-search-path-for-OpenEmbedded-Host.patch index 8fb4ba4f..7388f8e7 100644 --- a/recipes-devtools/clang/clang/0032-Correct-library-search-path-for-OpenEmbedded-Host.patch +++ b/recipes-devtools/clang/clang/0032-Correct-library-search-path-for-OpenEmbedded-Host.patch @@ -1,4 +1,4 @@ -From 34b0c0644c78f12e9f7107e119cdc1248840b231 Mon Sep 17 00:00:00 2001 +From 12b439deed0381e603155a11f3aec5eb20cd6803 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 diff --git a/recipes-devtools/clang/clang/0033-lldb-Link-with-libatomic-on-x86.patch b/recipes-devtools/clang/clang/0033-lldb-Link-with-libatomic-on-x86.patch index 0975f837..7539afc8 100644 --- a/recipes-devtools/clang/clang/0033-lldb-Link-with-libatomic-on-x86.patch +++ b/recipes-devtools/clang/clang/0033-lldb-Link-with-libatomic-on-x86.patch @@ -1,4 +1,4 @@ -From 76f806cd0a30fdccccd8915f891cd6bd17a7dbab Mon Sep 17 00:00:00 2001 +From 17c7ad88f765bfbcfe25dd8f76ab9264250b9ea3 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 diff --git a/recipes-devtools/clang/clang/0034-clang-exclude-openembedded-distributions-from-settin.patch b/recipes-devtools/clang/clang/0034-clang-exclude-openembedded-distributions-from-settin.patch index 2f7e5826..cbc3da1c 100644 --- a/recipes-devtools/clang/clang/0034-clang-exclude-openembedded-distributions-from-settin.patch +++ b/recipes-devtools/clang/clang/0034-clang-exclude-openembedded-distributions-from-settin.patch @@ -1,4 +1,4 @@ -From 8ad10677d1bbf350992bd1354895afaac01977dc Mon Sep 17 00:00:00 2001 +From 5c0d026419a69d5b8722f1abb0000caa4c151885 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 diff --git a/recipes-devtools/clang/clang/0035-compiler-rt-Enable-__int128-for-ppc32.patch b/recipes-devtools/clang/clang/0035-compiler-rt-Enable-__int128-for-ppc32.patch index 7771de40..bb1a26ab 100644 --- a/recipes-devtools/clang/clang/0035-compiler-rt-Enable-__int128-for-ppc32.patch +++ b/recipes-devtools/clang/clang/0035-compiler-rt-Enable-__int128-for-ppc32.patch @@ -1,4 +1,4 @@ -From af95376f07071e6fe8faf492726cc23dca84d59a Mon Sep 17 00:00:00 2001 +From 734aaa66800b91abe42bdef1dd721c368fa17b07 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 diff --git a/recipes-devtools/clang/clang/D122505.diff b/recipes-devtools/clang/clang/D122505.diff deleted file mode 100644 index fa154d79..00000000 --- a/recipes-devtools/clang/clang/D122505.diff +++ /dev/null @@ -1,135 +0,0 @@ -Upstream-Status: https://reviews.llvm.org/D122505 - -diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp ---- a/llvm/lib/Object/ELF.cpp -+++ b/llvm/lib/Object/ELF.cpp -@@ -568,11 +568,9 @@ - } - - if (Dyn.empty()) -- // TODO: this error is untested. - return createError("invalid empty dynamic section"); - - if (Dyn.back().d_tag != ELF::DT_NULL) -- // TODO: this error is untested. - return createError("dynamic sections must be DT_NULL terminated"); - - return Dyn; -diff --git a/llvm/test/tools/llvm-objdump/ELF/dynamic-malformed.test b/llvm/test/tools/llvm-objdump/ELF/dynamic-malformed.test -new file mode 100644 ---- /dev/null -+++ b/llvm/test/tools/llvm-objdump/ELF/dynamic-malformed.test -@@ -0,0 +1,39 @@ -+## An empty dynamic section is invalid. Test we report a warning instead of an -+## error. objcopy --only-keep-debug may produce an empty dynamic section, it is -+## excessive to use an error. -+# RUN: yaml2obj %s --docnum=1 -o %t.empty -+# RUN: llvm-objdump -p %t.empty 2>&1 | FileCheck %s -DFILE=%t.empty --check-prefix=EMPTY -+ -+# EMPTY: Program Header: -+# EMPTY-NEXT: warning: '[[FILE]]': invalid empty dynamic section -+# EMPTY-EMPTY: -+ -+--- !ELF -+FileHeader: -+ Class: ELFCLASS64 -+ Data: ELFDATA2LSB -+ Type: ET_EXEC -+ Machine: EM_X86_64 -+Sections: -+ - Name: .dynamic -+ Type: SHT_DYNAMIC -+ -+# RUN: yaml2obj %s --docnum=2 -o %t.nonull -+# RUN: llvm-objdump -p %t.nonull 2>&1 | FileCheck %s -DFILE=%t.nonull --check-prefix=NONULL -+ -+# NONULL: Program Header: -+# NONULL-NEXT: warning: '[[FILE]]': dynamic sections must be DT_NULL terminated -+# NONULL-EMPTY: -+ -+--- !ELF -+FileHeader: -+ Class: ELFCLASS64 -+ Data: ELFDATA2LSB -+ Type: ET_EXEC -+ Machine: EM_X86_64 -+Sections: -+ - Name: .dynamic -+ Type: SHT_DYNAMIC -+ Entries: -+ - Tag: DT_SONAME -+ Value: 1 -diff --git a/llvm/test/tools/llvm-objdump/ELF/invalid-phdr.test b/llvm/test/tools/llvm-objdump/ELF/invalid-phdr.test ---- a/llvm/test/tools/llvm-objdump/ELF/invalid-phdr.test -+++ b/llvm/test/tools/llvm-objdump/ELF/invalid-phdr.test -@@ -1,11 +1,11 @@ - ## Test how we handle the case when the e_phoff field is invalid. - # RUN: yaml2obj %s -o %t --# RUN: not llvm-objdump --private-headers %t 2>&1 | \ -+# RUN: llvm-objdump --private-headers %t 2>&1 | \ - # RUN: FileCheck -DFILE=%t %s --check-prefix=INVALID-PHOFF - - # INVALID-PHOFF: Program Header: - # INVALID-PHOFF-NEXT: warning: '[[FILE]]': unable to read program headers: program headers are longer than binary of size 280: e_phoff = 0xffffff, e_phnum = 0, e_phentsize = 0 --# INVALID-PHOFF-NEXT: error: '[[FILE]]': program headers are longer than binary of size 280: e_phoff = 0xffffff, e_phnum = 0, e_phentsize = 0 -+# INVALID-PHOFF-NEXT: warning: '[[FILE]]': program headers are longer than binary of size 280: e_phoff = 0xffffff, e_phnum = 0, e_phentsize = 0 - - --- !ELF - FileHeader: -diff --git a/llvm/test/tools/llvm-objdump/ELF/program-headers.test b/llvm/test/tools/llvm-objdump/ELF/program-headers.test ---- a/llvm/test/tools/llvm-objdump/ELF/program-headers.test -+++ b/llvm/test/tools/llvm-objdump/ELF/program-headers.test -@@ -278,12 +278,12 @@ - ## Check we report an error / warning when we are unable to read program headers. - ## Case A: the e_phentsize field is invalid. - # RUN: yaml2obj --docnum=2 -DPHENTSIZE=1 %s -o %t.phdr.err --# RUN: not llvm-objdump --private-headers %t.phdr.err 2>&1 | \ -+# RUN: llvm-objdump --private-headers %t.phdr.err 2>&1 | \ - # RUN: FileCheck %s -DFILE=%t.phdr.err --check-prefix=PHENTSIZE - - # PHENTSIZE: Program Header: - # PHENTSIZE-NEXT: warning: '[[FILE]]': unable to read program headers: invalid e_phentsize: 1 --# PHENTSIZE-NEXT: error: '[[FILE]]': invalid e_phentsize: 1 -+# PHENTSIZE-NEXT: warning: '[[FILE]]': invalid e_phentsize: 1 - - --- !ELF - FileHeader: -@@ -309,16 +309,16 @@ - - ## Check we report a warning / error when e_phoff goes 1 byte past the end of the file. - # RUN: yaml2obj --docnum=2 -DPHOFF=0x161 %s -o %t.phdr.err2 --# RUN: not llvm-objdump --private-headers %t.phdr.err2 2>&1 | \ -+# RUN: llvm-objdump --private-headers %t.phdr.err2 2>&1 | \ - # RUN: FileCheck %s -DFILE=%t.phdr.err2 --check-prefix=PHOFF -DOFF=0x161 - - # PHOFF: Program Header: - # PHOFF-NEXT: warning: '[[FILE]]': unable to read program headers: program headers are longer than binary of size 408: e_phoff = [[OFF]], e_phnum = 1, e_phentsize = 56 --# PHOFF-NEXT: error: '[[FILE]]': program headers are longer than binary of size 408: e_phoff = [[OFF]], e_phnum = 1, e_phentsize = 56 -+# PHOFF-NEXT: warning: '[[FILE]]': program headers are longer than binary of size 408: e_phoff = [[OFF]], e_phnum = 1, e_phentsize = 56 - - - ## Check we report a warning / error when the value of e_phoff is so large that - ## e_phoff + e_phnum * e_phentsize > UINT64_MAX. - # RUN: yaml2obj --docnum=2 -DPHOFF=0xffffffffffffffff %s -o %t.phdr.err3 --# RUN: not llvm-objdump --private-headers %t.phdr.err3 2>&1 | \ -+# RUN: llvm-objdump --private-headers %t.phdr.err3 2>&1 | \ - # RUN: FileCheck %s -DFILE=%t.phdr.err3 --check-prefix=PHOFF -DOFF=0xffffffffffffffff -diff --git a/llvm/tools/llvm-objdump/ELFDump.cpp b/llvm/tools/llvm-objdump/ELFDump.cpp ---- a/llvm/tools/llvm-objdump/ELFDump.cpp -+++ b/llvm/tools/llvm-objdump/ELFDump.cpp -@@ -171,8 +171,12 @@ - - template - static void printDynamicSection(const ELFFile &Elf, StringRef Filename) { -- ArrayRef DynamicEntries = -- unwrapOrError(Elf.dynamicEntries(), Filename); -+ auto DynamicEntriesOrErr = Elf.dynamicEntries(); -+ if (!DynamicEntriesOrErr) { -+ reportWarning(toString(DynamicEntriesOrErr.takeError()), Filename); -+ return; -+ } -+ ArrayRef DynamicEntries = *DynamicEntriesOrErr; - - // Find the maximum tag name length to format the value column properly. - size_t MaxLen = 0; - diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index ba47dd1e..b61d239d 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -45,7 +45,6 @@ SRC_URI = "\ file://0033-lldb-Link-with-libatomic-on-x86.patch \ file://0034-clang-exclude-openembedded-distributions-from-settin.patch \ file://0035-compiler-rt-Enable-__int128-for-ppc32.patch \ - file://D122505.diff \ " # Fallback to no-PIE if not set GCCPIE ??= "" From d93cac3f0de0f78c3ef0efa292c04586713307f5 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 9 Apr 2022 13:55:21 -0700 Subject: [PATCH 139/166] libclc: Export YOCTO_ALTERNATE_EXE_PATH and YOCTO_ALTERNATE_LIBDIR They need to be explicitly exported Signed-off-by: Khem Raj (cherry picked from commit 401ed263f0d3297a05d8ffbe2d7dbcba76828b41) --- recipes-devtools/clang/libclc_git.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes-devtools/clang/libclc_git.bb b/recipes-devtools/clang/libclc_git.bb index 3cc52b5f..e49c9764 100644 --- a/recipes-devtools/clang/libclc_git.bb +++ b/recipes-devtools/clang/libclc_git.bb @@ -35,3 +35,6 @@ EOF FILES:${PN} += "${datadir}/clc" BBCLASSEXTEND = "native nativesdk" + +export YOCTO_ALTERNATE_EXE_PATH +export YOCTO_ALTERNATE_LIBDIR From 783aedec970122b7cbac83a0e852602358cd294a Mon Sep 17 00:00:00 2001 From: Esben Haabendal Date: Tue, 12 Apr 2022 13:41:25 +0200 Subject: [PATCH 140/166] compiler-rt: Build builtins only for the default target We were never really supposed to build for multiple target architectures in one compiler-rt build, so let's use the feature created to do exactly that. This also happens to fix building for ARM softfp ABI builds, where the target architecture guessing logics ends up with: -- Builtin supported architectures: arm;armv6m And later on bailing out because of duplicate ninja rules: ninja: error: build.ninja:56765: multiple rules generate lib/clang/14.0.0/lib/linux/libclang_rt.builtins-arm.a [-w dupbuild=err] Signed-off-by: Esben Haabendal (cherry picked from commit 74c7f6524cddd258f916e8e4acfb9e49d1870b65) --- recipes-devtools/clang/compiler-rt_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index 55b33784..5d991bb2 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb @@ -50,7 +50,8 @@ OECMAKE_TARGET_COMPILE = "compiler-rt" OECMAKE_TARGET_INSTALL = "install-compiler-rt install-compiler-rt-headers" OECMAKE_SOURCEPATH = "${S}/llvm" EXTRA_OECMAKE += "-DCOMPILER_RT_STANDALONE_BUILD=OFF \ - -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=${HOST_ARCH}${HF}${HOST_VENDOR}-${HOST_OS} \ + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \ + -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH}${HF}${HOST_VENDOR}-${HOST_OS} \ -DCOMPILER_RT_BUILD_XRAY=OFF \ -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ -DCOMPILER_RT_BUILD_MEMPROF=OFF \ From 41f3139e90f62e3e21f9453eb2bc7fa3626f1e63 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 23 Apr 2022 23:49:52 -0700 Subject: [PATCH 141/166] musl: Build with clang on ppc64 The build issue is only seen on ppc32 Signed-off-by: Khem Raj (cherry picked from commit 07c1cf8e19afa529299dc3aed5c14cb42c0b8d8b) --- recipes-core/musl/musl_%.bbappend | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes-core/musl/musl_%.bbappend b/recipes-core/musl/musl_%.bbappend index e08e4a7a..51409687 100644 --- a/recipes-core/musl/musl_%.bbappend +++ b/recipes-core/musl/musl_%.bbappend @@ -7,4 +7,3 @@ TOOLCHAIN:x86-x32 = "gcc" # => 0x3f7fc2e8 <+0>: addis r27,r20,-22264 TOOLCHAIN:powerpc = "gcc" -TOOLCHAIN:powerpc64 = "gcc" From fe0f22347a915c3ce624e8c6a814d63ade4c6694 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 24 Apr 2022 10:55:25 -0700 Subject: [PATCH 142/166] clang: Enable altivec again for ppc32 This was disabled for musl issue which is not related to altivec Signed-off-by: Khem Raj (cherry picked from commit 10461fab44ebdcee5e06c2eeb943b4d08f817965) --- classes/clang.bbclass | 4 ---- 1 file changed, 4 deletions(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index a8f5dbe0..62815564 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -39,10 +39,6 @@ LDFLAGS:append:toolchain-clang = " ${COMPILER_RT} ${LIBCPLUSPLUS}" TUNE_CCARGS:remove:toolchain-clang = "-meb" TUNE_CCARGS:remove:toolchain-clang = "-mel" TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -mbig-endian", " -mlittle-endian", d)}" -# Qemu uses 7400 but fails to emulate VSX/altivec instrs e.g. xor and fails with illegal instructions especially on musl/strspn.c -# Workaround the qemu limitation by disable altivec in code generation, gcc does not use altivec, so code generated with clang is -# superior but sadly qemu starts to puke :(, maybe it will work ok on real hardware !! -TUNE_CCARGS:append:toolchain-clang = "${@bb.utils.contains("TUNE_FEATURES", "ppc7400", " -mno-altivec", "", d)}" # Clang does not yet support big.LITTLE performance tunes, so use the LITTLE for tunes TUNE_CCARGS:remove:toolchain-clang = "-mtune=cortex-a57.cortex-a53 -mtune=cortex-a72.cortex-a53 -mtune=cortex-a15.cortex-a7 -mtune=cortex-a17.cortex-a7 -mtune=cortex-a72.cortex-a35 -mtune=cortex-a73.cortex-a53 -mtune=cortex-a75.cortex-a55 -mtune=cortex-a76.cortex-a55" From f4af35f325c3be9dc9c5ca02efce326eea10cede Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 24 Apr 2022 11:18:48 -0700 Subject: [PATCH 143/166] clang.bbclass: Use BASELIB instead of base_libdir in YOCTO_ALTERNATE_LIBDIR base_libdir may vary e.g. when using usrmerge feature Signed-off-by: Khem Raj (cherry picked from commit e8b870b3c0a0ca0ef7d41551b6e8a607d1a39433) --- classes/clang.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 62815564..af179257 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -95,7 +95,7 @@ OVERRIDES[vardepsexclude] += "TOOLCHAIN RUNTIME" YOCTO_ALTERNATE_EXE_PATH:toolchain-clang:class-target = "${STAGING_BINDIR}/llvm-config" -YOCTO_ALTERNATE_LIBDIR:toolchain-clang:class-target = "${base_libdir}" +YOCTO_ALTERNATE_LIBDIR:toolchain-clang:class-target = "/${BASELIB}" #YOCTO_ALTERNATE_EXE_PATH:toolchain-clang:class-target[export] = "1" #YOCTO_ALTERNATE_LIBDIR:toolchain-clang:class-target[export] = "1" From 43b499765f6eaeb3a3e61a5f493e6b25dac587b9 Mon Sep 17 00:00:00 2001 From: Esben Haabendal Date: Thu, 7 Apr 2022 14:32:43 +0200 Subject: [PATCH 144/166] compiler-rt: Fix nativesdk building Signed-off-by: Esben Haabendal (cherry picked from commit f3c3e492285b57b269916b795b2e8b8767eb6179) --- recipes-devtools/clang/compiler-rt_git.bb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index 5d991bb2..552c6f7b 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb @@ -22,9 +22,14 @@ INHIBIT_DEFAULT_DEPS = "1" DEPENDS += "ninja-native libgcc" DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc gcc-runtime" -DEPENDS:append:class-nativesdk = " clang-native" +DEPENDS:append:class-nativesdk = " clang-native clang-crosssdk-${SDK_ARCH} nativesdk-gcc-runtime" DEPENDS:append:class-native = " clang-native" +# Trick clang.bbclass into not creating circular dependencies +UNWINDLIB:class-nativesdk = "--unwindlib=libgcc" +COMPILER_RT:class-nativesdk:toolchain-clang:runtime-llvm = "-rtlib=libgcc --unwindlib=libgcc" +LIBCPLUSPLUS:class-nativesdk:toolchain-clang:runtime-llvm = "-stdlib=libstdc++" + CXXFLAGS += "-stdlib=libstdc++" LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" BUILD_CXXFLAGS += "-stdlib=libstdc++" From 05209dac7446d2a389009a327ee3c27d7247c22c Mon Sep 17 00:00:00 2001 From: Esben Haabendal Date: Thu, 7 Apr 2022 14:34:31 +0200 Subject: [PATCH 145/166] libcxx: Fix nativesdk building Signed-off-by: Esben Haabendal (cherry picked from commit 12a5f8be1201fa1fcb62aa004542279d5c9acae0) --- recipes-devtools/clang/libcxx_git.bb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index f7fcd1a4..b8df601b 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb @@ -21,12 +21,19 @@ PACKAGECONFIG[unwind-shared] = "-DLIBUNWIND_ENABLE_SHARED=ON,-DLIBUNWIND_ENABLE_ DEPENDS += "ninja-native" DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" +DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_ARCH} nativesdk-compiler-rt" DEPENDS:append:class-native = " clang-native" LIBCPLUSPLUS = "" COMPILER_RT ?= "-rtlib=compiler-rt" +# Trick clang.bbclass into not creating circular dependencies +UNWINDLIB:class-nativesdk = "--unwindlib=libgcc" +COMPILER_RT:class-nativesdk = "-rtlib=libgcc --unwindlib=libgcc" +LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++" + CC:append:toolchain-clang:class-native = " -unwindlib=libgcc -rtlib=libgcc" +CC:append:toolchain-clang:class-nativesdk = " -unwindlib=libgcc -rtlib=libgcc" CXXFLAGS += "-stdlib=libstdc++" LDFLAGS += "-unwindlib=libgcc -stdlib=libstdc++" From 8186e84a5515debceb763c4aafa8bd8c67f6eb25 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 29 Apr 2022 10:40:55 -0700 Subject: [PATCH 146/166] clang: Upgrade to 14.0.3 Brings these changes * 1f9140064dfb Bump version to 14.0.3 * 2e7e14177186 workflows: Add a test to ensure that the LLVM version is correct * 0e27d08cdeb3 [RISCV] Fix crash for section alignment with .option norvc * a36801750327 [asan] Always skip first object from dl_iterate_phdr * 1f4c7b2a9120 [RISCV] Don't emit fractional VIDs with negative steps * e19be4195b87 [RISCV] Add another test showing incorrect BUILD_VECTOR lowering * 9efcce92b55b [RISCV] Fix lowering of BUILD_VECTORs as VID sequences * 21ce6cfd1d93 [RISCV] Add tests showing incorrect BUILD_VECTOR lowering * 58d5fbe2c20b [llvm-mt] Add support /notify_update * 50c6ba751fa2 [RISCV] Only try LUI+SH*ADD+ADDI for int materialization if LUI+ADDI+SH*ADD failed. * dc30b0d3320d [ELF] --emit-relocs: fix missing STT_SECTION when the first input section is synthetic * 324127d8da95 [libcxx] Add some missing xlocale wrapper functions for OpenBSD * ebf29ba9f0a3 [LV] Remove stray debug dump added in 0d2efbb8b82c. * 0d2efbb8b82c [LV] Always use add to add scalar iv and (startidx + step) for ints. * e7a9fd4f57d6 [LV] Add test case for PR54427. * 9a3e81e1f91f [InstCombine] canonicalize select with signbit test * b83c4a2dc0fb [x86] Fix infinite loop inside DAG combiner with lzcnt feature. * 0fbe860711be [Clang][Fortify] drop inline decls when redeclared * 571c7d8f6dae Reland "[llvm][AArch64] Insert "bti j" after call to setjmp" * 0f56ce0fb207 [DebugInfo][InstrRef] Avoid a crash from mixed variable location modes * e8f03f2057ee Force GHashCell to be 8-byte-aligned. * 09fba23d41f7 [compiler-rt] Implement __clear_cache on FreeBSD/powerpc * 33504b3bbe10 [PowerPC] Allow absolute expressions in relocations * 3400d0293a14 [CMake] Update cache file for Win to ARM Linux cross toolchain builders. NFC. * 6c41c8edb0cc [CMake] Replace `TARGET_TRIPLE` with `TOOLCHAIN_TARGET_TRIPLE` for Win-to-Arm cross toolchain cache file. NFC. * b6dbee34387d [CMake] Update cache file for Win to ARM cross tooolchain. NFC. * 46d19f3a8699 [CMake] Use CMAKE_SYSROOT to build libs for Win to ARM cross tooolchain. NFC. * e11b929a3c97 [LLD][COFF] Fix TypeServerSource matcher with more than one collision * d800180f6bee [lld][COFF] Fix TypeServerSource lookup on GUID collisions * 8c3445ac1c8b [AArch64][LOH] Don't ignore regmasks in bundles by iterating over instrs. * 43ee392dd462 [InstCombine] try to fold low-mask of ashr to lshr * 5ea5e3c01b7b [InstCombine] add tests for low-mask of ashr; NFC * fe8a27acd716 [LV] Handle zero cost loops in selectInterleaveCount. * 2c4d288eae8b [RISCV][NFC] Add missing lit.local.cfg in test/CodeGen/MIR/RISCV/ * d0f27fb44952 [RISCV] Fixing stack offset for RVV object with vararg in stack. * b6e91d4a331e [RISCV] Pre-commit for fixing stack offset for RVV object * 87599bdabbd1 [RISCV] Store/restore RISCVMachineFunctionInfo into MIR YAML file * 5c9eed741dbd [libc++] Make __dir_stream visibility declaration consistent * c62053979489 [AArch64] Fix the upper limit for folded address offsets for COFF * 6697c5bc3a1e [compiler-rt] [scudo] Use -mcrc32 on x86 when available * 8475349bd639 [AARCH64] ssbs should be enabled by default for cortex-x1, cortex-x1c, cortex-a77 * d4e3c50b2bda [libc++] Define `namespace views` in its own detail header. Signed-off-by: Khem Raj (cherry picked from commit 85d956d95401479ca666139e31f662f60c156d5f) --- conf/layer.conf | 2 +- recipes-devtools/clang/clang.inc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/layer.conf b/conf/layer.conf index d18e5adb..83472f00 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -32,7 +32,7 @@ INHERIT += "clang" # Do not include clang in SDK unless user wants to CLANGSDK ??= "0" -LLVMVERSION = "14.0.1" +LLVMVERSION = "14.0.3" require conf/nonclangable.conf require conf/nonscanable.conf diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 8c5cedf8..90c7ae86 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -6,9 +6,9 @@ LLVM_GIT_PROTOCOL ?= "https" MAJOR_VER = "14" MINOR_VER = "0" -PATCH_VER = "1" +PATCH_VER = "3" -SRCREV ?= "ec13fed5867f674bb96ab5502629ec209ef5a73a" +SRCREV ?= "1f9140064dfbfb0bbda8e51306ea51080b2f7aac" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/14.x" From a87f9746de244764b4b77c5411f4947e976ad2df Mon Sep 17 00:00:00 2001 From: Esben Haabendal Date: Wed, 25 May 2022 10:42:15 +0200 Subject: [PATCH 147/166] compiler-rt: Build clang_rt.profile library when possible To enable clang_rt.profile library do something like the following in local.conf or your distro configuration. PACKAGECONFIG:pn-compiler-rt = "profile" The clang_rt.profile library is used to collect coverage information. It is a static library, so does not introduce any additional footprint in target images. Signed-off-by: Esben Haabendal (cherry picked from commit 659d43190d906b6e6081deb48a4bdb038eea0f27) (cherry picked from commit cd7b2f8c90962bef4e8b272ce6863a57b73f20fc) --- recipes-devtools/clang/compiler-rt_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index 552c6f7b..18aaa381 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb @@ -47,6 +47,7 @@ BUILD_NM:toolchain-clang = "llvm-nm" PACKAGECONFIG ??= "" PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" +PACKAGECONFIG[profile] ="-DCOMPILER_RT_BUILD_PROFILE=ON,-DCOMPILER_RT_BUILD_PROFILE=OFF" HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" HF[vardepvalue] = "${HF}" @@ -61,7 +62,6 @@ EXTRA_OECMAKE += "-DCOMPILER_RT_STANDALONE_BUILD=OFF \ -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ -DCOMPILER_RT_BUILD_MEMPROF=OFF \ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \ - -DCOMPILER_RT_BUILD_PROFILE=ON \ -DLLVM_ENABLE_PROJECTS='compiler-rt' \ -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \ " From 6c42fe660d58496c5984f6f02384b81384677a89 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Wed, 22 Jun 2022 16:17:12 +0200 Subject: [PATCH 148/166] compiler-rt: backport a patch fixing ARMv5 cross-compile Compiler-rt cross-compile for ARMv5 fails because D99282 made it an error if DMB is used for any pre-ARMv6 targets. More specifically, the "#error only supported on ARMv6+" added in D99282 will cause compilation to fail when any source file which includes assembly.h are compiled for pre-ARMv6 targets. Since the only place where DMB is used is syn-ops.h (which is only included by arm/sync_fetch_and_* and these files are excluded from being built for older targets), this patch moves the definition there to avoid the issues described above. Signed-off-by: Ming Liu (cherry picked from commit 36c4dc63c96fb0962d3825c19b22a166db0f3e4f) --- ...tins-Move-DMB-definition-to-syn-opsh.patch | 65 +++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 2 files changed, 66 insertions(+) create mode 100644 recipes-devtools/clang/clang/0036-compiler-rt-builtins-Move-DMB-definition-to-syn-opsh.patch diff --git a/recipes-devtools/clang/clang/0036-compiler-rt-builtins-Move-DMB-definition-to-syn-opsh.patch b/recipes-devtools/clang/clang/0036-compiler-rt-builtins-Move-DMB-definition-to-syn-opsh.patch new file mode 100644 index 00000000..36166455 --- /dev/null +++ b/recipes-devtools/clang/clang/0036-compiler-rt-builtins-Move-DMB-definition-to-syn-opsh.patch @@ -0,0 +1,65 @@ +From 1c9415806ba6d0d48a160637eea7d1b70efaae69 Mon Sep 17 00:00:00 2001 +From: Pengxuan Zheng +Date: Mon, 4 Apr 2022 18:17:03 -0700 +Subject: [PATCH] [compiler-rt][builtins] Move DMB definition to syn-ops.h + +Upstream-Status: Backported + +Compiler-rt cross-compile for ARMv5 fails because D99282 made it an error if DMB +is used for any pre-ARMv6 targets. More specifically, the "#error only supported +on ARMv6+" added in D99282 will cause compilation to fail when any source file +which includes assembly.h are compiled for pre-ARMv6 targets. Since the only +place where DMB is used is syn-ops.h (which is only included by +arm/sync_fetch_and_* and these files are excluded from being built for older +targets), this patch moves the definition there to avoid the issues described +above. + +Reviewed By: efriedma + +Differential Revision: https://reviews.llvm.org/D123105 +--- + compiler-rt/lib/builtins/arm/sync-ops.h | 8 ++++++++ + compiler-rt/lib/builtins/assembly.h | 8 -------- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/compiler-rt/lib/builtins/arm/sync-ops.h b/compiler-rt/lib/builtins/arm/sync-ops.h +index d914f9d3a109..dca201d8aef7 100644 +--- a/compiler-rt/lib/builtins/arm/sync-ops.h ++++ b/compiler-rt/lib/builtins/arm/sync-ops.h +@@ -14,6 +14,14 @@ + + #include "../assembly.h" + ++#if __ARM_ARCH >= 7 ++#define DMB dmb ++#elif __ARM_ARCH >= 6 ++#define DMB mcr p15, #0, r0, c7, c10, #5 ++#else ++#error DMB is only supported on ARMv6+ ++#endif ++ + #define SYNC_OP_4(op) \ + .p2align 2; \ + .syntax unified; \ +diff --git a/compiler-rt/lib/builtins/assembly.h b/compiler-rt/lib/builtins/assembly.h +index 06aa18162e3b..69a3d8620f92 100644 +--- a/compiler-rt/lib/builtins/assembly.h ++++ b/compiler-rt/lib/builtins/assembly.h +@@ -189,14 +189,6 @@ + JMP(ip) + #endif + +-#if __ARM_ARCH >= 7 +-#define DMB dmb +-#elif __ARM_ARCH >= 6 +-#define DMB mcr p15, #0, r0, c7, c10, #5 +-#else +-#error Only use this with ARMv6+ +-#endif +- + #if defined(USE_THUMB_2) + #define WIDE(op) op.w + #else +-- +2.25.1 + diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index b61d239d..7cbd7f45 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -45,6 +45,7 @@ SRC_URI = "\ file://0033-lldb-Link-with-libatomic-on-x86.patch \ file://0034-clang-exclude-openembedded-distributions-from-settin.patch \ file://0035-compiler-rt-Enable-__int128-for-ppc32.patch \ + file://0036-compiler-rt-builtins-Move-DMB-definition-to-syn-opsh.patch \ " # Fallback to no-PIE if not set GCCPIE ??= "" From db1b7ad4d38fe656e486056c0bf6454a15d937bc Mon Sep 17 00:00:00 2001 From: Esben Haabendal Date: Wed, 29 Jun 2022 16:22:56 +0200 Subject: [PATCH 149/166] clang: Fix native and nativesdk builds for hf targets Setting the ${HF} variable based on ${TUNE_CCARGS_MFLOAT} does only make sense for target builds, as it defines arguments for target. Without this fix, building with hf machine configuration will cause problems, as native and nativesdk triplets will be include "hf", something like "x86_64hf-linux", which is wrong and not recognized by LLVM build/configuration system. Signed-off-by: Esben Haabendal (cherry picked from commit 9cea73660aa56b461f96487ddcbfba5e7b64fafb) (cherry picked from commit d669d873edf68dc7440bb07096737203bb7ec505) --- recipes-devtools/clang/clang_git.bb | 3 ++- recipes-devtools/clang/compiler-rt-sanitizers_git.bb | 3 ++- recipes-devtools/clang/compiler-rt_git.bb | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 2ba01591..1ff8f815 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -105,7 +105,8 @@ LLVM_TARGETS_TO_BUILD ?= "AMDGPU;AArch64;ARM;BPF;Mips;PowerPC;RISCV;X86" LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ?= "" LLVM_EXPERIMENTAL_TARGETS_TO_BUILD:append = ";${@get_clang_experimental_target_arch(bb, d)}" -HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" +HF = "" +HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" HF[vardepvalue] = "${HF}" LLVM_PROJECTS ?= "clang;clang-tools-extra;lld${LLDB}" diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb index 18ec31d8..21c5e166 100644 --- a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb @@ -23,7 +23,8 @@ PACKAGECONFIG ??= "" PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" PACKAGECONFIG[static-libcxx] = "-DSANITIZER_USE_STATIC_CXX_ABI=ON -DSANITIZER_USE_STATIC_LLVM_UNWINDER=ON,," -HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" +HF = "" +HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" HF[vardepvalue] = "${HF}" OECMAKE_TARGET_COMPILE = "compiler-rt" diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index 18aaa381..203a8df5 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb @@ -49,7 +49,8 @@ PACKAGECONFIG ??= "" PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" PACKAGECONFIG[profile] ="-DCOMPILER_RT_BUILD_PROFILE=ON,-DCOMPILER_RT_BUILD_PROFILE=OFF" -HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" +HF = "" +HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" HF[vardepvalue] = "${HF}" OECMAKE_TARGET_COMPILE = "compiler-rt" From eb525a386afb569058e8ce89484b2245a818a5ab Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Thu, 11 Aug 2022 10:42:38 +0800 Subject: [PATCH 150/166] spirv-llvm-translator: fix branch name Upstream doesn't have a branch 'master' anymore so switch to using LLVM 14 specific branch. meta-clang master uses main branch so that doesn't have this problem. Signed-off-by: Anuj Mittal (cherry picked from commit 7952eba1d16264b605682ae1ccbea4d8c6e9fcac) --- .../spirv-llvm-translator/spirv-llvm-translator_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb index eb2618cb..d3d0f6b7 100644 --- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb @@ -1,7 +1,7 @@ LICENSE = "NCSA" LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=47e311aa9caedd1b3abf098bd7814d1d" -BRANCH = "master" +BRANCH = "llvm_release_140" SRC_URI = "git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;branch=${BRANCH} \ git://github.com/KhronosGroup/SPIRV-Headers;protocol=https;destsuffix=git/SPIRV-Headers;name=headers;branch=master \ " From ad5f48d918e9a79bed7320aed9f0d55c6bdd282c Mon Sep 17 00:00:00 2001 From: Mamta Shukla Date: Thu, 8 Sep 2022 13:31:38 +0000 Subject: [PATCH 151/166] compiler-rt-sanitizer: fix nativesdk-compiler-rt-sanitizers build Signed-off-by: Mamta Shukla (cherry picked from commit 8e53d8f91b0afd9d9076c5e052297cfd5d494db6) --- recipes-devtools/clang/compiler-rt-sanitizers_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb index 21c5e166..50a8cb7d 100644 --- a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb @@ -17,7 +17,7 @@ TUNE_CCARGS:remove = "-no-integrated-as" DEPENDS += "ninja-native virtual/crypt" DEPENDS:append:class-native = " clang-native libxcrypt-native" -DEPENDS:append:class-nativesdk = " clang-native nativesdk-libxcrypt" +DEPENDS:append:class-nativesdk = " clang-native clang-crosssdk-${SDK_ARCH} nativesdk-libxcrypt" PACKAGECONFIG ??= "" PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" From 8ff1ebc4be61e36f78e21df9f9dbe6743fe66027 Mon Sep 17 00:00:00 2001 From: Mamta Shukla Date: Tue, 20 Sep 2022 16:42:22 +0200 Subject: [PATCH 152/166] compiler-rt-sanitizers: fix multiple installations for orc lib remove libclang_rt.orc and c_orc.h header since it is being installed by both compiler-rt and compiler-rt-sanitizer when built for arm. Signed-off-by: Mamta Shukla (cherry picked from commit ed5ac4ff7a8d3704f2d2fe9db659304d1b360e2c) --- recipes-devtools/clang/compiler-rt-sanitizers_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb index 50a8cb7d..bf293646 100644 --- a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb @@ -61,7 +61,8 @@ do_install:append () { rmdir --ignore-fail-on-non-empty ${D}${libdir} fi # Already shipped with compile-rt Orc support - rm -rf ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.orc-x86_64.a + rm -rf ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.orc-*.a + rm -rf ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/include/orc/ } FILES_SOLIBSDEV = "" From 022f0f90e19ca4bfe6960682466aa4154ccdf26c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 28 Jul 2022 09:24:26 -0700 Subject: [PATCH 153/166] clang: Add compiler-rt and libcxx to build time depends for target These are not staged into sysroot otherwise and cmake fails to configure Signed-off-by: Khem Raj (cherry picked from commit 5d6c7c189e4abdfc3e4b309f7edadcbddb9236eb) --- recipes-devtools/clang/clang_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 1ff8f815..65c280c8 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -193,7 +193,7 @@ EXTRA_OECMAKE:append:class-target = "\ DEPENDS = "binutils zlib libffi libxml2 libxml2-native ninja-native swig-native" DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_ARCH} virtual/${TARGET_PREFIX}binutils-crosssdk nativesdk-python3" -DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} python3" +DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} python3 compiler-rt libcxx" RRECOMMENDS:${PN} = "binutils" RRECOMMENDS:${PN}:append:class-target = " libcxx-dev" From b5675015e027ff9e965c45b09042c257ffa32f65 Mon Sep 17 00:00:00 2001 From: Aleksey Smirnov Date: Thu, 8 Dec 2022 16:36:26 +0300 Subject: [PATCH 154/166] nonclangable.conf: Add new exceptions Add "erlang" for all architectures (found on riscv64 and x86-64) Add "grub" for x86-64 architecture Use proper OBJCOPY for "linux-yocto" for all architectures Signed-off-by: Aleksey Smirnov Signed-off-by: Khem Raj (cherry picked from commit f7fa299e3e759f0cd9bcd57fffcf8d9051e5d2ea) --- conf/nonclangable.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index d93c7440..78d18b3a 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -2,6 +2,13 @@ TOOLCHAIN:pn-u-boot = "gcc" # crash embeds version of gdb which is not buildable with clang TOOLCHAIN:pn-crash = "gcc" TOOLCHAIN:pn-elfutils = "gcc" + +#| erl_bits.c:(.text+0xc2a): undefined reference to `__extendhfsf2' +#| erl_bits.c:(.text+0x1bfa): undefined reference to `__truncsfhf2' +#| clang-15: error: linker command failed with exit code 1 (use -v to see invocation) +# both riscv64 and x86-64 +TOOLCHAIN:pn-erlang = "gcc" + # /mnt/a/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/firefox/60.1.0esr-r0/recipe-sysroot-native/usr/lib/clang/7.0.1/include/arm_neon.h:433:1: error: unknown type name 'inline' # __ai uint8x16_t vabdq_u8(uint8x16_t __p0, uint8x16_t __p1) { TOOLCHAIN:pn-firefox = "gcc" @@ -320,6 +327,10 @@ TOOLCHAIN_pn-u-boot-seco-imx = "gcc" # see https://bugs.llvm.org/show_bug.cgi?id=50443 this is in clang-13, until it is fixed do not use -O2 SELECTED_OPTIMIZATION:remove:pn-poke:toolchain-clang = "-O2" +# Subprocess output:mips-yoe-linux-llvm-objcopy: error: Link field value 22 in section .rel.dyn is not a symbol table +# also seen on riscv64 and x86-64 +OBJCOPY:pn-linux-yocto:toolchain-clang = "${HOST_PREFIX}objcopy" + # see https://github.com/llvm/llvm-project/issues/53948 OBJCOPY:pn-opensbi:toolchain-clang = "${HOST_PREFIX}objcopy" OBJCOPY:pn-libc-bench:toolchain-clang = "${HOST_PREFIX}objcopy" From 21782e068ec5b72c7ec2c095720caebea0cc277a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 15 Dec 2022 10:41:47 -0800 Subject: [PATCH 155/166] linux-yocto: Use binutils provided strip We are not _yet_ using clang as kernel compiler Signed-off-by: Khem Raj (cherry picked from commit 299a5fd24b7bee2191127c9fef8bd39d807f3492) --- conf/nonclangable.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index 78d18b3a..eec18c4b 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -330,6 +330,7 @@ SELECTED_OPTIMIZATION:remove:pn-poke:toolchain-clang = "-O2" # Subprocess output:mips-yoe-linux-llvm-objcopy: error: Link field value 22 in section .rel.dyn is not a symbol table # also seen on riscv64 and x86-64 OBJCOPY:pn-linux-yocto:toolchain-clang = "${HOST_PREFIX}objcopy" +STRIP:pn-linux-yocto:toolchain-clang = "${HOST_PREFIX}strip" # see https://github.com/llvm/llvm-project/issues/53948 OBJCOPY:pn-opensbi:toolchain-clang = "${HOST_PREFIX}objcopy" From 7cd11b4b71e9e28de1190280feb2ce9b066e96e3 Mon Sep 17 00:00:00 2001 From: Jan Dorniak Date: Mon, 19 Dec 2022 05:27:18 +0100 Subject: [PATCH 156/166] Fix OpenMP builds with thin LTO enabled. When built with thin LTO enabled, LLVM produces object files containing LLVM IR, which ld can't understand. Since we're forcing the toolchain to clang anyway, let's also force using lld. Fixes GitHub #708 Signed-off-by: Jan Dorniak (cherry picked from commit bc8388c622c62cde24512d5b4473ede1f5710348) --- recipes-devtools/clang/openmp_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-devtools/clang/openmp_git.bb b/recipes-devtools/clang/openmp_git.bb index b1f1a8d8..90b839ca 100644 --- a/recipes-devtools/clang/openmp_git.bb +++ b/recipes-devtools/clang/openmp_git.bb @@ -12,6 +12,8 @@ TOOLCHAIN = "clang" LIC_FILES_CHKSUM = "file://openmp/LICENSE.TXT;md5=d75288d1ce0450b28b8d58a284c09c79" +LDFLAGS:append = " -fuse-ld=lld" + inherit cmake pkgconfig perlnative DEPENDS += "elfutils libffi clang" From 36179c9d866e7124b64c2f75f0f6a2f51e8cdbb4 Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Mon, 16 Jan 2023 08:21:47 +0100 Subject: [PATCH 157/166] llvm-project-source: fix create-spdx handling as the recipe populates the shared source tree as part of do_patch, but create-spdx does only wait for do_unpack. Add an explicit dependency to wait to avoid race conditions Signed-off-by: Konrad Weihmann (cherry picked from commit dc95c5ee548526c615e8ee740a00c93abbe5da1a) --- recipes-devtools/clang/llvm-project-source.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-devtools/clang/llvm-project-source.inc b/recipes-devtools/clang/llvm-project-source.inc index 4afd1bb9..f7b4da01 100644 --- a/recipes-devtools/clang/llvm-project-source.inc +++ b/recipes-devtools/clang/llvm-project-source.inc @@ -86,3 +86,5 @@ python add_distro_vendor() { } do_patch[postfuncs] += "add_distro_vendor" +do_create_spdx[depends] += "${PN}:do_patch" + From c2e73cd3789b87c3de7ace5b181bff0eced18124 Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Mon, 16 Jan 2023 08:25:26 +0100 Subject: [PATCH 158/166] common-source: fix create-spdx handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - do_create_spdx does have to wait till the shared source tree is properly populated - override the spdx class code detection to determine if sources are under work-shared. the core code does only look at WORKDIR, which isn’t overridden in every case, more likely only S and B are touched, which make the spdx class code assume that these are per-workdir sources and starts to remove the shared sources via bitbake’s cleandirs settings. Avoid that by let the code always handle recipes including common-source as shared sources. Relates to #721 Signed-off-by: Konrad Weihmann (cherry picked from commit b7c0dcc4bc7f0d273f14cc0a70bcad5555a4be04) --- recipes-devtools/clang/common-source.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes-devtools/clang/common-source.inc b/recipes-devtools/clang/common-source.inc index e7fb06fb..cd95453f 100644 --- a/recipes-devtools/clang/common-source.inc +++ b/recipes-devtools/clang/common-source.inc @@ -9,3 +9,9 @@ SRC_URI = "" do_configure[depends] += "llvm-project-source-${PV}:do_patch" do_populate_lic[depends] += "llvm-project-source-${PV}:do_unpack" +do_create_spdx[depends] += "llvm-project-source-${PV}:do_patch" + +# spdx shared workdir detection fails as not WORKDIR is altered but S and B +# return always true to fix that +def is_work_shared_spdx(d): + return True From 406f811d926b127717574ea9c1b697f98065d0b4 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 11 Jan 2023 09:58:21 -0800 Subject: [PATCH 159/166] llvm-project-source: Ensure deploy_source_date_epoch sstate hash doesn't change if machines are switched, do_deploy_source_date_epoch would re-run as the stamps are tune specific Signed-off-by: Khem Raj (cherry picked from commit 16c67b492aeb5f356688858b2bafda75fec49069) Signed-off-by: Jose Quaresma (cherry picked from commit e33eec34a85bac111efbf034dfe782fe3c105b05) --- recipes-devtools/clang/llvm-project-source.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes-devtools/clang/llvm-project-source.inc b/recipes-devtools/clang/llvm-project-source.inc index f7b4da01..6bcb29f1 100644 --- a/recipes-devtools/clang/llvm-project-source.inc +++ b/recipes-devtools/clang/llvm-project-source.inc @@ -8,7 +8,6 @@ RM_WORK_EXCLUDE += "${PN}" inherit nopackages PN = "llvm-project-source-${PV}" - WORKDIR = "${TMPDIR}/work-shared/llvm-project-source-${PV}-${PR}" SSTATE_SWSPEC = "sstate:llvm-project-source::${PV}:${PR}::${SSTATE_VERSION}:" @@ -18,6 +17,13 @@ STAMPCLEAN = "${STAMPS_DIR}/work-shared/llvm-project-source-${PV}-*" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "" PACKAGES = "" +TARGET_ARCH = "allarch" +TARGET_AS_ARCH = "none" +TARGET_CC_ARCH = "none" +TARGET_LD_ARCH = "none" +TARGET_OS = "linux" +baselib = "lib" +PACKAGE_ARCH = "all" # space separated list of additional distro vendor values we want to support e.g. # "yoe webos" or "-yoe -webos" '-' is optional From d9dafd1e7f03ce4bd3ebe6ca85b6ca740eea3655 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 13 Feb 2023 23:03:46 -0800 Subject: [PATCH 160/166] clang: Move .so symlinks to -dev package fixes multilib build Fixes ERROR: lib32-clang-15.0.7-r0 do_package_qa: QA Issue: non -dev/-dbg/nativesdk- package lib32-liblldb contains symlink .so '/usr/lib/liblldbIntelFeatures.so' non -dev/-dbg/nativesdk- package lib32-liblldb contains symlink .so '/usr/lib/liblldb.so' [dev-so] ERROR: lib32-clang-15.0.7-r0 do_package_qa: Fatal QA errors were found, failing task. Signed-off-by: Khem Raj (cherry picked from commit 56a8534b6d7f029914e5ed91cae994dac26fcf24) --- recipes-devtools/clang/clang_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 65c280c8..3cf874ee 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -283,8 +283,8 @@ FILES:lldb-server = "\ " FILES:liblldb = "\ - ${libdir}/liblldbIntelFeatures.so* \ - ${libdir}/liblldb.so* \ + ${libdir}/liblldbIntelFeatures.so.* \ + ${libdir}/liblldb.so.* \ " FILES:${PN}-libllvm =+ "\ From 7846d31938ca5eda26f5e96b8ceb65e9605e4aa7 Mon Sep 17 00:00:00 2001 From: mzink89 Date: Fri, 21 Apr 2023 10:49:43 +0200 Subject: [PATCH 161/166] Add missing scan-build runtime dependencies * The perl scan-build script need some perl-modules to be executable Signed-off-by: Michel Zink (cherry picked from commit 68ec449f97ffa58d835163581fc72afcb08f027b) --- recipes-devtools/clang/clang_git.bb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 3cf874ee..f6700474 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -258,6 +258,18 @@ PROVIDES:append:class-native = " llvm-native" BBCLASSEXTEND = "native nativesdk" +RDEPENDS:${PN} += "\ + perl-module-digest-md5 \ + perl-module-file-basename \ + perl-module-file-copy \ + perl-module-file-find \ + perl-module-file-path \ + perl-module-findbin \ + perl-module-hash-util \ + perl-module-sys-hostname \ + perl-module-term-ansicolor \ +" + RDEPENDS:lldb += "${PN}-lldb-python" FILES:${PN}-lldb-python = "${libdir}/python*/site-packages/lldb/*" From a224d23197200740b1dbf90db5b2605f98ed51e4 Mon Sep 17 00:00:00 2001 From: Naveen Saini Date: Fri, 12 May 2023 13:56:48 +0800 Subject: [PATCH 162/166] llvm-config: add --libfiles option --libfiles Fully qualified library filenames for makefile depends. This option is being used by ispc cmake. https://github.com/ispc/ispc/blob/main/cmake/FindLLVM.cmake#L116 Signed-off-by: Naveen Saini (cherry picked from commit b9df71259272cc4e3078e92614720756ccb05845) --- recipes-devtools/clang/clang/llvm-config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes-devtools/clang/clang/llvm-config b/recipes-devtools/clang/clang/llvm-config index 7788bd5b..b405604c 100644 --- a/recipes-devtools/clang/clang/llvm-config +++ b/recipes-devtools/clang/clang/llvm-config @@ -22,6 +22,11 @@ if [[ $1 == "--bindir" ]]; then exec "$NEXT_LLVM_CONFIG" $@ fi +if [[ $1 == "--libfiles" ]]; then + exec "$NEXT_LLVM_CONFIG" $@ +fi + + for arg in "$@"; do case "$arg" in --cppflags) From 3ba0e570ae020388109b71db33829cca23be4339 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Sat, 13 May 2023 18:16:53 +0200 Subject: [PATCH 163/166] clang.bbclass: create lld symbolic link in sysroot when ld-is-lld is set Create a symbolic link lld -> ld in recipe sysroot to choose the default linker lld when ld-is-lld is set in DISTRO_FEATURES. othereise, we can get linking issues when '-fuse-ld=lld' is in LDFLAGS but the actual ld is not lld. Signed-off-by: Ming Liu (cherry picked from commit 71321ddf78ea522b87a6b4bffefb14c988a6d921) --- classes/clang.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index af179257..74226089 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -140,6 +140,16 @@ set( CMAKE_CLANG_TIDY ${HOST_PREFIX}clang-tidy ) EOF sed -i 's/ -mmusl / /g' ${WORKDIR}/toolchain.cmake } + +RECIPESYSROOTFUNCS = "" +RECIPESYSROOTFUNCS:toolchain-clang = "recipe_sysroot_check_ld_is_lld" + +recipe_sysroot_check_ld_is_lld () { + if "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', 'true', 'false', d)}"; then + ln -srf ${RECIPE_SYSROOT_NATIVE}${bindir}/${TARGET_SYS}/${TARGET_PREFIX}ld.lld ${RECIPE_SYSROOT_NATIVE}${bindir}/${TARGET_SYS}/${TARGET_PREFIX}ld + fi +} +do_prepare_recipe_sysroot[postfuncs] += "${RECIPESYSROOTFUNCS}" # # dump recipes which still use gcc #python __anonymous() { From 98a2a4bcae3d9be7af55290500a0586df5919487 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 29 Jul 2022 12:44:56 -0700 Subject: [PATCH 164/166] sanitizer: Fix build with glibc 2.36 Signed-off-by: Khem Raj (cherry picked from commit 013b5eeb580bc13b156aaf77d0c1175f75b89671) --- ...-include-linux-fs.h-to-resolve-fscon.patch | 62 +++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 2 files changed, 63 insertions(+) create mode 100644 recipes-devtools/clang/clang/0037-sanitizer-Remove-include-linux-fs.h-to-resolve-fscon.patch diff --git a/recipes-devtools/clang/clang/0037-sanitizer-Remove-include-linux-fs.h-to-resolve-fscon.patch b/recipes-devtools/clang/clang/0037-sanitizer-Remove-include-linux-fs.h-to-resolve-fscon.patch new file mode 100644 index 00000000..fee7a95a --- /dev/null +++ b/recipes-devtools/clang/clang/0037-sanitizer-Remove-include-linux-fs.h-to-resolve-fscon.patch @@ -0,0 +1,62 @@ +From 2095a89e5724866ae20d7f123b1c12b2758b58bd Mon Sep 17 00:00:00 2001 +From: Fangrui Song +Date: Mon, 11 Jul 2022 12:53:34 -0700 +Subject: [PATCH] [sanitizer] Remove #include to resolve + fsconfig_command/mount_attr conflict with glibc 2.36 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It is generally not a good idea to mix usage of glibc headers and Linux UAPI +headers (https://sourceware.org/glibc/wiki/Synchronizing_Headers). In glibc +since 7eae6a91e9b1670330c9f15730082c91c0b1d570 (milestone: 2.36), sys/mount.h +defines `fsconfig_command` which conflicts with linux/mount.h: + + .../usr/include/linux/mount.h:95:6: error: redeclaration of ‘enum fsconfig_command’ + +Remove #include which pulls in linux/mount.h. Expand its 4 macros manually. +Android sys/mount.h doesn't define BLKBSZGET and it still needs linux/fs.h. +In the long term we should move Linux specific definitions to sanitizer_platform_limits_linux.cpp +but this commit is easy to cherry pick into older compiler-rt releases. + +Fix https://github.com/llvm/llvm-project/issues/56421 + +Reviewed By: #sanitizers, vitalybuka, zatrazz + +Differential Revision: https://reviews.llvm.org/D129471 + +Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/9cf13067cb5088626ba7ee1ec4c42ec59c7995a0] +Signed-off-by: Khem Raj +--- + .../sanitizer_platform_limits_posix.cpp | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +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 32b8f47ed633..a29b31a432f0 100644 +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -73,7 +73,9 @@ + #include + #include + #include ++#if SANITIZER_ANDROID + #include ++#endif + #include + #include + #include +@@ -857,10 +859,10 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + unsigned IOCTL_EVIOCGPROP = IOCTL_NOT_PRESENT; + unsigned IOCTL_EVIOCSKEYCODE_V2 = IOCTL_NOT_PRESENT; + #endif +- unsigned IOCTL_FS_IOC_GETFLAGS = FS_IOC_GETFLAGS; +- unsigned IOCTL_FS_IOC_GETVERSION = FS_IOC_GETVERSION; +- unsigned IOCTL_FS_IOC_SETFLAGS = FS_IOC_SETFLAGS; +- unsigned IOCTL_FS_IOC_SETVERSION = FS_IOC_SETVERSION; ++ unsigned IOCTL_FS_IOC_GETFLAGS = _IOR('f', 1, long); ++ unsigned IOCTL_FS_IOC_GETVERSION = _IOR('v', 1, long); ++ unsigned IOCTL_FS_IOC_SETFLAGS = _IOW('f', 2, long); ++ unsigned IOCTL_FS_IOC_SETVERSION = _IOW('v', 2, long); + unsigned IOCTL_GIO_CMAP = GIO_CMAP; + unsigned IOCTL_GIO_FONT = GIO_FONT; + unsigned IOCTL_GIO_UNIMAP = GIO_UNIMAP; diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 7cbd7f45..77d71425 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -46,6 +46,7 @@ SRC_URI = "\ file://0034-clang-exclude-openembedded-distributions-from-settin.patch \ file://0035-compiler-rt-Enable-__int128-for-ppc32.patch \ file://0036-compiler-rt-builtins-Move-DMB-definition-to-syn-opsh.patch \ + file://0037-sanitizer-Remove-include-linux-fs.h-to-resolve-fscon.patch \ " # Fallback to no-PIE if not set GCCPIE ??= "" From 248d63955555a7288d405976dfb9ef99f66ff34e Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 22 Jun 2023 09:41:08 +0000 Subject: [PATCH 165/166] clang: fix build with yocto uninative gcc 13 Signed-off-by: Jose Quaresma (cherry picked from commit 35231498962d0f3e75866c7e20ae6b2f87a2ae28) --- .../clang/0038-Add-missing-cstdint.patch | 32 +++++++++++++++++++ recipes-devtools/clang/common.inc | 1 + 2 files changed, 33 insertions(+) create mode 100644 recipes-devtools/clang/clang/0038-Add-missing-cstdint.patch diff --git a/recipes-devtools/clang/clang/0038-Add-missing-cstdint.patch b/recipes-devtools/clang/clang/0038-Add-missing-cstdint.patch new file mode 100644 index 00000000..f6ef7ade --- /dev/null +++ b/recipes-devtools/clang/clang/0038-Add-missing-cstdint.patch @@ -0,0 +1,32 @@ +From ff1681ddb303223973653f7f5f3f3435b48a1983 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Mon, 23 May 2022 08:03:23 +0100 +Subject: [PATCH] [Support] Add missing header to Signals.h + +Without the change llvm build fails on this week's gcc-13 snapshot as: + + [ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o + In file included from llvm/lib/Support/Signals.cpp:14: + llvm/include/llvm/Support/Signals.h:119:8: error: variable or field 'CleanupOnSignal' declared void + 119 | void CleanupOnSignal(uintptr_t Context); + | ^~~~~~~~~~~~~~~ + +Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983] + +Signed-off-by: Jose Quaresma +--- + llvm/include/llvm/Support/Signals.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/llvm/include/llvm/Support/Signals.h b/llvm/include/llvm/Support/Signals.h +index 44f5a750ff5cb..937e0572d4a72 100644 +--- a/llvm/include/llvm/Support/Signals.h ++++ b/llvm/include/llvm/Support/Signals.h +@@ -14,6 +14,7 @@ + #ifndef LLVM_SUPPORT_SIGNALS_H + #define LLVM_SUPPORT_SIGNALS_H + ++#include + #include + + namespace llvm { diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 77d71425..ad35128e 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -47,6 +47,7 @@ SRC_URI = "\ file://0035-compiler-rt-Enable-__int128-for-ppc32.patch \ file://0036-compiler-rt-builtins-Move-DMB-definition-to-syn-opsh.patch \ file://0037-sanitizer-Remove-include-linux-fs.h-to-resolve-fscon.patch \ + file://0038-Add-missing-cstdint.patch \ " # Fallback to no-PIE if not set GCCPIE ??= "" From 0dc3caf541b8ea6d210220459974a7796ef9e722 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 11 Mar 2023 17:33:35 -0800 Subject: [PATCH 166/166] libclc: Define llvm tools needed during build It pokes at target llvm.cmake and gets the path LLVM_TOOLS_BINARY_DIR pointing to target sysroot however during cross builds it should be looking for tools for cross building in native sysroot MJ: otherwise it may fail to build with gold linker: DWARF error: invalid or unhandled FORM value: 0x23 Signed-off-by: Khem Raj Signed-off-by: Martin Jansa (cherry picked from commit 5563999cd1e3b9e29532df8d6f2b3c9475f96833) --- recipes-devtools/clang/libclc_git.bb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes-devtools/clang/libclc_git.bb b/recipes-devtools/clang/libclc_git.bb index e49c9764..cd7ad498 100644 --- a/recipes-devtools/clang/libclc_git.bb +++ b/recipes-devtools/clang/libclc_git.bb @@ -17,6 +17,11 @@ OECMAKE_SOURCEPATH = "${S}/libclc" EXTRA_OECMAKE += " \ -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ + -DLLVM_CLANG=${STAGING_BINDIR_NATIVE}/clang \ + -DLLVM_AS=${STAGING_BINDIR_NATIVE}/llvm-as \ + -DLLVM_LINK=${STAGING_BINDIR_NATIVE}/llvm-link \ + -DLLVM_OPT=${STAGING_BINDIR_NATIVE}/opt \ + -DLLVM_SPIRV=${STAGING_BINDIR_NATIVE}/llvm-spirv \ -Dclc_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeCLCCompiler.cmake.in \ -Dll_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeLLAsmCompiler.cmake.in \ "