sys-libs/compiler-rt: Run builtin tests for all ABIs
authorMichał Górny <mgorny@gentoo.org>
Tue, 3 Jan 2017 19:56:44 +0000 (20:56 +0100)
committerMichał Górny <mgorny@gentoo.org>
Tue, 3 Jan 2017 21:22:11 +0000 (22:22 +0100)
sys-libs/compiler-rt/compiler-rt-9999.ebuild

index ebb8b2b4819b6e69c9b04adf79ca9888efba064f..614c6757497c84142c4e38b662516c1d6a206629 100644 (file)
@@ -64,6 +64,10 @@ src_configure() {
        cmake-utils_src_configure
 }
 
+run_tests_for_abi() {
+       local ABI=${1}
+}
+
 src_test() {
        # prepare a test compiler
        local clang_version=4.0.0
@@ -103,13 +107,22 @@ src_test() {
                done
        } > Makefile || die
 
-       # use -k to run all tests even if some fail
-       emake -k \
-               CC="${BUILD_DIR}/bin/clang" \
-               CFLAGS='' \
-               CPPFLAGS='-I../../../lib/builtins' \
-               LDFLAGS='-rtlib=compiler-rt' \
-               LDLIBS='-lm'
+       local ABI
+       for ABI in $(get_all_abis); do
+               # not supported at all at the moment
+               [[ ${ABI} == x32 ]] && continue
+
+               rm -f "${tests[@]}" || die
+
+               einfo "Running tests for ABI=${ABI}"
+               # use -k to run all tests even if some fail
+               emake -k \
+                       CC="${BUILD_DIR}/bin/clang" \
+                       CFLAGS="$(get_abi_CFLAGS)" \
+                       CPPFLAGS='-I../../../lib/builtins' \
+                       LDFLAGS='-rtlib=compiler-rt' \
+                       LDLIBS='-lm'
+       done
 }
 
 src_install() {