Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gcc flags
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
dcstimm
Guru
Guru


Joined: 19 Jun 2002
Posts: 321

PostPosted: Wed Jul 17, 2002 11:40 pm    Post subject: gcc flags Reply with quote

hi I have a dual p3 machine I want gcc to have the best flags possible for my machine.

this is what i currently have (which I know is default)

CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=i686 -O3 -pipe"
CXXFLAGS="-mcpu=i686 -O3 -pipe"

can you tell me why there isnt a option for a more p3 oriented option in the make.conf?

why not use some options like this?
-O3 -march=pentium3 -fomit-frame-pointer -pipe -mmmx -msse
(of course I dont know how to set them up in the format above)

could these be included in the make.conf file so when I build gentoo I can have it optimized for my hardware?

thanks...
Back to top
View user's profile Send private message
proxy
Apprentice
Apprentice


Joined: 20 Apr 2002
Posts: 253
Location: Chantilly, VA

PostPosted: Thu Jul 18, 2002 3:09 am    Post subject: Reply with quote

err, just put whatever you want there..that's the point. gentoo supplies you with _examples_ which are safe for more or less every program, if you want ot expand on that...feel free. That's the beuty of gentoo.

my CFLAGS looks like this:

Code:
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O3 -pipe -fomit-frame-pointer -fstrength-reduce -fexpensive-optimizations -frerun-cse-after-loop -frerun-loop-opt -malign-functions=4"
CXXFLAGS=${CFLAGS}


proxy
Back to top
View user's profile Send private message
citizen428
Retired Dev
Retired Dev


Joined: 10 Jun 2002
Posts: 317
Location: Vienna, Austria

PostPosted: Thu Jul 18, 2002 10:47 am    Post subject: Reply with quote

Hi Proxy!

-O3 includes all the options you specify seperately.

Code:

-O: defer_pop, thread_jumps, delayed_branch, omit_frame_pointer, opt_reg_use, reduce_index_givs

-O2: cse_follow_jumps, cse_skip_blocks, gcse, expensive_optimizations, strength_reduce, rerun_cse_after_loop, rerun_loop_opt, caller_saves, force_mem, regmove, schedule_insns, schedule_insns_after_reload

-O3: inline_functions, jump_back, copy_prop, compare_elim, sftwr_pipe, reg_reg_copy_opt, peep_spills, replace_stack_mem, opt_jumps_out, replace_mem, correct_cse_mistakes, push_load_into_loop, replace_reload_regs, sign_extension_elim, lift_stores


They're cumulative, so -O2 includes all of -O, as -O3 includes all of -0 and -O2.

Just to save you some typing. :)

http://industrial-linux.org/pgcc-options.html

See also man gcc, Optimization Options.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat 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