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
This commit is contained in:
Henrik Grimler 2021-10-22 10:01:44 +02:00
parent d821abed8f
commit e410863adc

View File

@ -102,7 +102,7 @@ termux_step_make_install() {
socket_network_client_unix.c \ socket_network_client_unix.c \
sockets_unix.o \ sockets_unix.o \
str_parms.c" str_parms.c"
$CC $LDFLAGS \ $CC $CPPFLAGS $LDFLAGS \
-Dchar16_t=uint16_t \ -Dchar16_t=uint16_t \
-std=c11 \ -std=c11 \
-isystem $AOSP_INCLUDE_DIR \ -isystem $AOSP_INCLUDE_DIR \
@ -114,8 +114,6 @@ termux_step_make_install() {
-shared \ -shared \
-o $TERMUX_PREFIX/lib/libandroid-cutils.so -o $TERMUX_PREFIX/lib/libandroid-cutils.so
# Build libutil: # Build libutil:
local LIBUTILS_TARFILE=$TERMUX_PKG_CACHEDIR/libutils_${_TAGNAME}.tar.gz local LIBUTILS_TARFILE=$TERMUX_PKG_CACHEDIR/libutils_${_TAGNAME}.tar.gz
test ! -f $LIBUTILS_TARFILE && termux_download \ test ! -f $LIBUTILS_TARFILE && termux_download \