Allow a user to supply extra CFLAGS via the EXTRA_CFLAGS_XEN_CORE
environment variable for hypervisor builds. This is not a
configuration that is supported but is only aimed to help support
testing and troubleshooting when you need to make changes.

Signed-off-by: Doug Goldstein <car...@cardoe.com>
---
CC: Andrew Cooper <andrew.coop...@citrix.com>
CC: George Dunlap <george.dun...@eu.citrix.com>
CC: Ian Jackson <ian.jack...@eu.citrix.com>
CC: Jan Beulich <jbeul...@suse.com>
CC: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
CC: Stefano Stabellini <sstabell...@kernel.org>
CC: Tim Deegan <t...@xen.org>
CC: Wei Liu <wei.l...@citrix.com>
CC: Roger Pau Monné <roger....@citrix.com>
---
changes since v1:
 - don't depend on XEN_CONFIG_EXPERT
 - rename flag to EXTRA_CFLAGS_XEN_CORE
 - add info to INSTALL
--
 INSTALL      | 4 ++++
 xen/Rules.mk | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/INSTALL b/INSTALL
index 58359da380..9aa9ebdddc 100644
--- a/INSTALL
+++ b/INSTALL
@@ -247,6 +247,10 @@ EXTRA_CFLAGS_XEN_TOOLS=
 EXTRA_CFLAGS_QEMU_TRADITIONAL=
 EXTRA_CFLAGS_QEMU_XEN=
 
+Additional CFLAGS may be supplied to the build of the hypervisor by
+using this variable.
+EXTRA_CFLAGS_XEN_CORE=
+
 This variable can be used to use DIR/include and DIR/lib during build.
 This is the same as PREPEND_LIB and PREPEND_INCLUDES. APPEND_LIB and
 APPEND_INCLUDES= will be appended to the CFLAGS/LDFLAGS variable.
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 2918019b92..ef26b8d1bb 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -79,6 +79,8 @@ ALL_OBJS := $(ALL_OBJS-y)
 CFLAGS-y += -MMD -MF $(@D)/.$(@F).d
 
 CFLAGS += $(CFLAGS-y)
+# allow extra CFLAGS externally via EXTRA_CFLAGS_XEN_CORE
+CFLAGS += $(EXTRA_CFLAGS_XEN_CORE)
 
 # Most CFLAGS are safe for assembly files:
 #  -std=gnu{89,99} gets confused by #-prefixed end-of-line comments
-- 
2.13.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to