1 |
commit: 171fda3d7493b997af725b2cdbf968ab681dd123 |
2 |
Author: Jacob Floyd <cognifloyd <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Dec 28 00:42:55 2020 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 28 00:47:37 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=171fda3d |
7 |
|
8 |
sys-devel/clang: fix EPREFIX usage for prefix-paths.patch |
9 |
|
10 |
prefix-paths.patch required a trailing / to ensure it was never an empty |
11 |
string, which followed how this cmake patch works: |
12 |
dev-util/cmake/files/cmake-3.14.0_rc3-prefix-dirs.patch |
13 |
|
14 |
When I switched from sed to eprefixify, I missed this expectation. |
15 |
This modifies the patch to use EPREFIX as is. |
16 |
|
17 |
Bug: https://bugs.gentoo.org/758167 |
18 |
Signed-off-by: Jacob Floyd <cognifloyd <AT> gmail.com> |
19 |
Closes: https://github.com/gentoo/gentoo/pull/18847 |
20 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
21 |
|
22 |
sys-devel/clang/files/9999/prefix-dirs.patch | 11 ++++------- |
23 |
1 file changed, 4 insertions(+), 7 deletions(-) |
24 |
|
25 |
diff --git a/sys-devel/clang/files/9999/prefix-dirs.patch b/sys-devel/clang/files/9999/prefix-dirs.patch |
26 |
index 0f7b5ca31eb..d8d79b8fb51 100644 |
27 |
--- a/sys-devel/clang/files/9999/prefix-dirs.patch |
28 |
+++ b/sys-devel/clang/files/9999/prefix-dirs.patch |
29 |
@@ -8,9 +8,6 @@ Also, a couple of args are populated by inspecting the SDK, |
30 |
so, default to EPREFIX/MacOSX.sdk when the sysroot is not specified. |
31 |
(This does NOT set sysroot). |
32 |
|
33 |
-The ebuild adds an extra / at the end of EPREFIX so that it is never |
34 |
-an empty string. |
35 |
- |
36 |
--- a/clang/lib/Frontend/InitHeaderSearch.cpp 2020-11-30 12:53:42.000000000 -0600 |
37 |
+++ b/clang/lib/Frontend/InitHeaderSearch.cpp 2020-11-30 13:57:52.000000000 -0600 |
38 |
@@ -445,6 +445,9 @@ |
39 |
@@ -18,8 +15,8 @@ an empty string. |
40 |
if (triple.isOSDarwin()) { |
41 |
if (HSOpts.UseStandardSystemIncludes) { |
42 |
+ // Add Gentoo Prefix framework dirs first |
43 |
-+ AddPath("@GENTOO_PORTAGE_EPREFIX@××××××.sdk/System/Library/Frameworks", System, true); |
44 |
-+ AddPath("@GENTOO_PORTAGE_EPREFIX@××××××.sdk/Library/Frameworks", System, true); |
45 |
++ AddPath("@GENTOO_PORTAGE_EPREFIX@/MacOSX.sdk/System/Library/Frameworks", System, true); |
46 |
++ AddPath("@GENTOO_PORTAGE_EPREFIX@/MacOSX.sdk/Library/Frameworks", System, true); |
47 |
// Add the default framework include paths on Darwin. |
48 |
AddPath("/System/Library/Frameworks", System, true); |
49 |
AddPath("/Library/Frameworks", System, true); |
50 |
@@ -34,7 +31,7 @@ an empty string. |
51 |
- StringRef isysroot = A->getValue(); |
52 |
+ //if (!A) |
53 |
+ // return None; |
54 |
-+ StringRef isysroot = A ? A->getValue() : "@GENTOO_PORTAGE_EPREFIX@××××××.sdk"; |
55 |
++ StringRef isysroot = A ? A->getValue() : "@GENTOO_PORTAGE_EPREFIX@/MacOSX.sdk"; |
56 |
auto SDKInfoOrErr = driver::parseDarwinSDKInfo(VFS, isysroot); |
57 |
if (!SDKInfoOrErr) { |
58 |
llvm::consumeError(SDKInfoOrErr.takeError()); |
59 |
@@ -43,7 +40,7 @@ an empty string. |
60 |
if (!getDriver().SysRoot.empty()) |
61 |
return getDriver().SysRoot; |
62 |
- return "/"; |
63 |
-+ return "@GENTOO_PORTAGE_EPREFIX@"; |
64 |
++ return "@GENTOO_PORTAGE_EPREFIX@/"; |
65 |
} |
66 |
|
67 |
void DarwinClang::AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, |