aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libffi/Makefile.in1
-rwxr-xr-xlibffi/configure10
-rw-r--r--libffi/configure.ac5
-rw-r--r--libffi/include/Makefile.in1
-rw-r--r--libffi/man/Makefile.in1
-rw-r--r--libffi/testsuite/Makefile.in1
-rw-r--r--libffi/testsuite/lib/libffi.exp7
7 files changed, 20 insertions, 6 deletions
diff --git a/libffi/Makefile.in b/libffi/Makefile.in
index 71469f7..e8ab5f2 100644
--- a/libffi/Makefile.in
+++ b/libffi/Makefile.in
@@ -383,6 +383,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/configure b/libffi/configure
index 2905455..f82a45b 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -666,6 +666,7 @@ TESTSUBDIR_TRUE
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
+SYSROOT_CFLAGS_FOR_TARGET
READELF
ENABLE_DARWIN_AT_RPATH_FALSE
ENABLE_DARWIN_AT_RPATH_TRUE
@@ -11687,7 +11688,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11690 "configure"
+#line 11691 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11793,7 +11794,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11796 "configure"
+#line 11797 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15249,9 +15250,10 @@ _ACEOF
+
+
cat > local.exp <<EOF
-set CC_FOR_TARGET "$CC"
-set CXX_FOR_TARGET "$CXX"
+set SYSROOT_CFLAGS_FOR_TARGET "$SYSROOT_CFLAGS_FOR_TARGET"
set compiler_vendor "$ax_cv_c_compiler_vendor"
EOF
diff --git a/libffi/configure.ac b/libffi/configure.ac
index 716f20a..c89b246 100644
--- a/libffi/configure.ac
+++ b/libffi/configure.ac
@@ -62,9 +62,10 @@ AC_CHECK_TOOL(READELF, readelf)
# Test for 64-bit build.
AC_CHECK_SIZEOF([size_t])
+AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)
+
cat > local.exp <<EOF
-set CC_FOR_TARGET "$CC"
-set CXX_FOR_TARGET "$CXX"
+set SYSROOT_CFLAGS_FOR_TARGET "$SYSROOT_CFLAGS_FOR_TARGET"
set compiler_vendor "$ax_cv_c_compiler_vendor"
EOF
diff --git a/libffi/include/Makefile.in b/libffi/include/Makefile.in
index 879cb72..9759f0d 100644
--- a/libffi/include/Makefile.in
+++ b/libffi/include/Makefile.in
@@ -255,6 +255,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/man/Makefile.in b/libffi/man/Makefile.in
index 9d4f966..18de1e8 100644
--- a/libffi/man/Makefile.in
+++ b/libffi/man/Makefile.in
@@ -237,6 +237,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/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] {