diff mbox

xen: clean up AFLAGS management

Message ID 5758359202000078000F3102@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich June 8, 2016, 1:11 p.m. UTC
No need to force inclusion of xen/config.h - AFLAGS incorporates
CFLAGS, which already does this.

Also no need to use nested $(filter-out ...) - one of them can deal
with any number of patterns.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
clean up AFLAGS management

No need to force inclusion of xen/config.h - AFLAGS incorporates
CFLAGS, which already does this.

Also no need to use nested $(filter-out ...) - one of them can deal
with any number of patterns.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -64,7 +64,7 @@ ifneq ($(max_phys_irqs),)
 CFLAGS-y                += -DMAX_PHYS_IRQS=$(max_phys_irqs)
 endif
 
-AFLAGS-y                += -D__ASSEMBLY__ -include $(BASEDIR)/include/xen/config.h
+AFLAGS-y                += -D__ASSEMBLY__
 
 # Clang's built-in assembler can't handle .code16/.code32/.code64 yet
 AFLAGS-$(clang)         += -no-integrated-as
@@ -79,7 +79,7 @@ CFLAGS += $(CFLAGS-y)
 # Most CFLAGS are safe for assembly files:
 #  -std=gnu{89,99} gets confused by #-prefixed end-of-line comments
 #  -flto makes no sense and annoys clang
-AFLAGS += $(AFLAGS-y) $(filter-out -std=gnu%,$(filter-out -flto,$(CFLAGS)))
+AFLAGS += $(AFLAGS-y) $(filter-out -std=gnu% -flto,$(CFLAGS))
 
 # LDFLAGS are only passed directly to $(LD)
 LDFLAGS += $(LDFLAGS_DIRECT)

Comments

Andrew Cooper June 9, 2016, 11:36 a.m. UTC | #1
On 08/06/16 14:11, Jan Beulich wrote:
> No need to force inclusion of xen/config.h - AFLAGS incorporates
> CFLAGS, which already does this.
>
> Also no need to use nested $(filter-out ...) - one of them can deal
> with any number of patterns.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox

Patch

--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -64,7 +64,7 @@  ifneq ($(max_phys_irqs),)
 CFLAGS-y                += -DMAX_PHYS_IRQS=$(max_phys_irqs)
 endif
 
-AFLAGS-y                += -D__ASSEMBLY__ -include $(BASEDIR)/include/xen/config.h
+AFLAGS-y                += -D__ASSEMBLY__
 
 # Clang's built-in assembler can't handle .code16/.code32/.code64 yet
 AFLAGS-$(clang)         += -no-integrated-as
@@ -79,7 +79,7 @@  CFLAGS += $(CFLAGS-y)
 # Most CFLAGS are safe for assembly files:
 #  -std=gnu{89,99} gets confused by #-prefixed end-of-line comments
 #  -flto makes no sense and annoys clang
-AFLAGS += $(AFLAGS-y) $(filter-out -std=gnu%,$(filter-out -flto,$(CFLAGS)))
+AFLAGS += $(AFLAGS-y) $(filter-out -std=gnu% -flto,$(CFLAGS))
 
 # LDFLAGS are only passed directly to $(LD)
 LDFLAGS += $(LDFLAGS_DIRECT)