Make sure we're running dejagnu tests with the right compiler.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
diff --git a/ChangeLog b/ChangeLog
index 7719a48..289d195 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2013-01-08 Anthony Green <green@moxielogic.com>
+ * configure.ac: Generate local.exp. This sets CC_FOR_TARGET
+ when we are using the vendor compiler.
+ * testsuite/Makefile.am (EXTRA_DEJAGNU_SITE_CONFIG): Point to
+ ../local.exp.
+ * configure, testsuite/Makefile.in: Rebuilt.
+
* testsuite/libffi.call/call.exp: Run tests with different
options, depending on whether or not we are using gcc or the
vendor compiler.
diff --git a/configure b/configure
index a79b540..5876eb7 100755
--- a/configure
+++ b/configure
@@ -13068,6 +13068,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -fexceptions"
+ touch testsuite/local.exp
+else
+ cat > local.exp <<EOF
+set CC_FOR_TARGET $CC
+EOF
fi
diff --git a/configure.ac b/configure.ac
index e320b3c..7ffb36c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,11 @@ AX_CC_MAXOPT
AX_CFLAGS_WARN_ALL
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -fexceptions"
+ touch testsuite/local.exp
+else
+ cat > local.exp <<EOF
+set CC_FOR_TARGET $CC
+EOF
fi
AM_MAINTAINER_MODE
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index 146fdf9..d0dd112 100644
--- a/testsuite/Makefile.am
+++ b/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/testsuite/Makefile.in b/testsuite/Makefile.in
index 52e1df5..a1758ac 100644
--- a/testsuite/Makefile.in
+++ b/testsuite/Makefile.in
@@ -227,6 +227,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 libffi.call/closure_loc_fn0.c \