#855: config/init/defaults.pm:  Profiling options are too specific to GCC
-----------------------+----------------------------------------------------
 Reporter:  jkeenan    |       Owner:  jkeenan          
     Type:  bug        |      Status:  assigned         
 Priority:  minor      |   Milestone:                   
Component:  configure  |     Version:  1.3.0            
 Severity:  medium     |    Keywords:  profile gcc debug
     Lang:             |       Patch:                   
 Platform:  all        |  
-----------------------+----------------------------------------------------

Comment(by jkeenan):

 I've stared at this ticket from time to time over the past two months.
 Some further observations:

 1. It's interesting that the config step which makes the final
 determination re a debugging build, `init::optimize` (step 17), occurs
 long after the next-to-last step in this process, `inter::progs` (step 5).

 2. It's also interesting that the POD to ''config/init/optimize.pm'' asks
 the question:
 {{{
 Should this be part of config/inter/progs.pm? XXX
 }}}
 If the answer to that question were ''Yes,'' then we could handle our
 debugging and optimization concerns much earlier in the process.

 3. Unfortunately, `init::optimize` relies on two config data that are
 determined between steps 5 and 15:

 a. Are we using ''gcc'' and, if so, which version?
 {{{
     my $gccversion = $conf->data->get( 'gccversion' );
 }}}
 (determined in Step 9, `auto::gcc`)

 b. Are we on AMD64?
 {{{
     if ($conf->data->get('cpuarch') eq 'amd64') {
         $conf->data->set('optimize::src/gc/system.c','');
     }
 }}}
 (`cpuarch` is determined in Step 15, `auto::arch`)

 4. This raises the possibility that the best way to proceed might be to
 use step 17 more explicitly for making the final determinations for
 '''both''' debugging and optimization.  After all, if we're requesting
 optimization, we don't want the debugging information.  And (I think) vice
 versa.

 That would imply consolidating assignments to `cc_debug`, `ld_debug` and
 `link_debug` in step 17 -- and not doing them earlier.  What we would do
 earlier is to define appropriate values for appropriate
 OS/compiler/platform combinations.

 How does that sound?

 Thank you very much.

 kid51

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/855#comment:12>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to