]> git.ipfire.org Git - thirdparty/gcc.git/commit
testsuite: Only run test if alarm is available
authorTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Sun, 19 Jan 2025 17:33:24 +0000 (18:33 +0100)
committerTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Thu, 23 Jan 2025 09:50:43 +0000 (10:50 +0100)
commit57b706d141b87c06dfbba577048a1e4903d33f70
treee3990f5dbeafff420764d64459e43c4f0a42783f
parentf30edd17e62e9474f90785a5915959cd6d8c3f62
testsuite: Only run test if alarm is available

Most baremetal toolchains will not have an implementation for alarm and
sigaction as they are target specific.
For arm-none-eabi with newlib, function signatures are exposed, but
there is no implmentation and thus the test cases causes a undefined
symbol link error.

gcc/testsuite/ChangeLog:

* gcc.dg/pr78185.c: Remove dg-do and replace with
with dg-require-effective-target of signal and alarm.
* gcc.dg/pr116906-1.c: Likewise.
* gcc.dg/pr116906-2.c: Likewise.
* gcc.dg/vect/pr101145inf.c: Use effective-target alarm.
* gcc.dg/vect/pr101145inf_1.c: Likewise.
* lib/target-supports.exp(check_effective_target_alarm): New.

gcc/ChangeLog:

* doc/sourcebuild.texi (Effective-Target Keywords): Document
'alarm'.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
gcc/doc/sourcebuild.texi
gcc/testsuite/gcc.dg/pr116906-1.c
gcc/testsuite/gcc.dg/pr116906-2.c
gcc/testsuite/gcc.dg/pr78185.c
gcc/testsuite/gcc.dg/vect/pr101145inf.c
gcc/testsuite/gcc.dg/vect/pr101145inf_1.c
gcc/testsuite/lib/target-supports.exp