This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

CDL and makefile output


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]