diff options
author | Yuta Satoh <nigoro.dev@gmail.com> | 2016-10-02 18:04:29 +0900 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2016-10-03 19:02:12 +0200 |
commit | 081cc7192ffa253711ff3bd4612967a02ecd8046 (patch) | |
tree | 7a97117c71e52141c87cdb43b99cf0430b084856 /eclass/freebsd.eclass | |
parent | profiles/arch/amd64-fbsd/clang: add some variables for clang support. (diff) | |
download | gentoo-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.eclass | 11 |
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() { |