ruby: bump version to 2.4.1
[buildroot-gz.git] / package / xen / 0002-xen-Rules.mk-fix-build-with-CFLAGS-from-environment.patch
blob0d4e581af6a49e4776e5c0f369f915038d25115e
1 From 2a310549aaeaba05f640ade43488bb893101ce4a Mon Sep 17 00:00:00 2001
2 From: "Yann E. MORIN" <yann.morin.1998@free.fr>
3 Date: Sat, 29 Oct 2016 16:35:26 +0200
4 Subject: [PATCH] xen/Rules.mk: fix build with CFLAGS from environment
6 When CFLAGS are passed from the environment, the first-level make
7 invocation will append -D__OBJECT_FILE__ to it, then call a second
8 make invocation, that will have those new CFLAGS in its environment,
9 but will also append -D__OBJECT_FILE__ to those.
11 Then, the compiler fails because __OBEJECT_FILE__ is defined twice.
13 Just undefine it before defining it again, as a *workaround* to this
14 issue.
16 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
17 ---
18 xen/Rules.mk | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
21 diff --git a/xen/Rules.mk b/xen/Rules.mk
22 index a9fda71..09ccbfa 100644
23 --- a/xen/Rules.mk
24 +++ b/xen/Rules.mk
25 @@ -49,7 +49,7 @@ ALL_OBJS-$(CONFIG_CRYPTO) += $(BASEDIR)/crypto/built_in.o
26 CFLAGS += -nostdinc -fno-builtin -fno-common
27 CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
28 CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
29 -CFLAGS += '-D__OBJECT_FILE__="$@"'
30 +CFLAGS += -U__OBJECT_FILE__ '-D__OBJECT_FILE__="$@"'
32 ifneq ($(clang),y)
33 # Clang doesn't understand this command line argument, and doesn't appear to
34 --
35 2.7.4