• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

which use flags for gentoo?

Dark Atheist

Moderator
Staff member
Political User
#1
ok so i am messing about with gentoo, but i have no clue what use flags to use

(Usually, (the number of processors + 1) is a good value)
mybox ~ # echo 'MAKEOPTS="-j2"' >> /etc/make.conf

so for a p4m 1.8 that should be j2 as shown, for a dual core j3 and quad core j5 ?

cflags and use flags are confusing the hell out of me though, are they really required ?

edit: just found this - http://gentoo-wiki.com/Safe_Cflags
 
Last edited:

j79zlr

Glaanies script monkey
Political User
#2
Don't go crazy with your cflags, it will offer very little in the way of performance gains and offer very much in the way of headaches and failed compiles.

Use flags are the best part of Gentoo, it is what allows you to customize the compilation of each program. Personally I find it way more useful than the BSD's. X will be here shortly to mention how Gentoo sucks and it has way too many custom patches, but I personally love Gentoo.

If you are using Gentoo for a desktop, link to the desktop profile, e.g.

ln -s /etc/make.profile /usr/portage/profiles/default-linux/<arch>/2007.1/desktop

That should give you some good use flag defaults.
 

Dark Atheist

Moderator
Staff member
Political User
#3
if you look at the link in my post above and you look at the cflags below which someone gave me - who is rather up with Gentoo you will see there is little difference per se

CFLAGS="-O2 -fforce-addr -fomit-frame-pointer -march=x86-64 -mmmx -msse -msse2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"


i have stuck with the cflags from the link in my original post.

so far apart from the way Gentoo likes to be setup and the different commands i find Gentoo and freebsd very similar, although i have only just started messing with Gentoo.

So that file will give me all the flags i require for gnome/kde/xfce - what about alsa and things like that?
 

j79zlr

Glaanies script monkey
Political User
#4
You can read the make.defaults file in the directory that is linked, it lists the use flags it sets. If you want to only use gnome, I would disable qt3, qt4, kde and artsd in make.conf and if you only want to use kde, disable gnome, evo and eds.

I should have used 2007.0 instead of 2007.1 btw.

CFLAGS="-O2 -fforce-addr -fomit-frame-pointer -march=x86-64 -mmmx -msse -msse2 -pipe" would probably cause problems.

You have a 64-bit P4 from what I can tell. Do not change the CHOST variable. I would use the following:

CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
You do not have to set -mmmx -msse -msse2 since they are implied by your arch setting. I never set anything other than fomit-frame-pointer and -pipe. Anything over -O2 can cause strange results.
 

Dark Atheist

Moderator
Staff member
Political User
#5
nope AMD64 X2 - so with the make flags its a case of try and see, if something works you did it right if it doesn't you didn't :)

if i can get it working fine i might put it onto my amd64 x2 and not t he persons who pc i am holding hostage till he pays me for the repairs i did to his pc :p

so would need the cflags for a p4 m 1.8 and amd64 x2
 

j79zlr

Glaanies script monkey
Political User
#6
For 64-bit X2

CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CXXFLAGS="${CFLAGS}"


For the P4-m

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

You can always adjust your use flags, then run

emerge --ask --verbose --newuse --update --deep world

To recompile with your new use flags set.
 

Dark Atheist

Moderator
Staff member
Political User
#8
something we overlooked -

(Usually, (the number of processors + 1) is a good value)
mybox ~ # echo 'MAKEOPTS="-j2"' >> /etc/make.conf

so for a p4m 1.8 that should be j2 as shown, for a dual core j3 and quad core j5 ?

from my original post
 

j79zlr

Glaanies script monkey
Political User
#11
You wouldn't have to recompile, the only thing that affect is how many threads are used during compilation. Usually setting it too high will cause the system to freeze.
 

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,014
Latest member
sanoravies