From 6297fd36b255645886cdc16ab284c06ddc6684b8 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Wed, 29 Nov 2023 19:02:26 +0100 Subject: [PATCH] * Restore the patch for D148945, searching /usr/lib/llvm-18/lib by default. Addresses: #1056580. --- debian/changelog | 2 ++ debian/patches/D148945-revert.diff | 21 +++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 24 insertions(+) create mode 100644 debian/patches/D148945-revert.diff diff --git a/debian/changelog b/debian/changelog index caf73b06..8c6077bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,8 @@ llvm-toolchain-snapshot (1:18~++20230921012857+4cf8da94198d-1~exp1) UNRELEASED; * Also install liborc_rt*.a on ppc64 and ppc64el. * Fix stripping build flags on Ubuntu/ppc64el. * libclang1-18: Only encode the major version in the soname. See #1056126. + * Restore the patch for D148945, searching /usr/lib/llvm-18/lib by default. + Addresses: #1056580. [ John Paul Adrian Glaubitz ] * Don't install *clang_rt* on sparc and sparc64 diff --git a/debian/patches/D148945-revert.diff b/debian/patches/D148945-revert.diff new file mode 100644 index 00000000..73426bdb --- /dev/null +++ b/debian/patches/D148945-revert.diff @@ -0,0 +1,21 @@ +Restore that for now, we're not GenToo ... + +https://reviews.llvm.org/D148945 +https://reviews.llvm.org/D122444 + +--- a/clang/lib/Driver/ToolChains/Linux.cpp ++++ b/clang/lib/Driver/ToolChains/Linux.cpp +@@ -333,6 +333,13 @@ Linux::Linux(const Driver &D, const llvm + + Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths); + ++ // The deprecated -DLLVM_ENABLE_PROJECTS=libcxx configuration installs ++ // libc++.so in D.Dir+"/../lib/". Detect this path. ++ // TODO Remove once LLVM_ENABLE_PROJECTS=libcxx is unsupported. ++ if (StringRef(D.Dir).startswith(SysRoot) && ++ D.getVFS().exists(D.Dir + "/../lib/libc++.so")) ++ addPathIfExists(D, D.Dir + "/../lib", Paths); ++ + addPathIfExists(D, concat(SysRoot, "/lib"), Paths); + addPathIfExists(D, concat(SysRoot, "/usr/lib"), Paths); + } diff --git a/debian/patches/series b/debian/patches/series index fa5d6eab..9fbab5b3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -146,3 +146,4 @@ force-sse2-compiler-rt.diff bolt-disable-emit-relocs.patch link-grpc.diff libclang-major-version-only.diff +D148945-revert.diff