which use flags for gentoo?

Dark Atheist

OSNN Veteran Addict
Staff member
Political User
Joined
Apr 8, 2003
Messages
6,376
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
Joined
Feb 16, 2003
Messages
2,725
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

OSNN Veteran Addict
Staff member
Political User
Joined
Apr 8, 2003
Messages
6,376
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
Joined
Feb 16, 2003
Messages
2,725
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

OSNN Veteran Addict
Staff member
Political User
Joined
Apr 8, 2003
Messages
6,376
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
Joined
Feb 16, 2003
Messages
2,725
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

OSNN Veteran Addict
Staff member
Political User
Joined
Apr 8, 2003
Messages
6,376
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
 

Dark Atheist

OSNN Veteran Addict
Staff member
Political User
Joined
Apr 8, 2003
Messages
6,376
thank god for that, thought i might have to recompile everything yet again
 

j79zlr

Glaanies script monkey
Political User
Joined
Feb 16, 2003
Messages
2,725
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

Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did :(
Terrahertz wrote on Electronic Punk's profile.
Yo fellas.
Electronic Punk wrote on Sazar's profile.
Where are you buddy? :(
Perris Calderon wrote on Electronic Punk's profile.
Hey ep!

All good with me, applying for microsoft mvp right now, should have done this a while ago.

Notifications don't work, I only found your response by comming back to hunt up some threads, if you want, give me your email address so we can keep in touch easier, mine is perriscalderon at gmail
Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl

Forum statistics

Threads
61,980
Messages
673,294
Members
89,078
Latest member
JulianTic