Also switch to using clang for building 64-bit picolisp.
TERMUX_PKG_DESCRIPTION="Lisp interpreter and application server framework"
TERMUX_PKG_DEPENDS="libcrypt, openssl"
_PICOLISP_YEAR=17
TERMUX_PKG_DESCRIPTION="Lisp interpreter and application server framework"
TERMUX_PKG_DEPENDS="libcrypt, openssl"
_PICOLISP_YEAR=17
-_PICOLISP_MONTH=6
-_PICOLISP_DAY=6
+_PICOLISP_MONTH=7
+_PICOLISP_DAY=9
TERMUX_PKG_VERSION=${_PICOLISP_YEAR}.${_PICOLISP_MONTH}.${_PICOLISP_DAY}
# We use our bintray mirror since old version snapshots are not kept on main site.
TERMUX_PKG_SRCURL=https://dl.bintray.com/termux/upstream/picolisp_${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_VERSION=${_PICOLISP_YEAR}.${_PICOLISP_MONTH}.${_PICOLISP_DAY}
# We use our bintray mirror since old version snapshots are not kept on main site.
TERMUX_PKG_SRCURL=https://dl.bintray.com/termux/upstream/picolisp_${TERMUX_PKG_VERSION}.tar.gz
-TERMUX_PKG_SHA256=aeb90c3002b5fb2a708d3bb189ed1c2d9c2e5b699c873c60689867672d04967e
+TERMUX_PKG_SHA256=22eff19214f3250099935dc871045a5be6728724ad91a0534b9c29bcd8fde858
TERMUX_PKG_FOLDERNAME=picoLisp
TERMUX_PKG_BUILD_IN_SRC=true
# The assembly is not position-independent (would be a major rewrite):
TERMUX_PKG_FOLDERNAME=picoLisp
TERMUX_PKG_BUILD_IN_SRC=true
# The assembly is not position-independent (would be a major rewrite):
if [ $TERMUX_ARCH_BITS = 32 ]; then
# "Variable length array in structure won't be supported"
TERMUX_PKG_CLANG=no
if [ $TERMUX_ARCH_BITS = 32 ]; then
# "Variable length array in structure won't be supported"
TERMUX_PKG_CLANG=no
-else
- # FIXME: Use gcc for linking, as a clang build causes (tzo),
- # the time zone offset, to return 0:
- # Also, this call (and probably more) hangs:
- # (call "termux-notification" "--title" "Title" "--content" "Message")
- # These two problems only happen when using the gold linker, which
- # Termux does by default).
- TERMUX_PKG_CLANG=no
fi
termux_step_pre_configure() {
fi
termux_step_pre_configure() {
$TERMUX_HOST_PLATFORM-as -o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.s
$TERMUX_HOST_PLATFORM-as -o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.s
$TERMUX_HOST_PLATFORM-as -o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.s
$TERMUX_HOST_PLATFORM-as -o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.s
+ # Use -fuse-ld=bfd to avoid using the gold linker (which Termux
+ # patches NDK to use by default) as it causes (tzo), the time
+ # zone offset, to always be 0 (and probably other problems):
$CC -o ../bin/picolisp ${TERMUX_PKG_EXTRA_MAKE_ARGS}.base.o \
$CC -o ../bin/picolisp ${TERMUX_PKG_EXTRA_MAKE_ARGS}.base.o \
- -Wl,--no-as-needed -rdynamic -lc -lm -ldl -pie
+ -Wl,--no-as-needed -rdynamic -lc -lm -ldl -pie -fuse-ld=bfd
- $CC -o ../lib/ext -shared -rdynamic ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.o
- $CC -o ../lib/ht -shared -rdynamic ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.o
+ $CC -o ../lib/ext -shared -rdynamic -fuse-ld=bfd ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.o
+ $CC -o ../lib/ht -shared -rdynamic -fuse-ld=bfd ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.o
fi
mkdir -p $TERMUX_PREFIX/share/man/man1
fi
mkdir -p $TERMUX_PREFIX/share/man/man1
diff -u -r ../picoLisp/src/Makefile ./src/Makefile
diff -u -r ../picoLisp/src/Makefile ./src/Makefile
---- ../picoLisp/src/Makefile 2016-02-02 10:52:49.000000000 -0500
-+++ ./src/Makefile 2016-04-12 05:55:14.050621923 -0400
-@@ -6,119 +6,14 @@
+--- ../picoLisp/src/Makefile 2017-07-06 14:35:21.000000000 +0200
++++ ./src/Makefile 2017-07-10 01:13:20.897855727 +0200
+@@ -6,118 +6,14 @@
picoFiles = main.c gc.c apply.c flow.c sym.c subr.c big.c io.c net.c tab.c
-CC = gcc
# CCLD is the cc (compiler frontend) to use for the link step.
-CCLD = gcc
picoFiles = main.c gc.c apply.c flow.c sym.c subr.c big.c io.c net.c tab.c
-CC = gcc
# CCLD is the cc (compiler frontend) to use for the link step.
-CCLD = gcc
-CFLAGS = -c -O2 -pipe \
- -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing \
- -W -Wimplicit -Wreturn-type -Wunused -Wformat \
-CFLAGS = -c -O2 -pipe \
- -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing \
- -W -Wimplicit -Wreturn-type -Wunused -Wformat \
- DYNAMIC-LIB-FLAGS = -shared
- STRIP = strip -f
-else
- DYNAMIC-LIB-FLAGS = -shared
- STRIP = strip -f
-else
--ifeq ($(shell uname -o), Cygwin)
+-ifeq ($(shell uname -o | egrep -q "Cygwin|Msys" ; echo $$?), 0)
- OS = Cygwin
- CFLAGS += -m32
- DYNAMIC-LIB-FLAGS = -shared
- OS = Cygwin
- CFLAGS += -m32
- DYNAMIC-LIB-FLAGS = -shared
+CCLD = $(CC)
+LCRYPT = -lcrypt
+OS = Android
+PICOLISP-FLAGS = -rdynamic -lm $(LDFLAGS)
+DYNAMIC-LIB-FLAGS = -shared -export-dynamic $(LDFLAGS) -lm
+CCLD = $(CC)
+LCRYPT = -lcrypt
+OS = Android
+PICOLISP-FLAGS = -rdynamic -lm $(LDFLAGS)
+DYNAMIC-LIB-FLAGS = -shared -export-dynamic $(LDFLAGS) -lm
picolisp: $(bin)/picolisp $(lib)/ext$(dll) $(lib)/ht$(dll)
tools: $(bin)/lat1 $(bin)/utf2 $(bin)/balance
picolisp: $(bin)/picolisp $(lib)/ext$(dll) $(lib)/ht$(dll)
tools: $(bin)/lat1 $(bin)/utf2 $(bin)/balance
- gate: $(bin)/ssl $(bin)/httpGate