sys-libs/netbsd-csu: Force testing with sys-devel/clang
authorMichał Górny <mgorny@gentoo.org>
Sat, 17 Aug 2019 08:38:41 +0000 (10:38 +0200)
committerMichał Górny <mgorny@gentoo.org>
Wed, 25 Sep 2019 17:26:59 +0000 (19:26 +0200)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
sys-libs/netbsd-csu/netbsd-csu-7.1.ebuild

index bacdd60d24fa7efcb4c3af8d48a5725c87bf02a6..c3b117bb5771e6a662bbc52500f5c5c219b90fe0 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -12,9 +12,11 @@ SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz"
 LICENSE="BSD-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="test"
+RESTRICT="!test? ( test )"
 
-DEPEND="app-arch/xz-utils"
+DEPEND="app-arch/xz-utils
+       test? ( sys-devel/clang )"
 
 S=${WORKDIR}/${P}/lib/csu
 
@@ -60,9 +62,14 @@ multilib_src_compile() {
 }
 
 multilib_src_test() {
+       # TODO: fix gcc support
+       local -x CC=${CHOST}-clang
+       local -x CXX=${CHOST}-clang++
+       strip-unsupported-flags
+
        local cc=(
                # -B sets prefix for internal gcc/clang file lookup
-               $(tc-getCC) -B"${BUILD_DIR}"
+               "${CC}" -B"${BUILD_DIR}"
        )
 
        # 1. figure out the correct location for crt* files