Try s390x and sh4 cross builds/tests
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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
diff --git a/.travis.yml b/.travis.yml
index b11dbc9..ba96cf4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,6 +8,10 @@ matrix:
- os: osx
env: HOST=arm-apple-darwin
- os: linux
+ env: HOST=sh4-linux-gnu MEVAL='export CC="sh4-linux-gnu-gcc-8" && CXX="sh4-linux-gnu-g++-8"' CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/sh4-linux-gnu
+ - os: linux
+ env: HOST=s390x-linux-gnu MEVAL='export CC="s390x-linux-gnu-gcc-8" && CXX="s390x-linux-gnu-g++-8"' CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/s390x-linux-gnu
+ - os: linux
env: HOST=hppa-linux-gnu MEVAL='export CC="hppa-linux-gnu-gcc-5" && CXX="hppa-linux-gnu-g++-5"' CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/hppa-linux-gnu
- os: linux
env: HOST=s390x-linux-gnu MEVAL='export CC="s390x-linux-gnu-gcc-5" && CXX="s390x-linux-gnu-g++-5"' CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/s390x-linux-gnu
diff --git a/.travis/build-in-container.sh b/.travis/build-in-container.sh
index dc412c2..85624bf 100755
--- a/.travis/build-in-container.sh
+++ b/.travis/build-in-container.sh
@@ -2,7 +2,13 @@
cd /opt
-./configure
+export QEMU_LD_PREFIX=/usr/${HOST}
+
+if ! test "x$HOST" == "x"; then
+ ./configure --host=${HOST} --disable-shared;
+else
+ ./configure
+fi
make
make dist
make check RUNTESTFLAGS="-a $RUNTESTFLAGS"
diff --git a/.travis/build.sh b/.travis/build.sh
index 7baa81f..50cc9a4 100755
--- a/.travis/build.sh
+++ b/.travis/build.sh
@@ -34,6 +34,12 @@ function build_foreign_linux()
exit $?
}
+function build_cross_linux()
+{
+ docker run --rm -t -i -v `pwd`:/opt --rm -ti -e HOST="${HOST}" LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" $2 bash -c /opt/.travis/build-in-container.sh
+ exit $?
+}
+
function build_ios()
{
which python
@@ -56,6 +62,9 @@ case "$HOST" in
aarch64-linux-gnu| powerpc64le-unknown-linux-gnu | mips64el-linux-gnu | sparc64-linux-gnu)
build_cfarm
;;
+ sh4-linux-gnu | s390x-linux-gnu )
+ build_cross_linux
+ ;;
*)
./autogen.sh
build_linux
diff --git a/.travis/install.sh b/.travis/install.sh
index fec9dba..abe5d88 100755
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -12,15 +12,12 @@ else
case $HOST in
aarch64-linux-gnu | powerpc64le-unknown-linux-gnu | mips64el-linux-gnu | sparc64-linux-gnu)
;;
- arm32v7-linux-gnu )
+ arm32v7-linux-gnu | sh4-linux-gnu | s390x-linux-gnu )
sudo apt-get install qemu-user-static
;;
hppa-linux-gnu )
sudo apt-get install -y qemu-user-static g++-5-hppa-linux-gnu
;;
- s390x-linux-gnu )
- sudo apt-get install -y qemu-user-static g++-5-s390x-linux-gnu
- ;;
i386-pc-linux-gnu)
sudo apt-get install gcc-multilib g++-multilib;
;;