lfortran: Fix implicit declaration of function

defined in libandroid-complex-math.
This commit is contained in:
Tee KOBAYASHI 2023-04-19 21:20:19 +09:00 committed by xtkoba
parent 538d77e0b6
commit 3bc2aafa76
2 changed files with 18 additions and 2 deletions

View File

@ -5,7 +5,7 @@ TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.18.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=git+https://github.com/lfortran/lfortran
TERMUX_PKG_DEPENDS="clang, libc++, libllvm, zlib"
TERMUX_PKG_DEPENDS="clang, libandroid-complex-math, libc++, ncurses, zlib, zstd"
TERMUX_PKG_BUILD_DEPENDS="libllvm-static"
TERMUX_PKG_SUGGESTS="libkokkos"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
@ -38,5 +38,5 @@ termux_step_pre_configure() {
( cd $TERMUX_PKG_SRCDIR && sh build0.sh )
LDFLAGS+=" -lm"
LDFLAGS+=" -landroid-complex-math -lm"
}

View File

@ -0,0 +1,16 @@
--- a/src/libasr/runtime/lfortran_intrinsics.h
+++ b/src/libasr/runtime/lfortran_intrinsics.h
@@ -6,6 +6,13 @@
#include <inttypes.h>
#include <stdbool.h>
+#if defined __ANDROID__ && __ANDROID_API__ < 26
+double complex clog(double complex);
+float complex clogf(float complex);
+double complex cpow(double complex, double complex);
+float complex cpowf(float complex, float complex);
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif