Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CFLAGS for a Stage 1
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
Xelinis
n00b
n00b


Joined: 04 Jun 2007
Posts: 1

PostPosted: Mon Jun 04, 2007 1:20 am    Post subject: CFLAGS for a Stage 1 Reply with quote

Okay guys, I'm doing a Gentoo Stage 1 install on my grandfather's laptop. It's an Intel Celeron @ 2.13 with 512MB of RAM. As far as CFLAGS go, what's the call? O3 or Os?
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Mon Jun 04, 2007 1:27 am    Post subject: Re: CFLAGS for a Stage 1 Reply with quote

Xelinis wrote:
Okay guys, I'm doing a Gentoo Stage 1 install on my grandfather's laptop. It's an Intel Celeron @ 2.13 with 512MB of RAM. As far as CFLAGS go, what's the call? O3 or Os?


May I ask why are you doing a stage1 install on a laptop? You know you will get the same starting with a stage3, don't you?

Anyway, the CFLAGS are totally independent of the stage you choose. I advice you to use -O2 or -Os. -O3 has many problems, and can break packages. Anyway, most vulnerable packages just filter that flag out. In any case, even if you like -O3 for some obscure reason, or you think that it is faster or something, here are the facts:

1.- -O3 = bigger code, bigger binaries
2.- bigger bins = ++memory consumption, more disk space
3.- bigger binary files in hard disk = slower reads, and much more stress for your hd
4.- point 3, in a laptop, means shorter battery life, extra memory usage doesn't help either, + (possibly) overheating problems.

Now, you choose. :)
Back to top
View user's profile Send private message
mudrii
l33t
l33t


Joined: 26 Jun 2003
Posts: 789
Location: Singapore

PostPosted: Mon Jun 04, 2007 2:49 am    Post subject: Reply with quote

same here go with -O2 or Os depend on the platform for x86 Os is good inaf for amd64 O2 should do it.
_________________
www.gentoo.ro
Back to top
View user's profile Send private message
user118696
Apprentice
Apprentice


Joined: 16 Sep 2005
Posts: 276

PostPosted: Mon Jun 04, 2007 2:56 am    Post subject: Reply with quote

I've recently made a Stage1 install on my laptop (bootstrap.sh from Stage3) using these flags :
Code:
CFLAGS="-march=nocona -pipe -fomit-frame-pointer"
CFLAGS="${CFLAGS} -O3 -ffast-math -funroll-all-loops -ftree-vectorize"

Everything compiled without a single error and my Dell XPS M1210 is incredibly fast.

I must add that these flags are not for anybody though. You must be ready to work around things a bit... :)
Back to top
View user's profile Send private message
mark_alec
Bodhisattva
Bodhisattva


Joined: 11 Sep 2004
Posts: 6066
Location: Melbourne, Australia

PostPosted: Mon Jun 04, 2007 8:34 am    Post subject: Reply with quote

muaddib wrote:
CFLAGS="${CFLAGS} -O3 -ffast-math -funroll-all-loops -ftree-vectorize"
Don't expect any kind of support on bugzilla, and limited supported on the forums with those CFLAGS.
_________________
www.gentoo.org.au || #gentoo-au
Back to top
View user's profile Send private message
user118696
Apprentice
Apprentice


Joined: 16 Sep 2005
Posts: 276

PostPosted: Mon Jun 04, 2007 12:33 pm    Post subject: Reply with quote

mark_alec wrote:
Don't expect any kind of support on bugzilla, and limited supported on the forums with those CFLAGS.

Don't worry, I know that for sure! :) I assume my choices and I'm ready to work hard. I didn't want to lure people into this, believe me. That's why I added the last sentence on my previous post. My laptop is sort of an experimental lab...

I must add that I was the first to be surprised when everything compiled smoothly both with bootstrap.sh and emerge -e system. I expected some crashes but nothing happened. Logged everything, went through it all... Well, that made my day! :)


Last edited by user118696 on Mon Jun 04, 2007 1:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Mon Jun 04, 2007 12:55 pm    Post subject: Reply with quote

You say this is your grandfather's laptop, not yours. In that case, the #1 goal is reliability, not speed. I would suggest either "-O2" since that's best-tested, or "-Os" because it's a Celeron with an undersized L2 cache, and is still pretty decently tested. But "-O3" is still frequently recommended against, is more likely to produce problems for your grandfather.

How far away does he live?
I maintain a Gentoo system for my mother, 600+ miles away.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
djdunn
l33t
l33t


Joined: 26 Dec 2004
Posts: 810

PostPosted: Mon Jun 04, 2007 1:23 pm    Post subject: Reply with quote

-O3 is somewhat frowned upon in theory its better but at the same time it has drawbacks, the bigger memory usage and whatnot mentioned.

a stage 1 leaves all kinds of things installed that arent in the world file and stuff. thus all the stuff about a stage 1 on 3 install awhile ago but a stage one isnt recommended anymore. Back in the day, a stage one was THE way to do things but things change. It's not the way, at least not now.
_________________
“Music is a moral law. It gives a soul to the Universe, wings to the mind, flight to the imagination, a charm to sadness, gaiety and life to everything. It is the essence of order, and leads to all that is good and just and beautiful.”

― Plato
Back to top
View user's profile Send private message
FastTurtle
Guru
Guru


Joined: 03 Sep 2002
Posts: 477
Location: Flakey Shake & Bake Caliornia, USA

PostPosted: Wed Jun 06, 2007 4:46 pm    Post subject: Reply with quote

DJDUNN:
Actually, a stage1 install doesn't leave anything that's not in the world file or are you suggesting that a stage3 tarball, which BTW is built from a stage1 by catalyst has lots of stuff not in the world file?

Xelinis:
I'd suggest you start with a stage2 tarball instead as the only reason to even perform a stage1 with full bootstrap is when there's a change in the toolchain. Otherwise the stage2 offers the same options as you'd get with a stage1 except without the agravation of the stage1 failing. Another fact is you're doing this on a laptop and a stage1 really loads the CPU and I'd be more worried about overheating since the cooling capacity is pretty limited.

IF you aren't afraid of pulling the covers, I'd suggest you thoroughly clean both the vents and if possible the heatsink of the CPU to help cool things down. Also place it on an elevated oven rack to maximize cooling and yes I've built Gentoo on a laptop and had heating issues (Turion ML34 with 1GB of memory).

As to make options: I'd go with the Os because not only will it generate smaller code (it enables almost everything used by O2) but the resulting binaries are actually smaller in size, which on a slow laptop drive means faster loading.
_________________
AsRock B550 Phantom Gaming 4
128GB 3200 Mhz memory
4x 4TB Sata - 2x 2TB Sata SSD - 4x 450GB SaS - 3x 900GB SaS - 72GB SaS for Boot
LSI 9211-8i in HBA mode for all of the SaS drives
Radeon 6800 (Non XT) for GPU
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