Message ID | 20230410042136.351081-1-thiago.bauermann@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 97FFA3858401 for <patchwork@sourceware.org>; Mon, 10 Apr 2023 04:22:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97FFA3858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681100539; bh=vYu3icqWqPpEIRqMELJs4+JhZzQ+Z6mXcHU3tFPaSjs=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=KhWUjKthLU2psQQyNddgAgsUNkSDocngjsU9aLvEN7HEQ9VdU0UvxW/YI5wpVYZsU ovZ/wD838rGqMxKIW7yFI5j2GMbXCwImtvFKKf2+YGFcs3zDMOZr2Q+frj1k39hAJ4 mC37SG/DIVd4ap4bRvAQxU2+cw95KC650hsNCYN8= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 4889B3858D3C for <gdb-patches@sourceware.org>; Mon, 10 Apr 2023 04:21:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4889B3858D3C Received: by mail-ot1-x32d.google.com with SMTP id 6-20020a9d0106000000b006a177038dfeso15306865otu.7 for <gdb-patches@sourceware.org>; Sun, 09 Apr 2023 21:21:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681100513; x=1683692513; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vYu3icqWqPpEIRqMELJs4+JhZzQ+Z6mXcHU3tFPaSjs=; b=WGaYUg8FDp3QawXQcOMQ3sAG/Z50Fom7wcMAWbHkqe3o5Pq7NaX+yzyhFOZt0oscOr WeaP0lALjdQFqyseN2tm/ajjgvznFXgZaNs1LSiIjpXsYW115TfzIiCkzg+xJMZAe7zV Us6nXM1Mujr3lDn/sWDVbnaMIfHduxd1eOKstoVFc3kGz+A9yMGFLoIcrpn36scNnFmU JNDdZOhMpNR8aMNt6okTtjmBa1zkjZkLuykLG0sSoW4xYQDsh1HyKtLbM41Hp8FK3Qpa Rd1kOlNbnGKmXborwjPIL9x8xRujNqFQDJjw62YXgVjKHY6YtVEzU3cWYVcwWrmP/5+Z RzsA== X-Gm-Message-State: AAQBX9flCWPXxdFUMv1spOuZx9zaSIJN8WxYV/TtNSjCm5/kaJ1cG1OP s7EZRXokQYYeS/ZELciQnpQLsyt/lJ7Rq+RRi2c= X-Google-Smtp-Source: AKy350bsMl09/lHiuuUn1Rctg43vauPV1ZC9H5rvTdURokQpL5KEqo5JKZEa8zOdmizyQuG+DD6Kug== X-Received: by 2002:a9d:7ad9:0:b0:697:bfe5:93a0 with SMTP id m25-20020a9d7ad9000000b00697bfe593a0mr4677431otn.10.1681100513595; Sun, 09 Apr 2023 21:21:53 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:e57b:a7f7:7e:abf5]) by smtp.gmail.com with ESMTPSA id s13-20020a9d758d000000b006a13a29c06esm3869205otk.58.2023.04.09.21.21.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Apr 2023 21:21:53 -0700 (PDT) To: gdb-patches@sourceware.org Cc: Thiago Jung Bauermann <thiago.bauermann@linaro.org> Subject: [PATCH] gdb/dwarf: Fix MinGW build Date: Mon, 10 Apr 2023 04:21:36 +0000 Message-Id: <20230410042136.351081-1-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Thiago Jung Bauermann via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Thiago Jung Bauermann <thiago.bauermann@linaro.org> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
gdb/dwarf: Fix MinGW build
|
|
Commit Message
Thiago Jung Bauermann
April 10, 2023, 4:21 a.m. UTC
Unfortunately MinGW doesn't support std::future yet, so this causes the build to fail. Use GDB's version which provides a fallback for this case. Tested for regressions on native aarch64-linux. --- gdb/dwarf2/cooked-index.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
>>>>> Thiago Jung Bauermann via Gdb-patches <gdb-patches@sourceware.org> writes: > Unfortunately MinGW doesn't support std::future yet, so this causes the > build to fail. Use GDB's version which provides a fallback for this case. > Tested for regressions on native aarch64-linux. Thanks, & sorry about that. This doesn't fail for me using the Fedora mingw cross toolchain, I don't know why. Internally at AdaCore, it works fine, because we use a version of GCC that implements std::thread for mingw. Anyway... Approved-By: Tom Tromey <tromey@adacore.com> Tom
Tom Tromey <tromey@adacore.com> writes: >>>>>> Thiago Jung Bauermann via Gdb-patches <gdb-patches@sourceware.org> writes: > >> Unfortunately MinGW doesn't support std::future yet, so this causes the >> build to fail. Use GDB's version which provides a fallback for this case. > >> Tested for regressions on native aarch64-linux. > > Thanks, & sorry about that. No problem. > This doesn't fail for me using the Fedora mingw cross toolchain, I don't > know why. Internally at AdaCore, it works fine, because we use a > version of GCC that implements std::thread for mingw. Interesting. For the record, I noticed this with gcc-mingw-w64-i686 from Ubuntu 20.04 and 22.04, versions 9.3.0-7ubuntu1+22~exp1ubuntu4 and 10.3.0-14ubuntu1+24.3 respectively. > Anyway... > > Approved-By: Tom Tromey <tromey@adacore.com> Thanks! Committed.
diff --git a/gdb/dwarf2/cooked-index.h b/gdb/dwarf2/cooked-index.h index f2664929e521..0d6f3e5aa0ee 100644 --- a/gdb/dwarf2/cooked-index.h +++ b/gdb/dwarf2/cooked-index.h @@ -442,7 +442,7 @@ class cooked_index : public dwarf_scanner_base vec_type m_vector; /* A future that tracks when the 'index_write' method is done. */ - std::future<void> m_write_future; + gdb::future<void> m_write_future; }; #endif /* GDB_DWARF2_COOKED_INDEX_H */