ecl: Fix ABI for host build

This commit is contained in:
xtkoba 2021-11-22 04:11:19 +09:00 committed by Henrik Grimler
parent a6699b433c
commit ace5844658
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
3 changed files with 35 additions and 2 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="ECL (Embeddable Common Lisp) is an interpreter of the Co
TERMUX_PKG_LICENSE="LGPL-2.0" TERMUX_PKG_LICENSE="LGPL-2.0"
TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="21.2.1" TERMUX_PKG_VERSION="21.2.1"
TERMUX_PKG_REVISION=1 TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://common-lisp.net/project/ecl/static/files/release/ecl-${TERMUX_PKG_VERSION}.tgz TERMUX_PKG_SRCURL=https://common-lisp.net/project/ecl/static/files/release/ecl-${TERMUX_PKG_VERSION}.tgz
TERMUX_PKG_SHA256=b15a75dcf84b8f62e68720ccab1393f9611c078fcd3afdd639a1086cad010900 TERMUX_PKG_SHA256=b15a75dcf84b8f62e68720ccab1393f9611c078fcd3afdd639a1086cad010900
TERMUX_PKG_DEPENDS="libandroid-support, libgmp, libgc, libffi" TERMUX_PKG_DEPENDS="libandroid-support, libgmp, libgc, libffi"
@ -20,11 +20,19 @@ termux_step_host_build() {
srcdir=$TERMUX_PKG_SRCDIR/src srcdir=$TERMUX_PKG_SRCDIR/src
hostprefix=$TERMUX_PKG_HOSTBUILD_DIR/prefix hostprefix=$TERMUX_PKG_HOSTBUILD_DIR/prefix
mkdir $hostprefix mkdir $hostprefix
$srcdir/configure --prefix=$hostprefix --srcdir=$srcdir --disable-c99complex autoreconf -fi $srcdir/gmp
$srcdir/configure ABI=${TERMUX_ARCH_BITS} \
CFLAGS=-m${TERMUX_ARCH_BITS} LDFLAGS=-m${TERMUX_ARCH_BITS} \
--prefix=$hostprefix --srcdir=$srcdir --disable-c99complex
make make
make install make install
} }
termux_step_pre_configure() {
srcdir=$TERMUX_PKG_SRCDIR/src
autoreconf -fi $srcdir
}
termux_step_configure() { termux_step_configure() {
# Copy cross_config for target architecture. # Copy cross_config for target architecture.
case $TERMUX_ARCH in case $TERMUX_ARCH in

View File

@ -0,0 +1,14 @@
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -525,7 +525,10 @@
alpha*)
CFLAGS="${CFLAGS} -mieee";;
esac
-ECL_CFLAGS="-D${thehost}"
+case "${thehost}" in
+ android) ECL_CFLAGS= ;;
+ *) ECL_CFLAGS="-D${thehost}" ;;
+esac
AC_MSG_CHECKING(for ld flags when building shared libraries)
if test "${enable_shared}" = "yes"; then
AC_MSG_RESULT([${SHARED_LDFLAGS}])

View File

@ -0,0 +1,11 @@
--- a/src/gmp/acinclude.m4
+++ b/src/gmp/acinclude.m4
@@ -594,7 +594,7 @@
#ifdef __GNUC__
typedef unsigned long long t1;typedef t1*t2;
-__inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
+static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}