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 1S74BK-0006cy-IQ for garchives@archives.gentoo.org; Mon, 12 Mar 2012 12:16:55 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 21E82E0BF6; Mon, 12 Mar 2012 12:16:44 +0000 (UTC) Received: from mta-1.ms.rz.rwth-aachen.de (mta-1.ms.rz.rwth-aachen.de [134.130.7.72]) by pigeon.gentoo.org (Postfix) with ESMTP id 84D0FE0BE4 for ; Mon, 12 Mar 2012 12:15:42 +0000 (UTC) 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 Content-transfer-encoding: 7BIT Content-disposition: inline Content-type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed Received: from mx-out-2.rwth-aachen.de ([134.130.5.187]) by mta-1.ms.rz.RWTH-Aachen.de (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008)) with ESMTP id <0M0R007F4U25V360@mta-1.ms.rz.RWTH-Aachen.de> for gentoo-user@lists.gentoo.org; Mon, 12 Mar 2012 13:15:41 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.73,570,1325458800"; d="scan'208";a="81115460" Received: from relay-2.ms.rz.rwth-aachen.de (HELO relay.rwth-aachen.de) ([134.130.7.75]) by mx-2.rz.rwth-aachen.de with ESMTP; Mon, 12 Mar 2012 13:15:42 +0100 Received: from numa-i.igpm.rwth-aachen.de (numa-i.igpm.rwth-aachen.de [134.130.161.252]) by relay.rwth-aachen.de (8.14.4+Sun/8.13.8/1) with ESMTP id q2CCFfKJ016530 for ; Mon, 12 Mar 2012 13:15:41 +0100 (CET) Received: from numa-i (localhost [127.0.0.1]) by numa-i.igpm.rwth-aachen.de (Postfix) with ESMTP id B03B81C9D for ; Mon, 12 Mar 2012 13:15:43 +0100 (CET) Date: Mon, 12 Mar 2012 13:15:43 +0100 From: Helmut Jarausch Subject: Re: [gentoo-user] CFLAGS problem To: gentoo-user@lists.gentoo.org References: <20120312123201.61a8f3fc@weird.wonkology.org> In-reply-to: <20120312123201.61a8f3fc@weird.wonkology.org> X-Mailer: Balsa 2.4.90-10-g605316b Message-id: <1331554543.24722.2@numa-i> X-Archives-Salt: b553b712-cca7-48d3-8088-007e5c658564 X-Archives-Hash: 3efbe33b13b4bca706e5226c33bbeb0d On 03/12/2012 12:32:01 PM, Alex Schuster wrote: > Hi there! > > Recently, my sister could not log in to KDE after I had done some > updates. X crashed when loggin into KDE. It turned out that > x11-libs/qt-gui-4.7.4-r1 was the problem when compiled with explict > CFLAGS, instead of just using -march=native. > > Her CPU is an AMD A6-3500 with three cores. As I have a PC that is a > little faster, I thought I'd use my four cores in addition via > distcc. My > CPU is different, so using -march=native would be bad. I visited [*], > and > used this command to find out what -march=native does: > > leela # cc -march=native -E -v - &1 | grep cc1 > /usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3/cc1 -E -quiet -v - > -D_FORTIFY_SOURCE=2 -march=amdfam10 -mcx16 -msahf -mpopcnt -mabm > --param > l1-cache-size=64 --param l1-cache-line-size=64 --param > l2-cache-size=1024 -mtune=amdfam10 > > So I defined these CFLAGS: > CFLAGS="-pipe -march=amdfam10 -O2 -mcx16 -msahf -mpopcnt -mabm \ > --param l1-cache-size=64 --param l1-cache-line-size=64 \ > --param l2-cache-size=1024" > > The command above does not tell about SSE stuff, so I used this one to > find out about that: > > leela # echo | gcc -dME - -march=native | grep -Ei 'SSE|3DNOW|MMX' | > sort > #define __3dNOW_A__ 1 > #define __3dNOW__ 1 > #define __MMX__ 1 > #define __SSE2_MATH__ 1 > #define __SSE2__ 1 > #define __SSE3__ 1 > #define __SSE4A__ 1 > #define __SSE_MATH__ 1 > #define __SSE__ 1 > > And I added "-msse -msse2 -msse3 -msse4 -m3dnow -mmmx" to CFLAGS. > > Anything wrong with that? Because when I compile > x11-libs/qt-gui-4.7.4-r1, using distcc with local and remote clients, > X will crash when logging into KDE. gcc is at version 4.5.3 on both > PCs. > Distcc worked fine in the past, but those were other clients. > > Wonko > > [*] http://en.gentoo-wiki.com/wiki/Safe_Cflags#-march.3Dnative > I normally check the flags entry in cat /proc/cpuinfo to decide what's supported on a given CPU. Helmut.