public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Alexandre Oliva <oliva@adacore.com>
Cc: "Mike Stump" <mikestump@comcast.net>,
	gcc-patches@gcc.gnu.org,
	"Rainer Orth" <ro@cebitec.uni-bielefeld.de>,
	libstdc++@gcc.gnu.org, "Arsen Arsenović" <arsen@aarsen.me>
Subject: Re: testsuite: introduce hostedlib effective target
Date: Wed, 8 Nov 2023 15:49:08 +0000	[thread overview]
Message-ID: <CACb0b4=fkc-T3duSF1cGz8zNmJBzJfa4ESb9FENsnvEVUFZdtQ@mail.gmail.com> (raw)
In-Reply-To: <CACb0b4=tdH1BJ+sTocVHwFkCZjBBmG78htOH6WSPpKuF8LkMPw@mail.gmail.com>

On Wed, 8 Nov 2023 at 15:48, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> On Wed, 8 Nov 2023 at 15:30, Alexandre Oliva <oliva@adacore.com> wrote:
> >
> > On Nov  7, 2023, Jonathan Wakely <jwakely@redhat.com> wrote:
> >
> > > An alternative approach for the g++ testsuite would be to provide a
> > > set of dummy headers for the non-freestanding ones, so that all the
> > > hosted-only headers are provided by the testsuite itself, but consist
> > > of a single line:
> >
> > > #error not available in freestanding
> >
> > > Then match on that and XFAIL. So the individual tests themselves
> > > wouldn't need the dg-skip-if added to them, they would just
> > > automatically XFAIL if they use a hosted-only header.
> >
> > *nod*.  That wouldn't cover all the circumstances, alas: there are tests
> > that fail in freestanding mode not because of headers, but because
> > -fcontracts (currently?) links libstdc++exp in, and that library is not
> > even built in freestanding mode.
>
> Hmm, yes, that seems like a bug. Either we should provide
> libstdc++exp.a for freestanding builds (with a simplified contract
> violation handler that doesn't print to stdout), or the front end
> should not add -lstdc++exp when -ffreestanding is used (which would
> require teh user, or the testsuite in your case, to provide a custom
> contract violation handler), or it should be an error to use
> -fcontracts and -ffreestanding together.
>
> The libstdc++-v3/src/experimental/contract.cc file *already* supports
> freestanding, we just don't actually build it for freestanding. We can
> do that.

Which might be as simple as:

--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -34,14 +34,13 @@ backtrace_dir = libbacktrace
else
backtrace_dir =
endif
-
-experimental_dir = experimental
else
filesystem_dir =
backtrace_dir =
-experimental_dir =
endif

+experimental_dir = experimental
+
## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE.
SUBDIRS = c++98 c++11 c++17 c++20 c++23 \
       $(filesystem_dir) $(backtrace_dir) $(experimental_dir)


  reply	other threads:[~2023-11-08 15:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02  1:11 Alexandre Oliva
2023-11-05 20:40 ` Mike Stump
2023-11-07 10:04   ` Alexandre Oliva
2023-11-07 10:18     ` Jonathan Wakely
2023-11-07 10:24       ` Jonathan Wakely
2023-11-07 10:37         ` Jonathan Wakely
2023-11-08 15:30           ` Alexandre Oliva
2023-11-08 15:48             ` Jonathan Wakely
2023-11-08 15:49               ` Jonathan Wakely [this message]
2023-11-08 16:29   ` Alexandre Oliva
2023-11-09 21:42     ` Mike Stump

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='CACb0b4=fkc-T3duSF1cGz8zNmJBzJfa4ESb9FENsnvEVUFZdtQ@mail.gmail.com' \
    --to=jwakely@redhat.com \
    --cc=arsen@aarsen.me \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    --cc=oliva@adacore.com \
    --cc=ro@cebitec.uni-bielefeld.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).