Merge "Reduce unnecessary rebuilds of .dex files with restat=1"
diff --git a/core/clang/HOST_x86_common.mk b/core/clang/HOST_x86_common.mk
index fc98dd5..8b94209 100644
--- a/core/clang/HOST_x86_common.mk
+++ b/core/clang/HOST_x86_common.mk
@@ -6,6 +6,8 @@
CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_CFLAGS := \
-integrated-as
+
+CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_CFLAGS += -fstack-protector-strong
endif
ifeq ($(HOST_OS),linux)
@@ -16,6 +18,8 @@
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CFLAGS := \
--gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)
+CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CFLAGS += -fstack-protector-strong
+
ifneq ($(strip $($(clang_2nd_arch_prefix)HOST_IS_64_BIT)),)
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS := \
--gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \
diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk
index a70f4f8..186d88f 100644
--- a/core/combo/TARGET_linux-mips.mk
+++ b/core/combo/TARGET_linux-mips.mk
@@ -89,6 +89,7 @@
-ffunction-sections \
-fdata-sections \
-funwind-tables \
+ -fstack-protector-strong \
-Wa,--noexecstack \
-Werror=format-security \
-D_FORTIFY_SOURCE=2 \
diff --git a/core/combo/TARGET_linux-mips64.mk b/core/combo/TARGET_linux-mips64.mk
index 9e4eaa6..3e1f61a 100644
--- a/core/combo/TARGET_linux-mips64.mk
+++ b/core/combo/TARGET_linux-mips64.mk
@@ -89,6 +89,7 @@
-ffunction-sections \
-fdata-sections \
-funwind-tables \
+ -fstack-protector-strong \
-Wa,--noexecstack \
-Werror=format-security \
-D_FORTIFY_SOURCE=2 \
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index 7d2b6de..558ec3b 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -94,7 +94,7 @@
-fstrict-aliasing \
-funswitch-loops \
-funwind-tables \
- -fstack-protector \
+ -fstack-protector-strong \
-m32 \
-no-canonical-prefixes \
-fno-canonical-system-headers \
diff --git a/core/combo/TARGET_linux-x86_64.mk b/core/combo/TARGET_linux-x86_64.mk
index 81fafdd..12166ec 100644
--- a/core/combo/TARGET_linux-x86_64.mk
+++ b/core/combo/TARGET_linux-x86_64.mk
@@ -94,7 +94,7 @@
-fstrict-aliasing \
-funswitch-loops \
-funwind-tables \
- -fstack-protector \
+ -fstack-protector-strong \
-m64 \
-no-canonical-prefixes \
-fno-canonical-system-headers