From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id A0C9C38A90A4; Tue, 15 Nov 2022 19:01:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A0C9C38A90A4 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x62e.google.com with SMTP id n12so38371023eja.11; Tue, 15 Nov 2022 11:01:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UM8+1gKbSjH5cwWlM1Zlmhz13672Is3jrWYVf1p03E8=; b=PwmDVz/J3tm1SIYNL9Z/JwFHYlaVIDaJlJ2X8ZPIlhyD+mqHf6ssJ2y2V5prmpWQOB 2TMby8TfZjBIZm8UEcp2wQzM6AUEjlaPd5hnPDeuueGnUgk/fW708q5PPJAVEiH09ygM NRTB3j55S4Db7JOqmaoX1LrTbAncXZ4jztroykJWvkr6FKLQ5may3z52IqKfQPGbHgDd siOKKxWitHXFbeheZpyIVtC17mFdeplKP6TEBwBUVAnGGLUsNhupJlweniSuwJ/nAAov KUejNW78bhaB7HNlkhgE8NNcOhM5JZlyyk6cZbFVDJhlNEg8SxyAXSG9ZC5Jz0UQNgbJ m+aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UM8+1gKbSjH5cwWlM1Zlmhz13672Is3jrWYVf1p03E8=; b=n/Z01G5BxAYjoZRpfTeiDbZYWGU6DvbxQ9CTADdvtd715Xv98YA+bqUTWowMTzLeZA rkBcQLKi+0luspB4QcEKbtVoywl3N8TNBxH3CazRuZbZlUFl041t2RUoNcYLp/JBOXN9 rc66RaecfFi8yRGvVk+C+tPVpTlQHKmw7BWL0f76avtVZgR6T8p2Io1LBoI3KNqbLSMl y6aQ38kebNscdwtT46beq/jttCoaxWqExe3nprX4DoU6bw9BHpeCd2V2FKq/pyEaQp0V 6o7xfroZWDR1V9KonITYhnCc+niwYo0cqUuTXLnLg0k9juCPGKutEn4O8excybwsP8ML yBYQ== X-Gm-Message-State: ANoB5pkYOMpY1MfErcYYkGqcSPjWK+5jJLNV8FTkfyn7vFW7oTWBxCvr Kt6L+OsXaq5bzsIa1BjX2oELmPlfvmR29VibItg= X-Google-Smtp-Source: AA0mqf4gu+4e6yFxwPzFRPksMsVKVurxDzT7QNh4pzhBu/BoDATMDJSiSX3xZ2YbiUEKvK7ttOaO5a9hUQFWayO5giM= X-Received: by 2002:a17:906:4e54:b0:78d:a30f:3f3a with SMTP id g20-20020a1709064e5400b0078da30f3f3amr15066816ejw.386.1668538902154; Tue, 15 Nov 2022 11:01:42 -0800 (PST) MIME-Version: 1.0 References: <8f15b063-9ec8-59e0-590b-20e416f68cb4@126.com> <98c69fc7-713f-a09a-8ca7-c3e64bdfd309@126.com> <0c6b1411-fa35-1c2f-16f2-f26b6e6cedaa@126.com> <63a9058d0bb20e40a8d3c24ecbc0c5da1b54faf5.camel@redhat.com> In-Reply-To: <63a9058d0bb20e40a8d3c24ecbc0c5da1b54faf5.camel@redhat.com> From: Jonathan Wakely Date: Tue, 15 Nov 2022 19:01:27 +0000 Message-ID: Subject: Re: why does gcc jit require pthread? To: David Malcolm Cc: LIU Hao , Andrew Pinski , gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org, jit@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 15 Nov 2022 at 18:50, David Malcolm wrote: > > [Fixing typo in the Subject ("git" -> "jit" ); CCing jit mailing list] > > On Fri, 2022-11-11 at 17:16 +0000, Jonathan Wakely wrote: > > On Mon, 7 Nov 2022 at 13:51, Jonathan Wakely wrote: > > > > > > On Mon, 7 Nov 2022 at 13:33, LIU Hao wrote: > > > > > > > > =E5=9C=A8 2022-11-07 20:57, Jonathan Wakely =E5=86=99=E9=81=93: > > > > > It would be a lot nicer if playback::context met the C++ > > > > > Lockable > > > > > requirements, and playback::context::compile () could just take > > > > > a > > > > > scoped lock on *this: > > > > > > > > > > > > > > > > > > Yeah yeah that makes a lot of sense. Would you please just commit > > > > that? I don't have write access to > > > > GCC repo, and it takes a couple of hours for me to bootstrap GCC > > > > just for this tiny change. > > > > > > Somebody else needs to approve it first. I'll combine our patches > > > and > > > test and submit it properly for approval. > > > > Here's a complete patch that actually builds now, although I'm seeing > > a stage 2 vs stage 3 comparison error which I don't have time to look > > into right now. > > I confess that I'm not familiar with C++11's mutex and locking types, > but having read through the relevant entries on cppreference.com, the > patch looks correct to me. > > Are these classes well-supported on the minimum compiler version we > support? (Jonathan, I defer to your judgement here) std::mutex has been supported since 4.4.0 and is very simple. The implementation on trunk is identical to the one in gcc 4.8.5 except for adding 'noexcept' to mutex::native_handle (), which is not relevant to this change. > Jonathan: you said in your followup email that it "bootstraps and > passes testing on x86_64-pc-linux-gnu (CentOS 8 Stream)". This is > possibly a silly question, but did this testing include the jit > testsuite? A gotcha here is that --enable-languages=3Dall does *not* > enable jit. Yes, I built with --enable-languages=3Dc,c++,jit --enable-host-shared > The patch is OK for trunk if you have favorable answers for the above > two questions. > > Thanks! > Dave >