Always set CC_FOR_TARGET for dejagnu, to make the testsuite respect $CC

This fixes cross-compilation and compilation with CC="gcc -m32".
This commit is contained in:
Josh Triplett
2014-03-26 14:51:32 -07:00
parent 9946a92af3
commit 0c3824702d
2 changed files with 8 additions and 9 deletions

View File

@@ -3,15 +3,15 @@ compiler:
- gcc - gcc
- clang - clang
env: env:
- build32=false -
- build32=true - HOST=i386-pc-linux-gnu
matrix: matrix:
exclude: exclude:
- compiler: clang - compiler: clang
env: build32=true env: HOST=i386-pc-linux-gnu
before_script: before_script:
- sudo apt-get install dejagnu texinfo - 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

View File

@@ -53,12 +53,11 @@ fi
if test "x$GCC" = "xyes"; then if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -fexceptions" CFLAGS="$CFLAGS -fexceptions"
touch local.exp fi
else
cat > local.exp <<EOF cat > local.exp <<EOF
set CC_FOR_TARGET "$CC" set CC_FOR_TARGET "$CC"
EOF EOF
fi
AM_MAINTAINER_MODE AM_MAINTAINER_MODE