diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/avr32/Makefile | 2 | ||||
-rw-r--r-- | arch/blackfin/Makefile | 4 | ||||
-rw-r--r-- | arch/frv/Makefile | 22 | ||||
-rw-r--r-- | arch/ia64/Makefile | 6 | ||||
-rw-r--r-- | arch/m32r/Makefile | 4 | ||||
-rw-r--r-- | arch/m68k/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/Makefile | 6 | ||||
-rw-r--r-- | arch/powerpc/Makefile | 2 | ||||
-rw-r--r-- | arch/s390/Makefile | 3 | ||||
-rw-r--r-- | arch/score/Makefile | 3 |
10 files changed, 20 insertions, 34 deletions
diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile index ead8a75203a9..22fb66590dcd 100644 --- a/arch/avr32/Makefile +++ b/arch/avr32/Makefile | |||
@@ -13,7 +13,7 @@ KBUILD_DEFCONFIG := atstk1002_defconfig | |||
13 | 13 | ||
14 | KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic | 14 | KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic |
15 | KBUILD_AFLAGS += -mrelax -mno-pic | 15 | KBUILD_AFLAGS += -mrelax -mno-pic |
16 | CFLAGS_MODULE += -mno-relax | 16 | KBUILD_CFLAGS_MODULE += -mno-relax |
17 | LDFLAGS_vmlinux += --relax | 17 | LDFLAGS_vmlinux += --relax |
18 | 18 | ||
19 | cpuflags-$(CONFIG_PLATFORM_AT32AP) += -march=ap | 19 | cpuflags-$(CONFIG_PLATFORM_AT32AP) += -march=ap |
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile index 5a97a31d4bbd..9d5ffaf5492a 100644 --- a/arch/blackfin/Makefile +++ b/arch/blackfin/Makefile | |||
@@ -18,8 +18,8 @@ ifeq ($(CONFIG_ROMKERNEL),y) | |||
18 | KBUILD_CFLAGS += -mlong-calls | 18 | KBUILD_CFLAGS += -mlong-calls |
19 | endif | 19 | endif |
20 | KBUILD_AFLAGS += $(call cc-option,-mno-fdpic) | 20 | KBUILD_AFLAGS += $(call cc-option,-mno-fdpic) |
21 | CFLAGS_MODULE += -mlong-calls | 21 | KBUILD_CFLAGS_MODULE += -mlong-calls |
22 | LDFLAGS_MODULE += -m elf32bfin | 22 | KBUILD_LDFLAGS_MODULE += -m elf32bfin |
23 | KALLSYMS += --symbol-prefix=_ | 23 | KALLSYMS += --symbol-prefix=_ |
24 | 24 | ||
25 | KBUILD_DEFCONFIG := BF537-STAMP_defconfig | 25 | KBUILD_DEFCONFIG := BF537-STAMP_defconfig |
diff --git a/arch/frv/Makefile b/arch/frv/Makefile index 310c47a663f8..7ff84575b186 100644 --- a/arch/frv/Makefile +++ b/arch/frv/Makefile | |||
@@ -23,20 +23,14 @@ | |||
23 | # Copyright (C) 1994 by Hamish Macdonald | 23 | # Copyright (C) 1994 by Hamish Macdonald |
24 | # | 24 | # |
25 | 25 | ||
26 | CCSPECS := $(shell $(CC) -v 2>&1 | grep "^Reading specs from " | head -1 | cut -c20-) | ||
27 | CCDIR := $(strip $(patsubst %/specs,%,$(CCSPECS))) | ||
28 | CPUCLASS := fr400 | ||
29 | |||
30 | # test for cross compiling | ||
31 | COMPILE_ARCH = $(shell uname -m) | ||
32 | |||
33 | ifdef CONFIG_MMU | 26 | ifdef CONFIG_MMU |
34 | UTS_SYSNAME = -DUTS_SYSNAME=\"Linux\" | 27 | UTS_SYSNAME = -DUTS_SYSNAME=\"Linux\" |
35 | else | 28 | else |
36 | UTS_SYSNAME = -DUTS_SYSNAME=\"uClinux\" | 29 | UTS_SYSNAME = -DUTS_SYSNAME=\"uClinux\" |
37 | endif | 30 | endif |
38 | 31 | ||
39 | ARCHMODFLAGS += -G0 -mlong-calls | 32 | KBUILD_AFLAGS_MODULE += -G0 -mlong-calls |
33 | KBUILD_CFLAGS_MODULE += -G0 -mlong-calls | ||
40 | 34 | ||
41 | ifdef CONFIG_GPREL_DATA_8 | 35 | ifdef CONFIG_GPREL_DATA_8 |
42 | KBUILD_CFLAGS += -G8 | 36 | KBUILD_CFLAGS += -G8 |
@@ -54,7 +48,6 @@ endif | |||
54 | 48 | ||
55 | ifdef CONFIG_GC_SECTIONS | 49 | ifdef CONFIG_GC_SECTIONS |
56 | KBUILD_CFLAGS += -ffunction-sections -fdata-sections | 50 | KBUILD_CFLAGS += -ffunction-sections -fdata-sections |
57 | LINKFLAGS += --gc-sections | ||
58 | endif | 51 | endif |
59 | 52 | ||
60 | ifndef CONFIG_FRAME_POINTER | 53 | ifndef CONFIG_FRAME_POINTER |
@@ -64,16 +57,13 @@ endif | |||
64 | ifdef CONFIG_CPU_FR451_COMPILE | 57 | ifdef CONFIG_CPU_FR451_COMPILE |
65 | KBUILD_CFLAGS += -mcpu=fr450 | 58 | KBUILD_CFLAGS += -mcpu=fr450 |
66 | KBUILD_AFLAGS += -mcpu=fr450 | 59 | KBUILD_AFLAGS += -mcpu=fr450 |
67 | ASFLAGS += -mcpu=fr450 | ||
68 | else | 60 | else |
69 | ifdef CONFIG_CPU_FR551_COMPILE | 61 | ifdef CONFIG_CPU_FR551_COMPILE |
70 | KBUILD_CFLAGS += -mcpu=fr550 | 62 | KBUILD_CFLAGS += -mcpu=fr550 |
71 | KBUILD_AFLAGS += -mcpu=fr550 | 63 | KBUILD_AFLAGS += -mcpu=fr550 |
72 | ASFLAGS += -mcpu=fr550 | ||
73 | else | 64 | else |
74 | KBUILD_CFLAGS += -mcpu=fr400 | 65 | KBUILD_CFLAGS += -mcpu=fr400 |
75 | KBUILD_AFLAGS += -mcpu=fr400 | 66 | KBUILD_AFLAGS += -mcpu=fr400 |
76 | ASFLAGS += -mcpu=fr400 | ||
77 | endif | 67 | endif |
78 | endif | 68 | endif |
79 | 69 | ||
@@ -83,14 +73,12 @@ endif | |||
83 | KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media | 73 | KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media |
84 | KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 | 74 | KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 |
85 | KBUILD_AFLAGS += -mno-fdpic | 75 | KBUILD_AFLAGS += -mno-fdpic |
86 | ASFLAGS += -mno-fdpic | ||
87 | 76 | ||
88 | # make sure the .S files get compiled with debug info | 77 | # make sure the .S files get compiled with debug info |
89 | # and disable optimisations that are unhelpful whilst debugging | 78 | # and disable optimisations that are unhelpful whilst debugging |
90 | ifdef CONFIG_DEBUG_INFO | 79 | ifdef CONFIG_DEBUG_INFO |
91 | #KBUILD_CFLAGS += -O1 | 80 | #KBUILD_CFLAGS += -O1 |
92 | KBUILD_AFLAGS += -Wa,--gdwarf2 | 81 | KBUILD_AFLAGS += -Wa,--gdwarf2 |
93 | ASFLAGS += -Wa,--gdwarf2 | ||
94 | endif | 82 | endif |
95 | 83 | ||
96 | head-y := arch/frv/kernel/head.o arch/frv/kernel/init_task.o | 84 | head-y := arch/frv/kernel/head.o arch/frv/kernel/init_task.o |
@@ -105,11 +93,5 @@ all: Image | |||
105 | Image: vmlinux | 93 | Image: vmlinux |
106 | $(Q)$(MAKE) $(build)=arch/frv/boot $@ | 94 | $(Q)$(MAKE) $(build)=arch/frv/boot $@ |
107 | 95 | ||
108 | bootstrap: | ||
109 | $(Q)$(MAKEBOOT) bootstrap | ||
110 | |||
111 | archclean: | 96 | archclean: |
112 | $(Q)$(MAKE) $(clean)=arch/frv/boot | 97 | $(Q)$(MAKE) $(clean)=arch/frv/boot |
113 | |||
114 | archdep: scripts/mkdep symlinks | ||
115 | $(Q)$(MAKE) $(build)=arch/frv/boot dep | ||
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index 8ae0d2604ce1..be7bfa12b705 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile | |||
@@ -22,13 +22,13 @@ CHECKFLAGS += -m64 -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__ | |||
22 | 22 | ||
23 | OBJCOPYFLAGS := --strip-all | 23 | OBJCOPYFLAGS := --strip-all |
24 | LDFLAGS_vmlinux := -static | 24 | LDFLAGS_vmlinux := -static |
25 | LDFLAGS_MODULE += -T $(srctree)/arch/ia64/module.lds | 25 | KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/ia64/module.lds |
26 | AFLAGS_KERNEL := -mconstant-gp | 26 | KBUILD_AFLAGS_KERNEL := -mconstant-gp |
27 | EXTRA := | 27 | EXTRA := |
28 | 28 | ||
29 | cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \ | 29 | cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \ |
30 | -falign-functions=32 -frename-registers -fno-optimize-sibling-calls | 30 | -falign-functions=32 -frename-registers -fno-optimize-sibling-calls |
31 | CFLAGS_KERNEL := -mconstant-gp | 31 | KBUILD_CFLAGS_KERNEL := -mconstant-gp |
32 | 32 | ||
33 | GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)") | 33 | GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)") |
34 | KBUILD_CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") | 34 | KBUILD_CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") |
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile index 469766b24e22..8ff5ba0ea26c 100644 --- a/arch/m32r/Makefile +++ b/arch/m32r/Makefile | |||
@@ -12,8 +12,8 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -S | |||
12 | LDFLAGS_vmlinux := | 12 | LDFLAGS_vmlinux := |
13 | 13 | ||
14 | KBUILD_CFLAGS += -pipe -fno-schedule-insns | 14 | KBUILD_CFLAGS += -pipe -fno-schedule-insns |
15 | CFLAGS_KERNEL += -mmodel=medium | 15 | KBUILD_CFLAGS_KERNEL += -mmodel=medium |
16 | CFLAGS_MODULE += -mmodel=large | 16 | KBUILD_CFLAGS_MODULE += -mmodel=large |
17 | 17 | ||
18 | ifdef CONFIG_CHIP_VDEC2 | 18 | ifdef CONFIG_CHIP_VDEC2 |
19 | cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -Wa,-bitinst | 19 | cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -Wa,-bitinst |
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index 570d85c3f97f..b06a7e3cbcd6 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile | |||
@@ -18,7 +18,7 @@ KBUILD_DEFCONFIG := multi_defconfig | |||
18 | # override top level makefile | 18 | # override top level makefile |
19 | AS += -m68020 | 19 | AS += -m68020 |
20 | LDFLAGS := -m m68kelf | 20 | LDFLAGS := -m m68kelf |
21 | LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds | 21 | KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds |
22 | ifneq ($(SUBARCH),$(ARCH)) | 22 | ifneq ($(SUBARCH),$(ARCH)) |
23 | ifeq ($(CROSS_COMPILE),) | 23 | ifeq ($(CROSS_COMPILE),) |
24 | CROSS_COMPILE := $(call cc-cross-prefix, \ | 24 | CROSS_COMPILE := $(call cc-cross-prefix, \ |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index f0d196090e94..f4a4b663ebb3 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -93,7 +93,8 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlinuz | |||
93 | cflags-y += -G 0 -mno-abicalls -fno-pic -pipe | 93 | cflags-y += -G 0 -mno-abicalls -fno-pic -pipe |
94 | cflags-y += -msoft-float | 94 | cflags-y += -msoft-float |
95 | LDFLAGS_vmlinux += -G 0 -static -n -nostdlib | 95 | LDFLAGS_vmlinux += -G 0 -static -n -nostdlib |
96 | MODFLAGS += -mlong-calls | 96 | KBUILD_AFLAGS_MODULE += -mlong-calls |
97 | KBUILD_CFLAGS_MODULE += -mlong-calls | ||
97 | 98 | ||
98 | cflags-y += -ffreestanding | 99 | cflags-y += -ffreestanding |
99 | 100 | ||
@@ -165,7 +166,8 @@ cflags-$(CONFIG_CPU_DADDI_WORKAROUNDS) += $(call cc-option,-mno-daddi,) | |||
165 | 166 | ||
166 | ifdef CONFIG_CPU_SB1 | 167 | ifdef CONFIG_CPU_SB1 |
167 | ifdef CONFIG_SB1_PASS_1_WORKAROUNDS | 168 | ifdef CONFIG_SB1_PASS_1_WORKAROUNDS |
168 | MODFLAGS += -msb1-pass1-workarounds | 169 | KBUILD_AFLAGS_MODULE += -msb1-pass1-workarounds |
170 | KBUILD_CFLAGS_MODULE += -msb1-pass1-workarounds | ||
169 | endif | 171 | endif |
170 | endif | 172 | endif |
171 | 173 | ||
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 77cfe7a29e25..5d42f5eae70f 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -94,7 +94,7 @@ else | |||
94 | endif | 94 | endif |
95 | endif | 95 | endif |
96 | 96 | ||
97 | LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o | 97 | KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o |
98 | 98 | ||
99 | ifeq ($(CONFIG_TUNE_CELL),y) | 99 | ifeq ($(CONFIG_TUNE_CELL),y) |
100 | KBUILD_CFLAGS += $(call cc-option,-mtune=cell) | 100 | KBUILD_CFLAGS += $(call cc-option,-mtune=cell) |
diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 30c5f01f93b0..0c9e6c6d2a64 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile | |||
@@ -24,7 +24,8 @@ CHECKFLAGS += -D__s390__ -msize-long | |||
24 | else | 24 | else |
25 | LD_BFD := elf64-s390 | 25 | LD_BFD := elf64-s390 |
26 | LDFLAGS := -m elf64_s390 | 26 | LDFLAGS := -m elf64_s390 |
27 | MODFLAGS += -fpic -D__PIC__ | 27 | KBUILD_AFLAGS_MODULE += -fpic -D__PIC__ |
28 | KBUILD_CFLAGS_MODULE += -fpic -D__PIC__ | ||
28 | KBUILD_CFLAGS += -m64 | 29 | KBUILD_CFLAGS += -m64 |
29 | KBUILD_AFLAGS += -m64 | 30 | KBUILD_AFLAGS += -m64 |
30 | UTS_MACHINE := s390x | 31 | UTS_MACHINE := s390x |
diff --git a/arch/score/Makefile b/arch/score/Makefile index 68e0cd06d5c9..d77dc639d8e3 100644 --- a/arch/score/Makefile +++ b/arch/score/Makefile | |||
@@ -20,7 +20,8 @@ cflags-y += -G0 -pipe -mel -mnhwloop -D__SCOREEL__ \ | |||
20 | # | 20 | # |
21 | KBUILD_AFLAGS += $(cflags-y) | 21 | KBUILD_AFLAGS += $(cflags-y) |
22 | KBUILD_CFLAGS += $(cflags-y) | 22 | KBUILD_CFLAGS += $(cflags-y) |
23 | MODFLAGS += -mlong-calls | 23 | KBUILD_AFLAGS_MODULE += -mlong-calls |
24 | KBUILD_CFLAGS_MODULE += -mlong-calls | ||
24 | LDFLAGS += --oformat elf32-littlescore | 25 | LDFLAGS += --oformat elf32-littlescore |
25 | LDFLAGS_vmlinux += -G0 -static -nostdlib | 26 | LDFLAGS_vmlinux += -G0 -static -nostdlib |
26 | 27 | ||