diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-03-15 17:44:56 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-03-15 18:33:53 +0100 |
commit | d7841372b9eb2a0b14c378a3b1d20eaee337df55 (patch) | |
tree | 160f4f10d62e83954303f54fb5928582b5123799 /sys-libs | |
parent | sys-kernel/vanilla-sources: Version bump to 4.15.10 (diff) | |
download | gentoo-d7841372b9eb2a0b14c378a3b1d20eaee337df55.tar.gz gentoo-d7841372b9eb2a0b14c378a3b1d20eaee337df55.tar.bz2 gentoo-d7841372b9eb2a0b14c378a3b1d20eaee337df55.zip |
sys-libs/compiler-rt-sanitizers: Backport USE=clang to older versions
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.1.ebuild | 11 | ||||
-rw-r--r-- | sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild | 9 |
2 files changed, 17 insertions, 3 deletions
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.1.ebuild index 9d6981d1ffc6..3519ecb52ac3 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.1.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -19,13 +19,14 @@ SRC_URI="https://releases.llvm.org/${PV/_//}/compiler-rt-${PV/_/}.src.tar.xz LICENSE="|| ( UoI-NCSA MIT )" SLOT="${PV%_*}" KEYWORDS="amd64 ~arm64 x86" -IUSE="test" +IUSE="+clang test" LLVM_MAX_SLOT=${SLOT%%.*} RDEPEND="!=sys-libs/compiler-rt-sanitizers-${SLOT}*:0" # llvm-4 needed for --cmakedir DEPEND=" >=sys-devel/llvm-4 + clang? ( sys-devel/clang ) test? ( app-portage/unsandbox $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") @@ -72,6 +73,12 @@ src_configure() { # pre-set since we need to pass it to cmake BUILD_DIR=${WORKDIR}/${P}_build + if use clang; then + local -x CC=${CHOST}-clang + local -x CXX=${CHOST}-clang++ + strip-unsupported-flags + fi + local mycmakeargs=( -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" # use a build dir structure consistent with install diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild index 686e223817fb..768c64155d0a 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild @@ -21,12 +21,13 @@ SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz LICENSE="|| ( UoI-NCSA MIT )" SLOT="${PV%_*}" KEYWORDS="amd64 ~arm64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="test" +IUSE="+clang test" LLVM_MAX_SLOT=${SLOT%%.*} # llvm-4 needed for --cmakedir DEPEND=" >=sys-devel/llvm-4 + clang? ( sys-devel/clang ) test? ( app-portage/unsandbox $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") @@ -72,6 +73,12 @@ src_configure() { # pre-set since we need to pass it to cmake BUILD_DIR=${WORKDIR}/${P}_build + if use clang; then + local -x CC=${CHOST}-clang + local -x CXX=${CHOST}-clang++ + strip-unsupported-flags + fi + local mycmakeargs=( -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" # use a build dir structure consistent with install |