Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 786824 Details for
Bug 788430
sys-devel/clang: paths not set correctly for mingw
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch updated for clang 14.0.5
mingw-patch.patch (text/plain), 3.38 KB, created by
Mark Harmstone
on 2022-06-22 18:21:13 UTC
(
hide
)
Description:
patch updated for clang 14.0.5
Filename:
MIME Type:
Creator:
Mark Harmstone
Created:
2022-06-22 18:21:13 UTC
Size:
3.38 KB
patch
obsolete
>--- a/clang/lib/Driver/ToolChains/MinGW.cpp >+++ b/clang/lib/Driver/ToolChains/MinGW.cpp >@@ -334,8 +334,9 @@ > > // Simplified from Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple. > static bool findGccVersion(StringRef LibDir, std::string &GccLibDir, >- std::string &Ver) { >- auto Version = toolchains::Generic_GCC::GCCVersion::Parse("0.0.0"); >+ std::string &Ver, >+ toolchains::Generic_GCC::GCCVersion &Version) { >+ Version = toolchains::Generic_GCC::GCCVersion::Parse("0.0.0"); > std::error_code EC; > for (llvm::sys::fs::directory_iterator LI(LibDir, EC), LE; !EC && LI != LE; > LI = LI.increment(EC)) { >@@ -366,7 +367,7 @@ > for (StringRef CandidateSysroot : SubdirNames) { > llvm::SmallString<1024> LibDir(Base); > llvm::sys::path::append(LibDir, CandidateLib, "gcc", CandidateSysroot); >- if (findGccVersion(LibDir, GccLibDir, Ver)) { >+ if (findGccVersion(LibDir, GccLibDir, Ver, GccVer)) { > SubdirName = std::string(CandidateSysroot); > return; > } >@@ -433,6 +434,11 @@ > getFilePaths().push_back(GccLibDir); > getFilePaths().push_back( > (Base + SubdirName + llvm::sys::path::get_separator() + "lib").str()); >+ >+ // Gentoo >+ getFilePaths().push_back( >+ (Base + SubdirName + llvm::sys::path::get_separator() + "mingw/lib").str()); >+ > getFilePaths().push_back(Base + "lib"); > // openSUSE > getFilePaths().push_back(Base + SubdirName + "/sys-root/mingw/lib"); >@@ -587,6 +593,11 @@ > addSystemInclude(DriverArgs, CC1Args, > Base + SubdirName + llvm::sys::path::get_separator() + > "include"); >+ >+ // Gentoo >+ addSystemInclude(DriverArgs, CC1Args, >+ Base + SubdirName + llvm::sys::path::get_separator() + "usr/include"); >+ > addSystemInclude(DriverArgs, CC1Args, Base + "include"); > } > >@@ -614,7 +625,7 @@ > } > > case ToolChain::CST_Libstdcxx: >- llvm::SmallVector<llvm::SmallString<1024>, 4> CppIncludeBases; >+ llvm::SmallVector<llvm::SmallString<1024>, 7> CppIncludeBases; > CppIncludeBases.emplace_back(Base); > llvm::sys::path::append(CppIncludeBases[0], SubdirName, "include", "c++"); > CppIncludeBases.emplace_back(Base); >@@ -624,6 +635,15 @@ > llvm::sys::path::append(CppIncludeBases[2], "include", "c++", Ver); > CppIncludeBases.emplace_back(GccLibDir); > llvm::sys::path::append(CppIncludeBases[3], "include", "c++"); >+ CppIncludeBases.emplace_back(GccLibDir); >+ llvm::sys::path::append(CppIncludeBases[4], "include", >+ "g++-v" + GccVer.Text); >+ CppIncludeBases.emplace_back(GccLibDir); >+ llvm::sys::path::append(CppIncludeBases[5], "include", >+ "g++-v" + GccVer.MajorStr + "." + GccVer.MinorStr); >+ CppIncludeBases.emplace_back(GccLibDir); >+ llvm::sys::path::append(CppIncludeBases[6], "include", >+ "g++-v" + GccVer.MajorStr); > for (auto &CppIncludeBase : CppIncludeBases) { > addSystemInclude(DriverArgs, CC1Args, CppIncludeBase); > CppIncludeBase += Slash; >--- a/clang/lib/Driver/ToolChains/MinGW.h >+++ b/clang/lib/Driver/ToolChains/MinGW.h >@@ -103,6 +103,7 @@ > > std::string Base; > std::string GccLibDir; >+ clang::driver::toolchains::Generic_GCC::GCCVersion GccVer; > std::string Ver; > std::string SubdirName; > mutable std::unique_ptr<tools::gcc::Preprocessor> Preprocessor;
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 788430
:
706245
| 786824