OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [services/] [loader/] [current/] [cdl/] [loader.cdl] - Blame information for rev 819

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      loader.cdl
4
#
5
#      Dynamic loader configuration data
6
#
7
# ====================================================================
8
## ####ECOSGPLCOPYRIGHTBEGIN####
9
## -------------------------------------------
10
## This file is part of eCos, the Embedded Configurable Operating System.
11
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
12
##
13
## eCos is free software; you can redistribute it and/or modify it under
14
## the terms of the GNU General Public License as published by the Free
15
## Software Foundation; either version 2 or (at your option) any later
16
## version.
17
##
18
## eCos is distributed in the hope that it will be useful, but WITHOUT
19
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
21
## for more details.
22
##
23
## You should have received a copy of the GNU General Public License
24
## along with eCos; if not, write to the Free Software Foundation, Inc.,
25
## 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
26
##
27
## As a special exception, if other files instantiate templates or use
28
## macros or inline functions from this file, or you compile this file
29
## and link it with other works to produce a work based on this file,
30
## this file does not by itself cause the resulting work to be covered by
31
## the GNU General Public License. However the source code for this file
32
## must still be made available in accordance with section (3) of the GNU
33
## General Public License v2.
34
##
35
## This exception does not invalidate any other reasons why a work based
36
## on this file might be covered by the GNU General Public License.
37
## -------------------------------------------
38
## ####ECOSGPLCOPYRIGHTEND####
39
# ====================================================================
40
######DESCRIPTIONBEGIN####
41
#
42
# Author(s):      nickg
43
# Contributors:
44
# Date:           2000-11-20
45
#
46
#####DESCRIPTIONEND####
47
#
48
# ====================================================================
49
 
