[ECOS] CDL and makefile output
Jesper Skov
jskov@zoftcorp.dk
Thu Nov 13 01:00:00 GMT 2008
I am looking for a way to replace the below in hal.cdl:
make -priority 250 {
<PREFIX>/lib/extras.o: <PREFIX>/lib/libextras.a
$(CC) $(CFLAGS) -nostdlib -Wl,-r -Wl,--whole-archive -o $@ $<
}
with something along the lines of:
--- hal.cdl (revision 25)
+++ hal.cdl (working copy)
@@ -71,10 +71,21 @@
make -priority 250 {
<PREFIX>/lib/extras.o: <PREFIX>/lib/libextras.a
- $(CC) $(CFLAGS) -nostdlib -Wl,-r -Wl,--whole-archive -o $@ $<
+ $(CC) $(CFLAGS) $(EXTRAS_LDFLAGS) -o $@ $<
}
+ cdl_option CYGBLD_GLOBAL_EXTRAS_LDFLAGS {
+ display "Extras.o linker flags"
+ flavor data
+ parent CYGBLD_GLOBAL_OPTIONS
+ no_define
+ default_value { "-nostdlib -Wl,-r -Wl,--whole-archive" }
+ description "
+ This option controls the extras.o linker flags. Individual
+ packages may define options which override these global flags."
+ }
So I can modify the EXTRAS_LDFLAGS in a platform HAL.
Unfortunately, as far as I remember, CDL doesn't allow CDL values to
expanded in the make section. And I couldn't find anything to that
effect in the documentation or in the existing CDL files, so I figure
not much changed in this regard in the past 6 years. Or am I wrong?
Suggestions for alternative ways of handling this obviously accepted :)
Cheers,
Jesper
--
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