This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: How to modify CFLAGS within an ECM file?
- From: Sergei Gavrikov <w3sg at SoftHome dot Net>
- To: Mike Arthur <arth2219 at gmail dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Wed, 12 Sep 2007 18:01:08 +0300
- Subject: Re: [ECOS] How to modify CFLAGS within an ECM file?
- References: <2a3305fe0709111554x64de173ej3b684623610db101@mail.gmail.com>
Mike Arthur writes:
> Is there a way to adjust CFLAGS within an ECM file? I want to be able
> to adjust the optimization levels of configurations, without changing
> the rest of the CFLAGS when using ecosconfig. I don't want to have to
> hand edit the .ecc file.
>
> This is an example of what I want to do:
> $ ecosconfig new pc_rltk8139
> $ ecosconfig import file_that_modifies_optimization_to_O0.ecm
> $ ecosconfig tree
> $ make
>
> Now the 'pc_rltk8139' target would be built with -O0 optimization. I
> don't know what the contents of "file_that_modifies_optimization.ecm"
> would be.
>
> Any suggestions?
>
> Mike
It seems, it exists the ECos way for that (to make it with own CDL
rule), but Unix way is just to filter that
I did prepare same NOOPTIM.ECM using 'sed' and then import it
ecosconfig new target
sed -ne '/CYGBLD_GLOBAL_CFLAGS {/,/^}/p' ecos.ecc |
sed -e '/# user_value/s/# //;s/-g -O2/-g -O0/;/#/d;/^$/d' >NOOPTIM.ECM
ecosconfig import NOOPTIM.ECM
ecosconfig resolve
Sergei
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss