From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30050 invoked by alias); 18 Dec 2012 22:52:25 -0000 Received: (qmail 30041 invoked by uid 22791); 18 Dec 2012 22:52:24 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-oa0-f43.google.com (HELO mail-oa0-f43.google.com) (209.85.219.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Dec 2012 22:52:19 +0000 Received: by mail-oa0-f43.google.com with SMTP id k1so1318870oag.16 for ; Tue, 18 Dec 2012 14:52:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=zC+m/CErOrVoOsslXzHqC6pW+gVMH0S2mGr6bUUQmXM=; b=VEHrdbMIYIecBinno/jd4cGIfKB8DHKUJtrzcC22n5IU89f/H9v3gP3Ligo0+T74kG BwxgBYOE+YZfOmGfxFDoNnUqVp5ZRqQlSBVgpNJlIOJmXnnwl7TCSZrihkfteMEgSIQG AjvM3nP/7qt0IKrXwCqChB9+aTmI0MXSCqgzdExJ2+71/iex1ZfX9A8U6l7oZqMdgw3G n1rSQyzMa5XaZftqxs3HVFUvkTMEWm1UxhMSUmeGKhOFPEz5lVu+QECWwkzQlCxczj0O +fOZxmloJUbLgOtgyEAjua88S7vcY/UlOEjMR2lxKPQsh+5mL1IWeiq6bN+VOZ2fMVu3 ZtPA== MIME-Version: 1.0 Received: by 10.60.1.232 with SMTP id 8mr3138690oep.30.1355871138627; Tue, 18 Dec 2012 14:52:18 -0800 (PST) Received: by 10.182.115.72 with HTTP; Tue, 18 Dec 2012 14:52:18 -0800 (PST) In-Reply-To: <50D0EE7E.6000702@redhat.com> References: <50D0E0F2.5090407@redhat.com> <50D0EE7E.6000702@redhat.com> Date: Tue, 18 Dec 2012 22:52:00 -0000 Message-ID: Subject: Re: PATCH RFA: PR go/55201: Create libatomic convenience library From: Ian Lance Taylor To: Richard Henderson Cc: Matthias Klose , Andreas Schwab , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmcIqKNWdK0iFyio8LP0eZhpg63UFdaBoO6sILnmmLXbR2aicRm2pjvwKmhc1i5/kPQ4a47aSv0JdaAKxzAbkSpsKV7bN8EZwLmzTL++UEWvwpmZ94kQ4Go/iKlkhZ8WvvFEnqAL5sR0mQx4OYCTrwNjDTskhj4U5uRPfzt8ROx/EU4Ow2X9DG8z9u7bRjVKe/rP4PZ X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg01155.txt.bz2 On Tue, Dec 18, 2012 at 2:30 PM, Richard Henderson wrote: > On 12/18/2012 02:09 PM, Ian Lance Taylor wrote: >> I have now committed this follow-on patch, to make libgo use the new >> libatomic_convenience library. This means that the changes to >> explicitly link against -latomic are no longer necessary. > > Hang on, what are we doing here. Are we linking libatomic statically > into libgo? That's only going to work so long as the target does not > require the use of a mutex. While that's most desktop targets, it's > certainly not all of them. > > If the target requires a mutex for the atomic operation, then there > must be exactly one copy of the atomic library. Argh. But why? Wouldn't that only apply to cases where the lock was sometimes locked by one library and sometimes locked by a different one? Ian