[jamming] Problems Setting OPTIM on a target

David A Vincent dvincent at Toshiba-TAP.com
Tue Apr 5 04:39:33 PDT 2005


-----BEGIN PGP SIGNED MESSAGE-----

I'd like to thank Joseph and Anuj for their responses, which helped me 
to find a solution to my particular problem.

I wanted to override the value of OPTIM for a particular target, in the 
same way that the Cc rule allows me to set up target-specific values of 
HDRS and DEFINES.  But the Cc rule, when it assembles OPTIM into the 
target-specific value of CCFLAGS, does not consult a target-specific 
value of OPTIM.  A problem similar to this was discussed on Jamming, 
but the solution appears to have used a past version of the Cc rule, 
and it didn't work for me with a recent version of Jambase.  In the 
past version of the Cc rule, OPTIM went directly into the command line 
in the actions, while in the current version it goes by way of CCFLAGS.

Anuj suggested a modification to the Cc rule in the Jambase.  Joseph 
made some comments about Anuj's modification, and the way past versions 
of the Cc rule worked.

As a result of this discussion, I eventually realised that while I 
can't set a target-specific value of OPTIM in our Jamfile, I am able to 
modify the target-specific value of CCFLAGS, which is assembled by Cc 
based on OPTIM and other variables.  (I'm reluctant to mess with our Cc 
rule.)  Our C compiler (gcc) allows rightward -Ox options in the 
command line to override any to the left. So in our Jamfile, after the 
code that feeds a number of sources to Library (and thus to Cc), I've 
added something like the following.

CCFLAGS on <$(SOURCE_GRIST)>c-source-file-basename$(SUFOBJ) += -O0

But I would echo Joseph's questions about why the Jambase Cc rule is 
the way it is.


- -- 

David A Vincent                   dvincent at toshiba-tap.com
Software Engineer                telephone +61 2 9850-2593
RESEARCH AND DEVELOPMENT  TOSHIBA (AUSTRALIA) PTY. LIMITED
      "The best things in life are free.  So is Perl."

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iQCVAwUBQlJ5GpjExRNGDpoZAQHPjQP9HDMVtZhLwG+VP8dUzwjihGKnBg72sUtm
VniJjPrlkdO+PZfrFB1MewMKT8fmsnCeu6ZNdayN40wfxdjddURw4kK5hG2x17sI
ECJcrl9GabGuylA8+oxKHuTXAMwTCYOecY9ttd184L9kxDL2XQSZK2WIS6BajMh3
lSqCdwywI5U=
=jud1
-----END PGP SIGNATURE-----


#####################################################################################
Note:
This message is for the named person's use only.  It may contain confidential, proprietary 
or legally privileged information.  No confidentiality or privilege is waived or lost by any 
mis-transmission.  If you receive this message in error, please immediately delete it and all 
copies of it from your system, destroy any hard copies of it and notify the sender.  
You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of 
this message if you are not the intended recipient. Toshiba Australia reserves the right to 
monitor all e-mail communications through its networks.
 
Thank You. 

#####################################################################################



More information about the jamming mailing list