Re: [PATCH] Add --with-system-libbacktrace

Joseph Myers <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
On Thu, 13 Aug 2026, John Ericson wrote:

> We have other --with-system-* flags for using pre-installed libraries,
> but not for libbacktrace. It might not be *prudent* to use a
> libbacktrace other than the in-tree one, but that doesn't mean we should
> make it impossible to *try*.

A new configure option should be documented in install.texi.

> For most consumers this just swaps a relative path for -lbacktrace.
> libstdc++, however, normally compiles the sources itself with every
> symbol renamed. Using a pre-built libbacktrace for it is therefore a
> larger change, as it entails exposing those symbols downstream, where
> they may conflict with a libbacktrace the program links for itself.
> 
> The libstdc++ renaming, now being optional, is simply implemented by
> using the normal identifiers in libstdc++'s own source files, and then
> applying the same renaming trick that was previously used only on the
> vendored libbacktrace to libstdc++ itself.

I'd expect such a configure option to be either for the host, or for the 
target, but not both, as availability of a pre-installed library for one 
of host and target doesn't say anything about whether it's available for 
the other; if you want to cover both cases because this library can be 
used both for the host and the target, they should be separate options.

-- 
Joseph S. Myers
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.