aboutsummaryrefslogtreecommitdiff
path: root/libffi/testsuite
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2023-09-11 10:50:00 +0200
committerThomas Schwinge <thomas@codesourcery.com>2023-10-26 18:03:07 +0200
commit967d4171b2eb0557e86ba28996423353f0f1b141 (patch)
tree9ab24a1db25da5a5644002c69713a68058ab8c48 /libffi/testsuite
parent8a0fceee462ee2365e75d6c6014b512704f49c69 (diff)
downloadgcc-967d4171b2eb0557e86ba28996423353f0f1b141.zip
gcc-967d4171b2eb0557e86ba28996423353f0f1b141.tar.gz
gcc-967d4171b2eb0557e86ba28996423353f0f1b141.tar.bz2
libffi: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR109951]
Similar to commit fb5d27be272b71fb9026224535fc73f125ce3be7 "libgomp: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951]", this is commit a0b48358cb1e70e161a87ec5deb7a4b25defba6b "libffi/test: Fix compilation for build sysroot" done differently, avoiding build-tree testing use of any random gunk that may appear in build-time 'CC', 'CXX'. PR testsuite/109951 libffi/ * configure.ac: 'AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)'. <local.exp>: Don't set 'CC_FOR_TARGET', 'CXX_FOR_TARGET', instead set 'SYSROOT_CFLAGS_FOR_TARGET'. * Makefile.in: Regenerate. * configure: Likewise. * include/Makefile.in: Likewise. * man/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. * testsuite/lib/libffi.exp (libffi_target_compile): If '--with-build-sysroot=[...]' was specified, use it for build-tree testing.
Diffstat (limited to 'libffi/testsuite')
-rw-r--r--libffi/testsuite/Makefile.in1
-rw-r--r--libffi/testsuite/lib/libffi.exp7
2 files changed, 8 insertions, 0 deletions
diff --git a/libffi/testsuite/Makefile.in b/libffi/testsuite/Makefile.in
index a19b523..27d48a7 100644
--- a/libffi/testsuite/Makefile.in
+++ b/libffi/testsuite/Makefile.in
@@ -210,6 +210,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
TARGET = @TARGET@
TARGETDIR = @TARGETDIR@
TARGET_OBJ = @TARGET_OBJ@
diff --git a/libffi/testsuite/lib/libffi.exp b/libffi/testsuite/lib/libffi.exp
index 611f517..c1ae32d 100644
--- a/libffi/testsuite/lib/libffi.exp
+++ b/libffi/testsuite/lib/libffi.exp
@@ -374,6 +374,13 @@ proc libffi_target_compile { source dest type options } {
lappend options "ldflags=$wrap_flags"
}
+ if { $blddirffi != "" } {
+ # If '--with-build-sysroot=[...]' was specified, use it for build-tree
+ # testing.
+ global SYSROOT_CFLAGS_FOR_TARGET
+ lappend options "additional_flags=${SYSROOT_CFLAGS_FOR_TARGET}"
+ }
+
# TOOL_OPTIONS must come first, so that it doesn't override testcase
# specific options.
if [info exists TOOL_OPTIONS] {