linux/x86: Modify CPPFLAGS just in a single place
PATCH 1/1 linux/x86: Modify CPPFLAGS just in a single place
Reduces delta to native, thus making applying other patches easier.
As usual, written and tested against 2.6.24-rc3 and made apply against 2.6.18 without further testing.
Signed-off-by Jan Beulich <[email protected]>
arch/i386/Makefile +2 -6
@@ -48,11 +48,6 @@ AFLAGS += $(call as-instr,.cfi_st CFLAGS += $(cflags-y) -cppflags-$(CONFIG_XEN) += \ - -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION) - -CPPFLAGS += $(cppflags-y) - # Default subarch .c files mcore-y := mach-default
@@ -115,7 +110,8 @@ PHONY += zImage bzImage vmlinuz compress zdisk bzdisk fdimage fdimage144 fdimage288 isoimage install ifdef CONFIG_XEN -CPPFLAGS := -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS) +CPPFLAGS := -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION) \ + -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS) all: vmlinuz # KBUILD_IMAGE specifies the target image being built
arch/x86_64/Makefile +2 -5
@@ -32,10 +32,6 @@ cflags-$(CONFIG_MCORE2) += \ cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) -cppflags-$(CONFIG_XEN) += \ - -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION) -CPPFLAGS += $(cppflags-y) - cflags-y += -m64 cflags-y += -mno-red-zone cflags-y += -mcmodel=kernel
@@ -79,7 +75,8 @@ PHONY += bzImage bzlilo vmlinuz install fdimage fdimage144 fdimage288 isoimage archclean ifdef CONFIG_XEN -CPPFLAGS := -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS) +CPPFLAGS := -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION) \ + -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS) LDFLAGS_vmlinux := -e startup_64 #Default target when executing "make" all: vmlinuz