Skip to content

Commit

Permalink
Merge pull request #1491 from matthiasblaesing/update_libffi
Browse files Browse the repository at this point in the history
Update libffi to v3.4.4
  • Loading branch information
matthiasblaesing authored Dec 20, 2022
2 parents db1b553 + db97f36 commit 5dd4bd7
Show file tree
Hide file tree
Showing 84 changed files with 1,479 additions and 886 deletions.
17 changes: 8 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
os: linux
dist: trusty
dist: jammy

language: java

before_install:
- |
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)'
then
echo "Not running CI since only docs were changed."
travis_terminate 0
fi
- sudo apt-get -m install openjdk-11-jdk libltdl-dev;
- sudo apt-get -m install openjdk-11-jdk libltdl-dev curl;
- export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-arm64;
- export PATH=$JAVA_HOME/bin:$PATH;
- export PATH=$JAVA_HOME/bin:$PATH;
- mkdir $HOME/local
- export PATH=$HOME/local/bin:$PATH
- curl -o autoconf-2.71.tar.gz https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz
- tar xzvf autoconf-2.71.tar.gz
- cd autoconf-2.71; ./configure --prefix $HOME/local; make; make install; cd ..

install:
- export APACHE_ANT_BASE=$(curl http://apache.mirror.iphh.net/ant/binaries/ | grep "apache-ant-1.9..*-bin.tar.gz" | tail -1 | sed 's/.*href="\([^"]*\)-bin.tar.gz".*/\1/g')
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<!-- jnidispatch library release version -->
<property name="jni.major" value="6"/>
<property name="jni.minor" value="1"/>
<property name="jni.revision" value="5"/>
<property name="jni.revision" value="6"/>
<property name="jni.build" value="0"/> <!--${build.number}-->
<property name="jni.version" value="${jni.major}.${jni.minor}.${jni.revision}"/>
<property name="jni.md5" value="147a998f0cbc89681a1ae6c0dd121629"/>
Expand Down
Binary file modified lib/native/aix-ppc.jar
Binary file not shown.
Binary file modified lib/native/aix-ppc64.jar
Binary file not shown.
Binary file modified lib/native/android-aarch64.jar
Binary file not shown.
Binary file modified lib/native/android-arm.jar
Binary file not shown.
Binary file modified lib/native/android-armv7.jar
Binary file not shown.
Binary file modified lib/native/android-mips.jar
Binary file not shown.
Binary file modified lib/native/android-mips64.jar
Binary file not shown.
Binary file modified lib/native/android-x86-64.jar
Binary file not shown.
Binary file modified lib/native/android-x86.jar
Binary file not shown.
Binary file modified lib/native/darwin-aarch64.jar
Binary file not shown.
Binary file modified lib/native/darwin-x86-64.jar
Binary file not shown.
Binary file modified lib/native/freebsd-x86-64.jar
Binary file not shown.
Binary file modified lib/native/freebsd-x86.jar
Binary file not shown.
Binary file modified lib/native/linux-aarch64.jar
Binary file not shown.
Binary file modified lib/native/linux-arm.jar
Binary file not shown.
Binary file modified lib/native/linux-armel.jar
Binary file not shown.
Binary file modified lib/native/linux-loongarch64.jar
Binary file not shown.
Binary file modified lib/native/linux-mips64el.jar
Binary file not shown.
Binary file modified lib/native/linux-ppc.jar
Binary file not shown.
Binary file modified lib/native/linux-ppc64le.jar
Binary file not shown.
Binary file modified lib/native/linux-riscv64.jar
Binary file not shown.
Binary file modified lib/native/linux-s390x.jar
Binary file not shown.
Binary file modified lib/native/linux-x86-64.jar
Binary file not shown.
Binary file modified lib/native/linux-x86.jar
Binary file not shown.
Binary file modified lib/native/openbsd-x86-64.jar
Binary file not shown.
Binary file modified lib/native/openbsd-x86.jar
Binary file not shown.
Binary file modified lib/native/sunos-sparc.jar
Binary file not shown.
Binary file modified lib/native/sunos-sparcv9.jar
Binary file not shown.
Binary file modified lib/native/sunos-x86-64.jar
Binary file not shown.
Binary file modified lib/native/sunos-x86.jar
Binary file not shown.
Binary file modified lib/native/win32-aarch64.jar
Binary file not shown.
Binary file modified lib/native/win32-x86-64.jar
Binary file not shown.
Binary file modified lib/native/win32-x86.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions native/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ifneq ($(DYNAMIC_LIBFFI),true)
FFI_SRC=$(shell pwd)/libffi
FFI_BUILD=$(BUILD)/libffi
FFI_LIB=$(FFI_BUILD)/.libs/libffi$(ARSFX)
FFI_ENV=CC="$(CC)" CFLAGS="$(COPT) $(CDEBUG)" CPPFLAGS="$(CDEFINES)"
FFI_ENV=CC="$(CC)" CFLAGS="$(COPT) $(CDEBUG) -DFFI_STATIC_BUILD" CPPFLAGS="$(CDEFINES) -DFFI_STATIC_BUILD"
FFI_CONFIG=--enable-static --disable-shared --with-pic=yes
endif
LIBRARY=$(BUILD)/$(LIBPFX)jnidispatch$(JNISFX)
Expand Down Expand Up @@ -172,7 +172,7 @@ CPP=$(PREFIX)cpp
LD=$(CC)
RANLIB=$(PREFIX)ranlib
STRIP=$(PREFIX)strip -x
CDEFINES=-DNO_JAWT -DNO_WEAK_GLOBALS -DFFI_MMAP_EXEC_WRIT=1 -DFFI_MMAP_EXEC_SELINUX=0
CDEFINES=-DFFI_STATIC_BUILD -DNO_JAWT -DNO_WEAK_GLOBALS -DFFI_MMAP_EXEC_WRIT=1 -DFFI_MMAP_EXEC_SELINUX=0
COPT+=-fpic -ffunction-sections -funwind-tables -fno-short-enums
JAVA_INCLUDES=
CINCLUDES+=-I"$(NDK_PLATFORM)/arch-$(AARCH)/usr/include" # -I/usr/include
Expand Down
33 changes: 7 additions & 26 deletions native/libffi/.ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -x

# Special build tools are here...
export PATH=$HOME/i/bin:$PATH

# This is a policy bound API key. It can only be used with
# https://github.com/libffi/rlgl-policy.git.
RLGL_KEY=0LIBFFI-0LIBFFI-0LIBFFI-0LIBFFI
Expand All @@ -14,21 +17,6 @@ fi

export DOCKER=docker

function build_cfarm()
{
curl -u ${CFARM_AUTH} https://cfarm-test-libffi-libffi.apps.home.labdroid.net/test?host=${HOST}\&commit=${TRAVIS_COMMIT} | tee build.log
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo $(tail build.log | grep '^==LOGFILE==')
echo $(tail build.log | grep '^==LOGFILE==' | cut -b13-)
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
curl -u ${CFARM_AUTH} "$(tail build.log | grep '^==LOGFILE==' | cut -b13-)" > libffi.log

./rlgl l --key=${RLGL_KEY} https://rl.gl
ID=$(./rlgl start)
./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git libffi.log
exit $?
}

function build_linux()
{
./autogen.sh
Expand All @@ -39,8 +27,7 @@ function build_linux()
DEJAGNU=$(pwd)/.ci/site.exp BOARDSDIR=$(pwd)/.ci make check RUNTESTFLAGS="-a $RUNTESTFLAGS"

./rlgl l --key=${RLGL_KEY} https://rl.gl
ID=$(./rlgl start)
./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
./rlgl e -l project=libffi -l sha=${GITHUB_SHA:0:7} -l CC='$CC' ${HOST+-l host=$HOST} --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
exit $?
}

Expand All @@ -49,8 +36,7 @@ function build_foreign_linux()
${DOCKER} run --rm -t -v $(pwd):/opt ${SET_QEMU_CPU} -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" $2 bash -c /opt/.ci/build-in-container.sh

./rlgl l --key=${RLGL_KEY} https://rl.gl
ID=$(./rlgl start)
./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
./rlgl e -l project=libffi -l sha=${GITHUB_SHA:0:7} -l CC="$CC" ${HOST+-l host=$HOST} --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
exit $?
}

