mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-12 03:00:28 +00:00
9af0e0e046
CloudABI recently gained separate packages for ARMv7 based systems. These systems can freely use ARMv7-specific features like NEON, whereas the ARMv6 packages will need to stick to just VFP. This change extends the cloudabi-toolchain package to also set up a toolchain for ARMv7 properly. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D10938
83 lines
2.4 KiB
Makefile
83 lines
2.4 KiB
Makefile
# Created by: Ed Schouten <ed@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= cloudabi-toolchain
|
|
PORTVERSION= 1.9
|
|
CATEGORIES= devel
|
|
MASTER_SITES= # None
|
|
DISTFILES= # None
|
|
|
|
MAINTAINER= ed@FreeBSD.org
|
|
COMMENT= C and C++ toolchain for CloudABI
|
|
|
|
LICENSE= MIT
|
|
|
|
RUN_DEPENDS= clang${LLVM_SUFFIX}:devel/llvm${LLVM_SUFFIX} \
|
|
lld${LLVM_SUFFIX}:devel/llvm${LLVM_SUFFIX} \
|
|
pkgconf:devel/pkgconf
|
|
|
|
LLVM_SUFFIX= 40
|
|
|
|
CLOUDABI_ARCHS= aarch64-unknown-cloudabi armv6-unknown-cloudabi-eabihf \
|
|
armv7-unknown-cloudabi-eabihf i686-unknown-cloudabi \
|
|
x86_64-unknown-cloudabi
|
|
|
|
LLVM_TOOLS= ar nm objdump ranlib size
|
|
SHELL_TOOLS= man pkg-config
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100100
|
|
# Depend on ELF tools provided by the base system. They work well with
|
|
# CloudABI executables.
|
|
BASE_TOOLS= addr2line c++filt objcopy readelf strings strip
|
|
CONFLICTS= cloudabi-binutils-*
|
|
.else
|
|
# The tools in the base system are too old to properly support CloudABI
|
|
# and aarch64. Depend on versions provided by GNU Binutils instead.
|
|
RUN_DEPENDS+= aarch64-unknown-cloudabi-readelf:devel/cloudabi-binutils-aarch64 \
|
|
x86_64-unknown-cloudabi-readelf:devel/cloudabi-binutils-x86_64
|
|
.endif
|
|
|
|
.for arch in ${CLOUDABI_ARCHS}
|
|
. for tool in ${BASE_TOOLS} ${LLVM_TOOLS} ${SHELL_TOOLS}
|
|
PLIST_FILES+= bin/${arch}-${tool}
|
|
. endfor
|
|
PLIST_FILES+= bin/${arch}-cc bin/${arch}-c++ bin/${arch}-ld \
|
|
llvm${LLVM_SUFFIX}/${arch}
|
|
.endfor
|
|
|
|
do-build:
|
|
.for arch in ${CLOUDABI_ARCHS}
|
|
. for tool in ${SHELL_TOOLS}
|
|
@${SED} -e 's:%%PREFIX%%:${PREFIX}:g' -e 's:%%ARCH%%:${arch}:g' \
|
|
${FILESDIR}/${tool}.in > ${WRKDIR}/${arch}-${tool}
|
|
. endfor
|
|
.endfor
|
|
|
|
do-install:
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/llvm${LLVM_SUFFIX}
|
|
.for arch in ${CLOUDABI_ARCHS}
|
|
. for tool in ${BASE_TOOLS}
|
|
@${LN} -s /usr/bin/${tool} \
|
|
${STAGEDIR}${PREFIX}/bin/${arch}-${tool}
|
|
. endfor
|
|
. for tool in ${LLVM_TOOLS}
|
|
@${LN} -s ../llvm${LLVM_SUFFIX}/bin/llvm-${tool} \
|
|
${STAGEDIR}${PREFIX}/bin/${arch}-${tool}
|
|
. endfor
|
|
. for tool in ${SHELL_TOOLS}
|
|
${INSTALL_SCRIPT} ${WRKDIR}/${arch}-${tool} \
|
|
${STAGEDIR}${PREFIX}/bin/${arch}-${tool}
|
|
. endfor
|
|
@${LN} -s ../llvm${LLVM_SUFFIX}/bin/clang \
|
|
${STAGEDIR}${PREFIX}/bin/${arch}-cc
|
|
@${LN} -s ../llvm${LLVM_SUFFIX}/bin/clang++ \
|
|
${STAGEDIR}${PREFIX}/bin/${arch}-c++
|
|
@${LN} -s ../llvm${LLVM_SUFFIX}/bin/lld \
|
|
${STAGEDIR}${PREFIX}/bin/${arch}-ld
|
|
@${LN} -s ../${arch} ${STAGEDIR}${PREFIX}/llvm${LLVM_SUFFIX}/${arch}
|
|
.endfor
|
|
|
|
.include <bsd.port.post.mk>
|