# SPDX-License-Identifier: GPL-2.0 # CPU tuning section - shared with UML. # Must change only cflags-y (or [yn]), not CFLAGS! That makes a difference for UML. #-mtune exists since gcc 3.4 HAS_MTUNE := $(call cc-option-yn, -mtune=i386) ifeq ($(HAS_MTUNE),y) tune = $(call cc-option,-mtune=$(1),$(2)) else tune = $(call cc-option,-mcpu=$(1),$(2)) endif cflags-$([31mCONFIG_M486[0m) += -march=i486 cflags-$([31mCONFIG_M586[0m) += -march=i586 cflags-$([31mCONFIG_M586TSC[0m) += -march=i586 cflags-$([31mCONFIG_M586MMX[0m) += -march=pentium-mmx cflags-$([31mCONFIG_M686[0m) += -march=i686 cflags-$([31mCONFIG_MPENTIUMII[0m) += -march=i686 $(call tune,pentium2) cflags-$([31mCONFIG_MPENTIUMIII[0m) += -march=i686 $(call tune,pentium3) cflags-$([31mCONFIG_MPENTIUMM[0m) += -march=i686 $(call tune,pentium3) cflags-$([31mCONFIG_MPENTIUM4[0m) += -march=i686 $(call tune,pentium4) cflags-$([31mCONFIG_MK6[0m) += -march=k6 # Please note, that patches that add -march=athlon-xp and friends are pointless. # They make zero difference whatsosever to performance at this time. cflags-$([31mCONFIG_MK7[0m) += -march=athlon cflags-$([31mCONFIG_MK8[0m) += $(call cc-option,-march=k8,-march=athlon) cflags-$([31mCONFIG_MCRUSOE[0m) += -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0 cflags-$([31mCONFIG_MEFFICEON[0m) += -march=i686 $(call tune,pentium3) -falign-functions=0 -falign-jumps=0 -falign-loops=0 cflags-$([31mCONFIG_MWINCHIPC6[0m) += $(call cc-option,-march=winchip-c6,-march=i586) cflags-$([31mCONFIG_MWINCHIP3D[0m) += $(call cc-option,-march=winchip2,-march=i586) cflags-$([31mCONFIG_MCYRIXIII[0m) += $(call cc-option,-march=c3,-march=i486) -falign-functions=0 -falign-jumps=0 -falign-loops=0 cflags-$([31mCONFIG_MVIAC3_2[0m) += $(call cc-option,-march=c3-2,-march=i686) cflags-$([31mCONFIG_MVIAC7[0m) += -march=i686 cflags-$([31mCONFIG_MCORE2[0m) += -march=i686 $(call tune,core2) cflags-$([31mCONFIG_MATOM[0m) += $(call cc-option,-march=atom,$(call cc-option,-march=core2,-march=i686)) \ $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic)) # AMD Elan support cflags-$([31mCONFIG_MELAN[0m) += -march=i486 # Geode GX1 support cflags-$([31mCONFIG_MGEODEGX1[0m) += -march=pentium-mmx cflags-$([31mCONFIG_MGEODE_LX[0m) += $(call cc-option,-march=geode,-march=pentium-mmx) # add at the end to overwrite eventual tuning options from earlier # cpu entries cflags-$([31mCONFIG_X86_GENERIC[0m) += $(call tune,generic,$(call tune,i686)) # Bug fix for binutils: this option is required in order to keep # binutils from generating NOPL instructions against our will. ifneq ($([31mCONFIG_X86_P6_NOP[0m),y) cflags-y += $(call cc-option,-Wa$(comma)-mtune=generic32,) endif |