Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From ef130e812f80a1eeb8e30d4a4f17e769e30f8277 Mon Sep 17 00:00:00 2001
- From: Filipo Tardim <filipotardim@gmail.com>
- Date: Mon, 14 Mar 2011 04:55:01 +0100
- Subject: March: cflags -march=native
- Signed-off-by: Filipo Tardim <filipotardim@gmail.com>
- diff --git a/arch/x86/Makefile b/arch/x86/Makefile
- index 3199b76..5905452 100644
- --- a/arch/x86/Makefile
- +++ b/arch/x86/Makefile
- @@ -50,14 +50,14 @@
- KBUILD_CFLAGS += -m64
- # 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_MK8) += $(call cc-option,-march=native)
- + cflags-$(CONFIG_MPSC) += $(call cc-option,-march=native)
- 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)
- + $(call cc-option,-march=native,$(call cc-option,-mtune=generic))
- + cflags-$(CONFIG_MATOM) += $(call cc-option,-march=native) \
- + $(call cc-option,-mtune=generic,$(call cc-option,-mtune=generic))
- + cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
- KBUILD_CFLAGS += $(cflags-y)
- KBUILD_CFLAGS += -mno-red-zone
- diff --git a/arch/x86/Makefile_32.cpu b/arch/x86/Makefile_32.cpu
- index 3199b76..5905452 100644
- --- a/arch/x86/Makefile_32.cpu
- +++ b/arch/x86/Makefile_32.cpu
- @@ -2,7 +2,7 @@
- # 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)
- +HAS_MTUNE := $(call cc-option-yn, -mtune=generic)
- ifeq ($(HAS_MTUNE),y)
- tune = $(call cc-option,-mtune=$(1),$(2))
- else
- @@ -10,38 +10,38 @@
- endif
- align := $(cc-option-align)
- -cflags-$(CONFIG_M386) += -march=i386
- -cflags-$(CONFIG_M486) += -march=i486
- -cflags-$(CONFIG_M586) += -march=i586
- -cflags-$(CONFIG_M586TSC) += -march=i586
- -cflags-$(CONFIG_M586MMX) += -march=pentium-mmx
- -cflags-$(CONFIG_M686) += -march=i686
- -cflags-$(CONFIG_MPENTIUMII) += -march=i686 $(call tune,pentium2)
- -cflags-$(CONFIG_MPENTIUMIII) += -march=i686 $(call tune,pentium3)
- -cflags-$(CONFIG_MPENTIUMM) += -march=i686 $(call tune,pentium3)
- -cflags-$(CONFIG_MPENTIUM4) += -march=i686 $(call tune,pentium4)
- -cflags-$(CONFIG_MK6) += -march=k6
- +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=athlon
- -cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,-march=athlon)
- -cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
- -cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
- -cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586)
- -cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=winchip2,-march=i586)
- -cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
- -cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
- -cflags-$(CONFIG_MVIAC7) += -march=i686
- -cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)
- -cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom,$(call cc-option,-march=core2,-march=i686)) \
- - $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
- +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,-mtune=generic,$(call cc-option,-mtune=generic))
- # AMD Elan support
- -cflags-$(CONFIG_X86_ELAN) += -march=i486
- +cflags-$(CONFIG_X86_ELAN) += -march=native
- # Geode GX1 support
- -cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx
- -cflags-$(CONFIG_MGEODE_LX) += $(call cc-option,-march=geode,-march=pentium-mmx)
- +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))
- diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
- index 3199b76..5905452 100644
- --- a/arch/x86/boot/Makefile
- +++ b/arch/x86/boot/Makefile
- @@ -60,7 +60,7 @@
- KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
- -DDISABLE_BRANCH_PROFILING \
- -Wall -Wstrict-prototypes \
- - -march=i386 -mregparm=3 \
- + -march=native -mregparm=3 \
- -include $(srctree)/$(src)/code16gcc.h \
- -fno-strict-aliasing -fomit-frame-pointer \
- $(call cc-option, -ffreestanding) \
- diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
- index 3199b76..5905452 100644
- --- a/arch/x86/boot/compressed/Makefile
- +++ b/arch/x86/boot/compressed/Makefile
- @@ -9,7 +9,7 @@
- KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
- KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
- KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
- -cflags-$(CONFIG_X86_32) := -march=i386
- +cflags-$(CONFIG_X86_32) := -march=native
- cflags-$(CONFIG_X86_64) := -mcmodel=small
- KBUILD_CFLAGS += $(cflags-y)
- KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
- diff --git a/arch/x86/kernel/acpi/realmode/Makefile b/arch/x86/kernel/acpi/realmode/Makefile
- index 3199b76..5905452 100644
- --- a/arch/x86/kernel/acpi/realmode/Makefile
- +++ b/arch/x86/kernel/acpi/realmode/Makefile
- @@ -32,7 +32,7 @@
- -I$(srctree)/$(bootsrc) \
- $(cflags-y) \
- -Wall -Wstrict-prototypes \
- - -march=i386 -mregparm=3 \
- + -march=native -mregparm=3 \
- -include $(srctree)/$(bootsrc)/code16gcc.h \
- -fno-strict-aliasing -fomit-frame-pointer \
- $(call cc-option, -ffreestanding) \
- diff --git a/Makefile b/Makefile
- index 3199b76..5905452 100644
- --- a/Makefile
- +++ b/Makefile
- @@ -233,7 +233,7 @@
- HOSTCC = gcc
- HOSTCXX = g++
- -HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
- +HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -march=native -ffast-math -fomit-frame-pointer -mtune=generic
- HOSTCXXFLAGS = -O2
- # Decide whether to build built-in, modular, or both.
- diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig
- index 3199b76..5905452 100644
- --- a/debian/scripts/misc/kernelconfig
- +++ b/debian/scripts/misc/kernelconfig
- @@ -94,7 +94,7 @@
- case "$choice" in
- y* | Y* | "" )
- - make O=`pwd`/build ARCH=$kernarch menuconfig
- + make O=`pwd`/build ARCH=$kernarch xconfig
- break ;;
- n* | N* )
- break ;;
- --
- 1.7.3.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement