run sysconf-requiring test on systems that support it
authorAlexandre Oliva <oliva@adacore.com>
Wed, 24 Mar 2021 08:50:37 +0000 (05:50 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Wed, 24 Mar 2021 09:48:23 +0000 (06:48 -0300)
commit65cfa2fed39c76498e7c3dfe138bddb049d60dd7
tree52b7b58d8a326a05f1f74d5a0a5c090c388651b3
parent9eec7c7686aedc79853699549d1c9eee0a0a84fd
run sysconf-requiring test on systems that support it

Some gcc.target/i386 tests requires the mmap feature, but that's not
enough for the test to be able to call sysconf.

This patch introduces a sysconf feature, analogous to mmap, and adds
it to tests in gcc.target/i386 that call sysconf.

There are other tests within gcc.dg and g++.dg that call sysconf, but
I haven't added the tag to them, because they already cover it with
target triplets.  I was a little nervous about dropping the triplets,
and saw how they implied sysconf, so I left those alone.

for  gcc/ChangeLog

* doc/sourcebuild.texi (sysconf): New effective target.

for  gcc/testsuite/ChangeLog

* lib/target-supports.exp (check_effective_target_sysconf): New.
* gcc.target/i386/pr95443-1.c: Require it.
* gcc.target/i386/pr95443-2.c: Likewise.
* gcc.target/i386/sse2-mmx-maskmovq.c: Likewise.
* gcc.target/i386/strncmp-1.c: Likewise.
gcc/doc/sourcebuild.texi
gcc/testsuite/gcc.target/i386/pr95443-1.c
gcc/testsuite/gcc.target/i386/pr95443-2.c
gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
gcc/testsuite/gcc.target/i386/strncmp-1.c
gcc/testsuite/lib/target-supports.exp