introduce target fileio and require it in tests that use tmpnam
authorAlexandre Oliva <oliva@adacore.com>
Fri, 24 Apr 2020 11:32:10 +0000 (08:32 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Fri, 24 Apr 2020 11:32:10 +0000 (08:32 -0300)
commit3685c5adf5c0b30268cb8f95c89e4c4a3240ae6f
treeb63072d91a0b2fdcd2adce6c4fca24952dcd4abd
parentc508fd07d7615443f7a62d6745779ec97514e7a2
introduce target fileio and require it in tests that use tmpnam

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/ChangeLog
gcc/testsuite/gcc.c-torture/execute/fprintf-2.c
gcc/testsuite/gcc.c-torture/execute/printf-2.c
gcc/testsuite/gcc.c-torture/execute/user-printf.c
gcc/testsuite/lib/target-supports.exp