Always set CC_FOR_TARGET for dejagnu, to make the testsuite respect $CC This fixes cross-compilation and compilation with CC="gcc -m32".
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
diff --git a/.travis.yml b/.travis.yml
index 6633e6f..7c8d302 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,15 +3,15 @@ compiler:
- gcc
- clang
env:
- - build32=false
- - build32=true
+ -
+ - HOST=i386-pc-linux-gnu
matrix:
exclude:
- compiler: clang
- env: build32=true
+ env: HOST=i386-pc-linux-gnu
before_script:
- sudo apt-get install dejagnu texinfo
- - if $build32 ; then sudo apt-get install gcc-multilib g++-multilib ; fi
+ - if [ "$HOST" = i386-pc-linux-gnu ] ; then sudo apt-get install gcc-multilib g++-multilib && CC="$CC -m32" ; fi
-script: run= && if $build32 ; then run=i386 && mkdir path32 && PATH="$(pwd)/path32:$PATH" && printf '#!/bin/sh\nexec /usr/bin/'"$CC"' -m32 "$@"' > "path32/$CC" && chmod a+x "path32/$CC" ; fi && ./autogen.sh && $run ./configure && make && make dist && make check
+script: ./autogen.sh && ./configure ${HOST+--host=$HOST} && make && make dist && make check
diff --git a/configure.ac b/configure.ac
index 3c1632c..0369b30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,12 +53,11 @@ fi
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -fexceptions"
- touch local.exp
-else
- cat > local.exp <<EOF
+fi
+
+cat > local.exp <<EOF
set CC_FOR_TARGET "$CC"
EOF
-fi
AM_MAINTAINER_MODE