Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mixed Optimization Flags
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
mikebela777
n00b
n00b


Joined: 11 Sep 2004
Posts: 20

PostPosted: Sun Dec 04, 2005 10:38 pm    Post subject: Mixed Optimization Flags Reply with quote

I've an AMD Sempron on my machine and I want to optimize the compilation for my processor in such a way that the packages obtained in the "/usr/portage/packages" would run faultlessly on a Pentium 2 too. The older processors (i386, i486, i586) are out of theme!

Can I mix the -march and the -mcpu flags with different parameters in these manners?:

Code:
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium2 -mcpu=athlon-xp -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

and/or
Code:
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=i686 -mcpu=athlon-xp -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

(I've took over this idea from Patrick Volkedring, who optimizes the Slackware packages with "-march=i486 -mcpu=i686".)
_________________
http://www.mikebela.home.ro
Back to top
View user's profile Send private message
cokey
Advocate
Advocate


Joined: 23 Apr 2004
Posts: 3343

PostPosted: Sun Dec 04, 2005 11:13 pm    Post subject: Reply with quote

if -march is used -mcpu will be ignored
_________________
"Sex: breakfast of champions" - James Hunt
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Mon Dec 05, 2005 11:29 am    Post subject: Reply with quote

Moved from Installing Gentoo to Duplicate Threads.
See here: https://forums.gentoo.org/viewtopic-t-73719-highlight-march+mcpu+difference.html

Search first, then post in the relevant thread.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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