Update wasm-sysroot-usr.diff to fix #1029010

Update the wasm-sysroot-usr.diff patch to restore functionality that was
accidentally dropped when the patch was forward-ported from 14 to 15.
This resolves an issue in which clang++ builds would fail if
libc++-15-dev was installed alongside libc++-15-dev-wasm32.

This issue was rightfully caught in the autopkgtests, and has prevented
the package from migrating to testing, something that should hopefully
be resolved now.

Closes: #1029010, #1032317
This commit is contained in:
Faidon Liambotis 2023-03-09 19:53:49 +02:00
parent 10acff747e
commit 14ef8ad6b5
2 changed files with 34 additions and 0 deletions

7
debian/changelog vendored
View File

@ -1,5 +1,6 @@
llvm-toolchain-15 (1:15.0.7-2) UNRELEASED; urgency=medium llvm-toolchain-15 (1:15.0.7-2) UNRELEASED; urgency=medium
[ Sylvestre Ledru ]
* Adjust some lintian overrides * Adjust some lintian overrides
* Disable flang on s390x. Seems that it is breaking * Disable flang on s390x. Seems that it is breaking
@ -13,6 +14,12 @@ llvm-toolchain-15 (1:15.0.7-2) UNRELEASED; urgency=medium
[ John Paul Adrian Glaubitz ] [ John Paul Adrian Glaubitz ]
* Don't run chrpath for libclang on powerpc and powerpcspe * Don't run chrpath for libclang on powerpc and powerpcspe
[ Faidon Liambotis ]
* Update the wasm-sysroot-usr.diff patch to restore functionality that was
accidentally dropped when the patch was forward-ported from 14 to 15. This
resolves an issue in which clang++ builds would fail if libc++-15-dev was
installed alongside libc++-15-dev-wasm32. (Closes: #1029010, #1032317)
-- Sylvestre Ledru <sylvestre@debian.org> Sun, 15 Jan 2023 10:54:41 +0100 -- Sylvestre Ledru <sylvestre@debian.org> Sun, 15 Jan 2023 10:54:41 +0100
llvm-toolchain-15 (1:15.0.7-1) unstable; urgency=medium llvm-toolchain-15 (1:15.0.7-1) unstable; urgency=medium

View File

@ -57,6 +57,33 @@
void WebAssembly::addLibCxxIncludePaths( void WebAssembly::addLibCxxIncludePaths(
const llvm::opt::ArgList &DriverArgs, const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args) const { llvm::opt::ArgStringList &CC1Args) const {
@@ -499,7 +519,9 @@ void WebAssembly::addLibCxxIncludePaths(
}
// Second add the generic one.
- addSystemInclude(DriverArgs, CC1Args, LibPath + "/c++/" + Version);
+ // don't include the host architecture's headers in the search path
+ if (!getDriver().SysRoot.empty())
+ addSystemInclude(DriverArgs, CC1Args, LibPath + "/c++/" + Version);
}
void WebAssembly::addLibStdCXXIncludePaths(
@@ -546,8 +568,11 @@ void WebAssembly::addLibStdCXXIncludePat
addSystemInclude(DriverArgs, CC1Args, TargetDir);
}
- // Second add the generic one.
- addSystemInclude(DriverArgs, CC1Args, LibPath + "/c++/" + Version);
- // Third the backward one.
- addSystemInclude(DriverArgs, CC1Args, LibPath + "/c++/" + Version + "/backward");
+ // don't include the host architecture's headers in the search path
+ if (!getDriver().SysRoot.empty()) {
+ // Second add the generic one.
+ addSystemInclude(DriverArgs, CC1Args, LibPath + "/c++/" + Version);
+ // Third the backward one.
+ addSystemInclude(DriverArgs, CC1Args, LibPath + "/c++/" + Version + "/backward");
+ }
}
--- a/clang/lib/Driver/ToolChains/WebAssembly.h --- a/clang/lib/Driver/ToolChains/WebAssembly.h
+++ b/clang/lib/Driver/ToolChains/WebAssembly.h +++ b/clang/lib/Driver/ToolChains/WebAssembly.h
@@ -89,6 +89,8 @@ private: @@ -89,6 +89,8 @@ private: