aboutsummaryrefslogtreecommitdiff
path: root/libffi/testsuite
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@wdc.com>2020-04-25 21:27:14 +0100
committerMaciej W. Rozycki <macro@wdc.com>2020-04-25 21:27:14 +0100
commita0b48358cb1e70e161a87ec5deb7a4b25defba6b (patch)
tree882af17057eb6651175b2c2c2ff983600af5f3c9 /libffi/testsuite
parent8fc8bf801e46d0d478c50bddecf5d8edf9511849 (diff)
downloadgcc-a0b48358cb1e70e161a87ec5deb7a4b25defba6b.zip
gcc-a0b48358cb1e70e161a87ec5deb7a4b25defba6b.tar.gz
gcc-a0b48358cb1e70e161a87ec5deb7a4b25defba6b.tar.bz2
libffi/test: Fix compilation for build sysroot
Fix a problem with the libffi testsuite using a method to determine the compiler to use resulting in the tool being different from one the library has been built with, and causing a catastrophic failure from the inability to actually choose any compiler at all in a cross-compilation configuration. Address this problem by providing a DejaGNU configuration file defining the compiler to use, via the CC_FOR_TARGET TCL variable, set from $CC by autoconf, which will have all the required options set for the target compiler to build executables in the environment configured, removing failures like: FAIL: libffi.call/closure_fn0.c -W -Wall -Wno-psabi -O0 (test for excess errors) Excess errors: default_target_compile: No compiler to compile with UNRESOLVED: libffi.call/closure_fn0.c -W -Wall -Wno-psabi -O0 compilation failed to produce executable and bringing overall test results for the `riscv64-linux-gnu' target (here with the `x86_64-linux-gnu' host and RISC-V QEMU in the Linux user emulation mode as the target board) from: === libffi Summary === # of unexpected failures 708 # of unresolved testcases 708 # of unsupported tests 30 to: === libffi Summary === # of expected passes 1934 # of unsupported tests 28 This is a combined backport of the relevant parts of upstream libffi changes as follows: - commit 8308984e479e ("[PATCH] Make sure we're running dejagnu tests with the right compiler."), - commit 2d9b3939751b ("[PATCH] Fix for closures with sunpro compiler"), - commit 0c3824702d3d ("[PATCH] Always set CC_FOR_TARGET for dejagnu, to make the testsuite respect $CC"), - commit 7d698125b1f0 ("[PATCH] Use the proper C++ compiler to run C++ tests"), - commit 6b6df1a7bb37 ("[PATCH] Adds `local.exp` to CLEANFILES"), - commit 6cf0dea78a5a ("[PATCH] Change CLEANFILES to DISTCLEANFILES") libffi/ * Makefile.am (DISTCLEANFILES): New variable. * configure.ac: Produce `local.exp'. * Makefile.in: Regenerate. * configure: Regenerate. * testsuite/Makefile.am (EXTRA_DEJAGNU_SITE_CONFIG): New variable. * testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'libffi/testsuite')
-rw-r--r--libffi/testsuite/Makefile.am2
-rw-r--r--libffi/testsuite/Makefile.in1
2 files changed, 3 insertions, 0 deletions
diff --git a/libffi/testsuite/Makefile.am b/libffi/testsuite/Makefile.am
index 209e897..88509fc 100644
--- a/libffi/testsuite/Makefile.am
+++ b/libffi/testsuite/Makefile.am
@@ -13,6 +13,8 @@ RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
AM_RUNTESTFLAGS =
+EXTRA_DEJAGNU_SITE_CONFIG=../local.exp
+
CLEANFILES = *.exe core* *.log *.sum
EXTRA_DIST = config/default.exp libffi.call/cls_19byte.c \
diff --git a/libffi/testsuite/Makefile.in b/libffi/testsuite/Makefile.in
index 31e9cf5..8b574da 100644
--- a/libffi/testsuite/Makefile.in
+++ b/libffi/testsuite/Makefile.in
@@ -279,6 +279,7 @@ RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
echo $(top_srcdir)/../dejagnu/runtest ; \
else echo runtest; fi`
+EXTRA_DEJAGNU_SITE_CONFIG = ../local.exp
CLEANFILES = *.exe core* *.log *.sum
EXTRA_DIST = config/default.exp libffi.call/cls_19byte.c \
libffi.call/cls_align_longdouble_split.c \