diff options
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r-- | arch/mips/Makefile | 55 |
1 files changed, 37 insertions, 18 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 2563a088d3b8..8f57fc72d62c 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -122,26 +122,8 @@ predef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__ | |||
122 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be)) | 122 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be)) |
123 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le)) | 123 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le)) |
124 | 124 | ||
125 | # For smartmips configurations, there are hundreds of warnings due to ISA overrides | ||
126 | # in assembly and header files. smartmips is only supported for MIPS32r1 onwards | ||
127 | # and there is no support for 64-bit. Various '.set mips2' or '.set mips3' or | ||
128 | # similar directives in the kernel will spam the build logs with the following warnings: | ||
129 | # Warning: the `smartmips' extension requires MIPS32 revision 1 or greater | ||
130 | # or | ||
131 | # Warning: the 64-bit MIPS architecture does not support the `smartmips' extension | ||
132 | # Pass -Wa,--no-warn to disable all assembler warnings until the kernel code has | ||
133 | # been fixed properly. | ||
134 | cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,-msmartmips) -Wa,--no-warn | ||
135 | cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,-mmicromips) | ||
136 | |||
137 | cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \ | 125 | cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \ |
138 | -fno-omit-frame-pointer | 126 | -fno-omit-frame-pointer |
139 | |||
140 | ifeq ($(CONFIG_CPU_HAS_MSA),y) | ||
141 | toolchain-msa := $(call cc-option-yn,-mhard-float -mfp64 -Wa$(comma)-mmsa) | ||
142 | cflags-$(toolchain-msa) += -DTOOLCHAIN_SUPPORTS_MSA | ||
143 | endif | ||
144 | |||
145 | # | 127 | # |
146 | # CPU-dependent compiler/assembler options for optimization. | 128 | # CPU-dependent compiler/assembler options for optimization. |
147 | # | 129 | # |
@@ -156,10 +138,12 @@ cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS | |||
156 | -Wa,-mips32 -Wa,--trap | 138 | -Wa,-mips32 -Wa,--trap |
157 | cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ | 139 | cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ |
158 | -Wa,-mips32r2 -Wa,--trap | 140 | -Wa,-mips32r2 -Wa,--trap |
141 | cflags-$(CONFIG_CPU_MIPS32_R6) += -march=mips32r6 -Wa,--trap | ||
159 | cflags-$(CONFIG_CPU_MIPS64_R1) += $(call cc-option,-march=mips64,-mips64 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \ | 142 | cflags-$(CONFIG_CPU_MIPS64_R1) += $(call cc-option,-march=mips64,-mips64 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \ |
160 | -Wa,-mips64 -Wa,--trap | 143 | -Wa,-mips64 -Wa,--trap |
161 | cflags-$(CONFIG_CPU_MIPS64_R2) += $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \ | 144 | cflags-$(CONFIG_CPU_MIPS64_R2) += $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \ |
162 | -Wa,-mips64r2 -Wa,--trap | 145 | -Wa,-mips64r2 -Wa,--trap |
146 | cflags-$(CONFIG_CPU_MIPS64_R6) += -march=mips64r6 -Wa,--trap | ||
163 | cflags-$(CONFIG_CPU_R5000) += -march=r5000 -Wa,--trap | 147 | cflags-$(CONFIG_CPU_R5000) += -march=r5000 -Wa,--trap |
164 | cflags-$(CONFIG_CPU_R5432) += $(call cc-option,-march=r5400,-march=r5000) \ | 148 | cflags-$(CONFIG_CPU_R5432) += $(call cc-option,-march=r5400,-march=r5000) \ |
165 | -Wa,--trap | 149 | -Wa,--trap |
@@ -182,6 +166,16 @@ cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -Wa,-march=octeon | |||
182 | endif | 166 | endif |
183 | cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1 | 167 | cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1 |
184 | cflags-$(CONFIG_CPU_BMIPS) += -march=mips32 -Wa,-mips32 -Wa,--trap | 168 | cflags-$(CONFIG_CPU_BMIPS) += -march=mips32 -Wa,-mips32 -Wa,--trap |
169 | # | ||
170 | # binutils from v2.25 on and gcc starting from v4.9.0 treat -march=loongson3a | ||
171 | # as MIPS64 R1; older versions as just R1. This leaves the possibility open | ||
172 | # that GCC might generate R2 code for -march=loongson3a which then is rejected | ||
173 | # by GAS. The cc-option can't probe for this behaviour so -march=loongson3a | ||
174 | # can't easily be used safely within the kbuild framework. | ||
175 | # | ||
176 | cflags-$(CONFIG_CPU_LOONGSON3) += \ | ||
177 | $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \ | ||
178 | -Wa,-mips64r2 -Wa,--trap | ||
185 | 179 | ||
186 | cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,) | 180 | cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,) |
187 | cflags-$(CONFIG_CPU_R4400_WORKAROUNDS) += $(call cc-option,-mfix-r4400,) | 181 | cflags-$(CONFIG_CPU_R4400_WORKAROUNDS) += $(call cc-option,-mfix-r4400,) |
@@ -194,6 +188,23 @@ KBUILD_CFLAGS_MODULE += -msb1-pass1-workarounds | |||
194 | endif | 188 | endif |
195 | endif | 189 | endif |
196 | 190 | ||
191 | # For smartmips configurations, there are hundreds of warnings due to ISA overrides | ||
192 | # in assembly and header files. smartmips is only supported for MIPS32r1 onwards | ||
193 | # and there is no support for 64-bit. Various '.set mips2' or '.set mips3' or | ||
194 | # similar directives in the kernel will spam the build logs with the following warnings: | ||
195 | # Warning: the `smartmips' extension requires MIPS32 revision 1 or greater | ||
196 | # or | ||
197 | # Warning: the 64-bit MIPS architecture does not support the `smartmips' extension | ||
198 | # Pass -Wa,--no-warn to disable all assembler warnings until the kernel code has | ||
199 | # been fixed properly. | ||
200 | mips-cflags := "$(cflags-y)" | ||
201 | cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,$(mips-cflags),-msmartmips) -Wa,--no-warn | ||
202 | cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,$(mips-cflags),-mmicromips) | ||
203 | ifeq ($(CONFIG_CPU_HAS_MSA),y) | ||
204 | toolchain-msa := $(call cc-option-yn,-$(mips-cflags),mhard-float -mfp64 -Wa$(comma)-mmsa) | ||
205 | cflags-$(toolchain-msa) += -DTOOLCHAIN_SUPPORTS_MSA | ||
206 | endif | ||
207 | |||
197 | # | 208 | # |
198 | # Firmware support | 209 | # Firmware support |
199 | # | 210 | # |
@@ -287,7 +298,11 @@ boot-y += vmlinux.ecoff | |||
287 | boot-y += vmlinux.srec | 298 | boot-y += vmlinux.srec |
288 | ifeq ($(shell expr $(load-y) \< 0xffffffff80000000 2> /dev/null), 0) | 299 | ifeq ($(shell expr $(load-y) \< 0xffffffff80000000 2> /dev/null), 0) |
289 | boot-y += uImage | 300 | boot-y += uImage |
301 | boot-y += uImage.bin | ||
302 | boot-y += uImage.bz2 | ||
290 | boot-y += uImage.gz | 303 | boot-y += uImage.gz |
304 | boot-y += uImage.lzma | ||
305 | boot-y += uImage.lzo | ||
291 | endif | 306 | endif |
292 | 307 | ||
293 | # compressed boot image targets (arch/mips/boot/compressed/) | 308 | # compressed boot image targets (arch/mips/boot/compressed/) |
@@ -386,7 +401,11 @@ define archhelp | |||
386 | echo ' vmlinuz.bin - Raw binary zboot image' | 401 | echo ' vmlinuz.bin - Raw binary zboot image' |
387 | echo ' vmlinuz.srec - SREC zboot image' | 402 | echo ' vmlinuz.srec - SREC zboot image' |
388 | echo ' uImage - U-Boot image' | 403 | echo ' uImage - U-Boot image' |
404 | echo ' uImage.bin - U-Boot image (uncompressed)' | ||
405 | echo ' uImage.bz2 - U-Boot image (bz2)' | ||
389 | echo ' uImage.gz - U-Boot image (gzip)' | 406 | echo ' uImage.gz - U-Boot image (gzip)' |
407 | echo ' uImage.lzma - U-Boot image (lzma)' | ||
408 | echo ' uImage.lzo - U-Boot image (lzo)' | ||
390 | echo ' dtbs - Device-tree blobs for enabled boards' | 409 | echo ' dtbs - Device-tree blobs for enabled boards' |
391 | echo | 410 | echo |
392 | echo ' These will be default as appropriate for a configured platform.' | 411 | echo ' These will be default as appropriate for a configured platform.' |