Expand All @@ -59,8 +45,7 @@ function build_cross_linux()
${DOCKER} run --rm -t -v $(pwd):/opt ${SET_QEMU_CPU} -e HOST="${HOST}" -e CC="${HOST}-gcc-8 ${GCC_OPTIONS}" -e CXX="${HOST}-g++-8 ${GCC_OPTIONS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" quay.io/moxielogic/cross-ci-build-container:latest bash -c /opt/.ci/build-in-container.sh

./rlgl l --key=${RLGL_KEY} https://rl.gl
ID=$(./rlgl start)
./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
./rlgl e -l project=libffi -l sha=${GITHUB_SHA:0:7} -l CC="${HOST}-gcc-8 ${GCC_OPTIONS}" -l host=${HOST} --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
exit $?
}

Expand All @@ -70,8 +55,7 @@ function build_cross()
${DOCKER} run --rm -t -v $(pwd):/opt -e HOST="${HOST}" -e CC="${HOST}-gcc ${GCC_OPTIONS}" -e CXX="${HOST}-g++ ${GCC_OPTIONS}" -e RUNNER_WORKSPACE=/opt -e RUNTESTFLAGS="-vv ${RUNTESTFLAGS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" quay.io/moxielogic/libffi-ci-${HOST} bash -c /opt/.ci/build-cross-in-container.sh

./rlgl l --key=${RLGL_KEY} https://rl.gl
ID=$(./rlgl start)
./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
./rlgl e -l project=libffi -l sha=${GITHUB_SHA:0:7} -l CC="${HOST}-gcc" -l host=$HOST --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
exit $?
}

Expand Down Expand Up @@ -109,9 +93,6 @@ case "$HOST" in
./autogen.sh
build_foreign_linux arm quay.io/moxielogic/arm32v7-ci-build-container:latest
;;
mips64el-linux-gnu | sparc64-linux-gnu)
build_cfarm
;;
bfin-elf )
./autogen.sh
GCC_OPTIONS=-msim build_cross
Expand Down
8 changes: 7 additions & 1 deletion native/libffi/.ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [[ $RUNNER_OS != 'Linux' ]]; then
# brew update > brew-update.log 2>&1
# fix an issue with libtool on travis by reinstalling it
brew uninstall libtool;
brew install libtool dejagnu;
brew install automake libtool dejagnu;

# Download and extract the rlgl client
wget -qO - https://rl.gl/cli/rlgl-darwin-amd64.tgz | \
Expand Down Expand Up @@ -35,6 +35,12 @@ else

sudo apt-get clean # clear the cache
sudo apt-get update

set -x
wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 -qO - https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.gz | tar -xvzf -
mkdir -p ~/i
(cd autoconf-2.71; ./configure --prefix=$HOME/i; make; make install)

case $HOST in
mips64el-linux-gnu | sparc64-linux-gnu)
;;
Expand Down
Loading

0 comments on commit 5dd4bd7

Please sign in to comment.