sys-libs/glibc: expose errors in sync primitives checks
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 16 Nov 2019 21:41:53 +0000 (21:41 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 16 Nov 2019 21:41:53 +0000 (21:41 +0000)
In bug #700232 CFLAGS_x86 mis-detects unsupported sync
primitives. That triggers accidental -march=* filter-out.

This change should expose actual built failure.

Bug: https://bugs.gentoo.org/700232
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
sys-libs/glibc/glibc-2.30-r2.ebuild
sys-libs/glibc/glibc-9999.ebuild

index f3282ba8a07f1e57a912f019215d39ed0d1da1fe..910396913f25fd21619775d2e4e2fd51cc0fa8f3 100644 (file)
@@ -198,7 +198,7 @@ do_compile_test() {
        rm -f glibc-test*
        printf '%b' "$*" > glibc-test.c
 
-       nonfatal emake -s glibc-test
+       nonfatal emake glibc-test
        ret=$?
 
        popd >/dev/null
@@ -246,7 +246,7 @@ setup_target_flags() {
                        # We could change main to _start and pass -nostdlib here so that we
                        # only test the gcc code compilation.  Or we could do a compile and
                        # then look for the symbol via scanelf.
-                       if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; then
+                       if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
                                local t=${CTARGET_OPT:-${CTARGET}}
                                t=${t%%-*}
                                filter-flags '-march=*'
@@ -259,7 +259,7 @@ setup_target_flags() {
                        # Note: This test only matters when the x86 ABI is enabled, so we could
                        # optimize a bit and elide it.
                        # TODO: See cross-compile issues listed above for x86.
-                       if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; then
+                       if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
                                local t=${CTARGET_OPT:-${CTARGET}}
                                t=${t%%-*}
                                # Normally the target is x86_64-xxx, so turn that into the -march that
index 9971df609793ae459c8162c0dbe7e53a5f5c9efd..f1b57d70806c7de6dfc6d69492f059c81af1e8cb 100644 (file)
@@ -199,7 +199,7 @@ do_compile_test() {
        rm -f glibc-test*
        printf '%b' "$*" > glibc-test.c
 
-       nonfatal emake -s glibc-test
+       nonfatal emake glibc-test
        ret=$?
 
        popd >/dev/null
@@ -247,7 +247,7 @@ setup_target_flags() {
                        # We could change main to _start and pass -nostdlib here so that we
                        # only test the gcc code compilation.  Or we could do a compile and
                        # then look for the symbol via scanelf.
-                       if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; then
+                       if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
                                local t=${CTARGET_OPT:-${CTARGET}}
                                t=${t%%-*}
                                filter-flags '-march=*'
@@ -260,7 +260,7 @@ setup_target_flags() {
                        # Note: This test only matters when the x86 ABI is enabled, so we could
                        # optimize a bit and elide it.
                        # TODO: See cross-compile issues listed above for x86.
-                       if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; then
+                       if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
                                local t=${CTARGET_OPT:-${CTARGET}}
                                t=${t%%-*}
                                # Normally the target is x86_64-xxx, so turn that into the -march that