diff options
-rw-r--r-- | eclass/freebsd.eclass | 14 |
1 files changed, 14 insertions, 0 deletions
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() { |