aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/Makefile2
-rw-r--r--arch/alpha/kernel/Makefile2
-rw-r--r--arch/alpha/lib/Makefile2
-rw-r--r--arch/arm/Makefile14
-rw-r--r--arch/arm/boot/compressed/Makefile2
-rw-r--r--arch/arm/vfp/Makefile2
-rw-r--r--arch/avr32/Makefile8
-rw-r--r--arch/blackfin/Kconfig2
-rw-r--r--arch/blackfin/Makefile4
-rw-r--r--arch/cris/Makefile10
-rw-r--r--arch/frv/Makefile32
-rw-r--r--arch/h8300/Makefile14
-rw-r--r--arch/h8300/lib/Makefile3
-rw-r--r--arch/i386/Makefile16
-rw-r--r--arch/ia64/Makefile4
-rw-r--r--arch/ia64/sn/kernel/Makefile2
-rw-r--r--arch/ia64/sn/kernel/sn2/Makefile2
-rw-r--r--arch/ia64/sn/pci/Makefile2
-rw-r--r--arch/ia64/sn/pci/pcibr/Makefile2
-rw-r--r--arch/m32r/Makefile8
-rw-r--r--arch/m68k/Makefile8
-rw-r--r--arch/m68knommu/Makefile8
-rw-r--r--arch/m68knommu/platform/5206/Makefile2
-rw-r--r--arch/m68knommu/platform/5206e/Makefile2
-rw-r--r--arch/m68knommu/platform/520x/Makefile2
-rw-r--r--arch/m68knommu/platform/523x/Makefile2
-rw-r--r--arch/m68knommu/platform/5249/Makefile2
-rw-r--r--arch/m68knommu/platform/5272/Makefile2
-rw-r--r--arch/m68knommu/platform/527x/Makefile2
-rw-r--r--arch/m68knommu/platform/528x/Makefile2
-rw-r--r--arch/m68knommu/platform/5307/Makefile2
-rw-r--r--arch/m68knommu/platform/532x/Makefile2
-rw-r--r--arch/m68knommu/platform/5407/Makefile2
-rw-r--r--arch/mips/Makefile8
-rw-r--r--arch/mips/kernel/Makefile2
-rw-r--r--arch/parisc/Makefile2
-rw-r--r--arch/parisc/math-emu/Makefile2
-rw-r--r--arch/powerpc/Kconfig.debug6
-rw-r--r--arch/powerpc/Makefile30
-rw-r--r--arch/powerpc/platforms/Kconfig2
-rw-r--r--arch/ppc/Makefile16
-rw-r--r--arch/ppc/boot/Makefile1
-rw-r--r--arch/s390/Makefile14
-rw-r--r--arch/sh/Makefile6
-rw-r--r--arch/sh/boot/compressed/Makefile2
-rw-r--r--arch/sh64/Makefile4
-rw-r--r--arch/sparc/Makefile8
-rw-r--r--arch/sparc64/Makefile8
-rw-r--r--arch/um/Makefile12
-rw-r--r--arch/um/Makefile-i3866
-rw-r--r--arch/um/Makefile-os-Linux2
-rw-r--r--arch/um/Makefile-x86_646
-rw-r--r--arch/um/drivers/Makefile2
-rw-r--r--arch/um/sys-ppc/Makefile6
-rw-r--r--arch/v850/Makefile8
-rw-r--r--arch/x86/boot/Makefile4
-rw-r--r--arch/x86/boot/compressed/Makefile_322
-rw-r--r--arch/x86/boot/compressed/Makefile_644
-rw-r--r--arch/x86/math-emu/Makefile3
-rw-r--r--arch/x86/vdso/Makefile4
-rw-r--r--arch/x86_64/Makefile8
-rw-r--r--arch/xtensa/Makefile8
-rw-r--r--arch/xtensa/boot/Makefile5
-rw-r--r--arch/xtensa/boot/boot-redboot/Makefile2
64 files changed, 178 insertions, 186 deletions
diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile
index d1004b4d942f..63104ebd1806 100644
--- a/arch/alpha/Makefile
+++ b/arch/alpha/Makefile
@@ -33,7 +33,7 @@ cflags-y += $(cpuflags-y)
33# For TSUNAMI, we must have the assembler not emulate our instructions. 33# For TSUNAMI, we must have the assembler not emulate our instructions.
34# The same is true for IRONGATE, POLARIS, PYXIS. 34# The same is true for IRONGATE, POLARIS, PYXIS.
35# BWX is most important, but we don't really want any emulation ever. 35# BWX is most important, but we don't really want any emulation ever.
36CFLAGS += $(cflags-y) -Wa,-mev6 36KBUILD_CFLAGS += $(cflags-y) -Wa,-mev6
37 37
38head-y := arch/alpha/kernel/head.o 38head-y := arch/alpha/kernel/head.o
39 39
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
index ab6fa54b3860..dccf05245d4d 100644
--- a/arch/alpha/kernel/Makefile
+++ b/arch/alpha/kernel/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5extra-y := head.o vmlinux.lds 5extra-y := head.o vmlinux.lds
6EXTRA_AFLAGS := $(CFLAGS) 6EXTRA_AFLAGS := $(KBUILD_CFLAGS)
7EXTRA_CFLAGS := -Werror -Wno-sign-compare 7EXTRA_CFLAGS := -Werror -Wno-sign-compare
8 8
9obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ 9obj-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 266f78e13076..9b72c59c95be 100644
--- a/arch/alpha/lib/Makefile
+++ b/arch/alpha/lib/Makefile
@@ -2,7 +2,7 @@
2# Makefile for alpha-specific library files.. 2# Makefile for alpha-specific library files..
3# 3#
4 4
5EXTRA_AFLAGS := $(CFLAGS) 5EXTRA_AFLAGS := $(KBUILD_CFLAGS)
6EXTRA_CFLAGS := -Werror 6EXTRA_CFLAGS := -Werror
7 7
8# Many of these routines have implementations tuned for ev6. 8# Many of these routines have implementations tuned for ev6.
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 6c2d539cd22b..35e56c99ad1d 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -14,9 +14,9 @@ LDFLAGS_vmlinux :=-p --no-undefined -X
14CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) 14CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
15OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S 15OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
16GZFLAGS :=-9 16GZFLAGS :=-9
17#CFLAGS +=-pipe 17#KBUILD_CFLAGS +=-pipe
18# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: 18# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
19CFLAGS +=$(call cc-option,-marm,) 19KBUILD_CFLAGS +=$(call cc-option,-marm,)
20 20
21# Do not use arch/arm/defconfig - it's always outdated. 21# Do not use arch/arm/defconfig - it's always outdated.
22# Select a platform tht is kept up-to-date 22# Select a platform tht is kept up-to-date
@@ -28,15 +28,15 @@ MMUEXT := -nommu
28endif 28endif
29 29
30ifeq ($(CONFIG_FRAME_POINTER),y) 30ifeq ($(CONFIG_FRAME_POINTER),y)
31CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog 31KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
32endif 32endif
33 33
34ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) 34ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
35CPPFLAGS += -mbig-endian 35KBUILD_CPPFLAGS += -mbig-endian
36AS += -EB 36AS += -EB
37LD += -EB 37LD += -EB
38else 38else
39CPPFLAGS += -mlittle-endian 39KBUILD_CPPFLAGS += -mlittle-endian
40AS += -EL 40AS += -EL
41LD += -EL 41LD += -EL
42endif 42endif
@@ -85,8 +85,8 @@ CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-th
85endif 85endif
86 86
87# Need -Uarm for gcc < 3.x 87# Need -Uarm for gcc < 3.x
88CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 88KBUILD_CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
89AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float 89KBUILD_AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float
90 90
91CHECKFLAGS += -D__arm__ 91CHECKFLAGS += -D__arm__
92 92
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 6b8cbd69f249..5fde99f9d9f9 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -87,7 +87,7 @@ ifneq ($(PARAMS_PHYS),)
87LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) 87LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS)
88endif 88endif
89LDFLAGS_vmlinux += -p --no-undefined -X \ 89LDFLAGS_vmlinux += -p --no-undefined -X \
90 $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T 90 $(shell $(CC) $(KBUILD_CFLAGS) --print-libgcc-file-name) -T
91 91
92# Don't allow any static data in misc.o, which 92# Don't allow any static data in misc.o, which
93# would otherwise mess up our GOT table 93# would otherwise mess up our GOT table
diff --git a/arch/arm/vfp/Makefile b/arch/arm/vfp/Makefile
index 7e136e77971a..39f6d8e1af73 100644
--- a/arch/arm/vfp/Makefile
+++ b/arch/arm/vfp/Makefile
@@ -7,7 +7,7 @@
7# EXTRA_CFLAGS := -DDEBUG 7# EXTRA_CFLAGS := -DDEBUG
8# EXTRA_AFLAGS := -DDEBUG 8# EXTRA_AFLAGS := -DDEBUG
9 9
10AFLAGS :=$(AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) 10KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp)
11LDFLAGS +=--no-warn-mismatch 11LDFLAGS +=--no-warn-mismatch
12 12
13obj-y += vfp.o 13obj-y += vfp.o
diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile
index dc6bc01f232c..87918647be6d 100644
--- a/arch/avr32/Makefile
+++ b/arch/avr32/Makefile
@@ -11,15 +11,15 @@ all: uImage vmlinux.elf
11 11
12KBUILD_DEFCONFIG := atstk1002_defconfig 12KBUILD_DEFCONFIG := atstk1002_defconfig
13 13
14CFLAGS += -pipe -fno-builtin -mno-pic 14KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic
15AFLAGS += -mrelax -mno-pic 15KBUILD_AFLAGS += -mrelax -mno-pic
16CFLAGS_MODULE += -mno-relax 16CFLAGS_MODULE += -mno-relax
17LDFLAGS_vmlinux += --relax 17LDFLAGS_vmlinux += --relax
18 18
19cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000 19cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000
20 20
21CFLAGS += $(cpuflags-y) 21KBUILD_CFLAGS += $(cpuflags-y)
22AFLAGS += $(cpuflags-y) 22KBUILD_AFLAGS += $(cpuflags-y)
23 23
24CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN 24CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN
25 25
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index b24f4535ffe0..aa9db3073312 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -758,7 +758,7 @@ config BFIN_DMA_5XX
758choice 758choice
759 prompt "Uncached SDRAM region" 759 prompt "Uncached SDRAM region"
760 default DMA_UNCACHED_1M 760 default DMA_UNCACHED_1M
761 depends BFIN_DMA_5XX 761 depends on BFIN_DMA_5XX
762config DMA_UNCACHED_2M 762config DMA_UNCACHED_2M
763 bool "Enable 2M DMA region" 763 bool "Enable 2M DMA region"
764config DMA_UNCACHED_1M 764config DMA_UNCACHED_1M
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile
index 20841663270f..368933760d28 100644
--- a/arch/blackfin/Makefile
+++ b/arch/blackfin/Makefile
@@ -53,8 +53,8 @@ rev-$(CONFIG_BF_REV_0_5) := 0.5
53rev-$(CONFIG_BF_REV_NONE) := none 53rev-$(CONFIG_BF_REV_NONE) := none
54rev-$(CONFIG_BF_REV_ANY) := any 54rev-$(CONFIG_BF_REV_ANY) := any
55 55
56CFLAGS += -mcpu=$(cpu-y)-$(rev-y) 56KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
57AFLAGS += -mcpu=$(cpu-y)-$(rev-y) 57KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
58 58
59head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o 59head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
60 60
diff --git a/arch/cris/Makefile b/arch/cris/Makefile
index ee114699ef8e..e6bf00c262e0 100644
--- a/arch/cris/Makefile
+++ b/arch/cris/Makefile
@@ -29,18 +29,18 @@ LD = $(CROSS_COMPILE)ld -mcrislinux
29OBJCOPYFLAGS := -O binary -R .note -R .comment -S 29OBJCOPYFLAGS := -O binary -R .note -R .comment -S
30 30
31CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) 31CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
32AFLAGS += -mlinux 32KBUILD_AFLAGS += -mlinux
33 33
34CFLAGS := $(CFLAGS) -mlinux -march=$(arch-y) -pipe 34KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe
35 35
36ifdef CONFIG_FRAME_POINTER 36ifdef CONFIG_FRAME_POINTER
37CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g 37KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
38CFLAGS += -fno-omit-frame-pointer 38KBUILD_CFLAGS += -fno-omit-frame-pointer
39endif 39endif
40 40
41head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o 41head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o
42 42
43LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a) 43LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a)
44 44
45core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ 45core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
46core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/ 46core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/
diff --git a/arch/frv/Makefile b/arch/frv/Makefile
index 9bf7345c5cc9..310c47a663f8 100644
--- a/arch/frv/Makefile
+++ b/arch/frv/Makefile
@@ -39,13 +39,13 @@ endif
39ARCHMODFLAGS += -G0 -mlong-calls 39ARCHMODFLAGS += -G0 -mlong-calls
40 40
41ifdef CONFIG_GPREL_DATA_8 41ifdef CONFIG_GPREL_DATA_8
42CFLAGS += -G8 42KBUILD_CFLAGS += -G8
43else 43else
44ifdef CONFIG_GPREL_DATA_4 44ifdef CONFIG_GPREL_DATA_4
45CFLAGS += -G4 45KBUILD_CFLAGS += -G4
46else 46else
47ifdef CONFIG_GPREL_DATA_NONE 47ifdef CONFIG_GPREL_DATA_NONE
48CFLAGS += -G0 48KBUILD_CFLAGS += -G0
49endif 49endif
50endif 50endif
51endif 51endif
@@ -53,26 +53,26 @@ endif
53#LDFLAGS_vmlinux := -Map linkmap.txt 53#LDFLAGS_vmlinux := -Map linkmap.txt
54 54
55ifdef CONFIG_GC_SECTIONS 55ifdef CONFIG_GC_SECTIONS
56CFLAGS += -ffunction-sections -fdata-sections 56KBUILD_CFLAGS += -ffunction-sections -fdata-sections
57LINKFLAGS += --gc-sections 57LINKFLAGS += --gc-sections
58endif 58endif
59 59
60ifndef CONFIG_FRAME_POINTER 60ifndef CONFIG_FRAME_POINTER
61CFLAGS += -mno-linked-fp 61KBUILD_CFLAGS += -mno-linked-fp
62endif 62endif
63 63
64ifdef CONFIG_CPU_FR451_COMPILE 64ifdef CONFIG_CPU_FR451_COMPILE
65CFLAGS += -mcpu=fr450 65KBUILD_CFLAGS += -mcpu=fr450
66AFLAGS += -mcpu=fr450 66KBUILD_AFLAGS += -mcpu=fr450
67ASFLAGS += -mcpu=fr450 67ASFLAGS += -mcpu=fr450
68else 68else
69ifdef CONFIG_CPU_FR551_COMPILE 69ifdef CONFIG_CPU_FR551_COMPILE
70CFLAGS += -mcpu=fr550 70KBUILD_CFLAGS += -mcpu=fr550
71AFLAGS += -mcpu=fr550 71KBUILD_AFLAGS += -mcpu=fr550
72ASFLAGS += -mcpu=fr550 72ASFLAGS += -mcpu=fr550
73else 73else
74CFLAGS += -mcpu=fr400 74KBUILD_CFLAGS += -mcpu=fr400
75AFLAGS += -mcpu=fr400 75KBUILD_AFLAGS += -mcpu=fr400
76ASFLAGS += -mcpu=fr400 76ASFLAGS += -mcpu=fr400
77endif 77endif
78endif 78endif
@@ -80,16 +80,16 @@ endif
80# pretend the kernel is going to run on an FR400 with no media-fp unit 80# pretend the kernel is going to run on an FR400 with no media-fp unit
81# - reserve CC3 for use with atomic ops 81# - reserve CC3 for use with atomic ops
82# - all the extra registers are dealt with only at context switch time 82# - all the extra registers are dealt with only at context switch time
83CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media 83KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media
84CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 84KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2
85AFLAGS += -mno-fdpic 85KBUILD_AFLAGS += -mno-fdpic
86ASFLAGS += -mno-fdpic 86ASFLAGS += -mno-fdpic
87 87
88# make sure the .S files get compiled with debug info 88# make sure the .S files get compiled with debug info
89# and disable optimisations that are unhelpful whilst debugging 89# and disable optimisations that are unhelpful whilst debugging
90ifdef CONFIG_DEBUG_INFO 90ifdef CONFIG_DEBUG_INFO
91#CFLAGS += -O1 91#KBUILD_CFLAGS += -O1
92AFLAGS += -Wa,--gdwarf2 92KBUILD_AFLAGS += -Wa,--gdwarf2
93ASFLAGS += -Wa,--gdwarf2 93ASFLAGS += -Wa,--gdwarf2
94endif 94endif
95 95
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
index 53b5c1edf596..a556447877b4 100644
--- a/arch/h8300/Makefile
+++ b/arch/h8300/Makefile
@@ -30,16 +30,16 @@ ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf
30cflags-$(CONFIG_CPU_H8S) := -ms 30cflags-$(CONFIG_CPU_H8S) := -ms
31ldflags-$(CONFIG_CPU_H8S) := -mh8300self 31ldflags-$(CONFIG_CPU_H8S) := -mh8300self
32 32
33CFLAGS += $(cflags-y) 33KBUILD_CFLAGS += $(cflags-y)
34CFLAGS += -mint32 -fno-builtin 34KBUILD_CFLAGS += -mint32 -fno-builtin
35CFLAGS += -g 35KBUILD_CFLAGS += -g
36CFLAGS += -D__linux__ 36KBUILD_CFLAGS += -D__linux__
37CFLAGS += -DUTS_SYSNAME=\"uClinux\" 37KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
38AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) 38KBUILD_AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y)
39LDFLAGS += $(ldflags-y) 39LDFLAGS += $(ldflags-y)
40 40
41CROSS_COMPILE = h8300-elf- 41CROSS_COMPILE = h8300-elf-
42LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name) 42LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
43 43
44head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o 44head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o
45 45
diff --git a/arch/h8300/lib/Makefile b/arch/h8300/lib/Makefile
index 98272b66f4e5..1577f5075b10 100644
--- a/arch/h8300/lib/Makefile
+++ b/arch/h8300/lib/Makefile
@@ -2,7 +2,4 @@
2# Makefile for H8/300-specific library files.. 2# Makefile for H8/300-specific library files..
3# 3#
4 4
5.S.o:
6 $(CC) $(AFLAGS) -D__ASSEMBLY__ -c $< -o $@
7
8lib-y = ashrdi3.o checksum.o memcpy.o memset.o abs.o romfs.o 5lib-y = ashrdi3.o checksum.o memcpy.o memset.o abs.o romfs.o
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index 5e50dbf00f3e..f036d2dee3de 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -34,10 +34,10 @@ LDFLAGS_vmlinux := --emit-relocs
34endif 34endif
35CHECKFLAGS += -D__i386__ 35CHECKFLAGS += -D__i386__
36 36
37CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return 37KBUILD_CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return
38 38
39# prevent gcc from keeping the stack 16 byte aligned 39# prevent gcc from keeping the stack 16 byte aligned
40CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) 40KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
41 41
42# CPU-specific tuning. Anything which can be shared with UML should go here. 42# CPU-specific tuning. Anything which can be shared with UML should go here.
43include $(srctree)/arch/i386/Makefile.cpu 43include $(srctree)/arch/i386/Makefile.cpu
@@ -51,17 +51,17 @@ cflags-y += -maccumulate-outgoing-args
51 51
52# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use 52# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
53# a lot more stack due to the lack of sharing of stacklots: 53# a lot more stack due to the lack of sharing of stacklots:
54CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) 54KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;)
55 55
56# do binutils support CFI? 56# do binutils support CFI?
57cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 57cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
58AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 58KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
59 59
60# is .cfi_signal_frame supported too? 60# is .cfi_signal_frame supported too?
61cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 61cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
62AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 62KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
63 63
64CFLAGS += $(cflags-y) 64KBUILD_CFLAGS += $(cflags-y)
65 65
66# Default subarch .c files 66# Default subarch .c files
67mcore-y := arch/x86/mach-default 67mcore-y := arch/x86/mach-default
@@ -116,8 +116,8 @@ drivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/
116drivers-$(CONFIG_PM) += arch/x86/power/ 116drivers-$(CONFIG_PM) += arch/x86/power/
117drivers-$(CONFIG_FB) += arch/x86/video/ 117drivers-$(CONFIG_FB) += arch/x86/video/
118 118
119CFLAGS += $(mflags-y) 119KBUILD_CFLAGS += $(mflags-y)
120AFLAGS += $(mflags-y) 120KBUILD_AFLAGS += $(mflags-y)
121 121
122boot := arch/x86/boot 122boot := arch/x86/boot
123 123
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
index 21033ed83307..34951aa2370b 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 \
29CFLAGS_KERNEL := -mconstant-gp 29CFLAGS_KERNEL := -mconstant-gp
30 30
31GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)") 31GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
32CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") 32KBUILD_CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)")
33 33
34ifeq ($(GAS_STATUS),buggy) 34ifeq ($(GAS_STATUS),buggy)
35$(error Sorry, you need a newer version of the assember, one that is built from \ 35$(error Sorry, you need a newer version of the assember, one that is built from \
@@ -44,7 +44,7 @@ ifeq ($(call cc-version),0304)
44 cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley 44 cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley
45endif 45endif
46 46
47CFLAGS += $(cflags-y) 47KBUILD_CFLAGS += $(cflags-y)
48head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o 48head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
49 49
50libs-y += arch/ia64/lib/ 50libs-y += arch/ia64/lib/
diff --git a/arch/ia64/sn/kernel/Makefile b/arch/ia64/sn/kernel/Makefile
index 0a59371d3475..688a3c27e0f6 100644
--- a/arch/ia64/sn/kernel/Makefile
+++ b/arch/ia64/sn/kernel/Makefile
@@ -7,7 +7,7 @@
7# Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All Rights Reserved. 7# Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All Rights Reserved.
8# 8#
9 9
10CPPFLAGS += -I$(srctree)/arch/ia64/sn/include 10EXTRA_CFLAGS += -Iarch/ia64/sn/include
11 11
12obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ 12obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \
13 huberror.o io_acpi_init.o io_common.o \ 13 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 99e177693234..08e6565dc908 100644
--- a/arch/ia64/sn/kernel/sn2/Makefile
+++ b/arch/ia64/sn/kernel/sn2/Makefile
@@ -9,7 +9,7 @@
9# sn2 specific kernel files 9# sn2 specific kernel files
10# 10#
11 11
12CPPFLAGS += -I$(srctree)/arch/ia64/sn/include 12EXTRA_CFLAGS += -Iarch/ia64/sn/include
13 13
14obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ 14obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \
15 prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o 15 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 c6946784a6a8..ad4ef34dfe26 100644
--- a/arch/ia64/sn/pci/Makefile
+++ b/arch/ia64/sn/pci/Makefile
@@ -7,6 +7,6 @@
7# 7#
8# Makefile for the sn pci general routines. 8# Makefile for the sn pci general routines.
9 9
10CPPFLAGS += -I$(srctree)/arch/ia64/sn/include 10EXTRA_CFLAGS += -Iarch/ia64/sn/include
11 11
12obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/ 12obj-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 3b403ea456f9..01192d3247dd 100644
--- a/arch/ia64/sn/pci/pcibr/Makefile
+++ b/arch/ia64/sn/pci/pcibr/Makefile
@@ -7,7 +7,7 @@
7# 7#
8# Makefile for the sn2 io routines. 8# Makefile for the sn2 io routines.
9 9
10CPPFLAGS += -I$(srctree)/arch/ia64/sn/include 10EXTRA_CFLAGS += -Iarch/ia64/sn/include
11 11
12obj-y += pcibr_dma.o pcibr_reg.o \ 12obj-y += pcibr_dma.o pcibr_reg.o \
13 pcibr_ate.o pcibr_provider.o 13 pcibr_ate.o pcibr_provider.o
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile
index 60e12f312654..4072a07ebf8e 100644
--- a/arch/m32r/Makefile
+++ b/arch/m32r/Makefile
@@ -9,7 +9,7 @@ LDFLAGS :=
9OBJCOPYFLAGS := -O binary -R .note -R .comment -S 9OBJCOPYFLAGS := -O binary -R .note -R .comment -S
10LDFLAGS_vmlinux := 10LDFLAGS_vmlinux :=
11 11
12CFLAGS += -pipe -fno-schedule-insns 12KBUILD_CFLAGS += -pipe -fno-schedule-insns
13CFLAGS_KERNEL += -mmodel=medium 13CFLAGS_KERNEL += -mmodel=medium
14CFLAGS_MODULE += -mmodel=large 14CFLAGS_MODULE += -mmodel=large
15 15
@@ -24,14 +24,14 @@ endif
24cflags-$(CONFIG_ISA_M32R) += -DNO_FPU 24cflags-$(CONFIG_ISA_M32R) += -DNO_FPU
25aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst 25aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst
26 26
27CFLAGS += $(cflags-y) 27KBUILD_CFLAGS += $(cflags-y)
28AFLAGS += $(aflags-y) 28KBUILD_AFLAGS += $(aflags-y)
29 29
30CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 30CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1
31 31
32head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o 32head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o
33 33
34LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 34LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
35 35
36libs-y += arch/m32r/lib/ $(LIBGCC) 36libs-y += arch/m32r/lib/ $(LIBGCC)
37core-y += arch/m32r/kernel/ \ 37core-y += arch/m32r/kernel/ \
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
index aa383a5ea7ac..4a1bd44ff162 100644
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -32,18 +32,18 @@ endif
32CHECKFLAGS += -D__mc68000__ 32CHECKFLAGS += -D__mc68000__
33 33
34# without -fno-strength-reduce the 53c7xx.c driver fails ;-( 34# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
35CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 35KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
36 36
37# enable processor switch if compiled only for a single cpu 37# enable processor switch if compiled only for a single cpu
38ifndef CONFIG_M68020 38ifndef CONFIG_M68020
39ifndef CONFIG_M68030 39ifndef CONFIG_M68030
40 40
41ifndef CONFIG_M68060 41ifndef CONFIG_M68060
42CFLAGS := $(CFLAGS) -m68040 42KBUILD_CFLAGS += -m68040
43endif 43endif
44 44
45ifndef CONFIG_M68040 45ifndef CONFIG_M68040
46CFLAGS := $(CFLAGS) -m68060 46KBUILD_CFLAGS += -m68060
47endif 47endif
48 48
49endif 49endif
@@ -52,7 +52,7 @@ endif
52ifdef CONFIG_KGDB 52ifdef CONFIG_KGDB
53# If configured for kgdb support, include debugging infos and keep the 53# If configured for kgdb support, include debugging infos and keep the
54# frame pointer 54# frame pointer
55CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g 55KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
56endif 56endif
57 57
58ifndef CONFIG_SUN3 58ifndef CONFIG_SUN3
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
index 1305cc980023..92227aaaa26e 100644
--- a/arch/m68knommu/Makefile
+++ b/arch/m68knommu/Makefile
@@ -102,11 +102,11 @@ cflags-$(CONFIG_M68EZ328) := -m68000
102cflags-$(CONFIG_M68VZ328) := -m68000 102cflags-$(CONFIG_M68VZ328) := -m68000
103cflags-$(CONFIG_M68360) := -m68332 103cflags-$(CONFIG_M68360) := -m68332
104 104
105AFLAGS += $(cflags-y) 105KBUILD_AFLAGS += $(cflags-y)
106 106
107CFLAGS += $(cflags-y) 107KBUILD_CFLAGS += $(cflags-y)
108CFLAGS += -D__linux__ 108KBUILD_CFLAGS += -D__linux__
109CFLAGS += -DUTS_SYSNAME=\"uClinux\" 109KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
110 110
111head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o 111head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o
112 112
diff --git a/arch/m68knommu/platform/5206/Makefile b/arch/m68knommu/platform/5206/Makefile
index 701b7abe019d..c7bb0cef31a0 100644
--- a/arch/m68knommu/platform/5206/Makefile
+++ b/arch/m68knommu/platform/5206/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/5206e/Makefile b/arch/m68knommu/platform/5206e/Makefile
index 701b7abe019d..c7bb0cef31a0 100644
--- a/arch/m68knommu/platform/5206e/Makefile
+++ b/arch/m68knommu/platform/5206e/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/520x/Makefile b/arch/m68knommu/platform/520x/Makefile
index e861b05106bc..31b4eb51739d 100644
--- a/arch/m68knommu/platform/520x/Makefile
+++ b/arch/m68knommu/platform/520x/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/523x/Makefile b/arch/m68knommu/platform/523x/Makefile
index c1578b016160..ac9fbece8a4f 100644
--- a/arch/m68knommu/platform/523x/Makefile
+++ b/arch/m68knommu/platform/523x/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/5249/Makefile b/arch/m68knommu/platform/5249/Makefile
index 701b7abe019d..c7bb0cef31a0 100644
--- a/arch/m68knommu/platform/5249/Makefile
+++ b/arch/m68knommu/platform/5249/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/5272/Makefile b/arch/m68knommu/platform/5272/Makefile
index 0871a29dd589..7475c38c3b4e 100644
--- a/arch/m68knommu/platform/5272/Makefile
+++ b/arch/m68knommu/platform/5272/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/527x/Makefile b/arch/m68knommu/platform/527x/Makefile
index 0871a29dd589..7475c38c3b4e 100644
--- a/arch/m68knommu/platform/527x/Makefile
+++ b/arch/m68knommu/platform/527x/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/528x/Makefile b/arch/m68knommu/platform/528x/Makefile
index 0871a29dd589..7475c38c3b4e 100644
--- a/arch/m68knommu/platform/528x/Makefile
+++ b/arch/m68knommu/platform/528x/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/5307/Makefile b/arch/m68knommu/platform/5307/Makefile
index 719a313494bc..5b600530c8d2 100644
--- a/arch/m68knommu/platform/5307/Makefile
+++ b/arch/m68knommu/platform/5307/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-$(CONFIG_COLDFIRE) += entry.o vectors.o 19obj-$(CONFIG_COLDFIRE) += entry.o vectors.o
diff --git a/arch/m68knommu/platform/532x/Makefile b/arch/m68knommu/platform/532x/Makefile
index 12301803b9eb..475b92866a9b 100644
--- a/arch/m68knommu/platform/532x/Makefile
+++ b/arch/m68knommu/platform/532x/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19#obj-y := config.o usb-mcf532x.o spi-mcf532x.o 19#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 91b2f495dd39..68633b27df51 100644
--- a/arch/m68knommu/platform/5407/Makefile
+++ b/arch/m68knommu/platform/5407/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index ebd5d02a7d78..6b663bec4752 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -608,14 +608,14 @@ ifdef CONFIG_64BIT
608 endif 608 endif
609endif 609endif
610 610
611AFLAGS += $(cflags-y) 611KBUILD_AFLAGS += $(cflags-y)
612CFLAGS += $(cflags-y) \ 612KBUILD_CFLAGS += $(cflags-y) \
613 -D"VMLINUX_LOAD_ADDRESS=$(load-y)" 613 -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
614 614
615LDFLAGS += -m $(ld-emul) 615LDFLAGS += -m $(ld-emul)
616 616
617ifdef CONFIG_MIPS 617ifdef CONFIG_MIPS
618CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \ 618CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -xc /dev/null | \
619 egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \ 619 egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
620 sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/") 620 sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
621ifdef CONFIG_64BIT 621ifdef CONFIG_64BIT
@@ -632,7 +632,7 @@ OBJCOPYFLAGS += --remove-section=.reginfo
632# 632#
633 633
634CPPFLAGS_vmlinux.lds := \ 634CPPFLAGS_vmlinux.lds := \
635 $(CFLAGS) \ 635 $(KBUILD_CFLAGS) \
636 -D"LOADADDR=$(load-y)" \ 636 -D"LOADADDR=$(load-y)" \
637 -D"JIFFIES=$(JIFFIES)" \ 637 -D"JIFFIES=$(JIFFIES)" \
638 -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)" 638 -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index a2689f93c160..95a356ef3910 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -71,7 +71,7 @@ obj-$(CONFIG_PCSPEAKER) += pcspeaker.o
71obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 71obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
72obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 72obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
73 73
74CFLAGS_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) 74CFLAGS_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)
75 75
76obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o 76obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o
77 77
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 760567a9ba16..f3d0d7c70977 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -63,7 +63,7 @@ cflags-$(CONFIG_PA8X00) += -march=2.0 -mschedule=8000
63 63
64head-y := arch/parisc/kernel/head.o 64head-y := arch/parisc/kernel/head.o
65 65
66CFLAGS += $(cflags-y) 66KBUILD_CFLAGS += $(cflags-y)
67 67
68kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o 68kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o
69kernel-$(CONFIG_HPUX) += hpux/ 69kernel-$(CONFIG_HPUX) += hpux/
diff --git a/arch/parisc/math-emu/Makefile b/arch/parisc/math-emu/Makefile
index affd4c80e3b7..1f3f225897f5 100644
--- a/arch/parisc/math-emu/Makefile
+++ b/arch/parisc/math-emu/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5# See arch/parisc/math-emu/README 5# See arch/parisc/math-emu/README
6CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \ 6EXTRA_CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \
7 -Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \ 7 -Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \
8 -Wno-implicit-int 8 -Wno-implicit-int
9 9
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index 464f9b4b3169..c939fe86a9e0 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -144,7 +144,7 @@ config BDI_SWITCH
144 144
145config BOOTX_TEXT 145config BOOTX_TEXT
146 bool "Support for early boot text console (BootX or OpenFirmware only)" 146 bool "Support for early boot text console (BootX or OpenFirmware only)"
147 depends PPC_OF && PPC_MULTIPLATFORM 147 depends on PPC_OF && PPC_MULTIPLATFORM
148 help 148 help
149 Say Y here to see progress messages from the boot firmware in text 149 Say Y here to see progress messages from the boot firmware in text
150 mode. Requires either BootX or Open Firmware. 150 mode. Requires either BootX or Open Firmware.
@@ -234,12 +234,12 @@ endchoice
234 234
235config PPC_EARLY_DEBUG_44x_PHYSLOW 235config PPC_EARLY_DEBUG_44x_PHYSLOW
236 hex "Low 32 bits of early debug UART physical address" 236 hex "Low 32 bits of early debug UART physical address"
237 depends PPC_EARLY_DEBUG_44x 237 depends on PPC_EARLY_DEBUG_44x
238 default "0x40000200" 238 default "0x40000200"
239 239
240config PPC_EARLY_DEBUG_44x_PHYSHIGH 240config PPC_EARLY_DEBUG_44x_PHYSHIGH
241 hex "EPRN of early debug UART physical address" 241 hex "EPRN of early debug UART physical address"
242 depends PPC_EARLY_DEBUG_44x 242 depends on PPC_EARLY_DEBUG_44x
243 default "0x1" 243 default "0x1"
244 244
245config PPC_EARLY_DEBUG_CPM_ADDR 245config PPC_EARLY_DEBUG_CPM_ADDR
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 643839a3f5d8..4e165342210a 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -75,10 +75,10 @@ CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
75AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) 75AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
76CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc 76CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc
77CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple 77CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple
78CPPFLAGS += $(CPPFLAGS-y) 78KBUILD_CPPFLAGS += $(CPPFLAGS-y)
79AFLAGS += $(AFLAGS-y) 79KBUILD_AFLAGS += $(AFLAGS-y)
80CFLAGS += -msoft-float -pipe $(CFLAGS-y) 80KBUILD_CFLAGS += -msoft-float -pipe $(CFLAGS-y)
81CPP = $(CC) -E $(CFLAGS) 81CPP = $(CC) -E $(KBUILD_CFLAGS)
82 82
83CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ 83CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
84 84
@@ -88,35 +88,35 @@ GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi
88ifeq ($(CONFIG_POWER4_ONLY),y) 88ifeq ($(CONFIG_POWER4_ONLY),y)
89ifeq ($(CONFIG_ALTIVEC),y) 89ifeq ($(CONFIG_ALTIVEC),y)
90ifeq ($(GCC_BROKEN_VEC),y) 90ifeq ($(GCC_BROKEN_VEC),y)
91 CFLAGS += $(call cc-option,-mcpu=970) 91 KBUILD_CFLAGS += $(call cc-option,-mcpu=970)
92else 92else
93 CFLAGS += $(call cc-option,-mcpu=power4) 93 KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
94endif 94endif
95else 95else
96 CFLAGS += $(call cc-option,-mcpu=power4) 96 KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
97endif 97endif
98else 98else
99 CFLAGS += $(call cc-option,-mtune=power4) 99 KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
100endif 100endif
101endif 101endif
102 102
103ifeq ($(CONFIG_TUNE_CELL),y) 103ifeq ($(CONFIG_TUNE_CELL),y)
104 CFLAGS += $(call cc-option,-mtune=cell) 104 KBUILD_CFLAGS += $(call cc-option,-mtune=cell)
105endif 105endif
106 106
107# No AltiVec instruction when building kernel 107# No AltiVec instruction when building kernel
108CFLAGS += $(call cc-option,-mno-altivec) 108KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
109 109
110# Enable unit-at-a-time mode when possible. It shrinks the 110# Enable unit-at-a-time mode when possible. It shrinks the
111# kernel considerably. 111# kernel considerably.
112CFLAGS += $(call cc-option,-funit-at-a-time) 112KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
113 113
114# Never use string load/store instructions as they are 114# Never use string load/store instructions as they are
115# often slow when they are implemented at all 115# often slow when they are implemented at all
116CFLAGS += -mno-string 116KBUILD_CFLAGS += -mno-string
117 117
118ifeq ($(CONFIG_6xx),y) 118ifeq ($(CONFIG_6xx),y)
119CFLAGS += -mcpu=powerpc 119KBUILD_CFLAGS += -mcpu=powerpc
120endif 120endif
121 121
122cpu-as-$(CONFIG_4xx) += -Wa,-m405 122cpu-as-$(CONFIG_4xx) += -Wa,-m405
@@ -125,8 +125,8 @@ cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec
125cpu-as-$(CONFIG_E500) += -Wa,-me500 125cpu-as-$(CONFIG_E500) += -Wa,-me500
126cpu-as-$(CONFIG_E200) += -Wa,-me200 126cpu-as-$(CONFIG_E200) += -Wa,-me200
127 127
128AFLAGS += $(cpu-as-y) 128KBUILD_AFLAGS += $(cpu-as-y)
129CFLAGS += $(cpu-as-y) 129KBUILD_CFLAGS += $(cpu-as-y)
130 130
131head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o 131head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o
132head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o 132head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index cc6013ffc29a..186397f283bb 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -117,7 +117,7 @@ config RTAS_FLASH
117 117
118config PPC_PMI 118config PPC_PMI
119 tristate "Support for PMI" 119 tristate "Support for PMI"
120 depends PPC_IBM_CELL_BLADE 120 depends on PPC_IBM_CELL_BLADE
121 help 121 help
122 PMI (Platform Management Interrupt) is a way to 122 PMI (Platform Management Interrupt) is a way to
123 communicate with the BMC (Baseboard Mangement Controller). 123 communicate with the BMC (Baseboard Mangement Controller).
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index eee6264e8a04..95894ef7beaa 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -22,22 +22,22 @@ endif
22 22
23LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic 23LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic
24# The -Iarch/$(ARCH)/include is temporary while we are merging 24# The -Iarch/$(ARCH)/include is temporary while we are merging
25CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include 25KBUILD_CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include
26AFLAGS += -Iarch/$(ARCH) 26KBUILD_AFLAGS += -Iarch/$(ARCH)
27CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ 27KBUILD_CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \
28 -ffixed-r2 -mmultiple 28 -ffixed-r2 -mmultiple
29 29
30# No AltiVec instruction when building kernel 30# No AltiVec instruction when building kernel
31CFLAGS += $(call cc-option, -mno-altivec) 31KBUILD_CFLAGS += $(call cc-option, -mno-altivec)
32 32
33CPP = $(CC) -E $(CFLAGS) 33CPP = $(CC) -E $(KBUILD_CFLAGS)
34# Temporary hack until we have migrated to asm-powerpc 34# Temporary hack until we have migrated to asm-powerpc
35LINUXINCLUDE += -Iarch/$(ARCH)/include 35LINUXINCLUDE += -Iarch/$(ARCH)/include
36 36
37CHECKFLAGS += -D__powerpc__ 37CHECKFLAGS += -D__powerpc__
38 38
39ifndef CONFIG_FSL_BOOKE 39ifndef CONFIG_FSL_BOOKE
40CFLAGS += -mstring 40KBUILD_CFLAGS += -mstring
41endif 41endif
42 42
43cpu-as-$(CONFIG_4xx) += -Wa,-m405 43cpu-as-$(CONFIG_4xx) += -Wa,-m405
@@ -45,8 +45,8 @@ cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
45cpu-as-$(CONFIG_E500) += -Wa,-me500 45cpu-as-$(CONFIG_E500) += -Wa,-me500
46cpu-as-$(CONFIG_E200) += -Wa,-me200 46cpu-as-$(CONFIG_E200) += -Wa,-me200
47 47
48AFLAGS += $(cpu-as-y) 48KBUILD_AFLAGS += $(cpu-as-y)
49CFLAGS += $(cpu-as-y) 49KBUILD_CFLAGS += $(cpu-as-y)
50 50
51# Default to the common case. 51# Default to the common case.
52KBUILD_DEFCONFIG := common_defconfig 52KBUILD_DEFCONFIG := common_defconfig
diff --git a/arch/ppc/boot/Makefile b/arch/ppc/boot/Makefile
index b739e25d4728..487dc66dcc74 100644
--- a/arch/ppc/boot/Makefile
+++ b/arch/ppc/boot/Makefile
@@ -13,7 +13,6 @@
13# modified by Cort (cort@cs.nmt.edu) 13# modified by Cort (cort@cs.nmt.edu)
14# 14#
15 15
16CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include
17HOSTCFLAGS += -Iarch/$(ARCH)/boot/include 16HOSTCFLAGS += -Iarch/$(ARCH)/boot/include
18 17
19BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd 18BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 143ed8e154af..f708be367b03 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -15,16 +15,16 @@
15 15
16ifndef CONFIG_64BIT 16ifndef CONFIG_64BIT
17LDFLAGS := -m elf_s390 17LDFLAGS := -m elf_s390
18CFLAGS += -m31 18KBUILD_CFLAGS += -m31
19AFLAGS += -m31 19KBUILD_AFLAGS += -m31
20UTS_MACHINE := s390 20UTS_MACHINE := s390
21STACK_SIZE := 8192 21STACK_SIZE := 8192
22CHECKFLAGS += -D__s390__ -msize-long 22CHECKFLAGS += -D__s390__ -msize-long
23else 23else
24LDFLAGS := -m elf64_s390 24LDFLAGS := -m elf64_s390
25MODFLAGS += -fpic -D__PIC__ 25MODFLAGS += -fpic -D__PIC__
26CFLAGS += -m64 26KBUILD_CFLAGS += -m64
27AFLAGS += -m64 27KBUILD_AFLAGS += -m64
28UTS_MACHINE := s390x 28UTS_MACHINE := s390x
29STACK_SIZE := 16384 29STACK_SIZE := 16384
30CHECKFLAGS += -D__s390__ -D__s390x__ 30CHECKFLAGS += -D__s390__ -D__s390x__
@@ -77,9 +77,9 @@ cflags-$(CONFIG_WARN_STACK) += -mwarn-dynamicstack
77cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE) 77cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE)
78endif 78endif
79 79
80CFLAGS += -mbackchain -msoft-float $(cflags-y) 80KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y)
81CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare 81KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare
82AFLAGS += $(aflags-y) 82KBUILD_AFLAGS += $(aflags-y)
83 83
84OBJCOPYFLAGS := -O binary 84OBJCOPYFLAGS := -O binary
85LDFLAGS_vmlinux := -e start 85LDFLAGS_vmlinux := -e start
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index a0a2083aad3e..408342b175c8 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -91,12 +91,12 @@ LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4'
91LDFLAGS += -EB 91LDFLAGS += -EB
92endif 92endif
93 93
94CFLAGS += -pipe $(cflags-y) 94KBUILD_CFLAGS += -pipe $(cflags-y)
95AFLAGS += $(cflags-y) 95KBUILD_AFLAGS += $(cflags-y)
96 96
97head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o 97head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o
98 98
99LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 99LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
100 100
101core-y += arch/sh/kernel/ arch/sh/mm/ 101core-y += arch/sh/kernel/ arch/sh/mm/
102core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/ 102core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile
index 013504ae1122..906a13f82fe0 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" \
21 $(CONFIG_MEMORY_START) + \ 21 $(CONFIG_MEMORY_START) + \
22 $(CONFIG_BOOT_LINK_OFFSET)]') 22 $(CONFIG_BOOT_LINK_OFFSET)]')
23 23
24LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 24LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
25 25
26LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds 26LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds
27 27
diff --git a/arch/sh64/Makefile b/arch/sh64/Makefile
index 8290c6380d7d..8dac7e1a2be6 100644
--- a/arch/sh64/Makefile
+++ b/arch/sh64/Makefile
@@ -26,7 +26,7 @@ LDFLAGS += -EB -mshelf32_linux
26endif 26endif
27 27
28# No requirements for endianess support from AFLAGS, 'as' always run through gcc 28# No requirements for endianess support from AFLAGS, 'as' always run through gcc
29CFLAGS += $(cpu-y) 29KBUILD_CFLAGS += $(cpu-y)
30 30
31LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \ 31LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \
32 --defsym phys_stext_shmedia=phys_stext+1 \ 32 --defsym phys_stext_shmedia=phys_stext+1 \
@@ -58,7 +58,7 @@ ifneq ($(machine-y),)
58core-y += arch/sh64/mach-$(machine-y)/ 58core-y += arch/sh64/mach-$(machine-y)/
59endif 59endif
60 60
61LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 61LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
62libs-y += arch/$(ARCH)/lib/ $(LIBGCC) 62libs-y += arch/$(ARCH)/lib/ $(LIBGCC)
63 63
64drivers-$(CONFIG_OPROFILE) += arch/sh64/oprofile/ 64drivers-$(CONFIG_OPROFILE) += arch/sh64/oprofile/
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index f33c3817f014..fef28e267a52 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -8,16 +8,16 @@
8# 8#
9 9
10# 10#
11# Uncomment the first CFLAGS if you are doing kgdb source level 11# Uncomment the first KBUILD_CFLAGS if you are doing kgdb source level
12# debugging of the kernel to get the proper debugging information. 12# debugging of the kernel to get the proper debugging information.
13 13
14AS := $(AS) -32 14AS := $(AS) -32
15LDFLAGS := -m elf32_sparc 15LDFLAGS := -m elf32_sparc
16CHECKFLAGS += -D__sparc__ 16CHECKFLAGS += -D__sparc__
17 17
18#CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7 18#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
19CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 19KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
20AFLAGS := $(AFLAGS) -m32 20KBUILD_AFLAGS += -m32
21 21
22#LDFLAGS_vmlinux = -N -Ttext 0xf0004000 22#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
23# Since 2.5.40, the first stage is left not btfix-ed. 23# Since 2.5.40, the first stage is left not btfix-ed.
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile
index cad10c5b83d3..6c92a42efe76 100644
--- a/arch/sparc64/Makefile
+++ b/arch/sparc64/Makefile
@@ -39,17 +39,17 @@ AS := $(AS) --undeclared-regs
39endif 39endif
40 40
41ifneq ($(NEW_GCC),y) 41ifneq ($(NEW_GCC),y)
42 CFLAGS := $(CFLAGS) -pipe -mno-fpu -mtune=ultrasparc -mmedlow \ 42 KBUILD_CFLAGS += -pipe -mno-fpu -mtune=ultrasparc -mmedlow \
43 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare 43 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare
44else 44else
45 CFLAGS := $(CFLAGS) -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \ 45 KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
46 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \ 46 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \
47 $(CC_UNDECL) 47 $(CC_UNDECL)
48 AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) 48 KBUILD_AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL)
49endif 49endif
50 50
51ifeq ($(CONFIG_MCOUNT),y) 51ifeq ($(CONFIG_MCOUNT),y)
52 CFLAGS := $(CFLAGS) -pg 52 KBUILD_CFLAGS += -pg
53endif 53endif
54 54
55head-y := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o 55head-y := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o
diff --git a/arch/um/Makefile b/arch/um/Makefile
index ab22fdeedf29..82c2ac48040d 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -49,15 +49,15 @@ SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH)
49# 49#
50# These apply to USER_CFLAGS to. 50# These apply to USER_CFLAGS to.
51 51
52CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ 52KBUILD_CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \
53 $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ 53 $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \
54 -Din6addr_loopback=kernel_in6addr_loopback \ 54 -Din6addr_loopback=kernel_in6addr_loopback \
55 -Din6addr_any=kernel_in6addr_any 55 -Din6addr_any=kernel_in6addr_any
56 56
57AFLAGS += $(ARCH_INCLUDE) 57KBUILD_AFLAGS += $(ARCH_INCLUDE)
58 58
59USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ 59USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
60 $(patsubst -I%,,$(CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ 60 $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
61 -D_FILE_OFFSET_BITS=64 61 -D_FILE_OFFSET_BITS=64
62 62
63include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) 63include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
@@ -67,14 +67,14 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
67 67
68# -Derrno=kernel_errno - This turns all kernel references to errno into 68# -Derrno=kernel_errno - This turns all kernel references to errno into
69# kernel_errno to separate them from the libc errno. This allows -fno-common 69# kernel_errno to separate them from the libc errno. This allows -fno-common
70# in CFLAGS. Otherwise, it would cause ld to complain about the two different 70# in KBUILD_CFLAGS. Otherwise, it would cause ld to complain about the two different
71# errnos. 71# errnos.
72# These apply to kernelspace only. 72# These apply to kernelspace only.
73 73
74KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ 74KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
75 -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) 75 -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)
76CFLAGS += $(KERNEL_DEFINES) 76KBUILD_CFLAGS += $(KERNEL_DEFINES)
77CFLAGS += $(call cc-option,-fno-unit-at-a-time,) 77KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
78 78
79# These are needed for clean and mrproper, since in that case .config is not 79# These are needed for clean and mrproper, since in that case .config is not
80# included; the values here are meaningless 80# included; the values here are meaningless
diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386
index ae61e3c271e2..0178df306939 100644
--- a/arch/um/Makefile-i386
+++ b/arch/um/Makefile-i386
@@ -12,8 +12,8 @@ HEADER_ARCH := x86
12 12
13ifeq ("$(origin SUBARCH)", "command line") 13ifeq ("$(origin SUBARCH)", "command line")
14ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") 14ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)")
15CFLAGS += $(call cc-option,-m32) 15KBUILD_CFLAGS += $(call cc-option,-m32)
16AFLAGS += $(call cc-option,-m32) 16KBUILD_AFLAGS += $(call cc-option,-m32)
17LINK-y += $(call cc-option,-m32) 17LINK-y += $(call cc-option,-m32)
18UML_OBJCOPYFLAGS += -F $(ELF_FORMAT) 18UML_OBJCOPYFLAGS += -F $(ELF_FORMAT)
19 19
@@ -38,4 +38,4 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
38# an unresolved reference. 38# an unresolved reference.
39cflags-y += -ffreestanding 39cflags-y += -ffreestanding
40 40
41CFLAGS += $(cflags-y) 41KBUILD_CFLAGS += $(cflags-y)
diff --git a/arch/um/Makefile-os-Linux b/arch/um/Makefile-os-Linux
index 0c0f9a1cbbad..52859487c95d 100644
--- a/arch/um/Makefile-os-Linux
+++ b/arch/um/Makefile-os-Linux
@@ -5,4 +5,4 @@
5 5
6# To get a definition of F_SETSIG 6# To get a definition of F_SETSIG
7USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE 7USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
8CFLAGS += -D_LARGEFILE64_SOURCE 8KBUILD_CFLAGS += -D_LARGEFILE64_SOURCE
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64
index 8a00e5f6934c..fe5316f0c6a5 100644
--- a/arch/um/Makefile-x86_64
+++ b/arch/um/Makefile-x86_64
@@ -9,12 +9,12 @@ _extra_flags_ = -fno-builtin -m64
9#We #undef __x86_64__ for kernelspace, not for userspace where 9#We #undef __x86_64__ for kernelspace, not for userspace where
10#it's needed for headers to work! 10#it's needed for headers to work!
11ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__ 11ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__
12CFLAGS += $(_extra_flags_) 12KBUILD_CFLAGS += $(_extra_flags_)
13 13
14CHECKFLAGS += -m64 14CHECKFLAGS += -m64
15AFLAGS += -m64 15KBUILD_AFLAGS += -m64
16LDFLAGS += -m elf_x86_64 16LDFLAGS += -m elf_x86_64
17CPPFLAGS += -m64 17KBUILD_CPPFLAGS += -m64
18 18
19ELF_ARCH := i386:x86-64 19ELF_ARCH := i386:x86-64
20ELF_FORMAT := elf64-x86-64 20ELF_FORMAT := elf64-x86-64
diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile
index 634968150bd6..d283e7b022a0 100644
--- a/arch/um/drivers/Makefile
+++ b/arch/um/drivers/Makefile
@@ -17,7 +17,7 @@ ubd-objs := ubd_kern.o ubd_user.o
17port-objs := port_kern.o port_user.o 17port-objs := port_kern.o port_user.o
18harddog-objs := harddog_kern.o harddog_user.o 18harddog-objs := harddog_kern.o harddog_user.o
19 19
20LDFLAGS_pcap.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libpcap.a) 20LDFLAGS_pcap.o := -r $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a)
21 21
22LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a) 22LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a)
23 23
diff --git a/arch/um/sys-ppc/Makefile b/arch/um/sys-ppc/Makefile
index af200268fddb..a9814a7ae60e 100644
--- a/arch/um/sys-ppc/Makefile
+++ b/arch/um/sys-ppc/Makefile
@@ -1,7 +1,7 @@
1OBJ = built-in.o 1OBJ = built-in.o
2 2
3.S.o: 3.S.o:
4 $(CC) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 4 $(CC) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
5 5
6OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \ 6OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \
7 ptrace_user.o sysrq.o 7 ptrace_user.o sysrq.o
@@ -57,13 +57,13 @@ ppc_defs.h: mk_defs.c ppc_defs.head \
57checksum.o: checksum.S 57checksum.o: checksum.S
58 rm -f asm 58 rm -f asm
59 ln -s $(TOPDIR)/include/asm-ppc asm 59 ln -s $(TOPDIR)/include/asm-ppc asm
60 $(CC) $(EXTRA_AFLAGS) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 60 $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
61 rm -f asm 61 rm -f asm
62 62
63misc.o: misc.S ppc_defs.h 63misc.o: misc.S ppc_defs.h
64 rm -f asm 64 rm -f asm
65 ln -s $(TOPDIR)/include/asm-ppc asm 65 ln -s $(TOPDIR)/include/asm-ppc asm
66 $(CC) $(EXTRA_AFLAGS) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 66 $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
67 rm -f asm 67 rm -f asm
68 68
69clean-files := $(OBJS) ppc_defs.h checksum.S semaphore.c mk_defs.c 69clean-files := $(OBJS) ppc_defs.h checksum.S semaphore.c mk_defs.c
diff --git a/arch/v850/Makefile b/arch/v850/Makefile
index 8be9aacb20a7..8b629df0029a 100644
--- a/arch/v850/Makefile
+++ b/arch/v850/Makefile
@@ -16,11 +16,11 @@
16 16
17arch_dir = arch/v850 17arch_dir = arch/v850
18 18
19CFLAGS += -mv850e 19KBUILD_CFLAGS += -mv850e
20# r16 is a fixed pointer to the current task 20# r16 is a fixed pointer to the current task
21CFLAGS += -ffixed-r16 -mno-prolog-function 21KBUILD_CFLAGS += -ffixed-r16 -mno-prolog-function
22CFLAGS += -fno-builtin 22KBUILD_CFLAGS += -fno-builtin
23CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\" 23KBUILD_CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\"
24 24
25# By default, build a kernel that runs on the gdb v850 simulator. 25# By default, build a kernel that runs on the gdb v850 simulator.
26KBUILD_DEFCONFIG := sim_defconfig 26KBUILD_DEFCONFIG := sim_defconfig
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index cb1035f2b7e9..d6ed8e5e1ccc 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -50,7 +50,7 @@ HOSTCFLAGS_build.o := $(LINUXINCLUDE)
50# that way we can complain to the user if the CPU is insufficient. 50# that way we can complain to the user if the CPU is insufficient.
51cflags-i386 := 51cflags-i386 :=
52cflags-x86_64 := -m32 52cflags-x86_64 := -m32
53CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ 53KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
54 $(cflags-$(ARCH)) \ 54 $(cflags-$(ARCH)) \
55 -Wall -Wstrict-prototypes \ 55 -Wall -Wstrict-prototypes \
56 -march=i386 -mregparm=3 \ 56 -march=i386 -mregparm=3 \
@@ -61,7 +61,7 @@ CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
61 $(call cc-option, -fno-unit-at-a-time)) \ 61 $(call cc-option, -fno-unit-at-a-time)) \
62 $(call cc-option, -fno-stack-protector) \ 62 $(call cc-option, -fno-stack-protector) \
63 $(call cc-option, -mpreferred-stack-boundary=2) 63 $(call cc-option, -mpreferred-stack-boundary=2)
64AFLAGS := $(CFLAGS) -D__ASSEMBLY__ 64KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
65 65
66$(obj)/zImage: IMAGE_OFFSET := 0x1000 66$(obj)/zImage: IMAGE_OFFSET := 0x1000
67$(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) 67$(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK)
diff --git a/arch/x86/boot/compressed/Makefile_32 b/arch/x86/boot/compressed/Makefile_32
index 22613c652d22..e43ff7c56e6e 100644
--- a/arch/x86/boot/compressed/Makefile_32
+++ b/arch/x86/boot/compressed/Makefile_32
@@ -11,7 +11,7 @@ EXTRA_AFLAGS := -traditional
11LDFLAGS_vmlinux := -T 11LDFLAGS_vmlinux := -T
12hostprogs-y := relocs 12hostprogs-y := relocs
13 13
14CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ 14KBUILD_CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \
15 -fno-strict-aliasing -fPIC \ 15 -fno-strict-aliasing -fPIC \
16 $(call cc-option,-ffreestanding) \ 16 $(call cc-option,-ffreestanding) \
17 $(call cc-option,-fno-stack-protector) 17 $(call cc-option,-fno-stack-protector)
diff --git a/arch/x86/boot/compressed/Makefile_64 b/arch/x86/boot/compressed/Makefile_64
index dc6b3380cc45..7801e8dd90b2 100644
--- a/arch/x86/boot/compressed/Makefile_64
+++ b/arch/x86/boot/compressed/Makefile_64
@@ -6,11 +6,11 @@
6 6
7targets := vmlinux vmlinux.bin vmlinux.bin.gz head_64.o misc_64.o piggy.o 7targets := vmlinux vmlinux.bin vmlinux.bin.gz head_64.o misc_64.o piggy.o
8 8
9CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \ 9KBUILD_CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \
10 -fno-strict-aliasing -fPIC -mcmodel=small \ 10 -fno-strict-aliasing -fPIC -mcmodel=small \
11 $(call cc-option, -ffreestanding) \ 11 $(call cc-option, -ffreestanding) \
12 $(call cc-option, -fno-stack-protector) 12 $(call cc-option, -fno-stack-protector)
13AFLAGS := $(CFLAGS) -D__ASSEMBLY__ 13KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
14LDFLAGS := -m elf_x86_64 14LDFLAGS := -m elf_x86_64
15 15
16LDFLAGS_vmlinux := -T 16LDFLAGS_vmlinux := -T
diff --git a/arch/x86/math-emu/Makefile b/arch/x86/math-emu/Makefile
index 9c943fa6ce6b..9b0c63b60302 100644
--- a/arch/x86/math-emu/Makefile
+++ b/arch/x86/math-emu/Makefile
@@ -5,8 +5,7 @@
5#DEBUG = -DDEBUGGING 5#DEBUG = -DDEBUGGING
6DEBUG = 6DEBUG =
7PARANOID = -DPARANOID 7PARANOID = -DPARANOID
8CFLAGS := $(CFLAGS) $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION) 8EXTRA_CFLAGS := $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)
9
10EXTRA_AFLAGS := $(PARANOID) 9EXTRA_AFLAGS := $(PARANOID)
11 10
12# From 'C' language sources: 11# From 'C' language sources:
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index 8d03de029d9b..dcd6bb9e0bb3 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -34,8 +34,8 @@ $(obj)/vdso.so: $(src)/vdso.lds $(vobjs) FORCE
34 34
35CFL := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64 35CFL := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64
36 36
37$(obj)/vclock_gettime.o: CFLAGS = $(CFL) 37$(obj)/vclock_gettime.o: KBUILD_CFLAGS = $(CFL)
38$(obj)/vgetcpu.o: CFLAGS = $(CFL) 38$(obj)/vgetcpu.o: KBUILD_CFLAGS = $(CFL)
39 39
40# We also create a special relocatable object that should mirror the symbol 40# We also create a special relocatable object that should mirror the symbol
41# table and layout of the linked DSO. With ld -R we can then refer to 41# 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 8bffb94c71b5..9daa32d1d2a1 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -61,18 +61,18 @@ cflags-y += -maccumulate-outgoing-args
61 61
62# do binutils support CFI? 62# do binutils support CFI?
63cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 63cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
64AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 64KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
65 65
66# is .cfi_signal_frame supported too? 66# is .cfi_signal_frame supported too?
67cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 67cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
68AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 68KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
69 69
70cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector ) 70cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector )
71cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all ) 71cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all )
72 72
73CFLAGS += $(cflags-y) 73KBUILD_CFLAGS += $(cflags-y)
74CFLAGS_KERNEL += $(cflags-kernel-y) 74CFLAGS_KERNEL += $(cflags-kernel-y)
75AFLAGS += -m64 75KBUILD_AFLAGS += -m64
76 76
77head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o 77head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o
78 78
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index acf05be24929..56685a883347 100644
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -28,11 +28,9 @@ PLATFORM = $(platform-y)
28export PLATFORM 28export PLATFORM
29 29
30# temporarily until string.h is fixed 30# temporarily until string.h is fixed
31cflags-y += -ffreestanding 31KBUILD_CFLAGS += -ffreestanding
32 32
33cflags-y += -pipe -mlongcalls 33KBUILD_CFLAGS += -pipe -mlongcalls
34
35CFLAGS += $(cflags-y)
36 34
37KBUILD_DEFCONFIG := iss_defconfig 35KBUILD_DEFCONFIG := iss_defconfig
38 36
@@ -56,7 +54,7 @@ endif
56 54
57# 55#
58 56
59LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 57LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
60 58
61head-y := arch/xtensa/kernel/head.o 59head-y := arch/xtensa/kernel/head.o
62core-y += arch/xtensa/kernel/ arch/xtensa/mm/ 60core-y += arch/xtensa/kernel/ arch/xtensa/mm/
diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile
index 820b31d10ae4..9c5185f605b6 100644
--- a/arch/xtensa/boot/Makefile
+++ b/arch/xtensa/boot/Makefile
@@ -8,13 +8,12 @@
8# 8#
9 9
10 10
11CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include 11EXTRA_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
12HOSTFLAGS += -Iarch/$(ARCH)/boot/include 12HOSTFLAGS += -Iarch/$(ARCH)/boot/include
13 13
14BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") 14BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
15 15
16export CFLAGS 16export EXTRA_CFLAGS
17export AFLAGS
18export BIG_ENDIAN 17export BIG_ENDIAN
19 18
20subdir-y := lib 19subdir-y := lib
diff --git a/arch/xtensa/boot/boot-redboot/Makefile b/arch/xtensa/boot/boot-redboot/Makefile
index f53262c2e1f3..74d15d08077b 100644
--- a/arch/xtensa/boot/boot-redboot/Makefile
+++ b/arch/xtensa/boot/boot-redboot/Makefile
@@ -19,7 +19,7 @@ boot-y := bootstrap.o
19OBJS := $(addprefix $(obj)/,$(boot-y)) 19OBJS := $(addprefix $(obj)/,$(boot-y))
20LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a 20LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
21 21
22LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 22LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
23 23
24zImage: vmlinux $(OBJS) $(LIBS) 24zImage: vmlinux $(OBJS) $(LIBS)
25 $(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ 25 $(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \