On Sat, Jan 31, 2026 at 12:27 AM Alexandre Oliva <[email protected]> wrote:
>
>
> The test for -shared support doesn't fail on riscv64-elf, unlike other
> barebones targets including riscv32-elf (testing with -fpic -shared
> overflows HI20 relocs) that don't enable a hosted libstdc++.
>
> This test thus got skipped on those other platforms, but we still
> gave it a shot on riscv64-elf, and then it failed because libstdc++
> doesn't have all the headers enabled that the test requires.
>
> Require hostedlib.
>
> Regstrapped on x86_64-linux-gnu along with other patches in this batch;
> also tested with targets riscv64-elf and riscv32-elf on the same host,
> both trunk and gcc-15. Ok to install?
Ok for all branches.
>
>
> for gcc/testsuite/ChangeLog
>
> * g++.dg/lto/pr118817_0.C: Require hostedlib.
> ---
> gcc/testsuite/g++.dg/lto/pr118817_0.C | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gcc/testsuite/g++.dg/lto/pr118817_0.C
> b/gcc/testsuite/g++.dg/lto/pr118817_0.C
> index ae65f34504e89..2fd8d6b7ff8e2 100644
> --- a/gcc/testsuite/g++.dg/lto/pr118817_0.C
> +++ b/gcc/testsuite/g++.dg/lto/pr118817_0.C
> @@ -2,6 +2,7 @@
> // { dg-lto-options { { -O3 -fPIC -flto -shared -std=c++20 -Wall } } }
> // { dg-require-effective-target fpic }
> // { dg-require-effective-target shared }
> +// { dg-skip-if "requires hosted libstdc++ for vector and string" { !
> hostedlib } }
>
> #include <memory>
> #include <vector>
>
> --
> Alexandre Oliva, happy hacker https://blog.lx.oliva.nom.br/
> Free Software Activist FSFLA co-founder GNU Toolchain Engineer
> More tolerance and less prejudice are key for inclusion and diversity.
> Excluding neuro-others for not behaving ""normal"" is *not* inclusive!