From d5112aae544505078691a9099ae33c0f6aaaec2f Mon Sep 17 00:00:00 2001 From: Yuta SATOH Date: Fri, 7 Oct 2016 21:12:29 +0900 Subject: 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() { -- cgit v1.2.3-65-gdbad