From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QjpxI-0000D2-1v for garchives@archives.gentoo.org; Thu, 21 Jul 2011 09:54:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D059121C15B; Thu, 21 Jul 2011 09:53:57 +0000 (UTC) Received: from svr-us4.tirtonadi.com (unknown [69.65.43.212]) by pigeon.gentoo.org (Postfix) with ESMTP id 3934721C095 for ; Thu, 21 Jul 2011 09:52:57 +0000 (UTC) Received: from mail-ey0-f171.google.com ([209.85.215.171]) by svr-us4.tirtonadi.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.69) (envelope-from ) id 1QjpwA-000wCh-FM for gentoo-user@lists.gentoo.org; Thu, 21 Jul 2011 16:52:58 +0700 Received: by eye22 with SMTP id 22so1360133eye.2 for ; Thu, 21 Jul 2011 02:52:53 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.14.97.68 with SMTP id s44mr13037eef.169.1311241973272; Thu, 21 Jul 2011 02:52:53 -0700 (PDT) Received: by 10.14.48.70 with HTTP; Thu, 21 Jul 2011 02:52:53 -0700 (PDT) In-Reply-To: <4E27EF91.4060408@binarywings.net> References: <4E27EF91.4060408@binarywings.net> Date: Thu, 21 Jul 2011 16:52:53 +0700 Message-ID: Subject: Re: [gentoo-user] New computer and Gentoo From: Pandu Poluan To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - svr-us4.tirtonadi.com X-AntiAbuse: Original Domain - lists.gentoo.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - poluan.info X-Archives-Salt: X-Archives-Hash: efc786e83914fcb790a2bcfa2ed1887c On Thu, Jul 21, 2011 at 16:21, Florian Philipp wrot= e: > > Am 21.07.2011 10:57, schrieb Pandu Poluan: > > -original message- > > Subject: Re: [gentoo-user] New computer and Gentoo > > From: Bill Kenworthy > > Date: 2011-07-21 12:54 > > > >> On Thu, 2011-07-21 at 06:26 +0100, Mick wrote: > [...] > >> Ive just stumbled on something weird with march=3Dnative: > >> > >> At some point I had march=3Dprescott on a core2 E4600 running 32bit - > >> worked well. =C2=A0Changed to march=3Dnative and did some upgrades wit= h a few > >> odd things like asterisk segfaulting in a glibc library afterwards, an= d > >> some things not building. =C2=A0Then to add confusion, I changed to an > >> pentium Duo E6600 (flies!) and added another stick of ram. =C2=A0More = odd > >> things happening such as reiserfs oopsing on shutdown. > >> > >> Last night the penny dropped and I looked the new processor up and > >> changed to march=3Dcore2 and have mostly corrected (recompiled) the > >> damage. > >> > >> So not sure about march=3Dnative now as it is only what was built with > >> native thats been problematic. =C2=A0With 20-20 hindsight it was perha= ps > >> predictable ... > > > > IMO you're not supposed to compile part of the system with -march=3D > > and the rest with -march=3Dnative. The instructions (and optimizations) > > emitted by -march=3Dnative might not be compatible with your previous > > -march. > > I'd like to see a reference for this claim. -march=3Dnative doesn't do > more than set -march=3Dcore2 and some other optimizations for cache size > etc. This should be no more troublesome than mixing code compiled with > different specific -march settings. When you look at binary > distributions (and especially precompiled packages from the developer > instead of the distribution), this is pretty much normal. > > The compiler is not allowed to change the external interfaces of > functions for optimization purposes (see [1]). Besides this, I can only > think of alignment problems ([2]) but even this should be handled > correctly by the compiler. Everything else is a compiler bug that should > be reported. > > [1] http://en.wikipedia.org/wiki/Calling_convention > [2] http://en.wikipedia.org/wiki/Data_alignment > Hmmm... You do have a point. So, gcc's "-march" option *should* maintain ABI compatibility. There *are* other switches that can impact compatibility [1]. What I can't be sure of, whether the "-march" option (improperly) activates one or more of those switches when set to "-march=3Dnative" [1] http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html Rgds, -- Pandu E Poluan ~ IT Optimizer ~ Blog : http://pepoluan.tumblr.com =E2=80=A2 Linked-In : http://id.linkedin.com/in/pepoluan