1 |
Hi there! |
2 |
|
3 |
Recently, my sister could not log in to KDE after I had done some |
4 |
updates. X crashed when loggin into KDE. It turned out that |
5 |
x11-libs/qt-gui-4.7.4-r1 was the problem when compiled with explict |
6 |
CFLAGS, instead of just using -march=native. |
7 |
|
8 |
Her CPU is an AMD A6-3500 with three cores. As I have a PC that is a |
9 |
little faster, I thought I'd use my four cores in addition via distcc. My |
10 |
CPU is different, so using -march=native would be bad. I visited [*], and |
11 |
used this command to find out what -march=native does: |
12 |
|
13 |
leela # cc -march=native -E -v - </dev/null 2>&1 | grep cc1 |
14 |
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3/cc1 -E -quiet -v - |
15 |
-D_FORTIFY_SOURCE=2 -march=amdfam10 -mcx16 -msahf -mpopcnt -mabm --param |
16 |
l1-cache-size=64 --param l1-cache-line-size=64 --param |
17 |
l2-cache-size=1024 -mtune=amdfam10 |
18 |
|
19 |
So I defined these CFLAGS: |
20 |
CFLAGS="-pipe -march=amdfam10 -O2 -mcx16 -msahf -mpopcnt -mabm \ |
21 |
--param l1-cache-size=64 --param l1-cache-line-size=64 \ |
22 |
--param l2-cache-size=1024" |
23 |
|
24 |
The command above does not tell about SSE stuff, so I used this one to |
25 |
find out about that: |
26 |
|
27 |
leela # echo | gcc -dME - -march=native | grep -Ei 'SSE|3DNOW|MMX' | sort |
28 |
#define __3dNOW_A__ 1 |
29 |
#define __3dNOW__ 1 |
30 |
#define __MMX__ 1 |
31 |
#define __SSE2_MATH__ 1 |
32 |
#define __SSE2__ 1 |
33 |
#define __SSE3__ 1 |
34 |
#define __SSE4A__ 1 |
35 |
#define __SSE_MATH__ 1 |
36 |
#define __SSE__ 1 |
37 |
|
38 |
And I added "-msse -msse2 -msse3 -msse4 -m3dnow -mmmx" to CFLAGS. |
39 |
|
40 |
Anything wrong with that? Because when I compile |
41 |
x11-libs/qt-gui-4.7.4-r1, using distcc with local and remote clients, |
42 |
X will crash when logging into KDE. gcc is at version 4.5.3 on both PCs. |
43 |
Distcc worked fine in the past, but those were other clients. |
44 |
|
45 |
Wonko |
46 |
|
47 |
[*] http://en.gentoo-wiki.com/wiki/Safe_Cflags#-march.3Dnative |