From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wen Congyang Subject: [PATCH] Fix building error Date: Thu, 15 Jan 2015 11:39:04 +0800 Message-ID: <54B73658.6030309@cn.fujitsu.com> References: <1417435968.29138.19.camel@citrix.com> <1417443665-30809-1-git-send-email-euan.harris@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1417443665-30809-1-git-send-email-euan.harris@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian.Campbell@citrix.com Cc: Ian.Jackson@eu.citrix.com, Euan Harris , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Commit 1166ecf7 disables optimization. But python's build process may use CFLAGS -Wp,-D_FORTIFY_SOURCE=2, and suppose the 3rd party python modules to use. The macro _FORTIFY_SOURCE requires compiling with optimization (-O). Disable _FORTIFY_SOURCE by appending -Wp,-U_FORTIFY_SOURCE to CFLAGS. Signed-off-by: Wen Congyang --- tools/pygrub/Makefile | 5 +++++ tools/python/Makefile | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile index 3dff608..3d86254 100644 --- a/tools/pygrub/Makefile +++ b/tools/pygrub/Makefile @@ -2,6 +2,11 @@ XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk +ifeq ($(debug),y) +# Disable _FORTIFY_SOURCE +CFLAGS += -Wp,-U_FORTIFY_SOURCE +endif + .PHONY: all all: build .PHONY: build diff --git a/tools/python/Makefile b/tools/python/Makefile index 533d3de..3997660 100644 --- a/tools/python/Makefile +++ b/tools/python/Makefile @@ -4,6 +4,11 @@ include $(XEN_ROOT)/tools/Rules.mk .PHONY: all all: build +ifeq ($(debug),y) +# Disable _FORTIFY_SOURCE +CFLAGS += -Wp,-U_FORTIFY_SOURCE +endif + .PHONY: build build: genwrap.py $(XEN_ROOT)/tools/libxl/libxl_types.idl \ $(XEN_ROOT)/tools/libxl/idl.py -- 2.1.0