From 40febcad47d22c234b9dcc14391ccd936b895f8c Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Fri, 7 Dec 2012 17:20:28 -0800 Subject: [PATCH] x86: enable FORTIFY_SOURCE Enable FORTIFY_SOURCE for Android x86. This adds certain security protections to Android programs, checking for common programming mistakes and buffer overflows. FORTIFY_SOURCE protections have been enabled for ARM since a46c480e43cc61d0190569684f0a1e53a5da75b6 (Jun 4th 2012) Change-Id: Idae6f93d37ddae605088867cd3029f12632456e1 --- core/combo/TARGET_linux-x86.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk index 569914b7d2..948ee17d8f 100644 --- a/core/combo/TARGET_linux-x86.mk +++ b/core/combo/TARGET_linux-x86.mk @@ -84,6 +84,7 @@ TARGET_GLOBAL_CFLAGS += \ -Ulinux \ -Wa,--noexecstack \ -Werror=format-security \ + -D_FORTIFY_SOURCE=1 \ -Wstrict-aliasing=2 \ -fPIC -fPIE \ -ffunction-sections \