| View previous topic :: View next topic |
| Author |
Message |
dcstimm Guru


Joined: 19 Jun 2002 Posts: 321
|
Posted: Wed Jul 17, 2002 11:40 pm Post subject: gcc flags |
|
|
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 |
|
 |
proxy Apprentice


Joined: 20 Apr 2002 Posts: 253 Location: Chantilly, VA
|
Posted: Thu Jul 18, 2002 3:09 am Post subject: |
|
|
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 |
|
 |
citizen428 Retired Dev


Joined: 10 Jun 2002 Posts: 317 Location: Vienna, Austria
|
Posted: Thu Jul 18, 2002 10:47 am Post subject: |
|
|
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 |
|
 |
|
|
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
|
|