Introduce $(AFLAGS) to specify assembler flags
PATCH 1/1 Introduce $(AFLAGS) to specify assembler flags
Compile tested and verified.
-JX
Use AFLAGS for assembly files so we can "+=" more flags.
---
xen/Rules.mk +0 -0
@@ -55,11 +55,15 @@ CFLAGS-y += -DMAX_PHYS_CPU
CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus)
endif
+AFLAGS := -D__ASSEMBLY__
+
+ALL_OBJS := $(ALL_OBJS-y)
CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y))
+AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y))
%.o: %.c $(HDRS) Makefile
$(CC) $(CFLAGS) -c $< -o $@
%.o: %.S $(HDRS) Makefile
- $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
+ $(CC) $(CFLAGS) $(AFLAGS) -c $< -o $@
xen/arch/ia64/Makefile +0 -0
@@ -76,7 +76,7 @@ asm-xsi-offsets.s: asm-xsi-offsets.c
# I'm sure a Makefile wizard would know a better way to do this xen.lds.s: xen/xen.lds.S
- $(CC) -E $(CPPFLAGS) -P -DXEN -D__ASSEMBLY__ \
+ $(CC) -E $(CPPFLAGS) -P -DXEN $(AFLAGS) \
-o xen.lds.s xen/xen.lds.S
clean:: FORCE
xen/arch/x86/Makefile +0 -0
@@ -72,7 +72,7 @@ asm-offsets.s: $(TARGET_SUBARCH)/asm-off
$(CC) $(CFLAGS) -S -o $@ $<
xen.lds: $(TARGET_SUBARCH)/xen.lds.S $(HDRS)
- $(CC) $(CFLAGS) -P -E -Ui386 -D__ASSEMBLY__ -o $@ $<
+ $(CC) $(CFLAGS) -P -E -Ui386 $(AFLAGS) -o $@ $<
boot/mkelf32: boot/mkelf32.c
$(HOSTCC) $(HOSTCFLAGS) -o $@ $<