From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752060AbXJZKmj (ORCPT ); Fri, 26 Oct 2007 06:42:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751156AbXJZKmc (ORCPT ); Fri, 26 Oct 2007 06:42:32 -0400 Received: from mail.station1.mxsweep.com ([212.147.136.149]:4185 "EHLO smtp2.mxsweep.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751141AbXJZKmb convert rfc822-to-8bit (ORCPT ); Fri, 26 Oct 2007 06:42:31 -0400 Message-ID: <4721C44E.4000800@draigBrady.com> Date: Fri, 26 Oct 2007 11:41:18 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Thunderbird 2.0.0.6 (X11/20071008) MIME-Version: 1.0 To: Adrian Bunk CC: Michael Lothian , linux-kernel@vger.kernel.org Subject: Re: Possibility of adding -march=native to x86 References: <0EC33A59AA72084CA28B83816B40929F02682BB3@REEDXCLSXM01V03.rbsres01.net> <20071025185022.GP30533@stusta.de> <20071025191723.GQ30533@stusta.de> <20071025195020.GS30533@stusta.de> <20071025202031.GU30533@stusta.de> In-Reply-To: <20071025202031.GU30533@stusta.de> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-OriginalArrivalTime: 26 Oct 2007 10:43:32.0427 (UTC) FILETIME=[0D9649B0:01C817BD] X-CTCH-RefID: str=0001.0A0B0201.4721C400.00AF,ss=1,fgs=0 X-MXUniqueID: 85f69452-ff80-48cc-bf6b-f928f8a58990 X-MXSweep-Threat: Clean Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Adrian Bunk wrote: > On Thu, Oct 25, 2007 at 09:12:45PM +0100, Michael Lothian wrote: >>> The MPENTIUM4 option does not only set -march=pentium4, it also enables >>> several other options in arch/i386/Kconfig.cpu resulting in better >>> performance. >> How about an autodetect to set the right options here too using cpuid? >> >> With a warning of course that the code produced will be specifically >> for the native cpu that it's compiled on. > > If you don't know or can figure out yourself the CPU you have, you'd > better not compile your own kernel... There also is the added variable of what your version of gcc supports. The kernel gcc options would have to be the highest common factor. See also http://www.pixelbeat.org/scripts/gcccpuopt Pádraig.