From: Pedro Alves <pedro@palves.net>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [RFC] [gdb/build] Require c++17 compiler
Date: Thu, 12 Oct 2023 18:22:18 +0100 [thread overview]
Message-ID: <1a90eccf-8814-4b46-a56f-aaf2a8f30248@palves.net> (raw)
In-Reply-To: <20231005065449.32643-1-tdevries@suse.de>
On 2023-10-05 07:54, Tom de Vries via Gdb-patches wrote:
> Consequently, the NEWS item mentions gcc 9 as an example compiler to use.
>
> My understanding of using gcc 5-8 is that it works as long as gdb doesn't use
> not yet available language features. Of course the set of used language
> features may change in time, so what compiler still works may change.
>
> Problems can arise when shared libs starts to have C++17 based APIs (or
> somehow expose instantiations of such classes). If compiled with a compiler
> in which c++17 support was still experimental, it may be incompatible when
> linking with:
> - code compiled with a compiler with non-experimental c++17 support, or
> - code compiled with a different compiler with experimental c++17 support.
>
> Looking at the current implementation of our only shared lib:
> libinproctrace.so, I couldn't spot any c++ usage in the API, so I'm assuming
> this problem is not likely to happen.
I think this concern goes beyond libinproctrace.co, and extends to APIs exposed
by libstdc++. E.g., (and I haven't checked), say that the libstdc++ from GCC 6
implemented some C++17 library feature that we start using, but then the API/ABI of
that library feature changed in later GCCs. Compiling GDB with GCC 6 and
expecting that it runs on a system with libstdc++ from GCC 9 may not work. I don't
know whether there's some document or page or wiki or some such somewhere documenting
such ABI breakages. +1 on requiring GCC 9, unless it proves troublesomely "too new"
in practice, which I hope not.
prev parent reply other threads:[~2023-10-12 17:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 6:54 Tom de Vries via Gdb-patches
2023-10-05 10:33 ` [PATCH RFC] " Lancelot SIX via Gdb-patches
2023-10-05 12:26 ` Andrew Burgess via Gdb-patches
2023-10-05 14:26 ` Lancelot SIX via Gdb-patches
2023-10-05 14:32 ` Simon Marchi via Gdb-patches
2023-10-05 14:55 ` Lancelot SIX via Gdb-patches
2023-10-09 14:32 ` Andrew Burgess
2023-10-05 15:55 ` Tom Tromey
2023-10-12 17:30 ` Pedro Alves
2023-10-05 15:31 ` [RFC] [gdb/build] " Tom Tromey
2023-10-10 17:39 ` Tom Tromey
2023-10-10 19:16 ` Simon Marchi
2023-10-12 17:10 ` Pedro Alves
2023-10-12 17:22 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a90eccf-8814-4b46-a56f-aaf2a8f30248@palves.net \
--to=pedro@palves.net \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox