aboutsummaryrefslogtreecommitdiffstats
path: root/devel/ccache
diff options
context:
space:
mode:
authorehaupt <ehaupt@FreeBSD.org>2011-10-02 05:49:28 +0800
committerehaupt <ehaupt@FreeBSD.org>2011-10-02 05:49:28 +0800
commit1489477118b6642d29cb4d7d2049b9492d7f80d2 (patch)
tree10ec0e2553fbd15995c1e9f944428ad9184fad90 /devel/ccache
parent8ef5ede5d3b598e286351b9b62088084f7132f9e (diff)
downloadfreebsd-ports-gnome-1489477118b6642d29cb4d7d2049b9492d7f80d2.tar.gz
freebsd-ports-gnome-1489477118b6642d29cb4d7d2049b9492d7f80d2.tar.zst
freebsd-ports-gnome-1489477118b6642d29cb4d7d2049b9492d7f80d2.zip
Add options to create compiler links for clang and llvm. Also add a warning
that clang is not yet fully supported by ccache. PR: 161029 (based on) Submitted by: Volodymyr Kostyrko <c.kworr@gmail.com>
Diffstat (limited to 'devel/ccache')
-rw-r--r--devel/ccache/Makefile19
-rw-r--r--devel/ccache/files/pkg-message-clang7
2 files changed, 24 insertions, 2 deletions
diff --git a/devel/ccache/Makefile b/devel/ccache/Makefile
index f489e7aaf2cf..96ff95b4c572 100644
--- a/devel/ccache/Makefile
+++ b/devel/ccache/Makefile
@@ -7,7 +7,7 @@
PORTNAME= ccache
PORTVERSION= 3.1.5
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= http://samba.org/ftp/ccache/ CRITICAL
@@ -26,6 +26,9 @@ MAN1= ccache.1
PORTDOCS= ccache-howto-freebsd.txt MANUAL.html
+OPTIONS= CLANGLINK "Create clang compiler links if clang is installed" off \
+ LLVMLINK "Create llvm compiler links if llvm is installed" off
+
.include <bsd.port.pre.mk>
PLIST_SUB+= CCLINKDIR="${CCLINKDIR}"
@@ -33,9 +36,18 @@ PLIST_SUB+= CCLINKDIR="${CCLINKDIR}"
.if ${ARCH}=="i386"
CCACHE_COMPILERS+= icc icpc
.endif
+
GNU_COMPILERS+= 34 42 43 44 45 46
CCACHE_COMPILERS+= cc c++ gcc g++ ${GNU_COMPILERS:S|^|gcc|} ${GNU_COMPILERS:S|^|g++|}
-CCACHE_COMPILERS+= clang clang++ llvm-gcc llvm-c++ llvm-g++
+
+.if defined(WITH_CLANGLINK)
+CCACHE_COMPILERS+= clang clang++
+.endif
+
+.if defined(WITH_LLVMLINK)
+CCACHE_COMPILERS+= llvm-gcc llvm-c++ llvm-g++
+.endif
+
CCACHE_COMPILERS+= ${EXTRA_COMPILERS}
SUB_LIST+= CCACHE_COMPILERS="${CCACHE_COMPILERS}" \
CCLINKDIR="${CCLINKDIR}" \
@@ -72,5 +84,8 @@ post-install:
@${ECHO_CMD} "Create compiler links..."
@${PREFIX}/bin/ccache-update-links -v
@${CAT} ${PKGMESSAGE}
+.if defined(WITH_CLANGLINK)
+ @${CAT} ${FILESDIR}/pkg-message-clang
+.endif
.include <bsd.port.post.mk>
diff --git a/devel/ccache/files/pkg-message-clang b/devel/ccache/files/pkg-message-clang
new file mode 100644
index 000000000000..803bbaa17d12
--- /dev/null
+++ b/devel/ccache/files/pkg-message-clang
@@ -0,0 +1,7 @@
+You've chosen to create symlinks to clang compiler binaries if they exist.
+While it's known to be save to build world with clang/ccache, is not fully
+supported yet. You have been warned.
+
+See:
+https://bugzilla.samba.org/show_bug.cgi?id=8460
+