From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from ) id 1IBxGg-0002ne-Ha for garchives@archives.gentoo.org; Fri, 20 Jul 2007 18:31:58 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l6KITTCm010265; Fri, 20 Jul 2007 18:29:29 GMT Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l6KIOIQQ003537 for ; Fri, 20 Jul 2007 18:24:18 GMT Received: by mu-out-0910.google.com with SMTP id i10so1460635mue for ; Fri, 20 Jul 2007 11:24:18 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=EB9kFbaJYbDIaqBhTgyEpYw3E+0LUblxMv9UsvChDwxRutHGMjR3o1gWYxGcNiQtDzoK3fNkL4aFJk8dFAMbRFnVXATw6Vle6+2MWw1NVzZ281XnmKEXGh306fCbNPj3C4CDebT1c7C9JpvMtQymAK1hliRIrSjmZw0ql3S1M7Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=LJr9wNZI0A4LTYXoynt632+UBO+SuFblGyb/JtJMSdlPndJ8zR6KREbE4vSy8/VN1hpnP3cgykVC6xlEcrhA0d2ppj4nuqYvaQtnIQWPpONjpJQo0NOfDE/xwiGZ1gHXaQUX6e3QgYW1y9XDNpOkL6ZIcmIqB9heOng1VNIFyes= Received: by 10.82.116.15 with SMTP id o15mr829807buc.1184955858040; Fri, 20 Jul 2007 11:24:18 -0700 (PDT) Received: from ?192.168.0.2? ( [88.64.158.229]) by mx.google.com with ESMTPS id 2sm2145429nfv.2007.07.20.11.24.16 (version=SSLv3 cipher=RC4-MD5); Fri, 20 Jul 2007 11:24:17 -0700 (PDT) Message-ID: <46A0FDC8.9000204@googlemail.com> Date: Fri, 20 Jul 2007 20:24:08 +0200 From: Daniel Pielmeier User-Agent: Thunderbird 2.0.0.4 (X11/20070616) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] gcc 4.2 and Core 2 Duo References: <200707202147.17773@goldspace.net> In-Reply-To: <200707202147.17773@goldspace.net> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Archives-Salt: 30878cc1-c25e-4f36-9ba0-5fd453fc0f95 X-Archives-Hash: 4d1491e221df1d8a5eb624b409eebfba Andrew Gaydenko schrieb: > I have noticed, the official portage tree has included gcc 4.2. Now for > Core 2 Duo CPU (amd64 Gentoo arch) I use in make.conf file: > > CFLAGS="-O2 -march=nocona -pipe" > > gcc' changelog has this note: > > -------------------- > ... > IA-32/x86-64 > > * -mtune=generic can now be used to generate code running well on common x86 chips. > This includes AMD Athlon, AMD Opteron, Intel Pentium-M, Intel Pentium 4 and Intel > Core 2. > * -mtune=native and -march=native will produce code optimized for the host > architecture as detected using the cpuid instruction. > ... > -------------------- > > The question is: must I replace '-march=nocona' with '-mtune=native and -march=native'? Here you will find additional information http://tinyurl.com/2b6spk. It is stated there that you can use either -march=cpu-type or -mtune=cpu-type and that -march=cpu-type implies -mtune=cpu-type. I think you can also use the nocona option for the cpu-type until gcc 4.3 is out which brings you -march=core2, see here http://tinyurl.com/ottvh. Using mtune or march depends on where you want to use your compiled software, if you only want to use it only on your own machine -march=native is probably the best option and if you want to use it on other machines too, you should choose -mtune=native. If you don't know at all the weather the cpu is IA32 AMD64 or EM64T you should use -mtune=generic. Maybe someone could explain it better, but this is what i understand! Regards, Daniel -- gentoo-user@gentoo.org mailing list