Heads Up: gcc-4.6 -march=corei7 -mtune=corei7 doesn't work

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
3vi1
Level 4
Level 4
Posts: 125
Joined: Sun Feb 24, 2008 8:24 pm

Heads Up: gcc-4.6 -march=corei7 -mtune=corei7 doesn't work

Post by 3vi1 »

Noticed something I thought I would share so that others don't scratch their head wondering about it if they try the same.

I updated my system to Oneiric, and decided to recompile Wine. I tried making use of the corei7 optimizations in gcc 4.6 and found that, while a lot of stuff worked (ex. Steam), other things (like DirectX games) did not.

So, as always... don't expect things to work when turning on optimizations.
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

Can anyone else confirm? I'm currently installing a new Gentoo on a corei7 and have been using those flags. One of the first things I am going to do right after I get it fully setup is grab Wine and compile it from the sources and I am/was tempted to use those flags.

Thanks,
Jorl17
love2hate
Level 2
Level 2
Posts: 18
Joined: Wed Aug 19, 2009 7:10 am

Post by love2hate »

You use LTO flag ?
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

Unless somehow it got selected, I don't. I use -march=native
DL
Level 3
Level 3
Posts: 70
Joined: Fri Jun 27, 2008 7:47 pm

Post by DL »

Are you using a Sandy Bridge system 3vi1? The AVX instructions that get enabled when using -march=native with SB result in failed compilation for some applications. Try these flags:

CFLAGS="-march=corei7 -mtune=corei7 -O2 -pipe"
DL
Level 3
Level 3
Posts: 70
Joined: Fri Jun 27, 2008 7:47 pm

Post by DL »

Sorry, got confused with jor17 and the original post (I see you're already using the same flags that I posted).

Wine does seem to be sensitive to compiler optimisation. You could try just applying these optimisations to wined3d if you're looking for more D3D performance. Profile guided optimisation works well there too.
Locked