On Thu, 6 Mar 2025 at 11:47, Jonathan Wakely <jwak...@redhat.com> wrote:
>
> On Thu, 6 Mar 2025 at 11:36, Giuseppe D'Angelo
> <giuseppe.dang...@kdab.com> wrote:
> >
> > Hi,
> >
> > On 06/03/2025 12:26, Jonathan Wakely wrote:
> > > The old COW std::string is not usable in constant expressions, so these
> > > new tests fail with -D_GLIBCXX_USE_CXX11_ABI=0.
> >
> > LGTM; is there a specific incantation to run the testsuite with both
> > libstdc++ ABIs? Clearly I just tested the new one...
>
> You can use:
> make check RUNTESTFLAGS="--target_board=unix\{,-D_GLIBCXX_USE_CXX11_ABI=0\}"
>
> I do it a little differently, using the ~/.dejagnurc file below which
> runs every test for every -std option from 98 to 26, and with
> assertions enabled, with the old ABI, and with -m32. This takes about
> 20 times longer than normal to run the tests, so choose wisely!

If you don't use the dejagnurc method, you can still run with multiple
-std options by setting the GLIBCXX_TESTSUITE_STDS env var, e.g.

GLIBCXX_TESTSUITE_STDS=17,26 make check
RUNTESTFLAGS="--target_board=unix\{,-D_GLIBCXX_USE_CXX11_ABI=0\}"

That will run every test four times, with these options:
-std=gnu++17
-std=gnu++26
-std=gnu++17 -D_GLIBCXX_USE_CXX11_ABI=0
-std=gnu++26 -D_GLIBCXX_USE_CXX11_ABI=0

Reply via email to