[ECOS] C ompile options

Gary D. Thomas gary.thomas@mind.be
Fri May 2 17:10:00 GMT 2003

On Fri, 2003-05-02 at 11:02, Bart Veer wrote:
> >>>>> "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
> files.
> 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.

OK, thanks.  For now, I can live with package-level options,
but I do think that it would be nice to have finer grain support
in the future.

I'm not sure how to specify this, but you're right, it can be
messy and hard to abstract into the GUI.  Maybe it could be
handled on the "compile" line, like we currently do for the
  compile -options="-DEXTRA" file.c

Gary D. Thomas <gary.thomas@mind.be>

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