50
cdl_package CYGPKG_LOADER {
51
    display       "Dynamic loader"
52
    description   "
53
                  This package provides support for dynamic code loading."
54
    include_dir   cyg/loader
55
    compile       loader.cxx dload.cxx
56
 
57
    requires      { CYGBLD_ISO_DLFCN_HEADER == "" }
58
    implements    CYGINT_ISO_DLFCN
59
 
60
# ====================================================================
61
 
62
    cdl_component CYGPKG_LOADER_OPTIONS {
63
        display "Common memory allocator package build options"
64
        flavor  none
65
        no_define
66
        description   "
67
            Package specific build options including control over
68
            compiler flags used only in building this package,
69
            and details of which tests are built."
70
 
71
        cdl_option CYGPKG_LOADER_CFLAGS_ADD {
72
            display "Additional compiler flags"
73
            flavor  data
74
            no_define
75
            default_value { "" }
76
            description   "
77
                This option modifies the set of compiler flags for
78
                building this package. These flags are used in addition
79
                to the set of global flags."
80
        }
81
 
82
        cdl_option CYGPKG_LOADER_CFLAGS_REMOVE {
83
            display "Suppressed compiler flags"
84
            flavor  data
85
            no_define
86
            default_value { "-O2 -fvtable-gc" }
87
            description   "
88
                This option modifies the set of compiler flags for
89
                building this package. These flags are removed from
90
                the set of global flags if present."
91
        }
92
 
93
        cdl_option CYGPKG_LOADER_LDFLAGS_ADD {
94
            display "Additional compiler flags"
95
            flavor  data
96
            no_define
97
#            default_value { "-L$(PREFIX)/lib -ldlforce" }
98
            default_value { "" }
99
            description   "
100
                This option modifies the set of compiler flags for
101
                building this package. These flags are used in addition
102
                to the set of global flags."
103
        }
104
 
105
        cdl_option CYGPKG_LOADER_LDFLAGS_REMOVE {
106
            display "Suppressed compiler flags"
107
            flavor  data
108
            no_define
109
            default_value { "-Wl,-static -Wl,--gc-sections" }
110
            description   "
111
                This option modifies the set of compiler flags for
112
                building this package. These flags are removed from
113
                the set of global flags if present."
114
        }
115
 
116
    }
117
 
118
# ====================================================================
119
# Dynamic library build options
120
 
121
    cdl_option CYGBLD_LOADER_DYNAMIC_LD {
122
        display    "Build linker script for dynamic libraries"
123
        flavor     bool
124
        default_value 1
125
        description "Build a linker script for creating dynamic libraries"
126
 
127
        make -priority 50 {
128
            /lib/dynamic.ld: /src/dynamic.ld
129
            $(CC) -E -P -Wp,-MD,dynamic.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $<
130
            @echo $@ ": \\" > $(notdir $@).deps
131
            @tail -n +2 dynamic.tmp >> $(notdir $@).deps
132
            @echo >> $(notdir $@).deps
133
            @rm dynamic.tmp
134
 
135
        }
136
    }
137
 
138
    cdl_option CYGBLD_LOADER_CRTBEGINS {
139
        display "Build special crtbeginS.o for dynamic libraries"
140
        flavor   bool
141
        default_value 1
142
 
143
        make -priority 110 {
144
        /lib/crtbeginS.o : /src/crtbeginS.c
145
        $(CC) -Wp,-MD,crtbeginS.tmp $(INCLUDE_PATH) -g0 -Wall -finhibit-size-directive -fno-inline-functions -fno-exceptions -c -o $@ $<
146
        @echo $@ ": \\" > $(notdir $@).deps
147
        @tail -n +2 crtbeginS.tmp >> $(notdir $@).deps
148
        @echo >> $(notdir $@).deps
149
        @rm crtbeginS.tmp
150
        }
151
    }
152
 
153
    cdl_option CYGBLD_LOADER_CRTENDS {
154
        display "Build special crtendS.o for dynamic libraries"
155
        flavor   bool
156
        default_value 1
157
 
158
        make -priority 110 {
159
        /lib/crtendS.o : /src/crtendS.c
160
        $(CC) -Wp,-MD,crtendS.tmp $(INCLUDE_PATH) -g0 -Wall -finhibit-size-directive -fno-inline-functions -fno-exceptions -c -o $@ $<
161
        @echo $@ ": \\" > $(notdir $@).deps
162
        @tail -n +2 crtendS.tmp >> $(notdir $@).deps
163
        @echo >> $(notdir $@).deps
164
        @rm crtendS.tmp
165
        }
166
    }
167
 
168
    cdl_option CYGBLD_LOADER_DLFORCE_LIB {
169
        display    "Build dynamic load library"
170
        flavor     bool
171
        default_value 1
172
        description "Build a shared library that is to be linked with the executable
173
                     to force it to be built in such a way that it is suitable for
174
                     having some other shared library load against it. This is the
175
                     most portable way of achieving this."
176
 
177
        make -priority 160 {
178
            /lib/libdlforce.so : /src/dlforce.c
179
                    $(CC) $(CFLAGS) -Wp,-MD,dlforce.tmp $(INCLUDE_PATH) -shared -c -o src/dlforce.o $<
180
                    $(CC) -g -nostdlib -L$(PREFIX)/lib -shared -Tdynamic.ld -o $@ $(PREFIX)/lib/crtbeginS.o src/dlforce.o $(PREFIX)/lib/crtendS.o
181
                    @echo $@ ": \\" > $(notdir $@).deps
182
                    @tail -n +2 dlforce.tmp >> $(notdir $@).deps
183
                    @echo >> $(notdir $@).deps
184
                    @rm dlforce.tmp
185
        }
186
    }
187
 
188
# ====================================================================
189
# Tests
190
 
191
 
192
    cdl_option CYGBLD_LOADER_TEST_FOO_LIB {
193
        display    "Build a dynamic load library"
194
        flavor     bool
195
        default_value 1
196
        description "Build a shared library for testing."
197
 
198
        make {
199
            tests/libfoo.so : /tests/foo.c
200
                    mkdir -p tests
201
                    $(CC) $(CFLAGS) -Wp,-MD,foo.tmp $(INCLUDE_PATH) -shared -c -o tests/foo.o $<
202
                    $(CC) $(LDFLAGS) -L$(PREFIX)/lib -shared -Tdynamic.ld -o $@ $(PREFIX)/lib/crtbeginS.o tests/foo.o $(PREFIX)/lib/crtendS.o
203
                    @echo $@ ": \\" > $(notdir $@).deps
204
                    @tail -n +2 foo.tmp >> $(notdir $@).deps
205
                    @echo >> $(notdir $@).deps
206
                    @rm foo.tmp
207
                    cc -o entable $(REPOSITORY)/$(PACKAGE)/tests/entable.c
208
                    ./entable libfoo tests/libfoo.so.c
209
        }
210
    }
211
 
212
    cdl_option CYGBLD_LOADER_TEST_LOADFOO {
213
        display   "Build library load test program"
214
        flavor    bool
215
        default_value 1
216
        description "Build a test program that will load the test shared library"
217
 
218
        make {
219
            /tests/services/loader/current/tests/loadfoo : /tests/loadfoo.cxx
220
                    mkdir -p $(PREFIX)/tests/services/loader/current/tests
221
                    $(CC) $(CFLAGS) -Wp,-MD,loadfoo.tmp $(INCLUDE_PATH) -c -o tests/loadfoo.o $<
222
#                   $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -ldlforce -o $@ $(PREFIX)/lib/crtbeginS.o tests/loadfoo.o $(PREFIX)/lib/crtendS.o
223
                    $(CC) $(LDFLAGS) -Wl,-E -L$(PREFIX)/lib -Ttarget.ld -ldlforce -o $@ tests/loadfoo.o
224
                    @echo $@ ": \\" > $(notdir $@).deps
225
                    @tail -n +2 loadfoo.tmp >> $(notdir $@).deps
226
                    @echo >> $(notdir $@).deps
227
                    @rm loadfoo.tmp
228
 
229
        }
230
    }
231
 
232
#    cdl_option CYGPKG_LOADER_TESTS {
233
#       display "Tests"
234
#       flavor  data
235
#       no_define
236
#       calculated { "tests/loadfoo" }
237
#       description   "
238
#                      This option specifies the set of tests for this package."
239
#    }
240
 
241
}
242
 
243
# ====================================================================
244
# EOF loader.cdl

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.