From patchwork Thu May 10 09:16:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 158232 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 534DFB6FA1 for ; Thu, 10 May 2012 19:16:25 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1337246186; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=tRddxz+gDjIUZaM6kRE5W+KTL+o=; b=bI9dnCseEGfyfCN Vufl7pUtHvzgUlgI7kh8EQUmCx72TRAk8ZqEzpq9Of2+wpx7gqyTaUqgFpYp+O+4 cMjSfqSy1qbNyTgz0KMOLYPvBznXATYtDqYEBs3hqWUzjRghs8p3J0hc/bvJdj3Q 7FDMKv4xpvSXNgGZIhaTx7leFLNw= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Do1QloRJHM+drrRbFHD9I8KC3hrU+0kH1IMdihsXJBTuFRmRAXb6UZwBLLcB9w 6O84QlnMWOLCYUKIMEBEKvmyR61vZcwpse54D+9VOTJI3LLyfj0aEk6Vr+e73yFn 1HwsG+irgmLMmKJWwun04ingFB3kU597jQwwACpuiqPrA=; Received: (qmail 7078 invoked by alias); 10 May 2012 09:16:20 -0000 Received: (qmail 7066 invoked by uid 22791); 10 May 2012 09:16:19 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 May 2012 09:16:06 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id A9A722CF; Thu, 10 May 2012 11:16:05 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id EwbdTProTSgs; Thu, 10 May 2012 11:16:04 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 1648D2CE; Thu, 10 May 2012 11:16:04 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id q4A9G3Uo019912; Thu, 10 May 2012 11:16:03 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Richard Henderson Subject: [libatomic] Always compile atomic builtin tests with $XCFLAGS (PR other/53284) Date: Thu, 10 May 2012 11:16:03 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org As described in the PR, several 32-bit libatomic tests FAIL on Solaris/x86 with infinite recursion e.g. in __atomic_compare_exchange_8. It turns out that this happens because, unlike on glibc targets, the atomic builtin configure tests are run as compile tests, but are currently not compiled with $XCFLAGS, unlike the real code. The following patch fixes this, tested on i386-pc-solaris2.10 and x86_64-unknown-linux-gnu, approved by rth in the PR, installed on mainline. Rainer 2012-05-09 Rainer Orth PR other/53284 * acinclude.m4 (LIBAT_TEST_ATOMIC_BUILTIN): Add -O0 -S to CFLAGS instead of overriding. * configure: Regenerate. # HG changeset patch # Parent 6c6136d0a9792bfd3fe9600f7867d5edf5c9b114 Always compile atomic builtin tests with $XCFLAGS 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