From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id DF84E3858D37; Sat, 19 Nov 2022 11:27:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DF84E3858D37 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-x62c.google.com with SMTP id bj12so18719535ejb.13; Sat, 19 Nov 2022 03:27:21 -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=EP4D/l8beogwPbJES1guNgyrxdZ/PHyKCCKZB8MWZOY=; b=ciXK2Ys60FQYKqBmxhB1A/NDehdsMXuA/yv5/1UWHEQAXUlXW6/wnJ4o8skkGzMptL TSRZiu8lNXMitZw3mCtt3iB1WVDLpEeyduT81rbC9Qo9Z7rmJRT2E/UXFEmPjDPj7ce4 INPva5Dia1nSPXoy88dqNuXJo6uWcZNyGw7x7Izup8Ha9zuisjlDY15s62i88M+TnKMV zRzAMGWRgZQV/jLdyGbRs0gdL9ZNm16PjYErFseN8wYMfqwVncaJhOkoNUhSnTzv3qj9 CpVjEIsdNyp3Q4IyVHe4agzIxwys87Lq30bFEfr8uw4SIFeL0VLr0MRy5SYq5Ja3HxXR odNg== 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=EP4D/l8beogwPbJES1guNgyrxdZ/PHyKCCKZB8MWZOY=; b=yxDBmN4Ai21xvTJ/8+HYgcCl+mloQNSfVlGRfrLtjI2XvoMwcyNp4DIuJeBWZUqgzn SoTj+JsC2l5EkVkiXx3VZ8FQ19+IDL4i6FIJI5TsygBhkNnB5vqUkwmHbDL9H3m5zPET rlAJe5iCVXZ4pccIKD3eOcP/Ao1SOh/oDghO3OVVXTJtCacHqW35i1qR1o0/SsHquwMy A/GSphq3l3mltTNV9H0NdkQE0rXADj7PdE2YMOEgj1YCKorYtBOABa4nU48+fHwZSM4Y 95uffGcF6/Dd1VYIOnh9L1DZUzK0iyKiIAtufQAK/WS2hP/lwlGjOp23K84tMAiNQvcS hVOw== X-Gm-Message-State: ANoB5plzetcsRUwVzrWkCrz1vjt82fjeGQsmKh2HvBJxW0gT2s9J3TXF v92CWAJ5DeiwbKRNIkLiLQGDFaC9dsK/prGrIIE= X-Google-Smtp-Source: AA0mqf6aCVYcRHRoJx2EGejhnTt/8DhXGkNX+/yn+DOAIGxOPZd+hdyAYqfNNvnJzl0GYzU9V2hKKrLFi4RFuRrW0CA= X-Received: by 2002:a17:906:f106:b0:7b2:9a6b:9ac6 with SMTP id gv6-20020a170906f10600b007b29a6b9ac6mr1352523ejb.215.1668857240536; Sat, 19 Nov 2022 03:27:20 -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: From: Jonathan Wakely Date: Sat, 19 Nov 2022 11:27:09 +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.8 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 19:01, Jonathan Wakely wrote= : > > 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 I rebased the patch and re-tested with those options, and all tests passed again: =3D=3D=3D jit Summary =3D=3D=3D # of expected passes 15081 > > The patch is OK for trunk if you have favorable answers for the above > > two questions. Thanks, I've pushed it to trunk now.