* [PATCH] gdb/dwarf: Fix MinGW build
@ 2023-04-10 4:21 Thiago Jung Bauermann
2023-04-10 14:37 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Thiago Jung Bauermann @ 2023-04-10 4:21 UTC (permalink / raw)
To: gdb-patches; +Cc: Thiago Jung Bauermann
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(-)
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 */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb/dwarf: Fix MinGW build
2023-04-10 4:21 [PATCH] gdb/dwarf: Fix MinGW build Thiago Jung Bauermann
@ 2023-04-10 14:37 ` Tom Tromey
2023-04-10 23:22 ` Thiago Jung Bauermann
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2023-04-10 14:37 UTC (permalink / raw)
To: Thiago Jung Bauermann via Gdb-patches; +Cc: Thiago Jung Bauermann
>>>>> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb/dwarf: Fix MinGW build
2023-04-10 14:37 ` Tom Tromey
@ 2023-04-10 23:22 ` Thiago Jung Bauermann
0 siblings, 0 replies; 3+ messages in thread
From: Thiago Jung Bauermann @ 2023-04-10 23:22 UTC (permalink / raw)
To: Tom Tromey; +Cc: Thiago Jung Bauermann via Gdb-patches
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.
--
Thiago
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-10 23:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-10 4:21 [PATCH] gdb/dwarf: Fix MinGW build Thiago Jung Bauermann
2023-04-10 14:37 ` Tom Tromey
2023-04-10 23:22 ` Thiago Jung Bauermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).