Skip to content

Commit 7478157

Browse files
committed
let png rely on our own zlib verion and add more compile flags to andrid
1 parent b38ace0 commit 7478157

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

build/android/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ export ANDROID_API
115115
# info "LD FLAGS SELECTED = '${LDFLAGS}'"
116116

117117
export PATH="${toolchain_bin}:${cocos_root}/extras/tools/bin:$PATH"
118+
if [ "$ANDROID_ABI" = "armeabi-v7a" ]; then
119+
export CFLAGS="-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -Os -g -DNDEBUG -fomit-frame-pointer -fno-strict-aliasing -DANDROID -Wa,--noexecstack -Wformat -Werror=format-security "
120+
elif [ "$ANDROID_ABI" = "armeabi" ]; then
121+
export CFLAGS="-ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -g -DNDEBUG -fomit-frame-pointer -fno-strict-aliasing -DANDROID -Wa,--noexecstack -Wformat -Werror=format-security"
122+
else
123+
export CFLAGS="-ffunction-sections -funwind-tables -fstack-protector -fPIC -no-canonical-prefixes -O2 -g -DNDEBUG -fomit-frame-pointer -fstrict-aliasing -DANDROID -Wa,--noexecstack -Wformat -Werror=format-security"
124+
fi
125+
126+
info "CFLAGS is ${CFLAGS}"
127+
118128
#
119129
# build 3rd party libraries
120130
#

contrib/src/png/rules.mak

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ png: libpng-$(PNG_VERSION).tar.xz .sum-png
1818
$(UNPACK)
1919
$(MOVE)
2020

21-
ifndef HAVE_ANDROID
2221
DEPS_png = zlib $(DEPS_zlib)
23-
endif
2422

2523
.png: png
2624
$(RECONF)

0 commit comments

Comments
 (0)