Skip to content

Commit

Permalink
Fix build with more than one version of Python 3.x installed. [0]
Browse files Browse the repository at this point in the history
Fix C++ library selection with certain targets. [1]

PR:		248386 [1], 248488 [0]
Submitted by:	Greg V [1], John Hein [0]
  • Loading branch information
brooksdavis committed Aug 5, 2020
1 parent 4d98ed9 commit aa6d875
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
6 changes: 2 additions & 4 deletions devel/llvm11/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= llvm
DISTVERSION= 11.0.0rc1
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= devel lang
MASTER_SITES= https://github.com/llvm/llvm-project/releases/download/llvmorg-${DISTVERSION:S/rc/-rc/}/ \
https://${PRE_}releases.llvm.org/${LLVM_RELEASE}/${RCDIR}
Expand Down Expand Up @@ -55,9 +55,7 @@ CMAKE_ARGS+= -DLLVM_HOST_TRIPLE=${CONFIGURE_TARGET}
CMAKE_ARGS+= -DCMAKE_INSTALL_MANDIR:PATH="share/man"
CMAKE_ARGS+= -DLLVM_PARALLEL_LINK_JOBS=1
CMAKE_ARGS+= -DLLVM_ENABLE_Z3_SOLVER=OFF
CMAKE_ARGS+= -DPYTHON_EXECUTABLE=${PYTHON_CMD} \
-DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDEDIR} \
-DPYTHON_LIBRARY=${LOCALBASE}/lib/lib${PYTHON_VERSION}${PYTHON_ABIVER}.so
CMAKE_ARGS+= -DPython3_EXECUTABLE=${PYTHON_CMD}

# Disable assertions. They should be disabled by cmake, but USES=cmake
# overrides -DCMAKE_*_FLAGS_RELEASE.
Expand Down
20 changes: 20 additions & 0 deletions devel/llvm11/files/clang/patch-D77776
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;
}

0 comments on commit aa6d875

Please sign in to comment.