From fddf23f19e7604e6c5b3c5377e7ff6293539a1da Mon Sep 17 00:00:00 2001 From: Jim Huang Date: Wed, 7 Sep 2011 01:25:28 +0800 Subject: [PATCH] HOST_linux-x86: Avoid doubly define macro _FORTIFY_SOURCE While building Android with latest host gcc, it causes the following build error: Install: out/host/linux-x86/bin/mkbootimg host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp :0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] :0:0: note: this is the location of the previous definition cc1plus: all warnings being treated as errors In order to make build system happy, this patch does unset macro _FORTIFY_SOURCE and then define it in host cflags. Change-Id: Ic37a90f05081a2c3650b3335bc87e9e895900fb2 --- core/combo/HOST_linux-x86.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk index c871613fe..1a5e17fbc 100644 --- a/core/combo/HOST_linux-x86.mk +++ b/core/combo/HOST_linux-x86.mk @@ -58,6 +58,6 @@ HOST_GLOBAL_CFLAGS += \ -include $(call select-android-config-h,linux-x86) # Disable new longjmp in glibc 2.11 and later. See bug 2967937. -HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0 +HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 HOST_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined -- 2.11.0