diff options
Diffstat (limited to 'arch')
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. |
36 | CFLAGS += $(cflags-y) -Wa,-mev6 | 36 | KBUILD_CFLAGS += $(cflags-y) -Wa,-mev6 |
37 | 37 | ||
38 | head-y := arch/alpha/kernel/head.o | 38 | head-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 | ||
5 | extra-y := head.o vmlinux.lds | 5 | extra-y := head.o vmlinux.lds |
6 | EXTRA_AFLAGS := $(CFLAGS) | 6 | EXTRA_AFLAGS := $(KBUILD_CFLAGS) |
7 | EXTRA_CFLAGS := -Werror -Wno-sign-compare | 7 | EXTRA_CFLAGS := -Werror -Wno-sign-compare |
8 | 8 | ||
9 | obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ | 9 | 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 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 | ||
5 | EXTRA_AFLAGS := $(CFLAGS) | 5 | EXTRA_AFLAGS := $(KBUILD_CFLAGS) |
6 | EXTRA_CFLAGS := -Werror | 6 | EXTRA_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 | |||
14 | CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) | 14 | CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) |
15 | OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S | 15 | OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S |
16 | GZFLAGS :=-9 | 16 | GZFLAGS :=-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: |
19 | CFLAGS +=$(call cc-option,-marm,) | 19 | KBUILD_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 | |||
28 | endif | 28 | endif |
29 | 29 | ||
30 | ifeq ($(CONFIG_FRAME_POINTER),y) | 30 | ifeq ($(CONFIG_FRAME_POINTER),y) |
31 | CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog | 31 | KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog |
32 | endif | 32 | endif |
33 | 33 | ||
34 | ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) | 34 | ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) |
35 | CPPFLAGS += -mbig-endian | 35 | KBUILD_CPPFLAGS += -mbig-endian |
36 | AS += -EB | 36 | AS += -EB |
37 | LD += -EB | 37 | LD += -EB |
38 | else | 38 | else |
39 | CPPFLAGS += -mlittle-endian | 39 | KBUILD_CPPFLAGS += -mlittle-endian |
40 | AS += -EL | 40 | AS += -EL |
41 | LD += -EL | 41 | LD += -EL |
42 | endif | 42 | endif |
@@ -85,8 +85,8 @@ CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-th | |||
85 | endif | 85 | endif |
86 | 86 | ||
87 | # Need -Uarm for gcc < 3.x | 87 | # Need -Uarm for gcc < 3.x |
88 | CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm | 88 | KBUILD_CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm |
89 | AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float | 89 | KBUILD_AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float |
90 | 90 | ||
91 | CHECKFLAGS += -D__arm__ | 91 | CHECKFLAGS += -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),) | |||
87 | LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) | 87 | LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) |
88 | endif | 88 | endif |
89 | LDFLAGS_vmlinux += -p --no-undefined -X \ | 89 | LDFLAGS_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 | ||
10 | AFLAGS :=$(AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) | 10 | KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) |
11 | LDFLAGS +=--no-warn-mismatch | 11 | LDFLAGS +=--no-warn-mismatch |
12 | 12 | ||
13 | obj-y += vfp.o | 13 | obj-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 | ||
12 | KBUILD_DEFCONFIG := atstk1002_defconfig | 12 | KBUILD_DEFCONFIG := atstk1002_defconfig |
13 | 13 | ||
14 | CFLAGS += -pipe -fno-builtin -mno-pic | 14 | KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic |
15 | AFLAGS += -mrelax -mno-pic | 15 | KBUILD_AFLAGS += -mrelax -mno-pic |
16 | CFLAGS_MODULE += -mno-relax | 16 | CFLAGS_MODULE += -mno-relax |
17 | LDFLAGS_vmlinux += --relax | 17 | LDFLAGS_vmlinux += --relax |
18 | 18 | ||
19 | cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000 | 19 | cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000 |
20 | 20 | ||
21 | CFLAGS += $(cpuflags-y) | 21 | KBUILD_CFLAGS += $(cpuflags-y) |
22 | AFLAGS += $(cpuflags-y) | 22 | KBUILD_AFLAGS += $(cpuflags-y) |
23 | 23 | ||
24 | CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN | 24 | CHECKFLAGS += -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 | |||
758 | choice | 758 | choice |
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 |
762 | config DMA_UNCACHED_2M | 762 | config DMA_UNCACHED_2M |
763 | bool "Enable 2M DMA region" | 763 | bool "Enable 2M DMA region" |
764 | config DMA_UNCACHED_1M | 764 | config 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 | |||
53 | rev-$(CONFIG_BF_REV_NONE) := none | 53 | rev-$(CONFIG_BF_REV_NONE) := none |
54 | rev-$(CONFIG_BF_REV_ANY) := any | 54 | rev-$(CONFIG_BF_REV_ANY) := any |
55 | 55 | ||
56 | CFLAGS += -mcpu=$(cpu-y)-$(rev-y) | 56 | KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y) |
57 | AFLAGS += -mcpu=$(cpu-y)-$(rev-y) | 57 | KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y) |
58 | 58 | ||
59 | head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o | 59 | head-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 | |||
29 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S | 29 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
30 | 30 | ||
31 | CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) | 31 | CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) |
32 | AFLAGS += -mlinux | 32 | KBUILD_AFLAGS += -mlinux |
33 | 33 | ||
34 | CFLAGS := $(CFLAGS) -mlinux -march=$(arch-y) -pipe | 34 | KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe |
35 | 35 | ||
36 | ifdef CONFIG_FRAME_POINTER | 36 | ifdef CONFIG_FRAME_POINTER |
37 | CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g | 37 | KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g |
38 | CFLAGS += -fno-omit-frame-pointer | 38 | KBUILD_CFLAGS += -fno-omit-frame-pointer |
39 | endif | 39 | endif |
40 | 40 | ||
41 | head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o | 41 | head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o |
42 | 42 | ||
43 | LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a) | 43 | LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a) |
44 | 44 | ||
45 | core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ | 45 | core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ |
46 | core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/ | 46 | core-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 | |||
39 | ARCHMODFLAGS += -G0 -mlong-calls | 39 | ARCHMODFLAGS += -G0 -mlong-calls |
40 | 40 | ||
41 | ifdef CONFIG_GPREL_DATA_8 | 41 | ifdef CONFIG_GPREL_DATA_8 |
42 | CFLAGS += -G8 | 42 | KBUILD_CFLAGS += -G8 |
43 | else | 43 | else |
44 | ifdef CONFIG_GPREL_DATA_4 | 44 | ifdef CONFIG_GPREL_DATA_4 |
45 | CFLAGS += -G4 | 45 | KBUILD_CFLAGS += -G4 |
46 | else | 46 | else |
47 | ifdef CONFIG_GPREL_DATA_NONE | 47 | ifdef CONFIG_GPREL_DATA_NONE |
48 | CFLAGS += -G0 | 48 | KBUILD_CFLAGS += -G0 |
49 | endif | 49 | endif |
50 | endif | 50 | endif |
51 | endif | 51 | endif |
@@ -53,26 +53,26 @@ endif | |||
53 | #LDFLAGS_vmlinux := -Map linkmap.txt | 53 | #LDFLAGS_vmlinux := -Map linkmap.txt |
54 | 54 | ||
55 | ifdef CONFIG_GC_SECTIONS | 55 | ifdef CONFIG_GC_SECTIONS |
56 | CFLAGS += -ffunction-sections -fdata-sections | 56 | KBUILD_CFLAGS += -ffunction-sections -fdata-sections |
57 | LINKFLAGS += --gc-sections | 57 | LINKFLAGS += --gc-sections |
58 | endif | 58 | endif |
59 | 59 | ||
60 | ifndef CONFIG_FRAME_POINTER | 60 | ifndef CONFIG_FRAME_POINTER |
61 | CFLAGS += -mno-linked-fp | 61 | KBUILD_CFLAGS += -mno-linked-fp |
62 | endif | 62 | endif |
63 | 63 | ||
64 | ifdef CONFIG_CPU_FR451_COMPILE | 64 | ifdef CONFIG_CPU_FR451_COMPILE |
65 | CFLAGS += -mcpu=fr450 | 65 | KBUILD_CFLAGS += -mcpu=fr450 |
66 | AFLAGS += -mcpu=fr450 | 66 | KBUILD_AFLAGS += -mcpu=fr450 |
67 | ASFLAGS += -mcpu=fr450 | 67 | ASFLAGS += -mcpu=fr450 |
68 | else | 68 | else |
69 | ifdef CONFIG_CPU_FR551_COMPILE | 69 | ifdef CONFIG_CPU_FR551_COMPILE |
70 | CFLAGS += -mcpu=fr550 | 70 | KBUILD_CFLAGS += -mcpu=fr550 |
71 | AFLAGS += -mcpu=fr550 | 71 | KBUILD_AFLAGS += -mcpu=fr550 |
72 | ASFLAGS += -mcpu=fr550 | 72 | ASFLAGS += -mcpu=fr550 |
73 | else | 73 | else |
74 | CFLAGS += -mcpu=fr400 | 74 | KBUILD_CFLAGS += -mcpu=fr400 |
75 | AFLAGS += -mcpu=fr400 | 75 | KBUILD_AFLAGS += -mcpu=fr400 |
76 | ASFLAGS += -mcpu=fr400 | 76 | ASFLAGS += -mcpu=fr400 |
77 | endif | 77 | endif |
78 | endif | 78 | endif |
@@ -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 |
83 | CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media | 83 | KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media |
84 | CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 | 84 | KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 |
85 | AFLAGS += -mno-fdpic | 85 | KBUILD_AFLAGS += -mno-fdpic |
86 | ASFLAGS += -mno-fdpic | 86 | ASFLAGS += -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 |
90 | ifdef CONFIG_DEBUG_INFO | 90 | ifdef CONFIG_DEBUG_INFO |
91 | #CFLAGS += -O1 | 91 | #KBUILD_CFLAGS += -O1 |
92 | AFLAGS += -Wa,--gdwarf2 | 92 | KBUILD_AFLAGS += -Wa,--gdwarf2 |
93 | ASFLAGS += -Wa,--gdwarf2 | 93 | ASFLAGS += -Wa,--gdwarf2 |
94 | endif | 94 | endif |
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 | |||
30 | cflags-$(CONFIG_CPU_H8S) := -ms | 30 | cflags-$(CONFIG_CPU_H8S) := -ms |
31 | ldflags-$(CONFIG_CPU_H8S) := -mh8300self | 31 | ldflags-$(CONFIG_CPU_H8S) := -mh8300self |
32 | 32 | ||
33 | CFLAGS += $(cflags-y) | 33 | KBUILD_CFLAGS += $(cflags-y) |
34 | CFLAGS += -mint32 -fno-builtin | 34 | KBUILD_CFLAGS += -mint32 -fno-builtin |
35 | CFLAGS += -g | 35 | KBUILD_CFLAGS += -g |
36 | CFLAGS += -D__linux__ | 36 | KBUILD_CFLAGS += -D__linux__ |
37 | CFLAGS += -DUTS_SYSNAME=\"uClinux\" | 37 | KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" |
38 | AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) | 38 | KBUILD_AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) |
39 | LDFLAGS += $(ldflags-y) | 39 | LDFLAGS += $(ldflags-y) |
40 | 40 | ||
41 | CROSS_COMPILE = h8300-elf- | 41 | CROSS_COMPILE = h8300-elf- |
42 | LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name) | 42 | LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
43 | 43 | ||
44 | head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o | 44 | head-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 | |||
8 | lib-y = ashrdi3.o checksum.o memcpy.o memset.o abs.o romfs.o | 5 | lib-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 | |||
34 | endif | 34 | endif |
35 | CHECKFLAGS += -D__i386__ | 35 | CHECKFLAGS += -D__i386__ |
36 | 36 | ||
37 | CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return | 37 | KBUILD_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 |
40 | CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) | 40 | KBUILD_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. |
43 | include $(srctree)/arch/i386/Makefile.cpu | 43 | include $(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: |
54 | CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) | 54 | KBUILD_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? |
57 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) | 57 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) |
58 | AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) | 58 | KBUILD_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? |
61 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) | 61 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) |
62 | AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) | 62 | KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) |
63 | 63 | ||
64 | CFLAGS += $(cflags-y) | 64 | KBUILD_CFLAGS += $(cflags-y) |
65 | 65 | ||
66 | # Default subarch .c files | 66 | # Default subarch .c files |
67 | mcore-y := arch/x86/mach-default | 67 | mcore-y := arch/x86/mach-default |
@@ -116,8 +116,8 @@ drivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/ | |||
116 | drivers-$(CONFIG_PM) += arch/x86/power/ | 116 | drivers-$(CONFIG_PM) += arch/x86/power/ |
117 | drivers-$(CONFIG_FB) += arch/x86/video/ | 117 | drivers-$(CONFIG_FB) += arch/x86/video/ |
118 | 118 | ||
119 | CFLAGS += $(mflags-y) | 119 | KBUILD_CFLAGS += $(mflags-y) |
120 | AFLAGS += $(mflags-y) | 120 | KBUILD_AFLAGS += $(mflags-y) |
121 | 121 | ||
122 | boot := arch/x86/boot | 122 | boot := 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 \ | |||
29 | CFLAGS_KERNEL := -mconstant-gp | 29 | CFLAGS_KERNEL := -mconstant-gp |
30 | 30 | ||
31 | GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)") | 31 | GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)") |
32 | CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") | 32 | KBUILD_CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") |
33 | 33 | ||
34 | ifeq ($(GAS_STATUS),buggy) | 34 | ifeq ($(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 |
45 | endif | 45 | endif |
46 | 46 | ||
47 | CFLAGS += $(cflags-y) | 47 | KBUILD_CFLAGS += $(cflags-y) |
48 | head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o | 48 | head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o |
49 | 49 | ||
50 | libs-y += arch/ia64/lib/ | 50 | libs-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 | ||
10 | CPPFLAGS += -I$(srctree)/arch/ia64/sn/include | 10 | EXTRA_CFLAGS += -Iarch/ia64/sn/include |
11 | 11 | ||
12 | obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ | 12 | obj-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 | ||
12 | CPPFLAGS += -I$(srctree)/arch/ia64/sn/include | 12 | EXTRA_CFLAGS += -Iarch/ia64/sn/include |
13 | 13 | ||
14 | obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ | 14 | obj-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 | ||
10 | CPPFLAGS += -I$(srctree)/arch/ia64/sn/include | 10 | EXTRA_CFLAGS += -Iarch/ia64/sn/include |
11 | 11 | ||
12 | obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/ | 12 | 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 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 | ||
10 | CPPFLAGS += -I$(srctree)/arch/ia64/sn/include | 10 | EXTRA_CFLAGS += -Iarch/ia64/sn/include |
11 | 11 | ||
12 | obj-y += pcibr_dma.o pcibr_reg.o \ | 12 | obj-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 := | |||
9 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S | 9 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
10 | LDFLAGS_vmlinux := | 10 | LDFLAGS_vmlinux := |
11 | 11 | ||
12 | CFLAGS += -pipe -fno-schedule-insns | 12 | KBUILD_CFLAGS += -pipe -fno-schedule-insns |
13 | CFLAGS_KERNEL += -mmodel=medium | 13 | CFLAGS_KERNEL += -mmodel=medium |
14 | CFLAGS_MODULE += -mmodel=large | 14 | CFLAGS_MODULE += -mmodel=large |
15 | 15 | ||
@@ -24,14 +24,14 @@ endif | |||
24 | cflags-$(CONFIG_ISA_M32R) += -DNO_FPU | 24 | cflags-$(CONFIG_ISA_M32R) += -DNO_FPU |
25 | aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst | 25 | aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst |
26 | 26 | ||
27 | CFLAGS += $(cflags-y) | 27 | KBUILD_CFLAGS += $(cflags-y) |
28 | AFLAGS += $(aflags-y) | 28 | KBUILD_AFLAGS += $(aflags-y) |
29 | 29 | ||
30 | CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 | 30 | CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 |
31 | 31 | ||
32 | head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o | 32 | head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o |
33 | 33 | ||
34 | LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | 34 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
35 | 35 | ||
36 | libs-y += arch/m32r/lib/ $(LIBGCC) | 36 | libs-y += arch/m32r/lib/ $(LIBGCC) |
37 | core-y += arch/m32r/kernel/ \ | 37 | core-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 | |||
32 | CHECKFLAGS += -D__mc68000__ | 32 | CHECKFLAGS += -D__mc68000__ |
33 | 33 | ||
34 | # without -fno-strength-reduce the 53c7xx.c driver fails ;-( | 34 | # without -fno-strength-reduce the 53c7xx.c driver fails ;-( |
35 | CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 | 35 | KBUILD_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 |
38 | ifndef CONFIG_M68020 | 38 | ifndef CONFIG_M68020 |
39 | ifndef CONFIG_M68030 | 39 | ifndef CONFIG_M68030 |
40 | 40 | ||
41 | ifndef CONFIG_M68060 | 41 | ifndef CONFIG_M68060 |
42 | CFLAGS := $(CFLAGS) -m68040 | 42 | KBUILD_CFLAGS += -m68040 |
43 | endif | 43 | endif |
44 | 44 | ||
45 | ifndef CONFIG_M68040 | 45 | ifndef CONFIG_M68040 |
46 | CFLAGS := $(CFLAGS) -m68060 | 46 | KBUILD_CFLAGS += -m68060 |
47 | endif | 47 | endif |
48 | 48 | ||
49 | endif | 49 | endif |
@@ -52,7 +52,7 @@ endif | |||
52 | ifdef CONFIG_KGDB | 52 | ifdef 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 |
55 | CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g | 55 | KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g |
56 | endif | 56 | endif |
57 | 57 | ||
58 | ifndef CONFIG_SUN3 | 58 | ifndef 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 | |||
102 | cflags-$(CONFIG_M68VZ328) := -m68000 | 102 | cflags-$(CONFIG_M68VZ328) := -m68000 |
103 | cflags-$(CONFIG_M68360) := -m68332 | 103 | cflags-$(CONFIG_M68360) := -m68332 |
104 | 104 | ||
105 | AFLAGS += $(cflags-y) | 105 | KBUILD_AFLAGS += $(cflags-y) |
106 | 106 | ||
107 | CFLAGS += $(cflags-y) | 107 | KBUILD_CFLAGS += $(cflags-y) |
108 | CFLAGS += -D__linux__ | 108 | KBUILD_CFLAGS += -D__linux__ |
109 | CFLAGS += -DUTS_SYSNAME=\"uClinux\" | 109 | KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" |
110 | 110 | ||
111 | head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o | 111 | head-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 | ||
15 | ifdef CONFIG_FULLDEBUG | 15 | ifdef CONFIG_FULLDEBUG |
16 | AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 | 16 | EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | obj-y := config.o | 19 | obj-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 | ||
15 | ifdef CONFIG_FULLDEBUG | 15 | ifdef CONFIG_FULLDEBUG |
16 | AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 | 16 | EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | obj-y := config.o | 19 | obj-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 | ||
15 | ifdef CONFIG_FULLDEBUG | 15 | ifdef CONFIG_FULLDEBUG |
16 | AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 | 16 | EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | obj-y := config.o | 19 | obj-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 | ||
15 | ifdef CONFIG_FULLDEBUG | 15 | ifdef CONFIG_FULLDEBUG |
16 | AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 | 16 | EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | obj-y := config.o | 19 | obj-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 | ||
15 | ifdef CONFIG_FULLDEBUG | 15 | ifdef CONFIG_FULLDEBUG |
16 | AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 | 16 | EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | obj-y := config.o | 19 | obj-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 | ||
15 | ifdef CONFIG_FULLDEBUG | 15 | ifdef CONFIG_FULLDEBUG |
16 | AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 | 16 | EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | obj-y := config.o | 19 | obj-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 | ||
15 | ifdef CONFIG_FULLDEBUG | 15 | ifdef CONFIG_FULLDEBUG |
16 | AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 | 16 | EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | obj-y := config.o | 19 | obj-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 | ||
15 | ifdef CONFIG_FULLDEBUG | 15 | ifdef CONFIG_FULLDEBUG |
16 | AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 | 16 | EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | obj-y := config.o | 19 | obj-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 | ||
15 | ifdef CONFIG_FULLDEBUG | 15 | ifdef CONFIG_FULLDEBUG |
16 | AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 | 16 | EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | obj-$(CONFIG_COLDFIRE) += entry.o vectors.o | 19 | obj-$(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 | ||
15 | ifdef CONFIG_FULLDEBUG | 15 | ifdef CONFIG_FULLDEBUG |
16 | AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 | 16 | EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 |
17 | endif | 17 | endif |
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 | ||
15 | ifdef CONFIG_FULLDEBUG | 15 | ifdef CONFIG_FULLDEBUG |
16 | AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 | 16 | EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | obj-y := config.o | 19 | obj-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 |
609 | endif | 609 | endif |
610 | 610 | ||
611 | AFLAGS += $(cflags-y) | 611 | KBUILD_AFLAGS += $(cflags-y) |
612 | CFLAGS += $(cflags-y) \ | 612 | KBUILD_CFLAGS += $(cflags-y) \ |
613 | -D"VMLINUX_LOAD_ADDRESS=$(load-y)" | 613 | -D"VMLINUX_LOAD_ADDRESS=$(load-y)" |
614 | 614 | ||
615 | LDFLAGS += -m $(ld-emul) | 615 | LDFLAGS += -m $(ld-emul) |
616 | 616 | ||
617 | ifdef CONFIG_MIPS | 617 | ifdef CONFIG_MIPS |
618 | CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \ | 618 | CHECKFLAGS += $(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/$$/'/") |
621 | ifdef CONFIG_64BIT | 621 | ifdef CONFIG_64BIT |
@@ -632,7 +632,7 @@ OBJCOPYFLAGS += --remove-section=.reginfo | |||
632 | # | 632 | # |
633 | 633 | ||
634 | CPPFLAGS_vmlinux.lds := \ | 634 | CPPFLAGS_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 | |||
71 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o | 71 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o |
72 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 72 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
73 | 73 | ||
74 | 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) | 74 | 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) |
75 | 75 | ||
76 | obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o | 76 | obj-$(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 | ||
64 | head-y := arch/parisc/kernel/head.o | 64 | head-y := arch/parisc/kernel/head.o |
65 | 65 | ||
66 | CFLAGS += $(cflags-y) | 66 | KBUILD_CFLAGS += $(cflags-y) |
67 | 67 | ||
68 | kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o | 68 | kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o |
69 | kernel-$(CONFIG_HPUX) += hpux/ | 69 | kernel-$(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 |
6 | CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \ | 6 | EXTRA_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 | ||
145 | config BOOTX_TEXT | 145 | config 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 | ||
235 | config PPC_EARLY_DEBUG_44x_PHYSLOW | 235 | config 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 | ||
240 | config PPC_EARLY_DEBUG_44x_PHYSHIGH | 240 | config 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 | ||
245 | config PPC_EARLY_DEBUG_CPM_ADDR | 245 | config 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) | |||
75 | AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) | 75 | AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) |
76 | CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc | 76 | CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc |
77 | CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple | 77 | CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple |
78 | CPPFLAGS += $(CPPFLAGS-y) | 78 | KBUILD_CPPFLAGS += $(CPPFLAGS-y) |
79 | AFLAGS += $(AFLAGS-y) | 79 | KBUILD_AFLAGS += $(AFLAGS-y) |
80 | CFLAGS += -msoft-float -pipe $(CFLAGS-y) | 80 | KBUILD_CFLAGS += -msoft-float -pipe $(CFLAGS-y) |
81 | CPP = $(CC) -E $(CFLAGS) | 81 | CPP = $(CC) -E $(KBUILD_CFLAGS) |
82 | 82 | ||
83 | CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ | 83 | CHECKFLAGS += -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 | |||
88 | ifeq ($(CONFIG_POWER4_ONLY),y) | 88 | ifeq ($(CONFIG_POWER4_ONLY),y) |
89 | ifeq ($(CONFIG_ALTIVEC),y) | 89 | ifeq ($(CONFIG_ALTIVEC),y) |
90 | ifeq ($(GCC_BROKEN_VEC),y) | 90 | ifeq ($(GCC_BROKEN_VEC),y) |
91 | CFLAGS += $(call cc-option,-mcpu=970) | 91 | KBUILD_CFLAGS += $(call cc-option,-mcpu=970) |
92 | else | 92 | else |
93 | CFLAGS += $(call cc-option,-mcpu=power4) | 93 | KBUILD_CFLAGS += $(call cc-option,-mcpu=power4) |
94 | endif | 94 | endif |
95 | else | 95 | else |
96 | CFLAGS += $(call cc-option,-mcpu=power4) | 96 | KBUILD_CFLAGS += $(call cc-option,-mcpu=power4) |
97 | endif | 97 | endif |
98 | else | 98 | else |
99 | CFLAGS += $(call cc-option,-mtune=power4) | 99 | KBUILD_CFLAGS += $(call cc-option,-mtune=power4) |
100 | endif | 100 | endif |
101 | endif | 101 | endif |
102 | 102 | ||
103 | ifeq ($(CONFIG_TUNE_CELL),y) | 103 | ifeq ($(CONFIG_TUNE_CELL),y) |
104 | CFLAGS += $(call cc-option,-mtune=cell) | 104 | KBUILD_CFLAGS += $(call cc-option,-mtune=cell) |
105 | endif | 105 | endif |
106 | 106 | ||
107 | # No AltiVec instruction when building kernel | 107 | # No AltiVec instruction when building kernel |
108 | CFLAGS += $(call cc-option,-mno-altivec) | 108 | KBUILD_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. |
112 | CFLAGS += $(call cc-option,-funit-at-a-time) | 112 | KBUILD_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 |
116 | CFLAGS += -mno-string | 116 | KBUILD_CFLAGS += -mno-string |
117 | 117 | ||
118 | ifeq ($(CONFIG_6xx),y) | 118 | ifeq ($(CONFIG_6xx),y) |
119 | CFLAGS += -mcpu=powerpc | 119 | KBUILD_CFLAGS += -mcpu=powerpc |
120 | endif | 120 | endif |
121 | 121 | ||
122 | cpu-as-$(CONFIG_4xx) += -Wa,-m405 | 122 | cpu-as-$(CONFIG_4xx) += -Wa,-m405 |
@@ -125,8 +125,8 @@ cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec | |||
125 | cpu-as-$(CONFIG_E500) += -Wa,-me500 | 125 | cpu-as-$(CONFIG_E500) += -Wa,-me500 |
126 | cpu-as-$(CONFIG_E200) += -Wa,-me200 | 126 | cpu-as-$(CONFIG_E200) += -Wa,-me200 |
127 | 127 | ||
128 | AFLAGS += $(cpu-as-y) | 128 | KBUILD_AFLAGS += $(cpu-as-y) |
129 | CFLAGS += $(cpu-as-y) | 129 | KBUILD_CFLAGS += $(cpu-as-y) |
130 | 130 | ||
131 | head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o | 131 | head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o |
132 | head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o | 132 | head-$(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 | ||
118 | config PPC_PMI | 118 | config 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 | ||
23 | LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic | 23 | LDFLAGS_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 |
25 | CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include | 25 | KBUILD_CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include |
26 | AFLAGS += -Iarch/$(ARCH) | 26 | KBUILD_AFLAGS += -Iarch/$(ARCH) |
27 | CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ | 27 | KBUILD_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 |
31 | CFLAGS += $(call cc-option, -mno-altivec) | 31 | KBUILD_CFLAGS += $(call cc-option, -mno-altivec) |
32 | 32 | ||
33 | CPP = $(CC) -E $(CFLAGS) | 33 | CPP = $(CC) -E $(KBUILD_CFLAGS) |
34 | # Temporary hack until we have migrated to asm-powerpc | 34 | # Temporary hack until we have migrated to asm-powerpc |
35 | LINUXINCLUDE += -Iarch/$(ARCH)/include | 35 | LINUXINCLUDE += -Iarch/$(ARCH)/include |
36 | 36 | ||
37 | CHECKFLAGS += -D__powerpc__ | 37 | CHECKFLAGS += -D__powerpc__ |
38 | 38 | ||
39 | ifndef CONFIG_FSL_BOOKE | 39 | ifndef CONFIG_FSL_BOOKE |
40 | CFLAGS += -mstring | 40 | KBUILD_CFLAGS += -mstring |
41 | endif | 41 | endif |
42 | 42 | ||
43 | cpu-as-$(CONFIG_4xx) += -Wa,-m405 | 43 | cpu-as-$(CONFIG_4xx) += -Wa,-m405 |
@@ -45,8 +45,8 @@ cpu-as-$(CONFIG_6xx) += -Wa,-maltivec | |||
45 | cpu-as-$(CONFIG_E500) += -Wa,-me500 | 45 | cpu-as-$(CONFIG_E500) += -Wa,-me500 |
46 | cpu-as-$(CONFIG_E200) += -Wa,-me200 | 46 | cpu-as-$(CONFIG_E200) += -Wa,-me200 |
47 | 47 | ||
48 | AFLAGS += $(cpu-as-y) | 48 | KBUILD_AFLAGS += $(cpu-as-y) |
49 | CFLAGS += $(cpu-as-y) | 49 | KBUILD_CFLAGS += $(cpu-as-y) |
50 | 50 | ||
51 | # Default to the common case. | 51 | # Default to the common case. |
52 | KBUILD_DEFCONFIG := common_defconfig | 52 | KBUILD_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 | ||
16 | CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include | ||
17 | HOSTCFLAGS += -Iarch/$(ARCH)/boot/include | 16 | HOSTCFLAGS += -Iarch/$(ARCH)/boot/include |
18 | 17 | ||
19 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd | 18 | BOOT_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 | ||
16 | ifndef CONFIG_64BIT | 16 | ifndef CONFIG_64BIT |
17 | LDFLAGS := -m elf_s390 | 17 | LDFLAGS := -m elf_s390 |
18 | CFLAGS += -m31 | 18 | KBUILD_CFLAGS += -m31 |
19 | AFLAGS += -m31 | 19 | KBUILD_AFLAGS += -m31 |
20 | UTS_MACHINE := s390 | 20 | UTS_MACHINE := s390 |
21 | STACK_SIZE := 8192 | 21 | STACK_SIZE := 8192 |
22 | CHECKFLAGS += -D__s390__ -msize-long | 22 | CHECKFLAGS += -D__s390__ -msize-long |
23 | else | 23 | else |
24 | LDFLAGS := -m elf64_s390 | 24 | LDFLAGS := -m elf64_s390 |
25 | MODFLAGS += -fpic -D__PIC__ | 25 | MODFLAGS += -fpic -D__PIC__ |
26 | CFLAGS += -m64 | 26 | KBUILD_CFLAGS += -m64 |
27 | AFLAGS += -m64 | 27 | KBUILD_AFLAGS += -m64 |
28 | UTS_MACHINE := s390x | 28 | UTS_MACHINE := s390x |
29 | STACK_SIZE := 16384 | 29 | STACK_SIZE := 16384 |
30 | CHECKFLAGS += -D__s390__ -D__s390x__ | 30 | CHECKFLAGS += -D__s390__ -D__s390x__ |
@@ -77,9 +77,9 @@ cflags-$(CONFIG_WARN_STACK) += -mwarn-dynamicstack | |||
77 | cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE) | 77 | cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE) |
78 | endif | 78 | endif |
79 | 79 | ||
80 | CFLAGS += -mbackchain -msoft-float $(cflags-y) | 80 | KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y) |
81 | CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare | 81 | KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare |
82 | AFLAGS += $(aflags-y) | 82 | KBUILD_AFLAGS += $(aflags-y) |
83 | 83 | ||
84 | OBJCOPYFLAGS := -O binary | 84 | OBJCOPYFLAGS := -O binary |
85 | LDFLAGS_vmlinux := -e start | 85 | LDFLAGS_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' | |||
91 | LDFLAGS += -EB | 91 | LDFLAGS += -EB |
92 | endif | 92 | endif |
93 | 93 | ||
94 | CFLAGS += -pipe $(cflags-y) | 94 | KBUILD_CFLAGS += -pipe $(cflags-y) |
95 | AFLAGS += $(cflags-y) | 95 | KBUILD_AFLAGS += $(cflags-y) |
96 | 96 | ||
97 | head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o | 97 | head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o |
98 | 98 | ||
99 | LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | 99 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
100 | 100 | ||
101 | core-y += arch/sh/kernel/ arch/sh/mm/ | 101 | core-y += arch/sh/kernel/ arch/sh/mm/ |
102 | core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/ | 102 | core-$(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 | ||
24 | LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | 24 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
25 | 25 | ||
26 | LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds | 26 | LDFLAGS_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 | |||
26 | endif | 26 | endif |
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 |
29 | CFLAGS += $(cpu-y) | 29 | KBUILD_CFLAGS += $(cpu-y) |
30 | 30 | ||
31 | LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \ | 31 | LDFLAGS_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),) | |||
58 | core-y += arch/sh64/mach-$(machine-y)/ | 58 | core-y += arch/sh64/mach-$(machine-y)/ |
59 | endif | 59 | endif |
60 | 60 | ||
61 | LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | 61 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
62 | libs-y += arch/$(ARCH)/lib/ $(LIBGCC) | 62 | libs-y += arch/$(ARCH)/lib/ $(LIBGCC) |
63 | 63 | ||
64 | drivers-$(CONFIG_OPROFILE) += arch/sh64/oprofile/ | 64 | drivers-$(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 | ||
14 | AS := $(AS) -32 | 14 | AS := $(AS) -32 |
15 | LDFLAGS := -m elf32_sparc | 15 | LDFLAGS := -m elf32_sparc |
16 | CHECKFLAGS += -D__sparc__ | 16 | CHECKFLAGS += -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 |
19 | CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 | 19 | KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 |
20 | AFLAGS := $(AFLAGS) -m32 | 20 | KBUILD_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 | |||
39 | endif | 39 | endif |
40 | 40 | ||
41 | ifneq ($(NEW_GCC),y) | 41 | ifneq ($(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 |
44 | else | 44 | else |
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) |
49 | endif | 49 | endif |
50 | 50 | ||
51 | ifeq ($(CONFIG_MCOUNT),y) | 51 | ifeq ($(CONFIG_MCOUNT),y) |
52 | CFLAGS := $(CFLAGS) -pg | 52 | KBUILD_CFLAGS += -pg |
53 | endif | 53 | endif |
54 | 54 | ||
55 | head-y := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o | 55 | head-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 | ||
52 | CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ | 52 | KBUILD_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 | ||
57 | AFLAGS += $(ARCH_INCLUDE) | 57 | KBUILD_AFLAGS += $(ARCH_INCLUDE) |
58 | 58 | ||
59 | USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ | 59 | USER_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 | ||
63 | include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) | 63 | include $(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 | ||
74 | KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ | 74 | KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ |
75 | -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) | 75 | -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) |
76 | CFLAGS += $(KERNEL_DEFINES) | 76 | KBUILD_CFLAGS += $(KERNEL_DEFINES) |
77 | CFLAGS += $(call cc-option,-fno-unit-at-a-time,) | 77 | KBUILD_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 | ||
13 | ifeq ("$(origin SUBARCH)", "command line") | 13 | ifeq ("$(origin SUBARCH)", "command line") |
14 | ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") | 14 | ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") |
15 | CFLAGS += $(call cc-option,-m32) | 15 | KBUILD_CFLAGS += $(call cc-option,-m32) |
16 | AFLAGS += $(call cc-option,-m32) | 16 | KBUILD_AFLAGS += $(call cc-option,-m32) |
17 | LINK-y += $(call cc-option,-m32) | 17 | LINK-y += $(call cc-option,-m32) |
18 | UML_OBJCOPYFLAGS += -F $(ELF_FORMAT) | 18 | UML_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. |
39 | cflags-y += -ffreestanding | 39 | cflags-y += -ffreestanding |
40 | 40 | ||
41 | CFLAGS += $(cflags-y) | 41 | KBUILD_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 |
7 | USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE | 7 | USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE |
8 | CFLAGS += -D_LARGEFILE64_SOURCE | 8 | KBUILD_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! |
11 | ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__ | 11 | ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__ |
12 | CFLAGS += $(_extra_flags_) | 12 | KBUILD_CFLAGS += $(_extra_flags_) |
13 | 13 | ||
14 | CHECKFLAGS += -m64 | 14 | CHECKFLAGS += -m64 |
15 | AFLAGS += -m64 | 15 | KBUILD_AFLAGS += -m64 |
16 | LDFLAGS += -m elf_x86_64 | 16 | LDFLAGS += -m elf_x86_64 |
17 | CPPFLAGS += -m64 | 17 | KBUILD_CPPFLAGS += -m64 |
18 | 18 | ||
19 | ELF_ARCH := i386:x86-64 | 19 | ELF_ARCH := i386:x86-64 |
20 | ELF_FORMAT := elf64-x86-64 | 20 | ELF_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 | |||
17 | port-objs := port_kern.o port_user.o | 17 | port-objs := port_kern.o port_user.o |
18 | harddog-objs := harddog_kern.o harddog_user.o | 18 | harddog-objs := harddog_kern.o harddog_user.o |
19 | 19 | ||
20 | LDFLAGS_pcap.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libpcap.a) | 20 | LDFLAGS_pcap.o := -r $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a) |
21 | 21 | ||
22 | LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a) | 22 | LDFLAGS_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 @@ | |||
1 | OBJ = built-in.o | 1 | OBJ = 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 | ||
6 | OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \ | 6 | OBJS = 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 \ | |||
57 | checksum.o: checksum.S | 57 | checksum.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 | ||
63 | misc.o: misc.S ppc_defs.h | 63 | misc.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 | ||
69 | clean-files := $(OBJS) ppc_defs.h checksum.S semaphore.c mk_defs.c | 69 | clean-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 | ||
17 | arch_dir = arch/v850 | 17 | arch_dir = arch/v850 |
18 | 18 | ||
19 | CFLAGS += -mv850e | 19 | KBUILD_CFLAGS += -mv850e |
20 | # r16 is a fixed pointer to the current task | 20 | # r16 is a fixed pointer to the current task |
21 | CFLAGS += -ffixed-r16 -mno-prolog-function | 21 | KBUILD_CFLAGS += -ffixed-r16 -mno-prolog-function |
22 | CFLAGS += -fno-builtin | 22 | KBUILD_CFLAGS += -fno-builtin |
23 | CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\" | 23 | KBUILD_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. |
26 | KBUILD_DEFCONFIG := sim_defconfig | 26 | KBUILD_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. |
51 | cflags-i386 := | 51 | cflags-i386 := |
52 | cflags-x86_64 := -m32 | 52 | cflags-x86_64 := -m32 |
53 | CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ | 53 | KBUILD_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) |
64 | AFLAGS := $(CFLAGS) -D__ASSEMBLY__ | 64 | KBUILD_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 | |||
11 | LDFLAGS_vmlinux := -T | 11 | LDFLAGS_vmlinux := -T |
12 | hostprogs-y := relocs | 12 | hostprogs-y := relocs |
13 | 13 | ||
14 | CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ | 14 | KBUILD_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 | ||
7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz head_64.o misc_64.o piggy.o | 7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz head_64.o misc_64.o piggy.o |
8 | 8 | ||
9 | CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \ | 9 | KBUILD_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) |
13 | AFLAGS := $(CFLAGS) -D__ASSEMBLY__ | 13 | KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ |
14 | LDFLAGS := -m elf_x86_64 | 14 | LDFLAGS := -m elf_x86_64 |
15 | 15 | ||
16 | LDFLAGS_vmlinux := -T | 16 | LDFLAGS_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 |
6 | DEBUG = | 6 | DEBUG = |
7 | PARANOID = -DPARANOID | 7 | PARANOID = -DPARANOID |
8 | CFLAGS := $(CFLAGS) $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION) | 8 | EXTRA_CFLAGS := $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION) |
9 | |||
10 | EXTRA_AFLAGS := $(PARANOID) | 9 | EXTRA_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 | ||
35 | CFL := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64 | 35 | CFL := $(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? |
63 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) | 63 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) |
64 | AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) | 64 | KBUILD_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? |
67 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) | 67 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) |
68 | AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) | 68 | KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) |
69 | 69 | ||
70 | cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector ) | 70 | cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector ) |
71 | cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all ) | 71 | cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all ) |
72 | 72 | ||
73 | CFLAGS += $(cflags-y) | 73 | KBUILD_CFLAGS += $(cflags-y) |
74 | CFLAGS_KERNEL += $(cflags-kernel-y) | 74 | CFLAGS_KERNEL += $(cflags-kernel-y) |
75 | AFLAGS += -m64 | 75 | KBUILD_AFLAGS += -m64 |
76 | 76 | ||
77 | head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o | 77 | head-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) | |||
28 | export PLATFORM | 28 | export PLATFORM |
29 | 29 | ||
30 | # temporarily until string.h is fixed | 30 | # temporarily until string.h is fixed |
31 | cflags-y += -ffreestanding | 31 | KBUILD_CFLAGS += -ffreestanding |
32 | 32 | ||
33 | cflags-y += -pipe -mlongcalls | 33 | KBUILD_CFLAGS += -pipe -mlongcalls |
34 | |||
35 | CFLAGS += $(cflags-y) | ||
36 | 34 | ||
37 | KBUILD_DEFCONFIG := iss_defconfig | 35 | KBUILD_DEFCONFIG := iss_defconfig |
38 | 36 | ||
@@ -56,7 +54,7 @@ endif | |||
56 | 54 | ||
57 | # | 55 | # |
58 | 56 | ||
59 | LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | 57 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
60 | 58 | ||
61 | head-y := arch/xtensa/kernel/head.o | 59 | head-y := arch/xtensa/kernel/head.o |
62 | core-y += arch/xtensa/kernel/ arch/xtensa/mm/ | 60 | core-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 | ||
11 | CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include | 11 | EXTRA_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include |
12 | HOSTFLAGS += -Iarch/$(ARCH)/boot/include | 12 | HOSTFLAGS += -Iarch/$(ARCH)/boot/include |
13 | 13 | ||
14 | BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") | 14 | BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") |
15 | 15 | ||
16 | export CFLAGS | 16 | export EXTRA_CFLAGS |
17 | export AFLAGS | ||
18 | export BIG_ENDIAN | 17 | export BIG_ENDIAN |
19 | 18 | ||
20 | subdir-y := lib | 19 | subdir-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 | |||
19 | OBJS := $(addprefix $(obj)/,$(boot-y)) | 19 | OBJS := $(addprefix $(obj)/,$(boot-y)) |
20 | LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a | 20 | LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a |
21 | 21 | ||
22 | LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | 22 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
23 | 23 | ||
24 | zImage: vmlinux $(OBJS) $(LIBS) | 24 | zImage: 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 \ |