From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14793 invoked by alias); 17 Jan 2015 22:22:52 -0000 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 Received: (qmail 14768 invoked by uid 89); 17 Jan 2015 22:22:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 17 Jan 2015 22:22:48 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1YCblR-00020F-QQ from Sandra_Loosemore@mentor.com ; Sat, 17 Jan 2015 14:22:41 -0800 Received: from [IPv6:::1] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Sat, 17 Jan 2015 14:22:41 -0800 Message-ID: <54BAE0A4.8040303@codesourcery.com> Date: Sat, 17 Jan 2015 22:54:00 -0000 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Jonathan Wakely CC: Hans-Peter Nilsson , , David Edelsohn , Torvald Riegel , GCC Patches , "libstdc++@gcc.gnu.org" Subject: Re: [patch libstdc++] Optimize synchronization in std::future if futexes are available. References: <9CAB68C4-08D2-43A1-9A8B-EDE135DDFC8F@gmail.com> <20150117134853.GR3360@redhat.com> <54BABF38.7080602@codesourcery.com> <20150117202356.GT3360@redhat.com> In-Reply-To: <20150117202356.GT3360@redhat.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-01/txt/msg01576.txt.bz2 On 01/17/2015 01:23 PM, Jonathan Wakely wrote: > On 17/01/15 12:59 -0700, Sandra Loosemore wrote: >> Re: >> >>> On 17/01/15 01:45 -0500, Hans-Peter Nilsson wrote: >>>> On Fri, 16 Jan 2015, pinskia@gmail.com wrote: >>>>>> On Jan 16, 2015, at 9:57 PM, David Edelsohn >>>>>> wrote: >>>>>> >>>>>> This patch has broken bootstrap on AIX >>>>>> >>>>>> May I mention that this really should have been tested on systems >>>>>> other than x86 Linux. >>>>> >>>>> It also broke all newlib targets too. So you could have tested one >>>>> listed in the sim-test web page. >>>> >>>> For those interested, PR64638. >>> >>> Should be fixed in trunk now, by this patch. >> >> I'm now getting this error in an arm-none-linux-gnueabi cross build: >> >> >> In file included from >> /scratch/sandra/arm-fsf2/obj/gcc-mainline-0-arm-none-linux-gnueabi-i686-pc-linux-gnu/arm-none-linux-gnueabi/libstdc++-v3/include/future:44:0, >> >> from >> /scratch/sandra/arm-fsf2/src/gcc-mainline/libstdc++-v3/src/c++11/functexcept.cc:34: >> >> /scratch/sandra/arm-fsf2/obj/gcc-mainline-0-arm-none-linux-gnueabi-i686-pc-linux-gnu/arm-none-linux-gnueabi/libstdc++-v3/include/bits/atomic_futex.h:71:3: >> error: #error We require lock-free atomic operations on int >> # error We require lock-free atomic operations on int >> ^ >> >> It used to work a few days ago.... nothing changed in my build >> environment except that I did "svn up" in my gcc source directory.... > > Well that file didn't exist until yesterday :-) > > Does the attached patch fix it? > > The new __atomic_futex_unsigned type is only used in when > ATOMIC_LOCK_FREE > 1, so there's no point trying to define it and > then failing if int is not lock-free, as the type isn't going to be > used anyway. I'm getting a different series of build errors with this patch -- starting with In file included from /scratch/sandra/arm-fsf2/src/gcc-mainline/libstdc++-v3/src/c++11/futex.cc:27:0: /scratch/sandra/arm-fsf2/obj/gcc-mainline-0-arm-none-linux-gnueabi-i686-pc-linux-gnu/arm-none-linux-gnueabi/libstdc++-v3/include/bits/atomic_futex.h:221:5: error: 'mutex' does not name a type mutex _M_mutex; ^ /scratch/sandra/arm-fsf2/obj/gcc-mainline-0-arm-none-linux-gnueabi-i686-pc-linux-gnu/arm-none-linux-gnueabi/libstdc++-v3/include/bits/atomic_futex.h:222:5: error: 'condition_variable' does not name a type condition_variable _M_condvar; ^ /scratch/sandra/arm-fsf2/obj/gcc-mainline-0-arm-none-linux-gnueabi-i686-pc-linux-gnu/arm-none-linux-gnueabi/libstdc++-v3/include/bits/atomic_futex.h: In member function 'unsigned int std::__atomic_futex_unsigned<_Waiter_bit>::_M_load(std::memory_ order)': /scratch/sandra/arm-fsf2/obj/gcc-mainline-0-arm-none-linux-gnueabi-i686-pc-linux-gnu/arm-none-linux-gnueabi/libstdc++-v3/include/bits/atomic_futex.h:230:7: error: 'unique_lock' was not declared in this scope unique_lock __lock(_M_mutex); ^ and going on for several screenfuls. Maybe the patch(es) causing all these problems should be reverted until the breakage is tracked down and fixed and regression-tested on a variety of targets? It's not really blocking me at the moment, but it seems unfortunate that trunk is so unstable as we're entering Stage 4..... -Sandra