[ECOS] How to modify CFLAGS within an ECM file?

Andrew Lunn andrew@lunn.ch
Wed Sep 12 18:02:00 GMT 2007


On Wed, Sep 12, 2007 at 12:12:36PM -0500, Mike Arthur wrote:
> > Take a look at:
> >
> > http://ecos.sourceware.org/docs-latest/cdl-guide/language.values.html
> >
> > In particular the first example after the table of operators, the
> > example in the section Functions, and the documentation for is_substr()
> >
> 
> 
> I get this error while trying to import my .ecm file:
> ---------------------------------------------------------------------
> option CYGBLD_GLOBAL_CFLAGS: error
>     invalid command name "requires"
> 
> 
> 
> 
> The ecm file looks like this:
> --------------------------------------
> cdl_option CYGBLD_GLOBAL_CFLAGS {
>     requires { is_substr(CYGBLD_GLOBAL_CFLAGS, " -O2") }
> };
> 
> 
> Do .ecm files have the same commands as .cdl?

Ah, my error. I thought you wanted this in one of your .cdl files.

You probably need to add some cdl somewhere, something like

cdl_option CYGBLD_GLOBAL_CFLAGS_O2 {
           display  "Compile with -02"
           default  0
           no_define
           requires { is_substr(CYGBLD_GLOBAL_CFLAGS, " -O2") }
}

And then in your .ecm file

cdl_option CYGBLD_GLOBAL_CFLAGS_O2 {
    user_value 1
}

        Andrew           

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



More information about the Ecos-discuss mailing list