Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Correct / safe cflags for core i5 3450
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
sale
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2004
Posts: 145
Location: ljubljana / slovenia

PostPosted: Wed Mar 23, 2011 10:53 am    Post subject: Correct / safe cflags for core i5 3450 Reply with quote

Hello!

I have been reading about cflags for my i5 m520 processor, but cant really decide what to put in?

I know -O2 and -pipe, but do not know about which march is proper one?

march=native or march=core2 or march=nocona

Any suggestions/help would be really apprreciated.

Thx, Sale


Last edited by sale on Tue Feb 05, 2013 10:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 2249
Location: Dallas area

PostPosted: Wed Mar 23, 2011 11:14 am    Post subject: Reply with quote

What does
Code:
gcc -march=native -E -v - </dev/null 2>&1 | sed -n 's/.* -v - //p'
return
_________________
Asus m5a99fx, FX 8320 - amd64-multilib, 3.9.1-zen, glibc-2.17, gcc-4.7.3-r1, eudev
xorg-server-1.16, openbox w/lxpanel, nouveau, oss4
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1942
Location: Zurich, Switzerland

PostPosted: Wed Mar 23, 2011 12:15 pm    Post subject: Reply with quote

if you are using a recent enough gcc, and do not want to use cross compile, go with -march=native
if you need cross compile, use march=core2
only use march=nocona if you have old gcc (<=4.3)

also run the command Anon-E-moose suggested - this will give you the additional options needed with march=core2 option (-sse4a and such...)


V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
sale
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2004
Posts: 145
Location: ljubljana / slovenia

PostPosted: Wed Mar 23, 2011 12:17 pm    Post subject: Reply with quote

I am preparing to install, so i guess i have to find which gcc is in the install cd?
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 2249
Location: Dallas area

PostPosted: Wed Mar 23, 2011 12:32 pm    Post subject: Reply with quote

You could probably run a system rescue disk and find out before the install, or if it is a live cd run it first before install

But "CFLAGS="-march=native -O2 -pipe" is pretty safe.
_________________
Asus m5a99fx, FX 8320 - amd64-multilib, 3.9.1-zen, glibc-2.17, gcc-4.7.3-r1, eudev
xorg-server-1.16, openbox w/lxpanel, nouveau, oss4
Back to top
View user's profile Send private message
sale
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2004
Posts: 145
Location: ljubljana / slovenia

PostPosted: Wed Mar 23, 2011 12:41 pm    Post subject: Reply with quote

I think I will go with march=native.

Thx for your help to both of you.

Br, Sale
Back to top
View user's profile Send private message
sale
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2004
Posts: 145
Location: ljubljana / slovenia

PostPosted: Wed Mar 23, 2011 1:51 pm    Post subject: Reply with quote

Since this proc has hyperthreading do I set makeopts -j3 or -j5?
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 2249
Location: Dallas area

PostPosted: Wed Mar 23, 2011 1:53 pm    Post subject: Reply with quote

sale wrote:
Since this proc has hyperthreading do I set makeopts -j3 or -j5?


I would use -J5
_________________
Asus m5a99fx, FX 8320 - amd64-multilib, 3.9.1-zen, glibc-2.17, gcc-4.7.3-r1, eudev
xorg-server-1.16, openbox w/lxpanel, nouveau, oss4
Back to top
View user's profile Send private message
sale
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2004
Posts: 145
Location: ljubljana / slovenia

PostPosted: Wed Mar 23, 2011 2:02 pm    Post subject: Reply with quote

Thx,

Sale
Back to top
View user's profile Send private message
sale
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2004
Posts: 145
Location: ljubljana / slovenia

PostPosted: Tue Feb 05, 2013 10:17 pm    Post subject: CORE i5 I3450 Reply with quote

Hi, I have ben away from Gentoo again for some time and , I have a desktop with I5 3450 proc.

Again wondering about cflags.. I have been reading this and dont really know wich ones to use..

Is GCC 4.6 now deafault or 4.3? I suppose"CFLAGS="-march=corei7 -O2 -pipe" would be O.K. or just use "march=native"?

THX, Sale


Core i7 and Core i5, Xeon 55xx

vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
vendor_id : GenuineIntel
cpu family : 6
model : 37
model name : Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz / 660 @ 3.33 GHz
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz
stepping : 7
cpu MHz : 2394.550
cache size : 3072 KB
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Xeon(R) CPU X5570 @ 2.93GHz
32 bit profile (x86)
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -fomit-frame-pointer -pipe"
CXXFLAGS="${CFLAGS}"
64 bit profile (amd64) for < GCC 4.3
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CXXFLAGS="${CFLAGS}"
64 bit profile (amd64) for GCC 4.3
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -mtune=generic -O2 -pipe"
CXXFLAGS="${CFLAGS}"
64 bit profile (amd64) for GCC 4.6
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
Warning: Note that Sandy Bridge CPUs use a march and mtune of corei7-avx not corei7. See the man page for gcc.
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1942
Location: Zurich, Switzerland

PostPosted: Wed Feb 06, 2013 9:19 am    Post subject: Reply with quote

Quote:
Warning: Note that Sandy Bridge CPUs use a march and mtune of corei7-avx not corei7. See the man page for gcc.

you are using an ivy bridge processor, which is a success to sandy bridge, therefore corei7-avx is more appropriate.
(corei7 does not hurt, but you are loosing some multimedia optimizations)

V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
toralf
Advocate
Advocate


Joined: 01 Feb 2004
Posts: 2672
Location: Hamburg/Germany

PostPosted: Wed Feb 06, 2013 10:07 am    Post subject: Reply with quote

Anon-E-moose wrote:
sale wrote:
Since this proc has hyperthreading do I set makeopts -j3 or -j5?


I would use -J5
Hhm, here's an opposite opinion : http://blogs.gentoo.org/ago/2013/01/14/makeopts-jcore-1-is-not-the-best-optimization/#utm_source=feed&utm_medium=feed&utm_campaign=feed
Back to top
View user's profile Send private message
sale
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2004
Posts: 145
Location: ljubljana / slovenia

PostPosted: Wed Feb 06, 2013 9:55 pm    Post subject: Reply with quote

THX you both for answers.

Sale
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum