[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Fix building error



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 <wency@xxxxxxxxxxxxxx>
---
 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.