summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuta Satoh <nigoro.dev@gmail.com>2016-10-02 18:04:29 +0900
committerAlexis Ballier <aballier@gentoo.org>2016-10-03 19:02:12 +0200
commit081cc7192ffa253711ff3bd4612967a02ecd8046 (patch)
tree7a97117c71e52141c87cdb43b99cf0430b084856 /eclass/freebsd.eclass
parentprofiles/arch/amd64-fbsd/clang: add some variables for clang support. (diff)
downloadgentoo-081cc7192ffa253711ff3bd4612967a02ecd8046.tar.gz
gentoo-081cc7192ffa253711ff3bd4612967a02ecd8046.tar.bz2
gentoo-081cc7192ffa253711ff3bd4612967a02ecd8046.zip
eclass/freebsd.eclass: If CC=clang, force use clang-cpp.
https://bugs.gentoo.org/show_bug.cgi?id=595878
Diffstat (limited to 'eclass/freebsd.eclass')
-rw-r--r--eclass/freebsd.eclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/eclass/freebsd.eclass b/eclass/freebsd.eclass
index 57f9d451e0f9..c5d946417de9 100644
--- a/eclass/freebsd.eclass
+++ b/eclass/freebsd.eclass
@@ -195,6 +195,17 @@ freebsd_src_unpack() {
export INSTALL_LINK="ln -f"
export INSTALL_SYMLINK="ln -fs"
fi
+
+ # When CC=clang, force use clang-cpp #478810, #595878
+ if [[ $(tc-getCC) == *clang* ]] ; then
+ if type -P clang-cpp > /dev/null ; then
+ export CPP=clang-cpp
+ else
+ mkdir "${WORKDIR}"/workaround_clang-cpp || die "Could not create ${WORKDIR}/workaround_clang-cpp"
+ ln -s "$(type -P clang)" "${WORKDIR}"/workaround_clang-cpp/clang-cpp || die "Could not create clang-cpp symlink."
+ export CPP="${WORKDIR}/workaround_clang-cpp/clang-cpp"
+ fi
+ fi
}
freebsd_src_compile() {