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