x86/Makefile: Move the CPU-specific 64-bit tuning settings
PATCH v2 1/1 x86/Makefile: Move the CPU-specific 64-bit tuning settings
In accordance with the FIXME comment in arch/x86/Makefile, move the CPU-specific 64-bit tuning settings to arch/x86/Makefile.cpu.
Signed-off-by Tor Vic <[email protected]>
---v1->v2:
* drop the second patch in the series
* use srctree with include (Masahiro)
arch/x86/Makefile | 11 ++--------- arch/x86/Makefile.cpu | 12 ++++++++++++ 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 arch/x86/Makefile.cpu
arch/x86/Makefile +2 -9
@@ -119,15 +119,8 @@ else # Use -mskip-rax-setup if supported. KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup) - # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) - cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) - cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) - - cflags-$(CONFIG_MCORE2) += \ - $(call cc-option,-march=core2,$(call cc-option,-mtune=generic)) - cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \ - $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic)) - cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) + # CPU-specific tuning (64-bit). + include $(srctree)/arch/x86/Makefile.cpu KBUILD_CFLAGS += $(cflags-y) KBUILD_CFLAGS += -mno-red-zone
arch/x86/Makefile.cpu new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0 + +# CPU tuning section (64-bit). + +cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) +cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) + +cflags-$(CONFIG_MCORE2) += \ + $(call cc-option,-march=core2,$(call cc-option,-mtune=generic)) +cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \ + $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic)) +cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
Signature · 1 line
2.33.0