Add -fPIC to compiler options for static library build on Android.

This commit is contained in:
qyt 2023-11-30 11:22:31 +08:00 committed by Mark Adler
parent 0f51fb4933
commit 4f8a17e8cb

4
configure vendored
View File

@ -197,8 +197,8 @@ show $cc -c $test.c
if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
echo ... using gcc >> configure.log echo ... using gcc >> configure.log
CC="$cc" CC="$cc"
CFLAGS="${CFLAGS--O3}" CFLAGS="${CFLAGS--O3} -fPIC"
SFLAGS="${CFLAGS--O3} -fPIC" SFLAGS="${CFLAGS--O3}"
if test "$ARCHS"; then if test "$ARCHS"; then
CFLAGS="${CFLAGS} ${ARCHS}" CFLAGS="${CFLAGS} ${ARCHS}"
LDFLAGS="${LDFLAGS} ${ARCHS}" LDFLAGS="${LDFLAGS} ${ARCHS}"