View previous topic :: View next topic |
Author |
Message |
sale Tux's lil' helper
Joined: 09 May 2004 Posts: 145 Location: ljubljana / slovenia
|
Posted: Wed Mar 23, 2011 10:53 am Post subject: Correct / safe cflags for core i5 3450 |
|
|
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 |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6097 Location: Dallas area
|
Posted: Wed Mar 23, 2011 11:14 am Post subject: |
|
|
What does Code: | gcc -march=native -E -v - </dev/null 2>&1 | sed -n 's/.* -v - //p' | return _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Veldrin Veteran
Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Wed Mar 23, 2011 12:15 pm Post subject: |
|
|
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 |
|
|
sale Tux's lil' helper
Joined: 09 May 2004 Posts: 145 Location: ljubljana / slovenia
|
Posted: Wed Mar 23, 2011 12:17 pm Post subject: |
|
|
I am preparing to install, so i guess i have to find which gcc is in the install cd? |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6097 Location: Dallas area
|
Posted: Wed Mar 23, 2011 12:32 pm Post subject: |
|
|
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. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
sale Tux's lil' helper
Joined: 09 May 2004 Posts: 145 Location: ljubljana / slovenia
|
Posted: Wed Mar 23, 2011 12:41 pm Post subject: |
|
|
I think I will go with march=native.
Thx for your help to both of you.
Br, Sale |
|
Back to top |
|
|
sale Tux's lil' helper
Joined: 09 May 2004 Posts: 145 Location: ljubljana / slovenia
|
Posted: Wed Mar 23, 2011 1:51 pm Post subject: |
|
|
Since this proc has hyperthreading do I set makeopts -j3 or -j5? |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6097 Location: Dallas area
|
Posted: Wed Mar 23, 2011 1:53 pm Post subject: |
|
|
sale wrote: | Since this proc has hyperthreading do I set makeopts -j3 or -j5? |
I would use -J5 _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
sale Tux's lil' helper
Joined: 09 May 2004 Posts: 145 Location: ljubljana / slovenia
|
Posted: Wed Mar 23, 2011 2:02 pm Post subject: |
|
|
Thx,
Sale |
|
Back to top |
|
|
sale Tux's lil' helper
Joined: 09 May 2004 Posts: 145 Location: ljubljana / slovenia
|
Posted: Tue Feb 05, 2013 10:17 pm Post subject: CORE i5 I3450 |
|
|
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 |
|
|
Veldrin Veteran
Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Wed Feb 06, 2013 9:19 am Post subject: |
|
|
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 |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
|
Back to top |
|
|
sale Tux's lil' helper
Joined: 09 May 2004 Posts: 145 Location: ljubljana / slovenia
|
Posted: Wed Feb 06, 2013 9:55 pm Post subject: |
|
|
THX you both for answers.
Sale |
|
Back to top |
|
|
|