arm: add -D_FORTIFY_SOURCE=1 to the default cflags
Add additional compile and runtime buffer overflow detection to Android. As of today, Android supports additional buffer overflow detection for the following libc functions: * memcpy * memmove * strcpy * strcat * strncpy * strncat Support for additional functions will be added to bionic libc in future code changes. Please see * http://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html * http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html for information on these features. Change-Id: I1a281a4bac20009f4730dd8d8b798fa107576230
This commit is contained in:
@@ -109,6 +109,7 @@ TARGET_GLOBAL_CFLAGS += \
|
||||
-fstack-protector \
|
||||
-Wa,--noexecstack \
|
||||
-Werror=format-security \
|
||||
-D_FORTIFY_SOURCE=1 \
|
||||
-fno-short-enums \
|
||||
$(arch_variant_cflags) \
|
||||
-include $(android_config_h) \
|
||||
|
Reference in New Issue
Block a user