From c01b171d91cf642a70477c7ba525ff1096d5c439 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sun, 9 Sep 2007 18:20:42 +0200 Subject: ia64: fix sn to add include files using EXTRA_CFLAGS Changing the global CPPFLAGS is not the recommended way to add additional include dirs. Changed to use EXTRA_CFLAGS. Signed-off-by: Sam Ravnborg Acked-by: Jes Sorensen --- arch/ia64/sn/kernel/Makefile | 2 +- arch/ia64/sn/kernel/sn2/Makefile | 2 +- arch/ia64/sn/pci/Makefile | 2 +- arch/ia64/sn/pci/pcibr/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/ia64/sn/kernel/Makefile b/arch/ia64/sn/kernel/Makefile index 0a59371d347..688a3c27e0f 100644 --- a/arch/ia64/sn/kernel/Makefile +++ b/arch/ia64/sn/kernel/Makefile @@ -7,7 +7,7 @@ # Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All Rights Reserved. # -CPPFLAGS += -I$(srctree)/arch/ia64/sn/include +EXTRA_CFLAGS += -Iarch/ia64/sn/include obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ huberror.o io_acpi_init.o io_common.o \ diff --git a/arch/ia64/sn/kernel/sn2/Makefile b/arch/ia64/sn/kernel/sn2/Makefile index 99e17769323..08e6565dc90 100644 --- a/arch/ia64/sn/kernel/sn2/Makefile +++ b/arch/ia64/sn/kernel/sn2/Makefile @@ -9,7 +9,7 @@ # sn2 specific kernel files # -CPPFLAGS += -I$(srctree)/arch/ia64/sn/include +EXTRA_CFLAGS += -Iarch/ia64/sn/include obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o diff --git a/arch/ia64/sn/pci/Makefile b/arch/ia64/sn/pci/Makefile index c6946784a6a..ad4ef34dfe2 100644 --- a/arch/ia64/sn/pci/Makefile +++ b/arch/ia64/sn/pci/Makefile @@ -7,6 +7,6 @@ # # Makefile for the sn pci general routines. -CPPFLAGS += -I$(srctree)/arch/ia64/sn/include +EXTRA_CFLAGS += -Iarch/ia64/sn/include obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/ diff --git a/arch/ia64/sn/pci/pcibr/Makefile b/arch/ia64/sn/pci/pcibr/Makefile index 3b403ea456f..01192d3247d 100644 --- a/arch/ia64/sn/pci/pcibr/Makefile +++ b/arch/ia64/sn/pci/pcibr/Makefile @@ -7,7 +7,7 @@ # # Makefile for the sn2 io routines. -CPPFLAGS += -I$(srctree)/arch/ia64/sn/include +EXTRA_CFLAGS += -Iarch/ia64/sn/include obj-y += pcibr_dma.o pcibr_reg.o \ pcibr_ate.o pcibr_provider.o -- cgit v1.2.3 From 247537b9a270b52cc0375adcb0fb2605a160cba5 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 26 Sep 2007 20:02:52 +0200 Subject: kconfig: syntax cleanup - drop support for "depends/requires/def_boolean" Remove the following redundant and never or rarely used kconfig syntax: - "def_boolean" (same as "def_bool") - "requires" (same as "depends on") - "depends" (same as "depends on") This patch contains the code changes and Kconfig updates. The shipped files are in next patch to let actual codechange stand out. Signed-off-by: Adrian Bunk Cc: "Randy.Dunlap" Cc: Bryan Wu Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Dmitry Torokhov Cc: "John W. Linville" Cc: Roman Zippel Cc: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- arch/blackfin/Kconfig | 2 +- arch/powerpc/Kconfig.debug | 6 +++--- arch/powerpc/platforms/Kconfig | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'arch') diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index b24f4535ffe..aa9db307331 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -758,7 +758,7 @@ config BFIN_DMA_5XX choice prompt "Uncached SDRAM region" default DMA_UNCACHED_1M - depends BFIN_DMA_5XX + depends on BFIN_DMA_5XX config DMA_UNCACHED_2M bool "Enable 2M DMA region" config DMA_UNCACHED_1M diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index 464f9b4b316..c939fe86a9e 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug @@ -144,7 +144,7 @@ config BDI_SWITCH config BOOTX_TEXT bool "Support for early boot text console (BootX or OpenFirmware only)" - depends PPC_OF && PPC_MULTIPLATFORM + depends on PPC_OF && PPC_MULTIPLATFORM help Say Y here to see progress messages from the boot firmware in text mode. Requires either BootX or Open Firmware. @@ -234,12 +234,12 @@ endchoice config PPC_EARLY_DEBUG_44x_PHYSLOW hex "Low 32 bits of early debug UART physical address" - depends PPC_EARLY_DEBUG_44x + depends on PPC_EARLY_DEBUG_44x default "0x40000200" config PPC_EARLY_DEBUG_44x_PHYSHIGH hex "EPRN of early debug UART physical address" - depends PPC_EARLY_DEBUG_44x + depends on PPC_EARLY_DEBUG_44x default "0x1" config PPC_EARLY_DEBUG_CPM_ADDR diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index cc6013ffc29..186397f283b 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig @@ -117,7 +117,7 @@ config RTAS_FLASH config PPC_PMI tristate "Support for PMI" - depends PPC_IBM_CELL_BLADE + depends on PPC_IBM_CELL_BLADE help PMI (Platform Management Interrupt) is a way to communicate with the BMC (Baseboard Mangement Controller). -- cgit v1.2.3 From 9a39e273d4df0560c724c5fe71f6314a0583ca2b Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sun, 14 Oct 2007 21:49:42 +0200 Subject: kbuild: fix up CFLAGS usage Only in very rare cases is it needed to change CFLAGS outside of arch/*/Makefile. Fix up all wrong cases - in most cases the use of EXTRA_CFLAGS is the only thing needed. Signed-off-by: Sam Ravnborg --- arch/parisc/math-emu/Makefile | 2 +- arch/ppc/boot/Makefile | 1 - arch/x86/math-emu/Makefile | 3 +-- arch/xtensa/boot/Makefile | 5 ++--- 4 files changed, 4 insertions(+), 7 deletions(-) (limited to 'arch') diff --git a/arch/parisc/math-emu/Makefile b/arch/parisc/math-emu/Makefile index affd4c80e3b..1f3f225897f 100644 --- a/arch/parisc/math-emu/Makefile +++ b/arch/parisc/math-emu/Makefile @@ -3,7 +3,7 @@ # # See arch/parisc/math-emu/README -CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \ +EXTRA_CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \ -Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \ -Wno-implicit-int diff --git a/arch/ppc/boot/Makefile b/arch/ppc/boot/Makefile index b739e25d472..487dc66dcc7 100644 --- a/arch/ppc/boot/Makefile +++ b/arch/ppc/boot/Makefile @@ -13,7 +13,6 @@ # modified by Cort (cort@cs.nmt.edu) # -CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include HOSTCFLAGS += -Iarch/$(ARCH)/boot/include BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd diff --git a/arch/x86/math-emu/Makefile b/arch/x86/math-emu/Makefile index 9c943fa6ce6..9b0c63b6030 100644 --- a/arch/x86/math-emu/Makefile +++ b/arch/x86/math-emu/Makefile @@ -5,8 +5,7 @@ #DEBUG = -DDEBUGGING DEBUG = PARANOID = -DPARANOID -CFLAGS := $(CFLAGS) $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION) - +EXTRA_CFLAGS := $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION) EXTRA_AFLAGS := $(PARANOID) # From 'C' language sources: diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile index 820b31d10ae..9c5185f605b 100644 --- a/arch/xtensa/boot/Makefile +++ b/arch/xtensa/boot/Makefile @@ -8,13 +8,12 @@ # -CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include +EXTRA_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include HOSTFLAGS += -Iarch/$(ARCH)/boot/include BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") -export CFLAGS -export AFLAGS +export EXTRA_CFLAGS export BIG_ENDIAN subdir-y := lib -- cgit v1.2.3 From a0f97e06a43cf524e616f09e6af3398e1e9c1c5b Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sun, 14 Oct 2007 22:21:35 +0200 Subject: kbuild: enable 'make CFLAGS=...' to add additional options to CC The variable CFLAGS is a wellknown variable and the usage by kbuild may result in unexpected behaviour. On top of that several people over time has asked for a way to pass in additional flags to gcc. This patch replace use of CFLAGS with KBUILD_CFLAGS all over the tree and enabling one to use: make CFLAGS=... to specify additional gcc commandline options. One usecase is when trying to find gcc bugs but other use cases has been requested too. Patch was tested on following architectures: alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k Test was simple to do a defconfig build, apply the patch and check that nothing got rebuild. Signed-off-by: Sam Ravnborg --- arch/alpha/Makefile | 2 +- arch/alpha/kernel/Makefile | 2 +- arch/alpha/lib/Makefile | 2 +- arch/arm/Makefile | 8 ++++---- arch/arm/boot/compressed/Makefile | 2 +- arch/avr32/Makefile | 4 ++-- arch/blackfin/Makefile | 2 +- arch/cris/Makefile | 8 ++++---- arch/frv/Makefile | 22 +++++++++++----------- arch/h8300/Makefile | 12 ++++++------ arch/i386/Makefile | 10 +++++----- arch/ia64/Makefile | 2 +- arch/m32r/Makefile | 6 +++--- arch/m68k/Makefile | 8 ++++---- arch/m68knommu/Makefile | 6 +++--- arch/mips/Makefile | 6 +++--- arch/mips/kernel/Makefile | 2 +- arch/parisc/Makefile | 2 +- arch/powerpc/Makefile | 24 ++++++++++++------------ arch/ppc/Makefile | 10 +++++----- arch/s390/Makefile | 8 ++++---- arch/sh/Makefile | 4 ++-- arch/sh/boot/compressed/Makefile | 2 +- arch/sh64/Makefile | 4 ++-- arch/sparc/Makefile | 6 +++--- arch/sparc64/Makefile | 6 +++--- arch/um/Makefile | 10 +++++----- arch/um/Makefile-i386 | 4 ++-- arch/um/Makefile-os-Linux | 2 +- arch/um/Makefile-x86_64 | 2 +- arch/um/drivers/Makefile | 2 +- arch/um/sys-i386/Makefile | 2 +- arch/um/sys-x86_64/Makefile | 2 +- arch/v850/Makefile | 8 ++++---- arch/x86/boot/Makefile | 4 ++-- arch/x86/boot/compressed/Makefile_32 | 2 +- arch/x86/boot/compressed/Makefile_64 | 4 ++-- arch/x86/vdso/Makefile | 4 ++-- arch/x86_64/Makefile | 2 +- arch/xtensa/Makefile | 8 +++----- arch/xtensa/boot/boot-redboot/Makefile | 2 +- 41 files changed, 113 insertions(+), 115 deletions(-) (limited to 'arch') diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile index 1b704ee54bf..2f283b2fb16 100644 --- a/arch/alpha/Makefile +++ b/arch/alpha/Makefile @@ -84,7 +84,7 @@ endif # For TSUNAMI, we must have the assembler not emulate our instructions. # The same is true for IRONGATE, POLARIS, PYXIS. # BWX is most important, but we don't really want any emulation ever. -CFLAGS += $(cflags-y) -Wa,-mev6 +KBUILD_CFLAGS += $(cflags-y) -Wa,-mev6 head-y := arch/alpha/kernel/head.o diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile index ab6fa54b386..dccf05245d4 100644 --- a/arch/alpha/kernel/Makefile +++ b/arch/alpha/kernel/Makefile @@ -3,7 +3,7 @@ # extra-y := head.o vmlinux.lds -EXTRA_AFLAGS := $(CFLAGS) +EXTRA_AFLAGS := $(KBUILD_CFLAGS) EXTRA_CFLAGS := -Werror -Wno-sign-compare obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ diff --git a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile index 266f78e1307..9b72c59c95b 100644 --- a/arch/alpha/lib/Makefile +++ b/arch/alpha/lib/Makefile @@ -2,7 +2,7 @@ # Makefile for alpha-specific library files.. # -EXTRA_AFLAGS := $(CFLAGS) +EXTRA_AFLAGS := $(KBUILD_CFLAGS) EXTRA_CFLAGS := -Werror # Many of these routines have implementations tuned for ev6. diff --git a/arch/arm/Makefile b/arch/arm/Makefile index fa4ea9ff079..0b82865ab50 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -14,9 +14,9 @@ LDFLAGS_vmlinux :=-p --no-undefined -X CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) OBJCOPYFLAGS :=-O binary -R .note -R .comment -S GZFLAGS :=-9 -#CFLAGS +=-pipe +#KBUILD_CFLAGS +=-pipe # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: -CFLAGS +=$(call cc-option,-marm,) +KBUILD_CFLAGS +=$(call cc-option,-marm,) # Do not use arch/arm/defconfig - it's always outdated. # Select a platform tht is kept up-to-date @@ -28,7 +28,7 @@ MMUEXT := -nommu endif ifeq ($(CONFIG_FRAME_POINTER),y) -CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog +KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog endif ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) @@ -85,7 +85,7 @@ CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-th endif # Need -Uarm for gcc < 3.x -CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm +KBUILD_CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float CHECKFLAGS += -D__arm__ diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 6b8cbd69f24..5fde99f9d9f 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -87,7 +87,7 @@ ifneq ($(PARAMS_PHYS),) LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) endif LDFLAGS_vmlinux += -p --no-undefined -X \ - $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T + $(shell $(CC) $(KBUILD_CFLAGS) --print-libgcc-file-name) -T # Don't allow any static data in misc.o, which # would otherwise mess up our GOT table diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile index dc6bc01f232..9883c8b55e1 100644 --- a/arch/avr32/Makefile +++ b/arch/avr32/Makefile @@ -11,14 +11,14 @@ all: uImage vmlinux.elf KBUILD_DEFCONFIG := atstk1002_defconfig -CFLAGS += -pipe -fno-builtin -mno-pic +KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic AFLAGS += -mrelax -mno-pic CFLAGS_MODULE += -mno-relax LDFLAGS_vmlinux += --relax cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000 -CFLAGS += $(cpuflags-y) +KBUILD_CFLAGS += $(cpuflags-y) AFLAGS += $(cpuflags-y) CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile index 20841663270..52a6ac07285 100644 --- a/arch/blackfin/Makefile +++ b/arch/blackfin/Makefile @@ -53,7 +53,7 @@ rev-$(CONFIG_BF_REV_0_5) := 0.5 rev-$(CONFIG_BF_REV_NONE) := none rev-$(CONFIG_BF_REV_ANY) := any -CFLAGS += -mcpu=$(cpu-y)-$(rev-y) +KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y) AFLAGS += -mcpu=$(cpu-y)-$(rev-y) head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o diff --git a/arch/cris/Makefile b/arch/cris/Makefile index ee114699ef8..32ef6f3cce0 100644 --- a/arch/cris/Makefile +++ b/arch/cris/Makefile @@ -31,16 +31,16 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -S CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) AFLAGS += -mlinux -CFLAGS := $(CFLAGS) -mlinux -march=$(arch-y) -pipe +KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe ifdef CONFIG_FRAME_POINTER -CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g -CFLAGS += -fno-omit-frame-pointer +KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g +KBUILD_CFLAGS += -fno-omit-frame-pointer endif head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o -LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a) +LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a) core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/ diff --git a/arch/frv/Makefile b/arch/frv/Makefile index 9bf7345c5cc..ec89886ed45 100644 --- a/arch/frv/Makefile +++ b/arch/frv/Makefile @@ -39,13 +39,13 @@ endif ARCHMODFLAGS += -G0 -mlong-calls ifdef CONFIG_GPREL_DATA_8 -CFLAGS += -G8 +KBUILD_CFLAGS += -G8 else ifdef CONFIG_GPREL_DATA_4 -CFLAGS += -G4 +KBUILD_CFLAGS += -G4 else ifdef CONFIG_GPREL_DATA_NONE -CFLAGS += -G0 +KBUILD_CFLAGS += -G0 endif endif endif @@ -53,25 +53,25 @@ endif #LDFLAGS_vmlinux := -Map linkmap.txt ifdef CONFIG_GC_SECTIONS -CFLAGS += -ffunction-sections -fdata-sections +KBUILD_CFLAGS += -ffunction-sections -fdata-sections LINKFLAGS += --gc-sections endif ifndef CONFIG_FRAME_POINTER -CFLAGS += -mno-linked-fp +KBUILD_CFLAGS += -mno-linked-fp endif ifdef CONFIG_CPU_FR451_COMPILE -CFLAGS += -mcpu=fr450 +KBUILD_CFLAGS += -mcpu=fr450 AFLAGS += -mcpu=fr450 ASFLAGS += -mcpu=fr450 else ifdef CONFIG_CPU_FR551_COMPILE -CFLAGS += -mcpu=fr550 +KBUILD_CFLAGS += -mcpu=fr550 AFLAGS += -mcpu=fr550 ASFLAGS += -mcpu=fr550 else -CFLAGS += -mcpu=fr400 +KBUILD_CFLAGS += -mcpu=fr400 AFLAGS += -mcpu=fr400 ASFLAGS += -mcpu=fr400 endif @@ -80,15 +80,15 @@ endif # pretend the kernel is going to run on an FR400 with no media-fp unit # - reserve CC3 for use with atomic ops # - all the extra registers are dealt with only at context switch time -CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media -CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 +KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media +KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 AFLAGS += -mno-fdpic ASFLAGS += -mno-fdpic # make sure the .S files get compiled with debug info # and disable optimisations that are unhelpful whilst debugging ifdef CONFIG_DEBUG_INFO -#CFLAGS += -O1 +#KBUILD_CFLAGS += -O1 AFLAGS += -Wa,--gdwarf2 ASFLAGS += -Wa,--gdwarf2 endif diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile index 53b5c1edf59..330e05f28f9 100644 --- a/arch/h8300/Makefile +++ b/arch/h8300/Makefile @@ -30,16 +30,16 @@ ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf cflags-$(CONFIG_CPU_H8S) := -ms ldflags-$(CONFIG_CPU_H8S) := -mh8300self -CFLAGS += $(cflags-y) -CFLAGS += -mint32 -fno-builtin -CFLAGS += -g -CFLAGS += -D__linux__ -CFLAGS += -DUTS_SYSNAME=\"uClinux\" +KBUILD_CFLAGS += $(cflags-y) +KBUILD_CFLAGS += -mint32 -fno-builtin +KBUILD_CFLAGS += -g +KBUILD_CFLAGS += -D__linux__ +KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) LDFLAGS += $(ldflags-y) CROSS_COMPILE = h8300-elf- -LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name) +LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o diff --git a/arch/i386/Makefile b/arch/i386/Makefile index 5e50dbf00f3..fc3c8e88b74 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile @@ -34,10 +34,10 @@ LDFLAGS_vmlinux := --emit-relocs endif CHECKFLAGS += -D__i386__ -CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return +KBUILD_CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return # prevent gcc from keeping the stack 16 byte aligned -CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) +KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) # CPU-specific tuning. Anything which can be shared with UML should go here. include $(srctree)/arch/i386/Makefile.cpu @@ -51,7 +51,7 @@ cflags-y += -maccumulate-outgoing-args # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use # a lot more stack due to the lack of sharing of stacklots: -CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) +KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) # do binutils support CFI? cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) @@ -61,7 +61,7 @@ AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_end cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) -CFLAGS += $(cflags-y) +KBUILD_CFLAGS += $(cflags-y) # Default subarch .c files mcore-y := arch/x86/mach-default @@ -116,7 +116,7 @@ drivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/ drivers-$(CONFIG_PM) += arch/x86/power/ drivers-$(CONFIG_FB) += arch/x86/video/ -CFLAGS += $(mflags-y) +KBUILD_CFLAGS += $(mflags-y) AFLAGS += $(mflags-y) boot := arch/x86/boot diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index 21033ed8330..9708a29c70b 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile @@ -44,7 +44,7 @@ ifeq ($(call cc-version),0304) cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley endif -CFLAGS += $(cflags-y) +KBUILD_CFLAGS += $(cflags-y) head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o libs-y += arch/ia64/lib/ diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile index 60e12f31265..c80618ab60e 100644 --- a/arch/m32r/Makefile +++ b/arch/m32r/Makefile @@ -9,7 +9,7 @@ LDFLAGS := OBJCOPYFLAGS := -O binary -R .note -R .comment -S LDFLAGS_vmlinux := -CFLAGS += -pipe -fno-schedule-insns +KBUILD_CFLAGS += -pipe -fno-schedule-insns CFLAGS_KERNEL += -mmodel=medium CFLAGS_MODULE += -mmodel=large @@ -24,14 +24,14 @@ endif cflags-$(CONFIG_ISA_M32R) += -DNO_FPU aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst -CFLAGS += $(cflags-y) +KBUILD_CFLAGS += $(cflags-y) AFLAGS += $(aflags-y) CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o -LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) +LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) libs-y += arch/m32r/lib/ $(LIBGCC) core-y += arch/m32r/kernel/ \ diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index aa383a5ea7a..4a1bd44ff16 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile @@ -32,18 +32,18 @@ endif CHECKFLAGS += -D__mc68000__ # without -fno-strength-reduce the 53c7xx.c driver fails ;-( -CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 +KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 # enable processor switch if compiled only for a single cpu ifndef CONFIG_M68020 ifndef CONFIG_M68030 ifndef CONFIG_M68060 -CFLAGS := $(CFLAGS) -m68040 +KBUILD_CFLAGS += -m68040 endif ifndef CONFIG_M68040 -CFLAGS := $(CFLAGS) -m68060 +KBUILD_CFLAGS += -m68060 endif endif @@ -52,7 +52,7 @@ endif ifdef CONFIG_KGDB # If configured for kgdb support, include debugging infos and keep the # frame pointer -CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g +KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g endif ifndef CONFIG_SUN3 diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile index 1305cc98002..1c1fbb69ff2 100644 --- a/arch/m68knommu/Makefile +++ b/arch/m68knommu/Makefile @@ -104,9 +104,9 @@ cflags-$(CONFIG_M68360) := -m68332 AFLAGS += $(cflags-y) -CFLAGS += $(cflags-y) -CFLAGS += -D__linux__ -CFLAGS += -DUTS_SYSNAME=\"uClinux\" +KBUILD_CFLAGS += $(cflags-y) +KBUILD_CFLAGS += -D__linux__ +KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o diff --git a/arch/mips/Makefile b/arch/mips/Makefile index ebd5d02a7d7..64512abef61 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -609,13 +609,13 @@ ifdef CONFIG_64BIT endif AFLAGS += $(cflags-y) -CFLAGS += $(cflags-y) \ +KBUILD_CFLAGS += $(cflags-y) \ -D"VMLINUX_LOAD_ADDRESS=$(load-y)" LDFLAGS += -m $(ld-emul) ifdef CONFIG_MIPS -CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \ +CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -xc /dev/null | \ egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \ sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/") ifdef CONFIG_64BIT @@ -632,7 +632,7 @@ OBJCOPYFLAGS += --remove-section=.reginfo # CPPFLAGS_vmlinux.lds := \ - $(CFLAGS) \ + $(KBUILD_CFLAGS) \ -D"LOADADDR=$(load-y)" \ -D"JIFFIES=$(JIFFIES)" \ -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)" diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index a2689f93c16..95a356ef391 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile @@ -71,7 +71,7 @@ obj-$(CONFIG_PCSPEAKER) += pcspeaker.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o -CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi) +CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi) obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 760567a9ba1..f3d0d7c7097 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -63,7 +63,7 @@ cflags-$(CONFIG_PA8X00) += -march=2.0 -mschedule=8000 head-y := arch/parisc/kernel/head.o -CFLAGS += $(cflags-y) +KBUILD_CFLAGS += $(cflags-y) kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o kernel-$(CONFIG_HPUX) += hpux/ diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 643839a3f5d..51309848c11 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -77,8 +77,8 @@ CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple CPPFLAGS += $(CPPFLAGS-y) AFLAGS += $(AFLAGS-y) -CFLAGS += -msoft-float -pipe $(CFLAGS-y) -CPP = $(CC) -E $(CFLAGS) +KBUILD_CFLAGS += -msoft-float -pipe $(CFLAGS-y) +CPP = $(CC) -E $(KBUILD_CFLAGS) CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ @@ -88,35 +88,35 @@ GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi ifeq ($(CONFIG_POWER4_ONLY),y) ifeq ($(CONFIG_ALTIVEC),y) ifeq ($(GCC_BROKEN_VEC),y) - CFLAGS += $(call cc-option,-mcpu=970) + KBUILD_CFLAGS += $(call cc-option,-mcpu=970) else - CFLAGS += $(call cc-option,-mcpu=power4) + KBUILD_CFLAGS += $(call cc-option,-mcpu=power4) endif else - CFLAGS += $(call cc-option,-mcpu=power4) + KBUILD_CFLAGS += $(call cc-option,-mcpu=power4) endif else - CFLAGS += $(call cc-option,-mtune=power4) + KBUILD_CFLAGS += $(call cc-option,-mtune=power4) endif endif ifeq ($(CONFIG_TUNE_CELL),y) - CFLAGS += $(call cc-option,-mtune=cell) + KBUILD_CFLAGS += $(call cc-option,-mtune=cell) endif # No AltiVec instruction when building kernel -CFLAGS += $(call cc-option,-mno-altivec) +KBUILD_CFLAGS += $(call cc-option,-mno-altivec) # Enable unit-at-a-time mode when possible. It shrinks the # kernel considerably. -CFLAGS += $(call cc-option,-funit-at-a-time) +KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) # Never use string load/store instructions as they are # often slow when they are implemented at all -CFLAGS += -mno-string +KBUILD_CFLAGS += -mno-string ifeq ($(CONFIG_6xx),y) -CFLAGS += -mcpu=powerpc +KBUILD_CFLAGS += -mcpu=powerpc endif cpu-as-$(CONFIG_4xx) += -Wa,-m405 @@ -126,7 +126,7 @@ cpu-as-$(CONFIG_E500) += -Wa,-me500 cpu-as-$(CONFIG_E200) += -Wa,-me200 AFLAGS += $(cpu-as-y) -CFLAGS += $(cpu-as-y) +KBUILD_CFLAGS += $(cpu-as-y) head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile index eee6264e8a0..43802e95c89 100644 --- a/arch/ppc/Makefile +++ b/arch/ppc/Makefile @@ -24,20 +24,20 @@ LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic # The -Iarch/$(ARCH)/include is temporary while we are merging CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include AFLAGS += -Iarch/$(ARCH) -CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ +KBUILD_CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ -ffixed-r2 -mmultiple # No AltiVec instruction when building kernel -CFLAGS += $(call cc-option, -mno-altivec) +KBUILD_CFLAGS += $(call cc-option, -mno-altivec) -CPP = $(CC) -E $(CFLAGS) +CPP = $(CC) -E $(KBUILD_CFLAGS) # Temporary hack until we have migrated to asm-powerpc LINUXINCLUDE += -Iarch/$(ARCH)/include CHECKFLAGS += -D__powerpc__ ifndef CONFIG_FSL_BOOKE -CFLAGS += -mstring +KBUILD_CFLAGS += -mstring endif cpu-as-$(CONFIG_4xx) += -Wa,-m405 @@ -46,7 +46,7 @@ cpu-as-$(CONFIG_E500) += -Wa,-me500 cpu-as-$(CONFIG_E200) += -Wa,-me200 AFLAGS += $(cpu-as-y) -CFLAGS += $(cpu-as-y) +KBUILD_CFLAGS += $(cpu-as-y) # Default to the common case. KBUILD_DEFCONFIG := common_defconfig diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 143ed8e154a..62a0da42c7f 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -15,7 +15,7 @@ ifndef CONFIG_64BIT LDFLAGS := -m elf_s390 -CFLAGS += -m31 +KBUILD_CFLAGS += -m31 AFLAGS += -m31 UTS_MACHINE := s390 STACK_SIZE := 8192 @@ -23,7 +23,7 @@ CHECKFLAGS += -D__s390__ -msize-long else LDFLAGS := -m elf64_s390 MODFLAGS += -fpic -D__PIC__ -CFLAGS += -m64 +KBUILD_CFLAGS += -m64 AFLAGS += -m64 UTS_MACHINE := s390x STACK_SIZE := 16384 @@ -77,8 +77,8 @@ cflags-$(CONFIG_WARN_STACK) += -mwarn-dynamicstack cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE) endif -CFLAGS += -mbackchain -msoft-float $(cflags-y) -CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare +KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y) +KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare AFLAGS += $(aflags-y) OBJCOPYFLAGS := -O binary diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 97ac58682d0..cd8a411acc9 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -91,12 +91,12 @@ LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4' LDFLAGS += -EB endif -CFLAGS += -pipe $(cflags-y) +KBUILD_CFLAGS += -pipe $(cflags-y) AFLAGS += $(cflags-y) head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o -LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) +LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) core-y += arch/sh/kernel/ arch/sh/mm/ core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/ diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile index 013504ae112..906a13f82fe 100644 --- a/arch/sh/boot/compressed/Makefile +++ b/arch/sh/boot/compressed/Makefile @@ -21,7 +21,7 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ $(CONFIG_MEMORY_START) + \ $(CONFIG_BOOT_LINK_OFFSET)]') -LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) +LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds diff --git a/arch/sh64/Makefile b/arch/sh64/Makefile index ebf20043991..9e874de0a09 100644 --- a/arch/sh64/Makefile +++ b/arch/sh64/Makefile @@ -26,7 +26,7 @@ LDFLAGS += -EB -mshelf32_linux endif # No requirements for endianess support from AFLAGS, 'as' always run through gcc -CFLAGS += $(cpu-y) +KBUILD_CFLAGS += $(cpu-y) LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \ --defsym phys_stext_shmedia=phys_stext+1 \ @@ -57,7 +57,7 @@ ifneq ($(machine-y),) core-y += arch/sh64/mach-$(machine-y)/ endif -LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) +LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) libs-y += arch/$(ARCH)/lib/ $(LIBGCC) drivers-$(CONFIG_OPROFILE) += arch/sh64/oprofile/ diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index f33c3817f01..2ce781a7cbf 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile @@ -8,15 +8,15 @@ # # -# Uncomment the first CFLAGS if you are doing kgdb source level +# Uncomment the first KBUILD_CFLAGS if you are doing kgdb source level # debugging of the kernel to get the proper debugging information. AS := $(AS) -32 LDFLAGS := -m elf32_sparc CHECKFLAGS += -D__sparc__ -#CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7 -CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 +#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 +KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 AFLAGS := $(AFLAGS) -m32 #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile index cad10c5b83d..b083dc458ce 100644 --- a/arch/sparc64/Makefile +++ b/arch/sparc64/Makefile @@ -39,17 +39,17 @@ AS := $(AS) --undeclared-regs endif ifneq ($(NEW_GCC),y) - CFLAGS := $(CFLAGS) -pipe -mno-fpu -mtune=ultrasparc -mmedlow \ + KBUILD_CFLAGS += -pipe -mno-fpu -mtune=ultrasparc -mmedlow \ -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare else - CFLAGS := $(CFLAGS) -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \ + KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \ -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \ $(CC_UNDECL) AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) endif ifeq ($(CONFIG_MCOUNT),y) - CFLAGS := $(CFLAGS) -pg + KBUILD_CFLAGS += -pg endif head-y := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o diff --git a/arch/um/Makefile b/arch/um/Makefile index 989224f2134..18123bf7b64 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -58,14 +58,14 @@ SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) # # These apply to USER_CFLAGS to. -CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ +KBUILD_CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ -Din6addr_loopback=kernel_in6addr_loopback AFLAGS += $(ARCH_INCLUDE) USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ - $(patsubst -I%,,$(CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ + $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ -D_FILE_OFFSET_BITS=64 include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) @@ -75,14 +75,14 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) # -Derrno=kernel_errno - This turns all kernel references to errno into # kernel_errno to separate them from the libc errno. This allows -fno-common -# in CFLAGS. Otherwise, it would cause ld to complain about the two different +# in KBUILD_CFLAGS. Otherwise, it would cause ld to complain about the two different # errnos. # These apply to kernelspace only. KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) -CFLAGS += $(KERNEL_DEFINES) -CFLAGS += $(call cc-option,-fno-unit-at-a-time,) +KBUILD_CFLAGS += $(KERNEL_DEFINES) +KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,) # These are needed for clean and mrproper, since in that case .config is not # included; the values here are meaningless diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386 index c9f1c5b24c9..26bc786fc61 100644 --- a/arch/um/Makefile-i386 +++ b/arch/um/Makefile-i386 @@ -15,7 +15,7 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -S ifeq ("$(origin SUBARCH)", "command line") ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") -CFLAGS += $(call cc-option,-m32) +KBUILD_CFLAGS += $(call cc-option,-m32) AFLAGS += $(call cc-option,-m32) LINK-y += $(call cc-option,-m32) UML_OBJCOPYFLAGS += -F $(ELF_FORMAT) @@ -36,4 +36,4 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) # an unresolved reference. cflags-y += -ffreestanding -CFLAGS += $(cflags-y) +KBUILD_CFLAGS += $(cflags-y) diff --git a/arch/um/Makefile-os-Linux b/arch/um/Makefile-os-Linux index 0c0f9a1cbba..52859487c95 100644 --- a/arch/um/Makefile-os-Linux +++ b/arch/um/Makefile-os-Linux @@ -5,4 +5,4 @@ # To get a definition of F_SETSIG USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -CFLAGS += -D_LARGEFILE64_SOURCE +KBUILD_CFLAGS += -D_LARGEFILE64_SOURCE diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index 69ecea63fda..36d2bb5e419 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 @@ -9,7 +9,7 @@ _extra_flags_ = -fno-builtin -m64 #We #undef __x86_64__ for kernelspace, not for userspace where #it's needed for headers to work! ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__ -CFLAGS += $(_extra_flags_) +KBUILD_CFLAGS += $(_extra_flags_) CHECKFLAGS += -m64 AFLAGS += -m64 diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile index de17d4c6e02..0f780dd0d4c 100644 --- a/arch/um/drivers/Makefile +++ b/arch/um/drivers/Makefile @@ -17,7 +17,7 @@ ubd-objs := ubd_kern.o ubd_user.o port-objs := port_kern.o port_user.o harddog-objs := harddog_kern.o harddog_user.o -LDFLAGS_pcap.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libpcap.a) +LDFLAGS_pcap.o := -r $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a) targets := pcap_kern.o pcap_user.o diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile index d6b3ecd4b77..8909b07d9ee 100644 --- a/arch/um/sys-i386/Makefile +++ b/arch/um/sys-i386/Makefile @@ -20,4 +20,4 @@ CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING) include arch/um/scripts/Makefile.rules -$(obj)/unmap.%: _c_flags = $(call unprofile,$(CFLAGS)) +$(obj)/unmap.%: _c_flags = $(call unprofile,$(KBUILD_CFLAGS)) diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile index 4d9e5efa6fb..e446a9916fd 100644 --- a/arch/um/sys-x86_64/Makefile +++ b/arch/um/sys-x86_64/Makefile @@ -28,4 +28,4 @@ CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING) include arch/um/scripts/Makefile.rules -$(obj)/unmap.%: _c_flags = $(call unprofile,$(CFLAGS)) +$(obj)/unmap.%: _c_flags = $(call unprofile,$(KBUILD_CFLAGS)) diff --git a/arch/v850/Makefile b/arch/v850/Makefile index 8be9aacb20a..8b629df0029 100644 --- a/arch/v850/Makefile +++ b/arch/v850/Makefile @@ -16,11 +16,11 @@ arch_dir = arch/v850 -CFLAGS += -mv850e +KBUILD_CFLAGS += -mv850e # r16 is a fixed pointer to the current task -CFLAGS += -ffixed-r16 -mno-prolog-function -CFLAGS += -fno-builtin -CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\" +KBUILD_CFLAGS += -ffixed-r16 -mno-prolog-function +KBUILD_CFLAGS += -fno-builtin +KBUILD_CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\" # By default, build a kernel that runs on the gdb v850 simulator. KBUILD_DEFCONFIG := sim_defconfig diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index cb1035f2b7e..646292aaf1f 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile @@ -50,7 +50,7 @@ HOSTCFLAGS_build.o := $(LINUXINCLUDE) # that way we can complain to the user if the CPU is insufficient. cflags-i386 := cflags-x86_64 := -m32 -CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ +KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ $(cflags-$(ARCH)) \ -Wall -Wstrict-prototypes \ -march=i386 -mregparm=3 \ @@ -61,7 +61,7 @@ CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ $(call cc-option, -fno-unit-at-a-time)) \ $(call cc-option, -fno-stack-protector) \ $(call cc-option, -mpreferred-stack-boundary=2) -AFLAGS := $(CFLAGS) -D__ASSEMBLY__ +AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ $(obj)/zImage: IMAGE_OFFSET := 0x1000 $(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) diff --git a/arch/x86/boot/compressed/Makefile_32 b/arch/x86/boot/compressed/Makefile_32 index 22613c652d2..e43ff7c56e6 100644 --- a/arch/x86/boot/compressed/Makefile_32 +++ b/arch/x86/boot/compressed/Makefile_32 @@ -11,7 +11,7 @@ EXTRA_AFLAGS := -traditional LDFLAGS_vmlinux := -T hostprogs-y := relocs -CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ +KBUILD_CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ -fno-strict-aliasing -fPIC \ $(call cc-option,-ffreestanding) \ $(call cc-option,-fno-stack-protector) diff --git a/arch/x86/boot/compressed/Makefile_64 b/arch/x86/boot/compressed/Makefile_64 index dc6b3380cc4..3013ad01fe6 100644 --- a/arch/x86/boot/compressed/Makefile_64 +++ b/arch/x86/boot/compressed/Makefile_64 @@ -6,11 +6,11 @@ targets := vmlinux vmlinux.bin vmlinux.bin.gz head_64.o misc_64.o piggy.o -CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \ +KBUILD_CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \ -fno-strict-aliasing -fPIC -mcmodel=small \ $(call cc-option, -ffreestanding) \ $(call cc-option, -fno-stack-protector) -AFLAGS := $(CFLAGS) -D__ASSEMBLY__ +AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ LDFLAGS := -m elf_x86_64 LDFLAGS_vmlinux := -T diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile index 8d03de029d9..dcd6bb9e0bb 100644 --- a/arch/x86/vdso/Makefile +++ b/arch/x86/vdso/Makefile @@ -34,8 +34,8 @@ $(obj)/vdso.so: $(src)/vdso.lds $(vobjs) FORCE CFL := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64 -$(obj)/vclock_gettime.o: CFLAGS = $(CFL) -$(obj)/vgetcpu.o: CFLAGS = $(CFL) +$(obj)/vclock_gettime.o: KBUILD_CFLAGS = $(CFL) +$(obj)/vgetcpu.o: KBUILD_CFLAGS = $(CFL) # We also create a special relocatable object that should mirror the symbol # table and layout of the linked DSO. With ld -R we can then refer to diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 8bffb94c71b..3fc33004e8c 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile @@ -70,7 +70,7 @@ AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONF cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector ) cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all ) -CFLAGS += $(cflags-y) +KBUILD_CFLAGS += $(cflags-y) CFLAGS_KERNEL += $(cflags-kernel-y) AFLAGS += -m64 diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index acf05be2492..56685a88334 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile @@ -28,11 +28,9 @@ PLATFORM = $(platform-y) export PLATFORM # temporarily until string.h is fixed -cflags-y += -ffreestanding +KBUILD_CFLAGS += -ffreestanding -cflags-y += -pipe -mlongcalls - -CFLAGS += $(cflags-y) +KBUILD_CFLAGS += -pipe -mlongcalls KBUILD_DEFCONFIG := iss_defconfig @@ -56,7 +54,7 @@ endif # -LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) +LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) head-y := arch/xtensa/kernel/head.o core-y += arch/xtensa/kernel/ arch/xtensa/mm/ diff --git a/arch/xtensa/boot/boot-redboot/Makefile b/arch/xtensa/boot/boot-redboot/Makefile index f53262c2e1f..74d15d08077 100644 --- a/arch/xtensa/boot/boot-redboot/Makefile +++ b/arch/xtensa/boot/boot-redboot/Makefile @@ -19,7 +19,7 @@ boot-y := bootstrap.o OBJS := $(addprefix $(obj)/,$(boot-y)) LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a -LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) +LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) zImage: vmlinux $(OBJS) $(LIBS) $(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ -- cgit v1.2.3 From 714055ede4ffd60933397d4b61d285d0dfc9ecaf Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Mon, 15 Oct 2007 21:03:59 +0200 Subject: kbuild: fix AFLAGS use in h8300 and m68knommu In most cases when AFALGS is manipuled direct this is a bug and EXTRA_AFLAGS should have been used. Fix the obvious candidates. Signed-off-by: Sam Ravnborg Cc: Greg Ungerer Cc: Yoshinori Sato --- arch/h8300/lib/Makefile | 3 --- arch/m68knommu/platform/5206/Makefile | 2 +- arch/m68knommu/platform/5206e/Makefile | 2 +- arch/m68knommu/platform/520x/Makefile | 2 +- arch/m68knommu/platform/523x/Makefile | 2 +- arch/m68knommu/platform/5249/Makefile | 2 +- arch/m68knommu/platform/5272/Makefile | 2 +- arch/m68knommu/platform/527x/Makefile | 2 +- arch/m68knommu/platform/528x/Makefile | 2 +- arch/m68knommu/platform/5307/Makefile | 2 +- arch/m68knommu/platform/532x/Makefile | 2 +- arch/m68knommu/platform/5407/Makefile | 2 +- 12 files changed, 11 insertions(+), 14 deletions(-) (limited to 'arch') diff --git a/arch/h8300/lib/Makefile b/arch/h8300/lib/Makefile index 98272b66f4e..1577f5075b1 100644 --- a/arch/h8300/lib/Makefile +++ b/arch/h8300/lib/Makefile @@ -2,7 +2,4 @@ # Makefile for H8/300-specific library files.. # -.S.o: - $(CC) $(AFLAGS) -D__ASSEMBLY__ -c $< -o $@ - lib-y = ashrdi3.o checksum.o memcpy.o memset.o abs.o romfs.o diff --git a/arch/m68knommu/platform/5206/Makefile b/arch/m68knommu/platform/5206/Makefile index 701b7abe019..c7bb0cef31a 100644 --- a/arch/m68knommu/platform/5206/Makefile +++ b/arch/m68knommu/platform/5206/Makefile @@ -13,7 +13,7 @@ # ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 endif obj-y := config.o diff --git a/arch/m68knommu/platform/5206e/Makefile b/arch/m68knommu/platform/5206e/Makefile index 701b7abe019..c7bb0cef31a 100644 --- a/arch/m68knommu/platform/5206e/Makefile +++ b/arch/m68knommu/platform/5206e/Makefile @@ -13,7 +13,7 @@ # ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 endif obj-y := config.o diff --git a/arch/m68knommu/platform/520x/Makefile b/arch/m68knommu/platform/520x/Makefile index e861b05106b..31b4eb51739 100644 --- a/arch/m68knommu/platform/520x/Makefile +++ b/arch/m68knommu/platform/520x/Makefile @@ -13,7 +13,7 @@ # ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 endif obj-y := config.o diff --git a/arch/m68knommu/platform/523x/Makefile b/arch/m68knommu/platform/523x/Makefile index c1578b01616..ac9fbece8a4 100644 --- a/arch/m68knommu/platform/523x/Makefile +++ b/arch/m68knommu/platform/523x/Makefile @@ -13,7 +13,7 @@ # ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 endif obj-y := config.o diff --git a/arch/m68knommu/platform/5249/Makefile b/arch/m68knommu/platform/5249/Makefile index 701b7abe019..c7bb0cef31a 100644 --- a/arch/m68knommu/platform/5249/Makefile +++ b/arch/m68knommu/platform/5249/Makefile @@ -13,7 +13,7 @@ # ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 endif obj-y := config.o diff --git a/arch/m68knommu/platform/5272/Makefile b/arch/m68knommu/platform/5272/Makefile index 0871a29dd58..7475c38c3b4 100644 --- a/arch/m68knommu/platform/5272/Makefile +++ b/arch/m68knommu/platform/5272/Makefile @@ -13,7 +13,7 @@ # ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 endif obj-y := config.o diff --git a/arch/m68knommu/platform/527x/Makefile b/arch/m68knommu/platform/527x/Makefile index 0871a29dd58..7475c38c3b4 100644 --- a/arch/m68knommu/platform/527x/Makefile +++ b/arch/m68knommu/platform/527x/Makefile @@ -13,7 +13,7 @@ # ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 endif obj-y := config.o diff --git a/arch/m68knommu/platform/528x/Makefile b/arch/m68knommu/platform/528x/Makefile index 0871a29dd58..7475c38c3b4 100644 --- a/arch/m68knommu/platform/528x/Makefile +++ b/arch/m68knommu/platform/528x/Makefile @@ -13,7 +13,7 @@ # ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 endif obj-y := config.o diff --git a/arch/m68knommu/platform/5307/Makefile b/arch/m68knommu/platform/5307/Makefile index 719a313494b..5b600530c8d 100644 --- a/arch/m68knommu/platform/5307/Makefile +++ b/arch/m68knommu/platform/5307/Makefile @@ -13,7 +13,7 @@ # ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 endif obj-$(CONFIG_COLDFIRE) += entry.o vectors.o diff --git a/arch/m68knommu/platform/532x/Makefile b/arch/m68knommu/platform/532x/Makefile index 12301803b9e..475b92866a9 100644 --- a/arch/m68knommu/platform/532x/Makefile +++ b/arch/m68knommu/platform/532x/Makefile @@ -13,7 +13,7 @@ # ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 endif #obj-y := config.o usb-mcf532x.o spi-mcf532x.o diff --git a/arch/m68knommu/platform/5407/Makefile b/arch/m68knommu/platform/5407/Makefile index 91b2f495dd3..68633b27df5 100644 --- a/arch/m68knommu/platform/5407/Makefile +++ b/arch/m68knommu/platform/5407/Makefile @@ -13,7 +13,7 @@ # ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 endif obj-y := config.o -- cgit v1.2.3 From 222d394d30e74bb7a2a65029fcea68107b0d0eb6 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Mon, 15 Oct 2007 21:59:31 +0200 Subject: kbuild: enable 'make AFLAGS=...' to add additional options to AS The variable AFLAGS is a wellknown variable and the usage by kbuild may result in unexpected behaviour. On top of that several people over time has asked for a way to pass in additional flags to gcc. This patch replace use of AFLAGS with KBUILD_AFLAGS all over the tree. Patch was tested on following architectures: alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390 Signed-off-by: Sam Ravnborg --- arch/arm/Makefile | 2 +- arch/arm/vfp/Makefile | 2 +- arch/avr32/Makefile | 4 ++-- arch/blackfin/Makefile | 2 +- arch/cris/Makefile | 2 +- arch/frv/Makefile | 10 +++++----- arch/h8300/Makefile | 2 +- arch/i386/Makefile | 6 +++--- arch/m32r/Makefile | 2 +- arch/m68knommu/Makefile | 2 +- arch/mips/Makefile | 2 +- arch/powerpc/Makefile | 4 ++-- arch/ppc/Makefile | 4 ++-- arch/s390/Makefile | 6 +++--- arch/sh/Makefile | 2 +- arch/sparc/Makefile | 2 +- arch/sparc64/Makefile | 2 +- arch/um/Makefile | 2 +- arch/um/Makefile-i386 | 2 +- arch/um/Makefile-x86_64 | 2 +- arch/um/sys-ppc/Makefile | 6 +++--- arch/x86/boot/Makefile | 2 +- arch/x86/boot/compressed/Makefile_64 | 2 +- arch/x86_64/Makefile | 6 +++--- 24 files changed, 39 insertions(+), 39 deletions(-) (limited to 'arch') diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 0b82865ab50..b762d235b81 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -86,7 +86,7 @@ endif # Need -Uarm for gcc < 3.x KBUILD_CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm -AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float +KBUILD_AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float CHECKFLAGS += -D__arm__ diff --git a/arch/arm/vfp/Makefile b/arch/arm/vfp/Makefile index 7e136e77971..39f6d8e1af7 100644 --- a/arch/arm/vfp/Makefile +++ b/arch/arm/vfp/Makefile @@ -7,7 +7,7 @@ # EXTRA_CFLAGS := -DDEBUG # EXTRA_AFLAGS := -DDEBUG -AFLAGS :=$(AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) +KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) LDFLAGS +=--no-warn-mismatch obj-y += vfp.o diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile index 9883c8b55e1..87918647be6 100644 --- a/arch/avr32/Makefile +++ b/arch/avr32/Makefile @@ -12,14 +12,14 @@ all: uImage vmlinux.elf KBUILD_DEFCONFIG := atstk1002_defconfig KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic -AFLAGS += -mrelax -mno-pic +KBUILD_AFLAGS += -mrelax -mno-pic CFLAGS_MODULE += -mno-relax LDFLAGS_vmlinux += --relax cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000 KBUILD_CFLAGS += $(cpuflags-y) -AFLAGS += $(cpuflags-y) +KBUILD_AFLAGS += $(cpuflags-y) CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile index 52a6ac07285..368933760d2 100644 --- a/arch/blackfin/Makefile +++ b/arch/blackfin/Makefile @@ -54,7 +54,7 @@ rev-$(CONFIG_BF_REV_NONE) := none rev-$(CONFIG_BF_REV_ANY) := any KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y) -AFLAGS += -mcpu=$(cpu-y)-$(rev-y) +KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y) head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o diff --git a/arch/cris/Makefile b/arch/cris/Makefile index 32ef6f3cce0..e6bf00c262e 100644 --- a/arch/cris/Makefile +++ b/arch/cris/Makefile @@ -29,7 +29,7 @@ LD = $(CROSS_COMPILE)ld -mcrislinux OBJCOPYFLAGS := -O binary -R .note -R .comment -S CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) -AFLAGS += -mlinux +KBUILD_AFLAGS += -mlinux KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe diff --git a/arch/frv/Makefile b/arch/frv/Makefile index ec89886ed45..310c47a663f 100644 --- a/arch/frv/Makefile +++ b/arch/frv/Makefile @@ -63,16 +63,16 @@ endif ifdef CONFIG_CPU_FR451_COMPILE KBUILD_CFLAGS += -mcpu=fr450 -AFLAGS += -mcpu=fr450 +KBUILD_AFLAGS += -mcpu=fr450 ASFLAGS += -mcpu=fr450 else ifdef CONFIG_CPU_FR551_COMPILE KBUILD_CFLAGS += -mcpu=fr550 -AFLAGS += -mcpu=fr550 +KBUILD_AFLAGS += -mcpu=fr550 ASFLAGS += -mcpu=fr550 else KBUILD_CFLAGS += -mcpu=fr400 -AFLAGS += -mcpu=fr400 +KBUILD_AFLAGS += -mcpu=fr400 ASFLAGS += -mcpu=fr400 endif endif @@ -82,14 +82,14 @@ endif # - all the extra registers are dealt with only at context switch time KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 -AFLAGS += -mno-fdpic +KBUILD_AFLAGS += -mno-fdpic ASFLAGS += -mno-fdpic # make sure the .S files get compiled with debug info # and disable optimisations that are unhelpful whilst debugging ifdef CONFIG_DEBUG_INFO #KBUILD_CFLAGS += -O1 -AFLAGS += -Wa,--gdwarf2 +KBUILD_AFLAGS += -Wa,--gdwarf2 ASFLAGS += -Wa,--gdwarf2 endif diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile index 330e05f28f9..a556447877b 100644 --- a/arch/h8300/Makefile +++ b/arch/h8300/Makefile @@ -35,7 +35,7 @@ KBUILD_CFLAGS += -mint32 -fno-builtin KBUILD_CFLAGS += -g KBUILD_CFLAGS += -D__linux__ KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" -AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) +KBUILD_AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) LDFLAGS += $(ldflags-y) CROSS_COMPILE = h8300-elf- diff --git a/arch/i386/Makefile b/arch/i386/Makefile index fc3c8e88b74..f036d2dee3d 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile @@ -55,11 +55,11 @@ KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call c # do binutils support CFI? cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) -AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) +KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) # is .cfi_signal_frame supported too? cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) -AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) +KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) KBUILD_CFLAGS += $(cflags-y) @@ -117,7 +117,7 @@ drivers-$(CONFIG_PM) += arch/x86/power/ drivers-$(CONFIG_FB) += arch/x86/video/ KBUILD_CFLAGS += $(mflags-y) -AFLAGS += $(mflags-y) +KBUILD_AFLAGS += $(mflags-y) boot := arch/x86/boot diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile index c80618ab60e..4072a07ebf8 100644 --- a/arch/m32r/Makefile +++ b/arch/m32r/Makefile @@ -25,7 +25,7 @@ cflags-$(CONFIG_ISA_M32R) += -DNO_FPU aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst KBUILD_CFLAGS += $(cflags-y) -AFLAGS += $(aflags-y) +KBUILD_AFLAGS += $(aflags-y) CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile index 1c1fbb69ff2..92227aaaa26 100644 --- a/arch/m68knommu/Makefile +++ b/arch/m68knommu/Makefile @@ -102,7 +102,7 @@ cflags-$(CONFIG_M68EZ328) := -m68000 cflags-$(CONFIG_M68VZ328) := -m68000 cflags-$(CONFIG_M68360) := -m68332 -AFLAGS += $(cflags-y) +KBUILD_AFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y) KBUILD_CFLAGS += -D__linux__ diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 64512abef61..6b663bec475 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -608,7 +608,7 @@ ifdef CONFIG_64BIT endif endif -AFLAGS += $(cflags-y) +KBUILD_AFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y) \ -D"VMLINUX_LOAD_ADDRESS=$(load-y)" diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 51309848c11..462bb89b67e 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -76,7 +76,7 @@ AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple CPPFLAGS += $(CPPFLAGS-y) -AFLAGS += $(AFLAGS-y) +KBUILD_AFLAGS += $(AFLAGS-y) KBUILD_CFLAGS += -msoft-float -pipe $(CFLAGS-y) CPP = $(CC) -E $(KBUILD_CFLAGS) @@ -125,7 +125,7 @@ cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec cpu-as-$(CONFIG_E500) += -Wa,-me500 cpu-as-$(CONFIG_E200) += -Wa,-me200 -AFLAGS += $(cpu-as-y) +KBUILD_AFLAGS += $(cpu-as-y) KBUILD_CFLAGS += $(cpu-as-y) head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile index 43802e95c89..dd63ccb6673 100644 --- a/arch/ppc/Makefile +++ b/arch/ppc/Makefile @@ -23,7 +23,7 @@ endif LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic # The -Iarch/$(ARCH)/include is temporary while we are merging CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include -AFLAGS += -Iarch/$(ARCH) +KBUILD_AFLAGS += -Iarch/$(ARCH) KBUILD_CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ -ffixed-r2 -mmultiple @@ -45,7 +45,7 @@ cpu-as-$(CONFIG_6xx) += -Wa,-maltivec cpu-as-$(CONFIG_E500) += -Wa,-me500 cpu-as-$(CONFIG_E200) += -Wa,-me200 -AFLAGS += $(cpu-as-y) +KBUILD_AFLAGS += $(cpu-as-y) KBUILD_CFLAGS += $(cpu-as-y) # Default to the common case. diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 62a0da42c7f..f708be367b0 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -16,7 +16,7 @@ ifndef CONFIG_64BIT LDFLAGS := -m elf_s390 KBUILD_CFLAGS += -m31 -AFLAGS += -m31 +KBUILD_AFLAGS += -m31 UTS_MACHINE := s390 STACK_SIZE := 8192 CHECKFLAGS += -D__s390__ -msize-long @@ -24,7 +24,7 @@ else LDFLAGS := -m elf64_s390 MODFLAGS += -fpic -D__PIC__ KBUILD_CFLAGS += -m64 -AFLAGS += -m64 +KBUILD_AFLAGS += -m64 UTS_MACHINE := s390x STACK_SIZE := 16384 CHECKFLAGS += -D__s390__ -D__s390x__ @@ -79,7 +79,7 @@ endif KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y) KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare -AFLAGS += $(aflags-y) +KBUILD_AFLAGS += $(aflags-y) OBJCOPYFLAGS := -O binary LDFLAGS_vmlinux := -e start diff --git a/arch/sh/Makefile b/arch/sh/Makefile index cd8a411acc9..0353296c2c9 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -92,7 +92,7 @@ LDFLAGS += -EB endif KBUILD_CFLAGS += -pipe $(cflags-y) -AFLAGS += $(cflags-y) +KBUILD_AFLAGS += $(cflags-y) head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index 2ce781a7cbf..fef28e267a5 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile @@ -17,7 +17,7 @@ CHECKFLAGS += -D__sparc__ #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 -AFLAGS := $(AFLAGS) -m32 +KBUILD_AFLAGS += -m32 #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 # Since 2.5.40, the first stage is left not btfix-ed. diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile index b083dc458ce..6c92a42efe7 100644 --- a/arch/sparc64/Makefile +++ b/arch/sparc64/Makefile @@ -45,7 +45,7 @@ else KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \ -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \ $(CC_UNDECL) - AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) + KBUILD_AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) endif ifeq ($(CONFIG_MCOUNT),y) diff --git a/arch/um/Makefile b/arch/um/Makefile index 18123bf7b64..d08d3bc518e 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -62,7 +62,7 @@ KBUILD_CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ -Din6addr_loopback=kernel_in6addr_loopback -AFLAGS += $(ARCH_INCLUDE) +KBUILD_AFLAGS += $(ARCH_INCLUDE) USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386 index 26bc786fc61..d10e4dc0dae 100644 --- a/arch/um/Makefile-i386 +++ b/arch/um/Makefile-i386 @@ -16,7 +16,7 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -S ifeq ("$(origin SUBARCH)", "command line") ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") KBUILD_CFLAGS += $(call cc-option,-m32) -AFLAGS += $(call cc-option,-m32) +KBUILD_AFLAGS += $(call cc-option,-m32) LINK-y += $(call cc-option,-m32) UML_OBJCOPYFLAGS += -F $(ELF_FORMAT) diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index 36d2bb5e419..8836f0df36a 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 @@ -12,7 +12,7 @@ ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__ KBUILD_CFLAGS += $(_extra_flags_) CHECKFLAGS += -m64 -AFLAGS += -m64 +KBUILD_AFLAGS += -m64 LDFLAGS += -m elf_x86_64 CPPFLAGS += -m64 diff --git a/arch/um/sys-ppc/Makefile b/arch/um/sys-ppc/Makefile index af200268fdd..a9814a7ae60 100644 --- a/arch/um/sys-ppc/Makefile +++ b/arch/um/sys-ppc/Makefile @@ -1,7 +1,7 @@ OBJ = built-in.o .S.o: - $(CC) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o + $(CC) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \ ptrace_user.o sysrq.o @@ -57,13 +57,13 @@ ppc_defs.h: mk_defs.c ppc_defs.head \ checksum.o: checksum.S rm -f asm ln -s $(TOPDIR)/include/asm-ppc asm - $(CC) $(EXTRA_AFLAGS) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o + $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o rm -f asm misc.o: misc.S ppc_defs.h rm -f asm ln -s $(TOPDIR)/include/asm-ppc asm - $(CC) $(EXTRA_AFLAGS) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o + $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o rm -f asm clean-files := $(OBJS) ppc_defs.h checksum.S semaphore.c mk_defs.c diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 646292aaf1f..d6ed8e5e1cc 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile @@ -61,7 +61,7 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ $(call cc-option, -fno-unit-at-a-time)) \ $(call cc-option, -fno-stack-protector) \ $(call cc-option, -mpreferred-stack-boundary=2) -AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ $(obj)/zImage: IMAGE_OFFSET := 0x1000 $(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) diff --git a/arch/x86/boot/compressed/Makefile_64 b/arch/x86/boot/compressed/Makefile_64 index 3013ad01fe6..7801e8dd90b 100644 --- a/arch/x86/boot/compressed/Makefile_64 +++ b/arch/x86/boot/compressed/Makefile_64 @@ -10,7 +10,7 @@ KBUILD_CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \ -fno-strict-aliasing -fPIC -mcmodel=small \ $(call cc-option, -ffreestanding) \ $(call cc-option, -fno-stack-protector) -AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ LDFLAGS := -m elf_x86_64 LDFLAGS_vmlinux := -T diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 3fc33004e8c..9daa32d1d2a 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile @@ -61,18 +61,18 @@ cflags-y += -maccumulate-outgoing-args # do binutils support CFI? cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) -AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) +KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) # is .cfi_signal_frame supported too? cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) -AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) +KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector ) cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all ) KBUILD_CFLAGS += $(cflags-y) CFLAGS_KERNEL += $(cflags-kernel-y) -AFLAGS += -m64 +KBUILD_AFLAGS += -m64 head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o -- cgit v1.2.3 From 06c5040cdb13d27adad118f2fbfae905a1911b37 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Mon, 15 Oct 2007 22:17:25 +0200 Subject: kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP The variable CPPFLAGS is a wellknown variable and the usage by kbuild may result in unexpected behaviour. This patch replace use of CPPFLAGS with KBUILD_CPPFLAGS all over the tree and enabling one to use: make CPPFLAGS=... to specify additional CPP commandline options. Patch was tested on following architectures: alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390 Signed-off-by: Sam Ravnborg --- arch/arm/Makefile | 4 ++-- arch/ia64/Makefile | 2 +- arch/powerpc/Makefile | 2 +- arch/ppc/Makefile | 2 +- arch/um/Makefile-x86_64 | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/arm/Makefile b/arch/arm/Makefile index b762d235b81..0d450e757e0 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -32,11 +32,11 @@ KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog endif ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) -CPPFLAGS += -mbig-endian +KBUILD_CPPFLAGS += -mbig-endian AS += -EB LD += -EB else -CPPFLAGS += -mlittle-endian +KBUILD_CPPFLAGS += -mlittle-endian AS += -EL LD += -EL endif diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index 9708a29c70b..34951aa2370 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile @@ -29,7 +29,7 @@ cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \ CFLAGS_KERNEL := -mconstant-gp GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)") -CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") +KBUILD_CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") ifeq ($(GAS_STATUS),buggy) $(error Sorry, you need a newer version of the assember, one that is built from \ diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 462bb89b67e..4e165342210 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -75,7 +75,7 @@ CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple -CPPFLAGS += $(CPPFLAGS-y) +KBUILD_CPPFLAGS += $(CPPFLAGS-y) KBUILD_AFLAGS += $(AFLAGS-y) KBUILD_CFLAGS += -msoft-float -pipe $(CFLAGS-y) CPP = $(CC) -E $(KBUILD_CFLAGS) diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile index dd63ccb6673..95894ef7bea 100644 --- a/arch/ppc/Makefile +++ b/arch/ppc/Makefile @@ -22,7 +22,7 @@ endif LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic # The -Iarch/$(ARCH)/include is temporary while we are merging -CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include +KBUILD_CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include KBUILD_AFLAGS += -Iarch/$(ARCH) KBUILD_CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ -ffixed-r2 -mmultiple diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index 8836f0df36a..bcfd6ea3003 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 @@ -14,7 +14,7 @@ KBUILD_CFLAGS += $(_extra_flags_) CHECKFLAGS += -m64 KBUILD_AFLAGS += -m64 LDFLAGS += -m elf_x86_64 -CPPFLAGS += -m64 +KBUILD_CPPFLAGS += -m64 ELF_ARCH := i386:x86-64 ELF_FORMAT := elf64-x86-64 -- cgit v1.2.3