svn commit: r451764 - head/devel/llvm40
Brooks Davis
brooks at FreeBSD.org
Wed Oct 11 17:15:31 UTC 2017
Author: brooks
Date: Wed Oct 11 17:15:30 2017
New Revision: 451764
URL: https://svnweb.freebsd.org/changeset/ports/451764
Log:
- add support for ARMv7
- according to r450176 pass CONFIGURE_TARGET as LLVM_DEFAULT_TARGET_TRIPLE
and LLVM_HOST_TRIPLE
- for ARMv[67], use correct API when building CONFIGURE_TARGET
PR: 219779
Submitted by: mmel
Modified:
head/devel/llvm40/Makefile
Modified: head/devel/llvm40/Makefile
==============================================================================
--- head/devel/llvm40/Makefile Wed Oct 11 17:10:10 2017 (r451763)
+++ head/devel/llvm40/Makefile Wed Oct 11 17:15:30 2017 (r451764)
@@ -2,7 +2,7 @@
PORTNAME= llvm
DISTVERSION= 4.0.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR}
PKGNAMESUFFIX= ${LLVM_SUFFIX}
@@ -40,6 +40,8 @@ SUB_LIST= LLVM_PREFIX="${LLVM_PREFIX}" LLVM_SUFFIX="${
CMAKE_INSTALL_PREFIX= ${LLVM_PREFIX}
CMAKE_ARGS= -DLLVM_BUILD_LLVM_DYLIB=ON
+CMAKE_ARGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=${CONFIGURE_TARGET}
+CMAKE_ARGS+= -DLLVM_HOST_TRIPLE=${CONFIGURE_TARGET}
# Following commit https://github.com/kitware/cmake/commit/956054
# we need to either change the whole man-shuffle below, or simply
# redefine CMAKE_INSTALL_MANDIR
@@ -184,9 +186,22 @@ EXTRAS_PATTERN= ${EXTRAS_COMMANDS:tW:C/ */|/g}|${EXTR
.include <bsd.port.options.mk>
-# keep in sync with /usr/src/lib/clang/clang.build.mk
-CONFIGURE_TARGET:=${ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-portbld-${OPSYS:tl}${OSREL}
+# keep in sync with /usr/src/lib/clang/llvm.build.mk
+# ----------- start of sync block ------------------
+# Armv6 and armv7 uses hard float abi, unless the CPUTYPE has soft in it.
+# arm (for armv4 and armv5 CPUs) always uses the soft float ABI.
+# For all other targets, we stick with 'unknown'.
+.if ${ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
+TARGET_ABI= -gnueabihf
+.elif ${ARCH:Marm*}
+TARGET_ABI= -gnueabi
+.else
+TARGET_ABI=
+.endif
+CONFIGURE_TARGET:=${ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-portbld-${OPSYS:tl}${OSREL}${TARGET_ABI}
+# ----------- end of sync block --------------------
+
.if ${PORT_OPTIONS:MCLANG}
COMMANDS+= c-index-test \
clang \
@@ -308,7 +323,7 @@ PORTDOCS+= lld
CXXFLAGS+= -D_GLIBCXX_USE_C99
.endif
-.if ${ARCH} == "armv6"
+.if ${ARCH} == armv6 || ${ARCH} == armv7
BUILD_DEPENDS+= ${LOCALBASE}/bin/ld:devel/binutils
CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
More information about the svn-ports-head
mailing list