Agora eu senti firmeza do HQx!
Quanto ao March eu acredito que devemos ser mais específicos, mostrar exatamente onde e quais os arquivos alterados! Aqui não deu nenhum erro de compilação por causa disso!
Vou começar por mim!
Mudo o Makefile dentro da pasta linux (link simbólico do 2.6.34)!
Apenas neste trecho:
# SHELL used by kbuild
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
HOSTCC = gcc
HOSTCXX = g++
HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -march=native -fomit-frame-pointer
HOSTCXXFLAGS = -O2
Todas as outras alterações que eu fiz estão dentro da pasta linux/arch/x86 (lembrem do link simbólico do 2.6.34)!
Na pasta x86 eu altero os arquivos: MakeFile e Makefile_32.cpu!
No arquivo Makefile eu mudo aqui:
# FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
cflags-$(CONFIG_MK8) += $(call cc-option,-march=native)
cflags-$(CONFIG_MPSC) += $(call cc-option,-march=native)
cflags-$(CONFIG_MCORE2) += \
$(call cc-option,-march=native,$(call cc-option,-march=native))
cflags-$(CONFIG_MATOM) += $(call cc-option,-march=native) \
$(call cc-option,-march=native,$(call cc-option,-march=native))
cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-march=native)
KBUILD_CFLAGS += $(cflags-y)
No Makefile_32.cpu aqui:
#-mtune exists since gcc 3.4
HAS_MTUNE := $(call cc-option-yn, -march=native)
ifeq ($(HAS_MTUNE),y)
tune = $(call cc-option,-march=$(1),$(2))
else
tune = $(call cc-option,-march=$(1),$(2))
endif
align := $(cc-option-align)
cflags-$(CONFIG_M386) += -march=native
cflags-$(CONFIG_M486) += -march=native
cflags-$(CONFIG_M586) += -march=native
cflags-$(CONFIG_M586TSC) += -march=native
cflags-$(CONFIG_M586MMX) += -march=native
cflags-$(CONFIG_M686) += -march=native
cflags-$(CONFIG_MPENTIUMII) += -march=native $(call tune,pentium2)
cflags-$(CONFIG_MPENTIUMIII) += -march=native $(call tune,pentium3)
cflags-$(CONFIG_MPENTIUMM) += -march=native $(call tune,pentium3)
cflags-$(CONFIG_MPENTIUM4) += -march=native $(call tune,pentium4)
cflags-$(CONFIG_MK6) += -march=native
# Please note, that patches that add -march=athlon-xp and friends are pointless.
# They make zero difference whatsosever to performance at this time.
cflags-$(CONFIG_MK7) += -march=native
cflags-$(CONFIG_MK8) += $(call cc-option,-march=native,-march=native)
cflags-$(CONFIG_MCRUSOE) += -march=native $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
cflags-$(CONFIG_MEFFICEON) += -march=native $(call tune,pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=native,-march=native)
cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=native,-march=native)
cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=native,-march=native) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=native,-march=native)
cflags-$(CONFIG_MVIAC7) += -march=native
cflags-$(CONFIG_MCORE2) += -march=native $(call tune,core2)
cflags-$(CONFIG_MATOM) += $(call cc-option,-march=native,$(call cc-option,-march=native,-march=native)) \
$(call cc-option,-march=native,$(call cc-option,-march=native))
# AMD Elan support
cflags-$(CONFIG_X86_ELAN) += -march=native
# Geode GX1 support
cflags-$(CONFIG_MGEODEGX1) += -march=native
cflags-$(CONFIG_MGEODE_LX) += $(call cc-option,-march=native,-march=native)
# add at the end to overwrite eventual tuning options from earlier
# cpu entries
cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic,$(call tune,i686))
# Work around the pentium-mmx code generator madness of gcc4.4.x which
# does stack alignment by generating horrible code _before_ the mcount
# prologue (push %ebp, mov %esp, %ebp) which breaks the function graph
# tracer assumptions. For i686, generic, core2 this is set by the
# compiler anyway
cflags-$(CONFIG_FUNCTION_GRAPH_TRACER) += $(call cc-option,-maccumulate-outgoing-args)
# Bug fix for binutils: this option is required in order to keep
# binutils from generating NOPL instructions against our will.
ifneq ($(CONFIG_X86_P6_NOP),y)
cflags-y += $(call cc-option,-Wa$(comma)-march=native,)
endif
Vejam que logo acima, na parte em negrito, tem um call tune Core2! Será que é por isso que não tira tudo o que for Core2?
São esses os arquivos e locais que achei para mudar! Tem algum outro lugar?