diff options
author | Jacob Floyd <cognifloyd@gmail.com> | 2020-12-27 18:42:55 -0600 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2020-12-28 00:47:37 +0000 |
commit | 171fda3d7493b997af725b2cdbf968ab681dd123 (patch) | |
tree | 98d4bf08cac340a0af016f226748ce9e21627b06 /sys-devel | |
parent | sys-apps/systemd: depend on acct-user/{nobody,root} and acct-group/users (diff) | |
download | gentoo-171fda3d7493b997af725b2cdbf968ab681dd123.tar.gz gentoo-171fda3d7493b997af725b2cdbf968ab681dd123.tar.bz2 gentoo-171fda3d7493b997af725b2cdbf968ab681dd123.zip |
sys-devel/clang: fix EPREFIX usage for prefix-paths.patch
prefix-paths.patch required a trailing / to ensure it was never an empty
string, which followed how this cmake patch works:
dev-util/cmake/files/cmake-3.14.0_rc3-prefix-dirs.patch
When I switched from sed to eprefixify, I missed this expectation.
This modifies the patch to use EPREFIX as is.
Bug: https://bugs.gentoo.org/758167
Signed-off-by: Jacob Floyd <cognifloyd@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/18847
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/clang/files/9999/prefix-dirs.patch | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys-devel/clang/files/9999/prefix-dirs.patch b/sys-devel/clang/files/9999/prefix-dirs.patch index 0f7b5ca31ebc..d8d79b8fb513 100644 --- a/sys-devel/clang/files/9999/prefix-dirs.patch +++ b/sys-devel/clang/files/9999/prefix-dirs.patch @@ -8,9 +8,6 @@ Also, a couple of args are populated by inspecting the SDK, so, default to EPREFIX/MacOSX.sdk when the sysroot is not specified. (This does NOT set sysroot). -The ebuild adds an extra / at the end of EPREFIX so that it is never -an empty string. - --- a/clang/lib/Frontend/InitHeaderSearch.cpp 2020-11-30 12:53:42.000000000 -0600 +++ b/clang/lib/Frontend/InitHeaderSearch.cpp 2020-11-30 13:57:52.000000000 -0600 @@ -445,6 +445,9 @@ @@ -18,8 +15,8 @@ an empty string. if (triple.isOSDarwin()) { if (HSOpts.UseStandardSystemIncludes) { + // Add Gentoo Prefix framework dirs first -+ AddPath("@GENTOO_PORTAGE_EPREFIX@MacOSX.sdk/System/Library/Frameworks", System, true); -+ AddPath("@GENTOO_PORTAGE_EPREFIX@MacOSX.sdk/Library/Frameworks", System, true); ++ AddPath("@GENTOO_PORTAGE_EPREFIX@/MacOSX.sdk/System/Library/Frameworks", System, true); ++ AddPath("@GENTOO_PORTAGE_EPREFIX@/MacOSX.sdk/Library/Frameworks", System, true); // Add the default framework include paths on Darwin. AddPath("/System/Library/Frameworks", System, true); AddPath("/Library/Frameworks", System, true); @@ -34,7 +31,7 @@ an empty string. - StringRef isysroot = A->getValue(); + //if (!A) + // return None; -+ StringRef isysroot = A ? A->getValue() : "@GENTOO_PORTAGE_EPREFIX@MacOSX.sdk"; ++ StringRef isysroot = A ? A->getValue() : "@GENTOO_PORTAGE_EPREFIX@/MacOSX.sdk"; auto SDKInfoOrErr = driver::parseDarwinSDKInfo(VFS, isysroot); if (!SDKInfoOrErr) { llvm::consumeError(SDKInfoOrErr.takeError()); @@ -43,7 +40,7 @@ an empty string. if (!getDriver().SysRoot.empty()) return getDriver().SysRoot; - return "/"; -+ return "@GENTOO_PORTAGE_EPREFIX@"; ++ return "@GENTOO_PORTAGE_EPREFIX@/"; } void DarwinClang::AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, |