[ECOS] C ompile options

Bart Veer bartv@ecoscentric.com
Fri May 2 17:02:00 GMT 2003

>>>>> "Gary" == Gary D Thomas <gary.thomas@mind.be> writes:

    Gary> Bart,
    Gary> Is there any way to get finer grain control over the C
    Gary> options used? In particular, I know how to do it on a
    Gary> package level, but I'd like to specify a special setup for
    Gary> just a handful of files. Is this possible?

Not at present, although it is something we could consider for 2.1.
One approach would be separate _ADD and _REMOVE configuration options
for every eCos source file, but that gets ugly. The actual options
could be generated inside the CDL by suitable Tcl, but you would still
end up with lots of extra options in the configtool and the save

Perhaps a better approach would be to expand the definition of the
_ADD options. For example in a savefile:

cdl_option <whatever>_CFLAGS_ADD {
   user_value "-O3\n\
file1.c: -O1\n\
file2.c: -O2"

So the compiler invocations for all files in this package would have
-O3 added. For file1.c -O1 would then be appended (which I believe
overrides the earlier -O3), for file2.c you end up with -O2.

However this is just a thought, I have not worked through all the
implications. In particular it might not work too well in the GUI
configtool, at least not without an implementation of custom dialogs.


Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

More information about the Ecos-discuss mailing list