diff options
author | Yuta SATOH <nigoro.dev@gmail.com> | 2016-10-07 21:12:29 +0900 |
---|---|---|
committer | Yuta SATOH <nigoro.dev@gmail.com> | 2016-10-07 21:12:29 +0900 |
commit | d5112aae544505078691a9099ae33c0f6aaaec2f (patch) | |
tree | 2593eaeaa3b0a9279f5576f5a4be67e5980defd1 | |
parent | Drop unnecessary mk files, and put all of mk to /usr/share/mk/system for sys-... (diff) | |
download | gentoo-bsd-d5112aae544505078691a9099ae33c0f6aaaec2f.tar.gz gentoo-bsd-d5112aae544505078691a9099ae33c0f6aaaec2f.tar.bz2 gentoo-bsd-d5112aae544505078691a9099ae33c0f6aaaec2f.zip |
freebsd.eclass: sync latest tree.
-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() { |