public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] CFLAGS problem
@ 2012-03-12 11:32 Alex Schuster
  2012-03-12 12:15 ` Helmut Jarausch
  2012-03-12 22:07 ` Volker Armin Hemmann
  0 siblings, 2 replies; 5+ messages in thread
From: Alex Schuster @ 2012-03-12 11:32 UTC (permalink / raw
  To: gentoo-user

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 - </dev/null 2>&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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-12 23:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-12 11:32 [gentoo-user] CFLAGS problem Alex Schuster
2012-03-12 12:15 ` Helmut Jarausch
2012-03-12 18:36   ` Alex Schuster
2012-03-12 22:07 ` Volker Armin Hemmann
2012-03-12 23:42   ` Alex Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox