Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 676360 Details for
Bug 758167
Fix bootstrapping linker/compiler packages for clang-based darwin prefix
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
sys-devel/clang/files/11.0.0/prefix-dirs.patch
prefix-dirs.patch (text/plain), 3.17 KB, created by
Jacob Floyd
on 2020-12-03 04:01:44 UTC
(
hide
)
Description:
sys-devel/clang/files/11.0.0/prefix-dirs.patch
Filename:
MIME Type:
Creator:
Jacob Floyd
Created:
2020-12-03 04:01:44 UTC
Size:
3.17 KB
patch
obsolete
>This mirrors cmake-*-prefix-dirs.patch > >It add EPREFIX to search paths for c/cxx headers. >It also adds EPREFIX/MacOSX.sdk to search paths for c and Frameworks. >Assumes that c++ lib and headers will be installed in the prefix. > >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 @@ > // All header search logic is handled in the Driver for Darwin. > 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); > // Add the default framework include paths on Darwin. > AddPath("/System/Library/Frameworks", System, true); > AddPath("/Library/Frameworks", System, true); >--- a/clang/lib/Driver/ToolChains/Darwin.cpp 2020-10-07 05:10:48.000000000 -0500 >+++ b/clang/lib/Driver/ToolChains/Darwin.cpp 2020-11-30 12:57:15.000000000 -0600 >@@ -1737,9 +1737,9 @@ > const ArgList &Args, > const Driver &TheDriver) { > const Arg *A = Args.getLastArg(options::OPT_isysroot); >- if (!A) >- return None; >- StringRef isysroot = A->getValue(); >+ //if (!A) >+ // return None; >+ StringRef isysroot = A ? A->getValue() : "@GENTOO_PORTAGE_EPREFIX@MacOSX.sdk"; > auto SDKInfoOrErr = driver::parseDarwinSDKInfo(VFS, isysroot); > if (!SDKInfoOrErr) { > llvm::consumeError(SDKInfoOrErr.takeError()); >@@ -1921,13 +1921,14 @@ > return DriverArgs.getLastArgValue(options::OPT_isysroot); > if (!getDriver().SysRoot.empty()) > return getDriver().SysRoot; >- return "/"; >+ return "@GENTOO_PORTAGE_EPREFIX@"; > } > > void DarwinClang::AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, > llvm::opt::ArgStringList &CC1Args) const { > const Driver &D = getDriver(); > >+ // Sysroot is effectively Gentoo EPREFIX when -isysroot/-sysroot is not defined > llvm::StringRef Sysroot = GetHeaderSysroot(DriverArgs); > > bool NoStdInc = DriverArgs.hasArg(options::OPT_nostdinc); >@@ -1969,6 +1970,10 @@ > SmallString<128> P(Sysroot); > llvm::sys::path::append(P, "usr", "include"); >- addExternCSystemInclude(DriverArgs, CC1Args, P.str()); >+ addSystemInclude(DriverArgs, CC1Args, P.str()); >+ // And add <sysroot>/MacOSX.sdk/usr/include. >+ SmallString<128> Psdk(Sysroot); >+ llvm::sys::path::append(Psdk, "MacOSX.sdk", "usr", "include"); >+ addSystemInclude(DriverArgs, CC1Args, Psdk.str()); > } > } > >@@ -2017,6 +2022,7 @@ > DriverArgs.hasArg(options::OPT_nostdincxx)) > return; > >+ // Sysroot is effectively Gentoo EPREFIX when -isysroot/-sysroot is not defined > llvm::StringRef Sysroot = GetHeaderSysroot(DriverArgs); > > switch (GetCXXStdlibType(DriverArgs)) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 758167
:
676360
|
676363
|
676366
|
676369
|
676375
|
676531
|
676534
|
676591
|
677179
|
677248
|
677251
|
677509
|
677512
|
677515
|
677524
|
677527
|
677530
|
678760
|
868834
|
868835
|
869498
|
869500
|
869577
|
870074
|
870075
|
874610
|
881438
|
884642