From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18265 invoked by alias); 7 Nov 2011 15:11:04 -0000 Received: (qmail 18238 invoked by uid 22791); 7 Nov 2011 15:11:02 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,TW_CX X-Spam-Check-By: sourceware.org Received: from ra.se.axis.com (HELO ra.se.axis.com) (195.60.68.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Nov 2011 15:10:42 +0000 Received: from localhost (localhost [127.0.0.1]) by ra.se.axis.com (Postfix) with ESMTP id 4F7D012E0F; Mon, 7 Nov 2011 16:10:37 +0100 (CET) Received: from ra.se.axis.com ([127.0.0.1]) by localhost (ra.se.axis.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Ge1qwz2XcxQE; Mon, 7 Nov 2011 16:10:36 +0100 (CET) Received: from seth.se.axis.com (seth.se.axis.com [10.0.2.172]) by ra.se.axis.com (Postfix) with ESMTP id 1AADB4B0FC; Mon, 7 Nov 2011 16:10:26 +0100 (CET) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by seth.se.axis.com (Postfix) with ESMTP id 07BFA3E0A1; Mon, 7 Nov 2011 16:10:26 +0100 (CET) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id pA7FAPF6012203; Mon, 7 Nov 2011 16:10:25 +0100 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id pA7FAP2k012199; Mon, 7 Nov 2011 16:10:25 +0100 Date: Mon, 07 Nov 2011 15:38:00 -0000 Message-Id: <201111071510.pA7FAP2k012199@ignucius.se.axis.com> From: Hans-Peter Nilsson To: amacleod@redhat.com CC: hp@axis.com, hp@axis.com, gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, bkoz@redhat.com, rth@redhat.com In-reply-to: <4EB7EEDF.1040103@redhat.com> (message from Andrew MacLeod on Mon, 7 Nov 2011 15:44:47 +0100) Subject: Re: cxx-mem-model merge [6 of 9] - libstdc++-v3 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT 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: 2011-11/txt/msg00958.txt.bz2 > From: Andrew MacLeod > Date: Mon, 7 Nov 2011 15:44:47 +0100 > Actually, this target has no lock free support whatsoever? ie, no > compare_and_swap instruction, nor an implementation of > sync_lock_test_and_set and sync_lock_release? In CRIS versions where such support would make sense: of course! For cris-elf with the default multilib: no. > I think the libstdc++ standard now requires the class atomic_flag to be > lock free in order to conform (n3242 29.7.2) An early error would be the graceful way, even better to fallback to something that works when simultaneity does not apply in the system. I'm on the edge if a linker warning would be a bonus or badness. :) > How can we tell when > compiling a C++ program whether that is going to be an unresolved > external or whether libgcc is going to provide it? >From within gcc, if (HAVE_sync_really_basic_operation_somethingorotherpatternname) which we could translate to builtin_define("__GNU_SYNC_SUPPORT") if needed. brgds, H-P