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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [services/] [loader/] [v2_0/] [cdl/] [loader.cdl] - Blame information for rev 174

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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