Commit 8308984e479e3274a36e98e8272b5adbb6b774c2

Anthony Green 2013-01-08T15:14:21

Make sure we're running dejagnu tests with the right compiler.

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 \