diff --git a/.travis.yml b/.travis.yml index 6633e6fe..6c14fcd0 100644 --- a/.travis.yml +++ b/.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 diff --git a/README b/README index 7c52607e..b4cdb858 100644 --- a/README +++ b/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. diff --git a/configure.ac b/configure.ac index 3c1632c1..30580954 100644 --- a/configure.ac +++ b/configure.ac @@ -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,13 +54,13 @@ fi if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -fexceptions" - touch local.exp -else - cat > local.exp < local.exp <