From 7dd8ec1761ade0c2d114ee93700ce0d654f4e069 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 13 May 2015 20:15:19 +0000 Subject: [PATCH] Revert "Revert "Turn on _FORTIFY_SOURCE=2 for the host."" This reverts commit e27b214fc248d8927c42c5529d5c9fe75e2591aa. Change-Id: I3d739c0594dbe4ecd62c5b07064ada7de6cdaadb --- core/combo/HOST_linux-x86.mk | 3 +-- core/combo/HOST_linux-x86_64.mk | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk index 8eda6c09e4..3acf7957fa 100644 --- a/core/combo/HOST_linux-x86.mk +++ b/core/combo/HOST_linux-x86.mk @@ -40,8 +40,7 @@ $(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -fPIC \ -no-canonical-prefixes \ -include $(call select-android-config-h,linux-x86) -# TODO: Set _FORTIFY_SOURCE=2. Bug 20558757. -$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fstack-protector +$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector # Workaround differences in inttypes.h between host and target. # See bug 12708004. diff --git a/core/combo/HOST_linux-x86_64.mk b/core/combo/HOST_linux-x86_64.mk index e268e41eb3..b74990b1f9 100644 --- a/core/combo/HOST_linux-x86_64.mk +++ b/core/combo/HOST_linux-x86_64.mk @@ -40,8 +40,7 @@ HOST_GLOBAL_CFLAGS += -fPIC \ -no-canonical-prefixes \ -include $(call select-android-config-h,linux-x86) -# TODO: Set _FORTIFY_SOURCE=2. Bug 20558757. -HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fstack-protector +HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector # Workaround differences in inttypes.h between host and target. # See bug 12708004.