forked from freebsd/freebsd-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build with more than one version of Python 3.x installed. [0]
Fix C++ library selection with certain targets. [1] PR: 248386 [1], 248488 [0] Submitted by: Greg V [1], John Hein [0]
- Loading branch information
1 parent
4d98ed9
commit aa6d875
Showing
2 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[Driver] Default to libc++ on FreeBSD | ||
|
||
Downstream may naively translate between DSL and LLVM target | ||
triple. If OS version is lost in the process then Clang would | ||
default to a version that's no longer supported by OS vendor. | ||
|
||
https://reviews.llvm.org/D77776 | ||
|
||
--- tools/clang/lib/Driver/ToolChains/FreeBSD.cpp.orig 2019-12-11 19:15:30 UTC | ||
+++ tools/clang/lib/Driver/ToolChains/FreeBSD.cpp | ||
@@ -351,7 +351,8 @@ FreeBSD::FreeBSD(const Driver &D, const llvm::Triple & | ||
} | ||
|
||
ToolChain::CXXStdlibType FreeBSD::GetDefaultCXXStdlibType() const { | ||
- if (getTriple().getOSMajorVersion() >= 10) | ||
+ unsigned Major = getTriple().getOSMajorVersion(); | ||
+ if (Major >= 10 || Major == 0) | ||
return ToolChain::CST_Libcxx; | ||
return ToolChain::CST_Libstdcxx; | ||
} |