diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/mips/Makefile | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 4547719e4e61..67109e53ebc0 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 | # |
| @@ -204,6 +186,23 @@ KBUILD_CFLAGS_MODULE += -msb1-pass1-workarounds | |||
| 204 | endif | 186 | endif |
| 205 | endif | 187 | endif |
| 206 | 188 | ||
| 189 | # For smartmips configurations, there are hundreds of warnings due to ISA overrides | ||
| 190 | # in assembly and header files. smartmips is only supported for MIPS32r1 onwards | ||
| 191 | # and there is no support for 64-bit. Various '.set mips2' or '.set mips3' or | ||
| 192 | # similar directives in the kernel will spam the build logs with the following warnings: | ||
| 193 | # Warning: the `smartmips' extension requires MIPS32 revision 1 or greater | ||
| 194 | # or | ||
| 195 | # Warning: the 64-bit MIPS architecture does not support the `smartmips' extension | ||
| 196 | # Pass -Wa,--no-warn to disable all assembler warnings until the kernel code has | ||
| 197 | # been fixed properly. | ||
| 198 | mips-cflags := "$(cflags-y)" | ||
| 199 | cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,$(mips-cflags),-msmartmips) -Wa,--no-warn | ||
| 200 | cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,$(mips-cflags),-mmicromips) | ||
| 201 | ifeq ($(CONFIG_CPU_HAS_MSA),y) | ||
| 202 | toolchain-msa := $(call cc-option-yn,-$(mips-cflags),mhard-float -mfp64 -Wa$(comma)-mmsa) | ||
| 203 | cflags-$(toolchain-msa) += -DTOOLCHAIN_SUPPORTS_MSA | ||
| 204 | endif | ||
| 205 | |||
| 207 | # | 206 | # |
| 208 | # Firmware support | 207 | # Firmware support |
| 209 | # | 208 | # |
