On 24 April 2020 11:59:50 CEST, Alexandre Oliva <ol...@adacore.com> wrote: >On Apr 23, 2020, Martin Sebor <mse...@gmail.com> wrote: > >> Sure. I'd go with _fileio but that's just a suggestion. > >Okiedokie, here's the patch using fileio instead of tmpnam for the >effective target name. I'm going to check it in shortly. > > >introduce target fileio and require it in tests that use tmpnam
ISTM the corresponding documentation hunk for sourcebuild.texi is missing. TIA, > >Some target C libraries that aren't recognized as freestanding don't >have filesystem support, so calling tmpnam, fopen/open and >remove/unlink fails to link. > >This patch introduces a fileio effective target to the testsuite, and >requires it in the tests that call tmpnam. > > >for gcc/testsuite/ChangeLog > > * lib/target-supports.exp (check_effective_target_fileio): New. > * gcc.c-torture/execute/fprintf-2.c: Require it. > * gcc.c-torture/execute/printf-2.c: Likewise. > * gcc.c-torture/execute/user-printf.c: Likewise. >--- > gcc/testsuite/gcc.c-torture/execute/fprintf-2.c | 1 + > gcc/testsuite/gcc.c-torture/execute/printf-2.c | 1 + > gcc/testsuite/gcc.c-torture/execute/user-printf.c | 1 + > gcc/testsuite/lib/target-supports.exp | 13 +++++++++++++ > 4 files changed, 16 insertions(+)