Merge pull request #86 from joshtriplett/testsuite-CC-CXX
testsuite ignores CC parameter supplied to configure or make
This commit is contained in:
17
.travis.yml
17
.travis.yml
@@ -1,17 +1,22 @@
|
||||
language: c
|
||||
language: cpp
|
||||
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" && CXX="$CXX -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
|
||||
|
||||
19
README
19
README
@@ -146,13 +146,16 @@ It's also possible to build libffi on Windows platforms with
|
||||
Microsoft's Visual C++ compiler. In this case, use the msvcc.sh
|
||||
wrapper script during configuration like so:
|
||||
|
||||
path/to/configure CC=path/to/msvcc.sh LD=link CPP=\"cl -nologo -EP\"
|
||||
path/to/configure CC=path/to/msvcc.sh CXX=path/to/msvcc.sh LD=link CPP=\"cl -nologo -EP\"
|
||||
|
||||
For 64-bit Windows builds, use CC="path/to/msvcc.sh -m64".
|
||||
You may also need to specify --build appropriately. When building with MSVC
|
||||
under a MingW environment, you may need to remove the line in configure
|
||||
that sets 'fix_srcfile_path' to a 'cygpath' command. ('cygpath' is not
|
||||
present in MingW, and is not required when using MingW-style paths.)
|
||||
For 64-bit Windows builds, use CC="path/to/msvcc.sh -m64" and
|
||||
CXX="path/to/msvcc.sh -m64". You may also need to specify --build
|
||||
appropriately.
|
||||
|
||||
When building with MSVC under a MingW environment, you may need to
|
||||
remove the line in configure that sets 'fix_srcfile_path' to a 'cygpath'
|
||||
command. ('cygpath' is not present in MingW, and is not required when
|
||||
using MingW-style paths.)
|
||||
|
||||
For iOS builds, the 'libffi.xcodeproj' Xcode project is available.
|
||||
|
||||
@@ -180,8 +183,8 @@ See the git log for details at http://github.com/atgreen/libffi.
|
||||
32-bit x86 targets such as Linux.
|
||||
Various Android, MIPS N32, x86, FreeBSD and UltraSPARC IIi
|
||||
fixes.
|
||||
Make the testsuite more robust: eliminated several spurious
|
||||
failures.
|
||||
Make the testsuite more robust: eliminate several spurious
|
||||
failures, and respect the $CC and $CXX environment variables.
|
||||
Archive off the manually maintained ChangeLog in favor of git
|
||||
log.
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
|
||||
m4_define([_AC_ARG_VAR_PRECIOUS],[])
|
||||
save_CFLAGS=$CFLAGS
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
CFLAGS=$save_CFLAGS
|
||||
m4_undefine([_AC_ARG_VAR_PRECIOUS])
|
||||
m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
|
||||
@@ -53,12 +54,12 @@ fi
|
||||
|
||||
if test "x$GCC" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -fexceptions"
|
||||
touch local.exp
|
||||
else
|
||||
fi
|
||||
|
||||
cat > local.exp <<EOF
|
||||
set CC_FOR_TARGET "$CC"
|
||||
set CXX_FOR_TARGET "$CXX"
|
||||
EOF
|
||||
fi
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
|
||||
@@ -2,17 +2,6 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign dejagnu
|
||||
|
||||
# Setup the testing framework, if you have one
|
||||
EXPECT = `if [ -f $(top_builddir)/../expect/expect ] ; then \
|
||||
echo $(top_builddir)/../expect/expect ; \
|
||||
else echo expect ; fi`
|
||||
|
||||
RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
|
||||
echo $(top_srcdir)/../dejagnu/runtest ; \
|
||||
else echo runtest; fi`
|
||||
|
||||
AM_RUNTESTFLAGS =
|
||||
|
||||
EXTRA_DEJAGNU_SITE_CONFIG=../local.exp
|
||||
|
||||
CLEANFILES = *.exe core* *.log *.sum
|
||||
|
||||
@@ -222,6 +222,10 @@ proc libffi_target_compile { source dest type options } {
|
||||
lappend options "libs= -lpthread"
|
||||
}
|
||||
|
||||
if { [string match "*.cc" $source] } {
|
||||
lappend options "c++"
|
||||
}
|
||||
|
||||
verbose "options: $options"
|
||||
return [target_compile $source $dest $type $options]
|
||||
}
|
||||
|
||||
@@ -19,10 +19,7 @@ libffi-init
|
||||
|
||||
global srcdir subdir
|
||||
|
||||
run-many-tests [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] ""
|
||||
if { [string match $using_gcc "yes"] } {
|
||||
run-many-tests [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] "-shared-libgcc -lstdc++"
|
||||
}
|
||||
run-many-tests [lsort [glob -nocomplain -- $srcdir/$subdir/*.{c,cc}]] ""
|
||||
|
||||
dg-finish
|
||||
|
||||
|
||||
Reference in New Issue
Block a user