From e410863adc3073203d7c328eef13dd61f271f512 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Fri, 22 Oct 2021 10:01:44 +0200 Subject: [PATCH] aapt: fix build with ndk-r23 As we have seen [1], i686 seem to explicitly need -fPIC. Pass CPPFLAGS in more places when building aapt, to avoid an error like: ld: error: relocation R_386_PC32 cannot be used against symbol config_free; recompile with -fPIC >>> defined in /tmp/config_utils-70060d.o >>> referenced by config_utils.c >>> /tmp/config_utils-70060d.o:(config_free) [1] https://github.com/termux/termux-packages/issues/7215#issuecomment-906154438 --- packages/aapt/build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/aapt/build.sh b/packages/aapt/build.sh index 351a246f9..58e7e566a 100644 --- a/packages/aapt/build.sh +++ b/packages/aapt/build.sh @@ -102,7 +102,7 @@ termux_step_make_install() { socket_network_client_unix.c \ sockets_unix.o \ str_parms.c" - $CC $LDFLAGS \ + $CC $CPPFLAGS $LDFLAGS \ -Dchar16_t=uint16_t \ -std=c11 \ -isystem $AOSP_INCLUDE_DIR \ @@ -114,8 +114,6 @@ termux_step_make_install() { -shared \ -o $TERMUX_PREFIX/lib/libandroid-cutils.so - - # Build libutil: local LIBUTILS_TARFILE=$TERMUX_PKG_CACHEDIR/libutils_${_TAGNAME}.tar.gz test ! -f $LIBUTILS_TARFILE && termux_download \