commit: d5112aae544505078691a9099ae33c0f6aaaec2f Author: Yuta SATOH <nigoro.dev <AT> gmail <DOT> com> AuthorDate: Fri Oct 7 12:12:29 2016 +0000 Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp> CommitDate: Fri Oct 7 12:12:29 2016 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=d5112aae
freebsd.eclass: sync latest tree. eclass/freebsd.eclass | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/eclass/freebsd.eclass b/eclass/freebsd.eclass index 0e6ad01..bedda33 100644 --- a/eclass/freebsd.eclass +++ b/eclass/freebsd.eclass @@ -208,6 +208,20 @@ freebsd_src_unpack() { if version_is_at_least 11.0 ${RV} ; then export RSYMLINK=" -l s" 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 + + # Add a special CFLAGS required for multilib support. + use amd64-fbsd && export CFLAGS_x86_fbsd="${CFLAGS_x86_fbsd} -DCOMPAT_32BIT -B/usr/lib32 -L/usr/lib32" } freebsd_src_compile() {