mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 06:24:53 +08:00
d49fc69293
This flag is not supported by clang, which results in a warning: clang-14: warning: argument unused during compilation: '-mno-branch-likely' [-Wunused-command-line-argument] This breaks cc-option, which adds -Werror to make this warning fatal and catch flags that are not supported. Wrap this flag in cc-option so that it does not cause cc-option to fail, which can cause randconfigs to be really noisy, due to warnings not getting disabled that should be. Additionally, move the cc-option check to Kconfig so that the check is done at configuration time, rather than build time, as builds with no configuration change will be quicker because the cc-option call will not need to happen in those instances. Suggested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
24 lines
653 B
Plaintext
24 lines
653 B
Plaintext
#
|
|
# Loongson Processors' Support
|
|
#
|
|
|
|
|
|
cflags-$(CONFIG_CPU_LOONGSON64) += -Wa,--trap
|
|
|
|
ifdef CONFIG_CPU_LOONGSON64
|
|
cflags-$(CONFIG_CC_IS_GCC) += -march=loongson3a
|
|
cflags-$(CONFIG_CC_IS_CLANG) += -march=mips64r2
|
|
endif
|
|
|
|
# Some -march= flags enable MMI instructions, and GCC complains about that
|
|
# support being enabled alongside -msoft-float. Thus explicitly disable MMI.
|
|
cflags-y += $(call cc-option,-mno-loongson-mmi)
|
|
|
|
#
|
|
# Loongson Machines' Support
|
|
#
|
|
|
|
cflags-$(CONFIG_MACH_LOONGSON64) += -I$(srctree)/arch/mips/include/asm/mach-loongson64
|
|
cflags-$(CONFIG_CC_HAS_MNO_BRANCH_LIKELY) += -mno-branch-likely
|
|
load-$(CONFIG_CPU_LOONGSON64) += 0xffffffff80200000
|