Add cloudabi-clang.

This port adds the necessary symbolic links to make Clang work as a
cross compiler for CloudABI. Clang can automatically derive its target
from argv[0]. We don't need to install another copy of Clang. It is
sufficient to invoke it the right way.

CloudABI support is not yet part of a released version of Clang. This is
why we still need to depend on llvm-devel. My intent is to stick to a
fixed compiler version at one point in time.

PR:		200954
Differential Revision:	https://reviews.freebsd.org/D2885
Approved by:	bapt
This commit is contained in:
Ed Schouten 2015-06-23 08:38:00 +00:00
parent e13379294e
commit 6d0ed5a314
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=390358
3 changed files with 39 additions and 0 deletions

View file

@ -40,6 +40,7 @@
SUBDIR += clang36
SUBDIR += clojure
SUBDIR += clojure-mode.el
SUBDIR += cloudabi-clang
SUBDIR += cmucl
SUBDIR += cmucl-extra
SUBDIR += cocor

View file

@ -0,0 +1,33 @@
# Created by: Ed Schouten <ed@FreeBSD.org>
# $FreeBSD$
PORTNAME= cloudabi-clang
PORTVERSION= 1.0
CATEGORIES= devel
MASTER_SITES= # None
DISTFILES= # None
MAINTAINER= ed@FreeBSD.org
COMMENT= Clang for CloudABI
LICENSE= MIT
RUN_DEPENDS= clang-devel:${PORTSDIR}/lang/clang-devel \
x86_64-unknown-cloudabi-ld:${PORTSDIR}/devel/cloudabi-binutils
NO_BUILD= yes
PLIST_FILES= bin/x86_64-unknown-cloudabi-cc \
bin/x86_64-unknown-cloudabi-c++ \
llvm-devel/x86_64-unknown-cloudabi
do-install:
@${LN} -s ../llvm-devel/bin/clang \
${STAGEDIR}${PREFIX}/bin/x86_64-unknown-cloudabi-cc
@${LN} -s ../llvm-devel/bin/clang++ \
${STAGEDIR}${PREFIX}/bin/x86_64-unknown-cloudabi-c++
@${MKDIR} ${STAGEDIR}${PREFIX}/llvm-devel
@${LN} -s ../x86_64-unknown-cloudabi \
${STAGEDIR}${PREFIX}/llvm-devel/x86_64-unknown-cloudabi
.include <bsd.port.mk>

View file

@ -0,0 +1,5 @@
The CloudABI environment uses Clang as its C/C++ compiler. This meta
port installs Clang and sets up symbolic links, so that Clang can be
used as a cross compiler for CloudABI.
WWW: https://github.com/NuxiNL/cloudlibc