Skip to contentSkip to conversation

EFI: fix tool chain capabilities detection

PATCH In review Jan Beulich 4 participants 4 messages Aug 26, 2013 – Sep 9, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EFI: fix tool chain capabilities detection

Commit f5a54e92 ("xen: move some arch CFLAGS into the common Rules.mk") transformed CFLAGS assignments to CFLAGS-y ones, which collides with the was xen/arch/x86/efi/Makefile determines whether the tol chain is usable for an EFI build. Transform the block back to using CFLAGS.

xen/Rules.mk +4 -5
@@ -41,13 +41,12 @@ ALL_OBJS-y               += $(BASEDIR)/x
 ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
 ALL_OBJS-$(x86)          += $(BASEDIR)/crypto/built_in.o
 
-CFLAGS-y                += -fno-builtin -fno-common
-CFLAGS-y                += -Werror -Wredundant-decls -Wno-pointer-arith
-CFLAGS-y                += -pipe
-CFLAGS-y                += -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
+CFLAGS += -fno-builtin -fno-common
+CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
+CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
 # Solaris puts stdarg.h &c in the system include directory.
 ifneq ($(XEN_OS),SunOS)
-CFLAGS-y                += -nostdinc -iwithprefix include
+CFLAGS += -nostdinc -iwithprefix include
 endif
 
 CFLAGS-$(XSM_ENABLE)    += -DXSM_ENABLE

EFI: fix tool chain capabilities detection

Commit f5a54e92 ("xen: move some arch CFLAGS into the common Rules.mk") transformed CFLAGS assignments to CFLAGS-y ones, which collides with the was xen/arch/x86/efi/Makefile determines whether the tol chain is usable for an EFI build. Transform the block back to using CFLAGS.

xen/Rules.mk +4 -5
@@ -41,13 +41,12 @@ ALL_OBJS-y               += $(BASEDIR)/x
 ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
 ALL_OBJS-$(x86)          += $(BASEDIR)/crypto/built_in.o
 
-CFLAGS-y                += -fno-builtin -fno-common
-CFLAGS-y                += -Werror -Wredundant-decls -Wno-pointer-arith
-CFLAGS-y                += -pipe
-CFLAGS-y                += -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
+CFLAGS += -fno-builtin -fno-common
+CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
+CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
 # Solaris puts stdarg.h &c in the system include directory.
 ifneq ($(XEN_OS),SunOS)
-CFLAGS-y                += -nostdinc -iwithprefix include
+CFLAGS += -nostdinc -iwithprefix include
 endif
 
 CFLAGS-$(XSM_ENABLE)    += -DXSM_ENABLE

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw
Quoted 6 lines · Jan Beulich

Commit f5a54e92 ("xen: move some arch CFLAGS into the common Rules.mk") transformed CFLAGS assignments to CFLAGS-y ones, which collides with the was xen/arch/x86/efi/Makefile determines whether the tol chain is usable for an EFI build. Transform the block back to using CFLAGS.

Eurgh, that difference between CFLAGS and CFLAGS-y should at least be documented somewhere so anyone adding a new flag knows what to do.

But this patch looks fine anyway. Reviewed-by: Tim Deegan <[email protected]>

Acked-by on v1 1/1
#2 lore raw
In reply to Jan Beulich
Quoted 6 lines · Jan Beulich

Commit f5a54e92 ("xen: move some arch CFLAGS into the common Rules.mk") transformed CFLAGS assignments to CFLAGS-y ones, which collides with the was xen/arch/x86/efi/Makefile determines whether the tol chain is usable for an EFI build. Transform the block back to using CFLAGS.

Quoted 24 lines
xen/Rules.mk +0 -4
@@ -41,13 +41,12 @@ ALL_OBJS-y               += $(BASEDIR)/x
 ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
 ALL_OBJS-$(x86)          += $(BASEDIR)/crypto/built_in.o
 
-CFLAGS-y                += -fno-builtin -fno-common
-CFLAGS-y                += -Werror -Wredundant-decls -Wno-pointer-arith
-CFLAGS-y                += -pipe
-CFLAGS-y                += -g -D__XEN__ -include

$(BASEDIR)/include/xen/config.h

xen/Rules.mk +4 -1
+CFLAGS += -fno-builtin -fno-common
+CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
+CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
 # Solaris puts stdarg.h &c in the system include directory.
 ifneq ($(XEN_OS),SunOS)
-CFLAGS-y                += -nostdinc -iwithprefix include
+CFLAGS += -nostdinc -iwithprefix include
 endif
 
 CFLAGS-$(XSM_ENABLE)    += -DXSM_ENABLE
Acked-by
#3 lore raw
Quoted 10 lines · Keir Fraser
Quoted 6 lines · Jan Beulich

Commit f5a54e92 ("xen: move some arch CFLAGS into the common Rules.mk") transformed CFLAGS assignments to CFLAGS-y ones, which collides with the was xen/arch/x86/efi/Makefile determines whether the tol chain is usable for an EFI build. Transform the block back to using CFLAGS.

I suppose this touches ARM too, in which case:

Although +1 to Tim comment about a comment.

Quoted 32 lines
Quoted 15 lines
xen/Rules.mk +0 -4
@@ -41,13 +41,12 @@ ALL_OBJS-y               += $(BASEDIR)/x
 ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
 ALL_OBJS-$(x86)          += $(BASEDIR)/crypto/built_in.o
 
-CFLAGS-y                += -fno-builtin -fno-common
-CFLAGS-y                += -Werror -Wredundant-decls -Wno-pointer-arith
-CFLAGS-y                += -pipe
-CFLAGS-y                += -g -D__XEN__ -include

$(BASEDIR)/include/xen/config.h

xen/Rules.mk ALL_OBJS-y += $(BASEDIR)/x · line 52

Quoted 10 lines
xen/Rules.mk +4 -1
+CFLAGS += -fno-builtin -fno-common
+CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
+CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
 # Solaris puts stdarg.h &c in the system include directory.
 ifneq ($(XEN_OS),SunOS)
-CFLAGS-y                += -nostdinc -iwithprefix include
+CFLAGS += -nostdinc -iwithprefix include
 endif
 
 CFLAGS-$(XSM_ENABLE)    += -DXSM_ENABLE

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel