Set __USE_FORTIFY_LEVEL for debug builds
This commit is contained in:
parent
12163bb879
commit
9887e8cbfd
@ -2,6 +2,7 @@ termux_step_setup_toolchain() {
|
||||
[ "$TERMUX_PKG_METAPACKAGE" = "true" ] && return
|
||||
|
||||
export CFLAGS=""
|
||||
export CPPFLAGS=""
|
||||
export LDFLAGS="-L${TERMUX_PREFIX}/lib"
|
||||
|
||||
export AS=$TERMUX_HOST_PLATFORM-clang
|
||||
@ -69,13 +70,14 @@ termux_step_setup_toolchain() {
|
||||
LDFLAGS+=" -Wl,-z,relro,-z,now"
|
||||
|
||||
if [ "$TERMUX_DEBUG" = "true" ]; then
|
||||
CFLAGS+=" -g3 -O1 -D_FORTIFY_SOURCE=2"
|
||||
CFLAGS+=" -g3 -O1"
|
||||
CPPFLAGS+=" -D_FORTIFY_SOURCE=2 -D__USE_FORTIFY_LEVEL=2"
|
||||
else
|
||||
CFLAGS+=" -Oz"
|
||||
fi
|
||||
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
export CPPFLAGS="-I${TERMUX_PREFIX}/include"
|
||||
export CPPFLAGS+=" -I${TERMUX_PREFIX}/include"
|
||||
|
||||
# If libandroid-support is declared as a dependency, link to it explicitly:
|
||||
if [ "$TERMUX_PKG_DEPENDS" != "${TERMUX_PKG_DEPENDS/libandroid-support/}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user