From 575183fb564ee506a7ce6c4526513e55ea0a70d9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 2 Mar 2020 17:41:57 -0800 Subject: clang: Update to latest 10.x release Signed-off-by: Khem Raj --- recipes-devtools/clang/clang.inc | 2 +- ...d-lxml2-to-linker-cmdline-of-xml-is-found.patch | 2 +- ...ind-libunwind-headers-when-LIBCXXABI_LIBU.patch | 2 +- ...er-rt-support-a-new-embedded-linux-target.patch | 2 +- ...-Simplify-cross-compilation.-Don-t-use-na.patch | 2 +- ...0005-compiler-rt-Disable-tsan-on-OE-glibc.patch | 2 +- ...LibraryInfo-Undefine-libc-functions-if-th.patch | 2 +- .../0007-llvm-allow-env-override-of-exe-path.patch | 2 +- ...-clang-driver-Check-sysroot-for-ldso-path.patch | 2 +- ...iver-tools.cpp-Add-lssp_nonshared-on-musl.patch | 2 +- ...-ppc-does-not-support-128-bit-long-double.patch | 2 +- .../0011-clang-Prepend-trailing-to-sysroot.patch | 2 +- ...inside-the-target-sysroot-for-compiler-ru.patch | 2 +- ...ang-Define-releative-gcc-installation-dir.patch | 2 +- ...dso-for-musl-on-x86-and-x32-architectures.patch | 2 +- .../0015-clang-scan-view-needs-python-2.x.patch | 2 +- ...pthread-and-ldl-along-with-lunwind-for-st.patch | 2 +- ...lang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch | 2 +- ..._EXECUTABLE-when-cross-compiling-for-nati.patch | 2 +- .../0019-Check-for-atomic-double-intrinsics.patch | 2 +- .../0020-clang-Enable-SSP-and-PIE-by-default.patch | 2 +- ...compiler-runtime-library-to-link-step-for.patch | 37 ++++++ ...-llvm-Add-lz-to-linker-cmdline-if-enabled.patch | 28 ----- ...cmake-Fix-configure-for-packages-using-fi.patch | 140 +++++++++++++++++++++ ...compiler-runtime-library-to-link-step-for.patch | 37 ------ ...cmake-Fix-configure-for-packages-using-fi.patch | 140 --------------------- ...-llvm-Add-lz-to-linker-cmdline-if-enabled.patch | 28 +++++ recipes-devtools/clang/common.inc | 6 +- 28 files changed, 229 insertions(+), 229 deletions(-) create mode 100644 recipes-devtools/clang/clang/0021-libcxx-Add-compiler-runtime-library-to-link-step-for.patch delete mode 100644 recipes-devtools/clang/clang/0021-llvm-Add-lz-to-linker-cmdline-if-enabled.patch create mode 100644 recipes-devtools/clang/clang/0022-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch delete mode 100644 recipes-devtools/clang/clang/0022-libcxx-Add-compiler-runtime-library-to-link-step-for.patch delete mode 100644 recipes-devtools/clang/clang/0023-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch create mode 100644 recipes-devtools/clang/clang/0023-llvm-Add-lz-to-linker-cmdline-if-enabled.patch diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 65fa95f..4832001 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "10" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "456e9c2e14bc936100f1d84e7637122b306d8c4c" +SRCREV ?= "001c8aac80e3924c33a4cc644cca58401c72fe6b" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/${MAJOR_VER}.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 d0d1d13..038fd50 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 47e9c3e1a066cd17828b819937b1296e6ebc6403 Mon Sep 17 00:00:00 2001 +From 4f92c75c8e3960fe65b63274d6e4b84e4642e02e 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 b3c8199..f9e97bf 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 9bea240c28ad2d202b42d729f3c5a1afe175ead8 Mon Sep 17 00:00:00 2001 +From 61ea81a532c9e3392031df6a8ae58aa6d7c1daf1 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 df021cd..aaf5675 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 dc01fa05b36c1623cdc1988be94dc6118b47cfe9 Mon Sep 17 00:00:00 2001 +From fc5fc771db75d516f6e4ef439f0163f3e1ca5641 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 cb5dea1..2644c74 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 82e0350c47f0d22e7081b64caff4dec9f48e3d7f Mon Sep 17 00:00:00 2001 +From 3d0ab292156f5751e67ea70b8a17c0b32a2a8649 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-compiler-rt-Disable-tsan-on-OE-glibc.patch b/recipes-devtools/clang/clang/0005-compiler-rt-Disable-tsan-on-OE-glibc.patch index 6189ae8..5033d7d 100644 --- a/recipes-devtools/clang/clang/0005-compiler-rt-Disable-tsan-on-OE-glibc.patch +++ b/recipes-devtools/clang/clang/0005-compiler-rt-Disable-tsan-on-OE-glibc.patch @@ -1,4 +1,4 @@ -From d9a483714b1ca13903024e4256b0b1beb5a1e2f6 Mon Sep 17 00:00:00 2001 +From 95c8548aa8fabdc074a6eefe0042ec0c3d8b586e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 18 Jul 2016 08:05:02 +0000 Subject: [PATCH] compiler-rt: Disable tsan on OE/glibc diff --git a/recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index 08d0c24..ac41b33 100644 --- a/recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/recipes-devtools/clang/clang/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch @@ -1,4 +1,4 @@ -From 1a61e23b599d194450cec2923e28c712d8f27fe5 Mon Sep 17 00:00:00 2001 +From 917a44afbb09f83ca1b540cbfbf6f9b2dbded438 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/0007-llvm-allow-env-override-of-exe-path.patch index c135135..5d7c461 100644 --- a/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch @@ -1,4 +1,4 @@ -From ebbc3bc8bef3bdab0d11e18049fe925ea24cb8e1 Mon Sep 17 00:00:00 2001 +From 9ea32e4bbe00e0c8cdaabc7f1b74b245e6c556da 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/0008-clang-driver-Check-sysroot-for-ldso-path.patch index b630aa6..499b9ba 100644 --- a/recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch +++ b/recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch @@ -1,4 +1,4 @@ -From d3ab7b54689301d94d3fa8eacfe56c1395cf2c23 Mon Sep 17 00:00:00 2001 +From 2e00d2cbd06b4d123ee053e5da4a9942665cbaf8 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/0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/recipes-devtools/clang/clang/0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index 4820682..d309a6d 100644 --- a/recipes-devtools/clang/clang/0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch +++ b/recipes-devtools/clang/clang/0009-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch @@ -1,4 +1,4 @@ -From 8a7e28da4aa95eb2e19dce222542e787f79a444c Mon Sep 17 00:00:00 2001 +From fbe4536e38b91438e6b1915402f98f0f627bc268 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/0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch index 934b49d..2788cdc 100644 --- a/recipes-devtools/clang/clang/0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0010-clang-musl-ppc-does-not-support-128-bit-long-double.patch @@ -1,4 +1,4 @@ -From 978921116f4f0947b1131767743a0a093c7d2b72 Mon Sep 17 00:00:00 2001 +From c179620dc7cc263f8cdc266bb7fa58bed3dd4b07 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/0011-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch index 6074a98..dd88ae5 100644 --- a/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch +++ b/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch @@ -1,4 +1,4 @@ -From 29b016e8af2283abd9dbbe5c229727c3facb8b4c Mon Sep 17 00:00:00 2001 +From 0e03314bfe5353ecea2d05ed47afb60a188f446e 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/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index d43e705..7b57ad7 100644 --- a/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -1,4 +1,4 @@ -From c9802082e3c3014e68040efdc7520a4cee1a38f6 Mon Sep 17 00:00:00 2001 +From 6437ba0b8e8b14e35ef7f89e5e2dd497196265e7 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/0013-clang-Define-releative-gcc-installation-dir.patch b/recipes-devtools/clang/clang/0013-clang-Define-releative-gcc-installation-dir.patch index 7a6fc28..3daa716 100644 --- a/recipes-devtools/clang/clang/0013-clang-Define-releative-gcc-installation-dir.patch +++ b/recipes-devtools/clang/clang/0013-clang-Define-releative-gcc-installation-dir.patch @@ -1,4 +1,4 @@ -From 3c21ecdc6dfd9e78c6cb464826f31cd005879dd0 Mon Sep 17 00:00:00 2001 +From d8f30724909520958c31c32e65a6c08d64ab2f38 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 21 May 2017 15:38:25 -0700 Subject: [PATCH] clang: Define / releative gcc installation dir 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 index 0c265f7..3269c3b 100644 --- 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 @@ -1,4 +1,4 @@ -From 416ec373ef2bc7df1e63e8f371cf28dc7794230a Mon Sep 17 00:00:00 2001 +From 08fe42cc0d64931655a72ee9e11d7ce1035c8065 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 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 index f5b3f1c..1c0c44a 100644 --- 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 @@ -1,4 +1,4 @@ -From cd53f8bef787fc6c3790db8d31f93916eae7be71 Mon Sep 17 00:00:00 2001 +From b9491c8b0632e88f2a7db4cdf2fbaa39ef3829d1 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 diff --git a/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index 90572d9..12124ca 100644 --- a/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch @@ -1,4 +1,4 @@ -From 751e7b29c02c935987cc9b4d5b17a9db576737f0 Mon Sep 17 00:00:00 2001 +From 262b287fca475f78c91afb41824adeb075c2195d 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/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch b/recipes-devtools/clang/clang/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch index e96ef14..2dbc699 100644 --- a/recipes-devtools/clang/clang/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch +++ b/recipes-devtools/clang/clang/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch @@ -1,4 +1,4 @@ -From 1f320fea9755b4616b12656ffa32191e8fe0aca3 Mon Sep 17 00:00:00 2001 +From b798b870645c4c1679c00078a6f7d3151bf96c23 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 11 Dec 2019 10:23:15 -0800 Subject: [PATCH] libclang: Use CMAKE_DL_LIBS for deducing libdl diff --git a/recipes-devtools/clang/clang/0018-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/recipes-devtools/clang/clang/0018-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index 0546bf5..f14e3a4 100644 --- a/recipes-devtools/clang/clang/0018-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/recipes-devtools/clang/clang/0018-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch @@ -1,4 +1,4 @@ -From af836c13a28a7537170a59343c96eb34d2b4e7fe Mon Sep 17 00:00:00 2001 +From 5fbf9922c8f616970d62264729d2ed22951b915a 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/0019-Check-for-atomic-double-intrinsics.patch b/recipes-devtools/clang/clang/0019-Check-for-atomic-double-intrinsics.patch index d552d9c..7092c6c 100644 --- a/recipes-devtools/clang/clang/0019-Check-for-atomic-double-intrinsics.patch +++ b/recipes-devtools/clang/clang/0019-Check-for-atomic-double-intrinsics.patch @@ -1,4 +1,4 @@ -From b6594af3414070fae4d2fd66a1b92a31c5fd3234 Mon Sep 17 00:00:00 2001 +From 1233461013a978f0bed777e3ccadff14df4701c2 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/0020-clang-Enable-SSP-and-PIE-by-default.patch b/recipes-devtools/clang/clang/0020-clang-Enable-SSP-and-PIE-by-default.patch index 29bb041..4869f42 100644 --- a/recipes-devtools/clang/clang/0020-clang-Enable-SSP-and-PIE-by-default.patch +++ b/recipes-devtools/clang/clang/0020-clang-Enable-SSP-and-PIE-by-default.patch @@ -1,4 +1,4 @@ -From 9fd60731726031748f2640ae9daae10ad479fb81 Mon Sep 17 00:00:00 2001 +From a6e28e299c290fb0ddcf04ae48d66b5d50087df2 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/0021-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0021-libcxx-Add-compiler-runtime-library-to-link-step-for.patch new file mode 100644 index 0000000..3a1ba09 --- /dev/null +++ b/recipes-devtools/clang/clang/0021-libcxx-Add-compiler-runtime-library-to-link-step-for.patch @@ -0,0 +1,37 @@ +From c091cb25a205ad047eff7fcc034a4aa208f29a57 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 + +This corrects "undefined reference to __divti3" + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Jeremy Puhlman +Signed-off-by: Khem Raj +--- + libcxx/src/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt +index 120505fe18d..b337fa2e403 100644 +--- a/libcxx/src/CMakeLists.txt ++++ b/libcxx/src/CMakeLists.txt +@@ -160,7 +160,7 @@ if (LIBCXX_ENABLE_SHARED) + if(COMMAND llvm_setup_rpath) + llvm_setup_rpath(cxx_shared) + endif() +- target_link_libraries(cxx_shared PRIVATE ${LIBCXX_LIBRARIES}) ++ target_link_libraries(cxx_shared PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)") + set_target_properties(cxx_shared + PROPERTIES + COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}" +@@ -238,7 +238,7 @@ endif() + # Build the static library. + if (LIBCXX_ENABLE_STATIC) + add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS}) +- target_link_libraries(cxx_static PRIVATE ${LIBCXX_LIBRARIES}) ++ target_link_libraries(cxx_static PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)") + set(CMAKE_STATIC_LIBRARY_PREFIX "lib") + set_target_properties(cxx_static + PROPERTIES diff --git a/recipes-devtools/clang/clang/0021-llvm-Add-lz-to-linker-cmdline-if-enabled.patch b/recipes-devtools/clang/clang/0021-llvm-Add-lz-to-linker-cmdline-if-enabled.patch deleted file mode 100644 index 8a8d35a..0000000 --- a/recipes-devtools/clang/clang/0021-llvm-Add-lz-to-linker-cmdline-if-enabled.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d46267d3d548dbfae92f4958090af4567778c4bd Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 4 Jan 2020 01:00:06 -0800 -Subject: [PATCH] llvm: Add -lz to linker cmdline if enabled - -cmake's detection mechanism confuses libz.so during cross build and ends -up linking with libz from build host which could be a different -architecture and fail link - -see -https://reviews.llvm.org/D70764#1803559 - -Signed-off-by: Khem Raj ---- - llvm/lib/Support/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt -index 26332d4f539..8b58516330b 100644 ---- a/llvm/lib/Support/CMakeLists.txt -+++ b/llvm/lib/Support/CMakeLists.txt -@@ -1,5 +1,5 @@ - if(LLVM_ENABLE_ZLIB) -- set(system_libs ${ZLIB_LIBRARY}) -+ set(system_libs z) - endif() - - if( MSVC OR MINGW ) diff --git a/recipes-devtools/clang/clang/0022-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0022-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch new file mode 100644 index 0000000..af10f53 --- /dev/null +++ b/recipes-devtools/clang/clang/0022-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch @@ -0,0 +1,140 @@ +From ac435f758336ad24a390acedd15f6ca01382a759 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 + find_package() + +Currently, when a package (i.e. bcc [https://github.com/iovisor/bcc.git]) +that depends on LLVM/Clang tries to run cmake find_package() during +do_configure, it will fail with a similar error: + +| The imported target "llvm-tblgen" references the file +| ".../recipe-sysroot/usr/bin/llvm-tblgen" +| +| but this file does not exist. Possible reasons include: +| * The file was deleted, renamed, or moved to another location. +| * An install or uninstall procedure did not complete successfully. +| * The installation package was faulty and contained +| ".../recipe-sysroot/usr/lib/cmake/LLVMExports.cmake" +| but not all the files it references. + +This is due to the fact that currently the cmake scripts look for target +binaries in sysroot. Work around this by not exporting the target binaries in +Exports-* cmake files. + +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(-) + +diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake +index 577cc11ab01..5c859d86069 100644 +--- a/clang/cmake/modules/AddClang.cmake ++++ b/clang/cmake/modules/AddClang.cmake +@@ -151,15 +151,8 @@ macro(add_clang_tool name) + add_dependencies(${name} clang-resource-headers) + + 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() + + install(TARGETS ${name} +- ${export_to_clangtargets} + RUNTIME DESTINATION bin + COMPONENT ${name}) + +@@ -168,7 +161,6 @@ macro(add_clang_tool name) + DEPENDS ${name} + COMPONENT ${name}) + endif() +- set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name}) + endif() + endmacro() + +diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake +index fd69786544a..70580ccb129 100644 +--- a/llvm/cmake/modules/AddLLVM.cmake ++++ b/llvm/cmake/modules/AddLLVM.cmake +@@ -1045,15 +1045,8 @@ macro(add_llvm_tool name) + + if ( ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + 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() + + install(TARGETS ${name} +- ${export_to_llvmexports} + RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR} + COMPONENT ${name}) + +@@ -1064,9 +1057,6 @@ macro(add_llvm_tool name) + endif() + endif() + endif() +- if( LLVM_BUILD_TOOLS ) +- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) +- endif() + set_target_properties(${name} PROPERTIES FOLDER "Tools") + endmacro(add_llvm_tool name) + +@@ -1104,15 +1094,8 @@ macro(add_llvm_utility name) + set_target_properties(${name} PROPERTIES FOLDER "Utils") + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + 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() + + install(TARGETS ${name} +- ${export_to_llvmexports} + RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} + COMPONENT ${name}) + +@@ -1121,7 +1104,6 @@ macro(add_llvm_utility name) + DEPENDS ${name} + COMPONENT ${name}) + endif() +- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) + elseif(LLVM_BUILD_UTILS) + 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 9d2fcd9a793..acdb898149d 100644 +--- a/llvm/cmake/modules/TableGen.cmake ++++ b/llvm/cmake/modules/TableGen.cmake +@@ -161,14 +161,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) +- set(export_to_llvmexports) +- if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR +- NOT LLVM_DISTRIBUTION_COMPONENTS) +- set(export_to_llvmexports EXPORT LLVMExports) +- endif() + + install(TARGETS ${target} +- ${export_to_llvmexports} + COMPONENT ${target} + RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}) + if(NOT LLVM_ENABLE_IDE) +@@ -177,5 +171,4 @@ macro(add_tablegen target project) + COMPONENT ${target}) + endif() + endif() +- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target}) + endmacro() diff --git a/recipes-devtools/clang/clang/0022-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0022-libcxx-Add-compiler-runtime-library-to-link-step-for.patch deleted file mode 100644 index 9cdce5b..0000000 --- a/recipes-devtools/clang/clang/0022-libcxx-Add-compiler-runtime-library-to-link-step-for.patch +++ /dev/null @@ -1,37 +0,0 @@ -From ecde714829d04ed0a3ee30827e60502aabc516b0 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 - -This corrects "undefined reference to __divti3" - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Jeremy Puhlman -Signed-off-by: Khem Raj ---- - libcxx/src/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt -index 120505fe18d..b337fa2e403 100644 ---- a/libcxx/src/CMakeLists.txt -+++ b/libcxx/src/CMakeLists.txt -@@ -160,7 +160,7 @@ if (LIBCXX_ENABLE_SHARED) - if(COMMAND llvm_setup_rpath) - llvm_setup_rpath(cxx_shared) - endif() -- target_link_libraries(cxx_shared PRIVATE ${LIBCXX_LIBRARIES}) -+ target_link_libraries(cxx_shared PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)") - set_target_properties(cxx_shared - PROPERTIES - COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}" -@@ -238,7 +238,7 @@ endif() - # Build the static library. - if (LIBCXX_ENABLE_STATIC) - add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS}) -- target_link_libraries(cxx_static PRIVATE ${LIBCXX_LIBRARIES}) -+ target_link_libraries(cxx_static PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)") - set(CMAKE_STATIC_LIBRARY_PREFIX "lib") - set_target_properties(cxx_static - PROPERTIES diff --git a/recipes-devtools/clang/clang/0023-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch b/recipes-devtools/clang/clang/0023-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch deleted file mode 100644 index c97158e..0000000 --- a/recipes-devtools/clang/clang/0023-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch +++ /dev/null @@ -1,140 +0,0 @@ -From 8c28658ad591489e35690a245f82b519ae37929e 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 - find_package() - -Currently, when a package (i.e. bcc [https://github.com/iovisor/bcc.git]) -that depends on LLVM/Clang tries to run cmake find_package() during -do_configure, it will fail with a similar error: - -| The imported target "llvm-tblgen" references the file -| ".../recipe-sysroot/usr/bin/llvm-tblgen" -| -| but this file does not exist. Possible reasons include: -| * The file was deleted, renamed, or moved to another location. -| * An install or uninstall procedure did not complete successfully. -| * The installation package was faulty and contained -| ".../recipe-sysroot/usr/lib/cmake/LLVMExports.cmake" -| but not all the files it references. - -This is due to the fact that currently the cmake scripts look for target -binaries in sysroot. Work around this by not exporting the target binaries in -Exports-* cmake files. - -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(-) - -diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake -index 577cc11ab01..5c859d86069 100644 ---- a/clang/cmake/modules/AddClang.cmake -+++ b/clang/cmake/modules/AddClang.cmake -@@ -151,15 +151,8 @@ macro(add_clang_tool name) - add_dependencies(${name} clang-resource-headers) - - 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() - - install(TARGETS ${name} -- ${export_to_clangtargets} - RUNTIME DESTINATION bin - COMPONENT ${name}) - -@@ -168,7 +161,6 @@ macro(add_clang_tool name) - DEPENDS ${name} - COMPONENT ${name}) - endif() -- set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name}) - endif() - endmacro() - -diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index fce36ba2125..554ad0b4ade 100644 ---- a/llvm/cmake/modules/AddLLVM.cmake -+++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -1033,15 +1033,8 @@ macro(add_llvm_tool name) - - if ( ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) - 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() - - install(TARGETS ${name} -- ${export_to_llvmexports} - RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR} - COMPONENT ${name}) - -@@ -1052,9 +1045,6 @@ macro(add_llvm_tool name) - endif() - endif() - endif() -- if( LLVM_BUILD_TOOLS ) -- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) -- endif() - set_target_properties(${name} PROPERTIES FOLDER "Tools") - endmacro(add_llvm_tool name) - -@@ -1092,15 +1082,8 @@ macro(add_llvm_utility name) - set_target_properties(${name} PROPERTIES FOLDER "Utils") - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) - 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() - - install(TARGETS ${name} -- ${export_to_llvmexports} - RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} - COMPONENT ${name}) - -@@ -1109,7 +1092,6 @@ macro(add_llvm_utility name) - DEPENDS ${name} - COMPONENT ${name}) - endif() -- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) - elseif(LLVM_BUILD_UTILS) - 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 9d2fcd9a793..acdb898149d 100644 ---- a/llvm/cmake/modules/TableGen.cmake -+++ b/llvm/cmake/modules/TableGen.cmake -@@ -161,14 +161,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) -- set(export_to_llvmexports) -- if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR -- NOT LLVM_DISTRIBUTION_COMPONENTS) -- set(export_to_llvmexports EXPORT LLVMExports) -- endif() - - install(TARGETS ${target} -- ${export_to_llvmexports} - COMPONENT ${target} - RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}) - if(NOT LLVM_ENABLE_IDE) -@@ -177,5 +171,4 @@ macro(add_tablegen target project) - COMPONENT ${target}) - endif() - endif() -- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target}) - endmacro() diff --git a/recipes-devtools/clang/clang/0023-llvm-Add-lz-to-linker-cmdline-if-enabled.patch b/recipes-devtools/clang/clang/0023-llvm-Add-lz-to-linker-cmdline-if-enabled.patch new file mode 100644 index 0000000..a6a90d3 --- /dev/null +++ b/recipes-devtools/clang/clang/0023-llvm-Add-lz-to-linker-cmdline-if-enabled.patch @@ -0,0 +1,28 @@ +From a4751125c7303e060e21eca48b150fb7368330fc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 4 Jan 2020 01:00:06 -0800 +Subject: [PATCH] llvm: Add -lz to linker cmdline if enabled + +cmake's detection mechanism confuses libz.so during cross build and ends +up linking with libz from build host which could be a different +architecture and fail link + +see +https://reviews.llvm.org/D70764#1803559 + +Signed-off-by: Khem Raj +--- + llvm/lib/Support/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt +index 5c656164e77..60316a59fbd 100644 +--- a/llvm/lib/Support/CMakeLists.txt ++++ b/llvm/lib/Support/CMakeLists.txt +@@ -1,5 +1,5 @@ + if(LLVM_ENABLE_ZLIB) +- set(imported_libs ZLIB::ZLIB) ++ set(system_libs z) + endif() + + if( MSVC OR MINGW ) diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 7b8ca85..1f4ac92 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -28,9 +28,9 @@ SRC_URI = "\ file://0018-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch \ file://0019-Check-for-atomic-double-intrinsics.patch \ file://0020-clang-Enable-SSP-and-PIE-by-default.patch \ - file://0021-llvm-Add-lz-to-linker-cmdline-if-enabled.patch \ - file://0022-libcxx-Add-compiler-runtime-library-to-link-step-for.patch \ - file://0023-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch \ + file://0021-libcxx-Add-compiler-runtime-library-to-link-step-for.patch \ + file://0022-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch \ + file://0023-llvm-Add-lz-to-linker-cmdline-if-enabled.patch \ " # Fallback to no-PIE if not set -- cgit v1.2.3-54-g00ecf