]> git.ipfire.org Git - thirdparty/gcc.git/commit
JIT, testsuite, Darwin: Initial testsuite fixes.
authorIain Sandoe <iain@sandoe.co.uk>
Thu, 5 Aug 2021 09:07:03 +0000 (10:07 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Thu, 14 Apr 2022 05:22:24 +0000 (06:22 +0100)
commit003287cf11d7591af5703ff6f6f0e743e2770e19
tree9128274f97ca870b46b923dd453d5a3811be2ff7
parent846d19e44c85c83a50e51867d854f8d98a087a77
JIT, testsuite, Darwin: Initial testsuite fixes.

The testsuite setup for jit is not compatible with Darwin since it
assumes that all targets support --export-dynamic.

 - this is fixed by adding '-rdynamic' conditionally upon target
   support for that (-rdynamic will be converted to the appropriate
   linker option).

There is also an assumption that a suitable version of dejagnu.h
is present in some default include search path that is usable from
the testsuite.  This is not the case for Darwin (dejagnu.h is not
installed, and would not, in general, be found in any default include
search path if installed via one of the main 'distros').  Also the
upstream dejagnu.h has a definition of 'wait()' that clashes with a
libc routines and therefore causes fails in the testsuite.

 - This patch imports the header from dejagnu-1.6.2 and
   * renames it to 'jit-dejagnu.h'
   * patches it to avoid unused variable warnings and the clash
     with the libc definition of wait ()
   * In accordance with the advice in the expect man page, ensures
     that the final output of the 'totals' print is stable.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/jit/ChangeLog:

* docs/examples/tut04-toyvm/toyvm.c: Include jit-dejagnu.h.
* docs/examples/tut04-toyvm/toyvm.cc: Likewise.
* jit-dejagnu.h: New file, imported from dejagnu-1.6.2 and
patched for this application.

gcc/testsuite/ChangeLog:

* jit.dg/harness.h: Include jit-dejagnu.h.
* jit.dg/jit.exp: Use -rdynamic conditionally on target
support, instead of unconditional -Wl,--export-dynamic.

(cherry picked from commit eea1677fd03a1cb820cbb72044d4a0770f8a7a93)
gcc/jit/docs/examples/tut04-toyvm/toyvm.c
gcc/jit/docs/examples/tut04-toyvm/toyvm.cc
gcc/jit/jit-dejagnu.h [new file with mode: 0644]
gcc/testsuite/jit.dg/harness.h
gcc/testsuite/jit.dg/jit.exp