[RFC] libstdc++: Make --enable-libstdcxx-backtrace=auto default to yes
Jonathan Wakely
jwakely@redhat.com
Wed Sep 6 23:11:04 GMT 2023
On Thu, 7 Sept 2023 at 00:10, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> On Thu, 7 Sept 2023 at 00:09, Hans-Peter Nilsson <hp@axis.com> wrote:
> >
> > > From: Jonathan Wakely <jwakely@redhat.com>
> > > Date: Wed, 6 Sep 2023 23:30:08 +0100
> >
> > > On Mon, 4 Sept 2023 at 17:49, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> > > >
> > > > On Mon, 4 Sept 2023 at 17:47, Hans-Peter Nilsson via Libstdc++
> > > > <libstdc++@gcc.gnu.org> wrote:
> > > > >
> > > > > > Date: Fri, 1 Sep 2023 12:16:40 +0100
> > > > > > Reply-To: Jonathan Wakely <jwakely@redhat.com>
> > > > > >
> > > > > > On Wed, 23 Aug 2023 at 17:03, Jonathan Wakely via Libstdc++
> > > > > > <libstdc++@gcc.gnu.org> wrote:
> > > > > > >
> > > > > > > Any objections to this? It's a C++23 feture, so should be enabled by
> > > > > > > default.
> > > > > >
> > > > > > I've pushed this to trunk, so let's see what breaks!
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > -- >8 --
> > > > > > >
> > > > > > > This causes libstdc++_libbacktrace.a to be built by default. This might
> > > > > > > fail on some targets, in which case we can make the 'auto' choice expand
> > > > > > > to either 'yes' or 'no' depending on the target.
> > > > > > >
> > > > > > > libstdc++-v3/ChangeLog:
> > > > > > >
> > > > > > > * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Default to yes.
> > > > > > > * configure: Regenerate.
> > > > >
> > > > > Incidentally, should check_effective_target_stacktrace in
> > > > > libstdc++.exp also be adjusted to match; removing the
> > > > > _GLIBCXX_HOSTED condition?
> > > >
> > > > No, it should still depend on is_hosted. The acinclude.m4 macro should
> > > > check that.
> > >
> > > Done in r14-3761-g6de5f5a4fe85bd
> >
> > Aha, that's what you meant. I thought you meant that just
> > check_effective_target_stacktrace should be gated on
> > $is_hosted.
> >
> > Yeah, it makes sense not to have backtrace enabled by
> > default for ! $is_hosted. On the other hand, bare-iron
> > targets like cris-elf apparently *are* hosted, according to
> > "#if __STDC_HOSTED__". I guess I'll have to dig into what
> > the definition of "hosted" is, because I don't agree by the
> > layman obvious definition. Maybe there's a bug to fix.
>
> I don't think there's a bug. $is_hosted is true for
> --enable-hosted-libstdcxx which is on by default.
And IIRC __STDC_HOSTED__ is defined unless you compile with -ffreestanding.
>
> > There sure are many yaks to shave these days.
> >
> > brgds, H-P
> >
More information about the Libstdc++
mailing list