Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Managing Your Gentoo ["Sort-Of" Easily], Tips, and More
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
judepereira
Apprentice
Apprentice


Joined: 19 Jan 2008
Posts: 179
Location: Portage, yes, somewhere out there

PostPosted: Tue Sep 22, 2009 2:11 am    Post subject: Managing Your Gentoo ["Sort-Of" Easily], Tips, and Reply with quote

I'm writing a neat little article for a Gentoo User, please be nice and contribute. It's at http://judepereira.com/blog/2009/09/21/managing-your-gentoo-sort-of-easily-tips-and-more/. Hope everyone likes it.

P. S.: I don't want to copy/paste everything here as I will be always updating that post when I find better ways of managing Gentoo, so then this version will be very stale after about a month or so.
_________________
Jude Pereira
(http://judepereira.com)
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3753
Location: sleeping in the bathtub

PostPosted: Tue Sep 22, 2009 7:16 am    Post subject: Reply with quote

A few suggestions wrt the CFLAGS in your guide, which you've most likely heard before, but anyways;

You have CFLAGS="-O2 -march=i686 -pipe", it really would be better to have the -march of the specific machine it's running on, you're essentially compiling everything for a generic pentium-pro class machine otherwise.
For one thing, the correct -march setting allows gcc to include assembly instructions like mmx and sse where possible.

Also, on i686 CHOSTS you should add -fomit-frame-pointer, it's included in most other archs if any -O flag is set, however on i386 it makes debuging more difficult, so must be explicitly declared to be used.
The advantage is it can free up a register, which on i386 processors are in short supply so is a rather good thing.

Lastly, just use CXXFLAGS="${CFLAGS}".

You can use that elsewhere too, such as FEATURES="${FEATURES} foo", commenting or uncommenting this will give you an easy way to add or remove "foo" from your features, if there's something you only want to enable or disable once in a while.

Another (better) example, and related to what you have in yours;
Code:
PORTAGE_BANDWIDTH='200'

PORTAGE_RSYNC_EXTRA_OPTS="--bwlimit=${PORTAGE_BANDWIDTH}"
FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -O \${DISTDIR}/\${FILE} \${URI} --limit-rate=${PORTAGE_BANDWIDTH}k"
RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O \${DISTDIR}/\${FILE} \${URI} --limit-rate=${PORTAGE_BANDWIDTH}k"
This limits the bandwidth used by rsync (if you use that --sync method) as well as package fetches.

Also, "--exclude-from=/etc/portage/rsync_excludes" is something often added to PORTAGE_RSYNC_EXTRA_OPTS, where /etc/portage/rsync_excludes is a list of categories to exclude from updating when syncing portage, it can reduce the time and bandwidth used during sync, as well as reducing the size of your local portage tree which can have other benefits.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
judepereira
Apprentice
Apprentice


Joined: 19 Jan 2008
Posts: 179
Location: Portage, yes, somewhere out there

PostPosted: Wed Sep 23, 2009 4:07 pm    Post subject: Reply with quote

Thanks, Hopeless, I will be updating the post as per your suggestions... Not getting a lot of time lately due to my college events!
_________________
Jude Pereira
(http://judepereira.com)
Back to top
View user's profile Send private message
nico--
n00b
n00b


Joined: 29 Jul 2002
Posts: 56

PostPosted: Sat Sep 26, 2009 9:01 am    Post subject: Reply with quote

-march=native is easy and works for all users, no matter what cpu they have.
_________________
Quidquid latine dictum sit, altum viditur.
Back to top
View user's profile Send private message
NotQuiteSane
Guru
Guru


Joined: 30 Jan 2005
Posts: 471
Location: Klamath Falls, Jefferson, USA, North America, Midgarth

PostPosted: Sun Sep 27, 2009 12:24 pm    Post subject: Reply with quote

nico-- wrote:
-march=native is easy and works for all users, no matter what cpu they have.


Incorrect

You should not use '-march=native' if running distcc

NQS
_________________
These opinions are mine, mine I say! Piss off and get your own.

As I see it -- An irregular blog, Improved with new location

To delete French language packs from system use 'sudo rm -fr /'
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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