commit:     8045956db286fac4cf3e6e0a03d5464d7049f889
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 16 21:41:53 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Nov 16 21:41:53 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8045956d

sys-libs/glibc: expose errors in sync primitives checks

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 <AT> gentoo.org>

 sys-libs/glibc/glibc-2.30-r2.ebuild | 6 +++---
 sys-libs/glibc/glibc-9999.ebuild    | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys-libs/glibc/glibc-2.30-r2.ebuild 
b/sys-libs/glibc/glibc-2.30-r2.ebuild
index f3282ba8a07..910396913f2 100644
--- a/sys-libs/glibc/glibc-2.30-r2.ebuild
+++ b/sys-libs/glibc/glibc-2.30-r2.ebuild
@@ -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

diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 9971df60979..f1b57d70806 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -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

Reply via email to