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>
This commit is contained in:
parent
35a35cf2f4
commit
509991cc05
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=282762
@ -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>
|
||||
|
7
devel/ccache/files/pkg-message-clang
Normal file
7
devel/ccache/files/pkg-message-clang
Normal file
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user