2019-08-10 12:18:31 +02:00
|
|
|
From 8aea14bbd20b04b8fffaf35138ebdcbd39e433a3 Mon Sep 17 00:00:00 2001
|
2016-11-01 09:37:32 +01:00
|
|
|
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
|
|
|
Date: Sat, 29 Oct 2016 16:35:26 +0200
|
|
|
|
Subject: [PATCH] xen/Rules.mk: fix build with CFLAGS from environment
|
|
|
|
|
|
|
|
When CFLAGS are passed from the environment, the first-level make
|
|
|
|
invocation will append -D__OBJECT_FILE__ to it, then call a second
|
|
|
|
make invocation, that will have those new CFLAGS in its environment,
|
|
|
|
but will also append -D__OBJECT_FILE__ to those.
|
|
|
|
|
|
|
|
Then, the compiler fails because __OBEJECT_FILE__ is defined twice.
|
|
|
|
|
|
|
|
Just undefine it before defining it again, as a *workaround* to this
|
|
|
|
issue.
|
|
|
|
|
|
|
|
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
|
|
|
---
|
|
|
|
xen/Rules.mk | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/xen/Rules.mk b/xen/Rules.mk
|
2019-08-10 12:18:31 +02:00
|
|
|
index 3090ea7828..d535bf9e2f 100644
|
2016-11-01 09:37:32 +01:00
|
|
|
--- a/xen/Rules.mk
|
|
|
|
+++ b/xen/Rules.mk
|
2019-08-10 12:18:31 +02:00
|
|
|
@@ -61,7 +61,7 @@ CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
|
|
|
|
$(call cc-option-add,CFLAGS,CC,-Wvla)
|
|
|
|
CFLAGS += -pipe -D__XEN__ -include $(BASEDIR)/include/xen/config.h
|
|
|
|
CFLAGS-$(CONFIG_DEBUG_INFO) += -g
|
2016-11-01 09:37:32 +01:00
|
|
|
-CFLAGS += '-D__OBJECT_FILE__="$@"'
|
|
|
|
+CFLAGS += -U__OBJECT_FILE__ '-D__OBJECT_FILE__="$@"'
|
|
|
|
|
|
|
|
ifneq ($(clang),y)
|
|
|
|
# Clang doesn't understand this command line argument, and doesn't appear to
|
|
|
|
--
|
2019-08-10 12:18:31 +02:00
|
|
|
2.22.0
|
2016-11-01 09:37:32 +01:00
|
|
|
|