From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16145 invoked by alias); 9 May 2012 11:45:29 -0000 Received: (qmail 16133 invoked by uid 22791); 9 May 2012 11:45:28 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 May 2012 11:45:15 +0000 From: "ro at CeBiTec dot Uni-Bielefeld.DE" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/53284] Several libatomic tests fail on 32-bit Solaris/x86 Date: Wed, 09 May 2012 11:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at CeBiTec dot Uni-Bielefeld.DE X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-05/txt/msg00992.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53284 --- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE 2012-05-09 11:45:10 UTC --- > --- Comment #1 from Richard Henderson 2012-05-08 22:39:35 UTC --- > Can you investigate why configure decides that __atomic_compare_exchange_8 > is implemented inline? That it isn't inline is obvious from the recursion. That was the critical hint, thanks. Comparing i386-pc-solaris2.10 and i686-unknown-linux-gnu config.log, I see that in the Linux case the test is run as a link test and includes -fno-sync-libcalls $XCFLAGS, while in the Solaris case, it's an compile test and lacks all of them. > Was the configure change to CFLAGS in fact wrong? No, that's unrelated. The following patch works for me and lets all tests in the above configuration pass. I've chosen to add to CFLAGS rather than adding $XCFLAGS since otherwise we loose -fno-sync-libcalls. Ok for mainline? Thanks. Rainer 2012-05-09 Rainer Orth * acinclude.m4 (LIBAT_TEST_ATOMIC_BUILTIN): Add -O0 -S to CFLAGS instead of overriding. * configure: Regenerate. diff --git a/libatomic/acinclude.m4 b/libatomic/acinclude.m4 --- a/libatomic/acinclude.m4 +++ b/libatomic/acinclude.m4 @@ -67,7 +67,7 @@ AC_DEFUN([LIBAT_TEST_ATOMIC_BUILTIN],[ else old_CFLAGS="$CFLAGS" # Compile unoptimized. - CFLAGS='-O0 -S' + CFLAGS="$CFLAGS -O0 -S" if AC_TRY_EVAL(ac_compile); then if grep __atomic_ conftest.s >/dev/null 2>&1 ; then eval $2=no