Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Stupid Noob error on install,wrong CFLAG - Can I rebuild?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
krjoseph
n00b
n00b


Joined: 08 Feb 2003
Posts: 23
Location: Nashville, Tennessee, USA

PostPosted: Wed Feb 26, 2003 8:47 pm    Post subject: Stupid Noob error on install,wrong CFLAG - Can I rebuild? Reply with quote

Just getting started with Gentoo but am loving it. After years of playing with Mandrake and Red Hat I always went back to windows. I have not booted into windows in several day. Gentoo acutally makes me learn how linux works, and I have found answers and fixes to dozens of problems by searching the forums. Here is something I cannot find an answer for.

I did a stage 1 install and had my CFLAG set like this:
Code:
CFLAGS="-march=athlon-xp -03 -pipe"

After stage 1, 2, and 3 (which all seemed to work) I realized the dumb mistake and the reason I was seeing warnings during compile. I used -03 instead of -O3. I now know it should have been:
Code:
CFLAGS="-march=athlon-xp -O3 -pipe"


What does this -O3 mean anyway and have I totally screwed up my system? I fixed it to read -O3 after stage 3 and have installed mozilla, open office, KDE and Gnome with the correct setting in /etc/make.conf. Everything still runs faster than it ever did in RH.

Can I fix this, or do I need to? Should I rebuild the base system? If so, where do I start? Thanks.
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1408
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Wed Feb 26, 2003 9:04 pm    Post subject: Reply with quote

So long as your system is working you didn't "totally screw up" your system. The -O3 optimization is a compiler switch that indicates how much optimization should be used during compile time for the application. I believe that's what the O stands for is optimization. For more details on the GCC optimizations check this out. For processor specific options see here. And for the master list of all options see here.

I would guess (but I don't know for sure) that GCC just ignored the -03 option and compiled as though you had used

CFLAGS="-march=athlon-xp -pipe"

but in a worst case scenario I'd say that it only recognized all the options before the bad option wich would mean that it compiled as though you has used

CFLAGS="-march=athlon-xp"

Both of these obviously result in a working system, however not as optimized as it could be.

Yes you can fix this, no you don't 'need' to -- you may want to though. If you are considering rebuilding the entire system I'd argue that it might be "easiest" (which is relative to the way you approach the problem and will differ from person to person) to just start over again from scratch.

Regards,
BonezTheGoon
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1408
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Wed Feb 26, 2003 9:07 pm    Post subject: Reply with quote

Oh I should mention that all the links I posted are specific to the 3.2.2 version of GCC, which is VERY important to take note of!!

Regards,
BonezTheGoon
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Feb 26, 2003 9:58 pm    Post subject: Reply with quote

I could have sworn I've seen emerges fail because 0 (number) was used instead of O (letter). Has this changed, or does it not always fail?


Moved from Installing Gentoo.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
frogger
n00b
n00b


Joined: 05 Dec 2002
Posts: 35

PostPosted: Wed Feb 26, 2003 11:10 pm    Post subject: Reply with quote

If you want to rebuild everything without starting from scratch, you can first change your CFLAGS in make.conf to what you want them to be (e.g. fix the -O3), then:

emerge glibc
emerge -e world

This will rebuild everything on your system, and you can even use it as normal while you wait :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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