]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/infra/v2_0/cdl/infra.cdl
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / packages / infra / v2_0 / cdl / infra.cdl
1 # ====================================================================
2 #
3 #      infra.cdl
4 #
5 #      Infrastructure 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):      bartv
44 # Original data:  bartv,hmt
45 # Contributors:
46 # Date:           1999-06-13
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51
52 cdl_package CYGPKG_INFRA {
53     display       "Infrastructure"
54     include_dir   cyg/infra
55     description   "
56         Common types and useful macros.
57         Tracing and assertion facilities.
58         Package startup options." 
59
60     compile startup.cxx prestart.cxx pkgstart.cxx userstart.cxx      \
61             dummyxxmain.cxx null.cxx simple.cxx fancy.cxx buffer.cxx \
62             diag.cxx tcdiag.cxx memcpy.c memset.c delete.cxx eprintf.c \
63             pure.cxx
64
65
66     # ====================================================================
67 #    cdl_component CYGPKG_INFRA_TYPES {
68 #        display       "Common Types"
69 #        flavor        none
70 #        active_if     0               ;# Not yet configurable.
71 #        description   "
72 #            These types are used throughout the eCos source code.
73 #            Currently there are no configuration options associated
74 #            with the Common Types component; they are automatically
75 #            set up according to the selected HAL."
76 #    }
77
78     # ====================================================================
79     cdl_component CYGPKG_INFRA_DEBUG {
80         display       "Asserts & Tracing"
81         default_value 0
82         description   "
83             The eCos source code contains a significant amount of
84             internal debugging support, in the form of assertions and
85             tracing.
86             Assertions check at runtime that various conditions are as
87             expected; if not, execution is halted.
88             Tracing takes the form of text messages that are output
89             whenever certain events occur, or whenever functions are
90             called or return.
91             The most important property of these checks and messages is
92             that they are not required for the program to run.
93             It is prudent to develop software with assertions enabled,
94             but disable them when making a product release, thus
95             removing the overhead of that checking.
96             It is possible to enable assertions and tracing
97             independently.
98             There are also options controlling the exact behaviour of
99             the assertion and tracing facilities, thus giving users
100             finer control over the code and data size requirements."
101
102         script        debug.cdl
103     }
104
105     # ====================================================================
106     cdl_component CYGPKG_INFRA_STARTUP {
107         display       "Startup options"
108         flavor        none
109         description   "
110             Some packages require a startup routine to be called.
111             This can be carried out by application code, by supplying
112             a routine called cyg_package_start() which calls the
113             appropriate package startup routine(s).
114             Alternatively, this routine can be constructed automatically
115             and configured to call the startup routines of your choice."
116
117         script        startup.cdl
118     }
119
120     # ========================================================================
121     # memcpy()/memset() configuration
122     cdl_option CYGIMP_INFRA_PREFER_SMALL_TO_FAST_MEMCPY {
123         display       "Smaller slower memcpy()"
124         default_value 0
125         description   "
126             Enabling this option causes the implementation of
127             the standard memcpy() routine to reduce code
128             size at the expense of execution speed. This
129             option is automatically enabled with the use of
130             the -Os option to the compiler. Also note that
131             the compiler will try to use its own builtin
132             version of memcpy() if possible, ignoring the
133             implementation in this package, unless given
134             the -fno-builtin compiler option."
135     }
136
137     cdl_option CYGIMP_INFRA_PREFER_SMALL_TO_FAST_MEMSET {
138         display       "Smaller slower memset()"
139         default_value 0
140         description   "
141             Enabling this option causes the implementation of
142             the standard memset() routine to reduce code
143             size at the expense of execution speed. This
144             option is automatically enabled with the use of
145             the -Os option to the compiler. Also note that
146             the compiler will try to use its own builtin
147             version of memset() if possible, ignoring the
148             implementation in this package, unless given
149             the -fno-builtin compiler option."
150     }
151
152     # ========================================================================
153
154     cdl_option CYGFUN_INFRA_EMPTY_DELETE_FUNCTIONS {
155         display       "Provide empty C++ delete functions"
156         default_value 1
157         description   "
158             To deal with virtual destructors, where the correct delete()
159             function must be called for the derived class in question, the
160             underlying delete is called when needed, from destructors.  This
161             is regardless of whether the destructor is called by delete itself.
162             So there is a reference to delete() from all destructors.  The
163             default builtin delete() attempts to call free() if there is
164             one defined.  So, if you have destructors, and you have free(),
165             as in malloc() and free(), any destructor counts as a reference
166             to free().  So the dynamic memory allocation code is linked
167             in regardless of whether it gets explicitly called. This
168             increases code and data size needlessly.
169             
170             To defeat this undesirable behaviour, we define empty versions
171             of delete and delete[].  But doing this prevents proper use
172             of dynamic memory in C++ programs via C++'s new and delete
173             operators.
174             
175             Therefore, this option is provided
176             for explicitly disabling the provision of these empty functions,
177             so that new and delete can be used, if that is what is required."
178     }
179
180     cdl_option CYGNUM_INFRA_EMPTY_DELETE_THRESHOLD {
181         display       "Threshold for valid number of delete calls"
182         flavor        data
183         default_value 100
184         active_if     CYGPKG_INFRA_DEBUG
185         description   "
186             Some users don't know about the empty delete function and then
187             wonder why their C++ classes are leaking memory. If
188             INFRA_DEBUG is enabled we keep a counter for the number of
189             times delete is called. If it goes above this threshold we throw
190             an assertion failure. This should point heavy users of
191             delete in the right direction without upsetting those who want
192             an empty delete function. "
193     }
194     
195     # ========================================================================
196
197     cdl_option CYGFUN_INFRA_DUMMY_ABORT {
198         display       "Provide dummy abort() function"
199         requires      !CYGINT_ISO_EXIT
200         default_value { CYGINT_ISO_EXIT == 0 }
201         compile       abort.cxx
202         description   "
203             This option controls the inclusion of a dummy abort() function.
204             Parts of the C and C++ compiler runtime systems contain references
205             to abort(), particulary in the C++ exception handling code. It is
206             not possible to eliminate these references, so this dummy function
207             in included to satisfy them. It is not expected that this function
208             will ever be called, so its current behaviour is to simply loop."
209     }
210
211     # ========================================================================
212
213     cdl_option CYGSEM_INFRA_RESET_ON_TEST_EXIT {
214         display       "Reset platform at end of test case execution"
215         default_value 0
216         description   "
217             If this option is set then test case programs will reset the platform
218             when they terminate, as opposed to the default which is to just hang
219             in a loop."
220     }
221
222     # ========================================================================
223
224     cdl_option CYGFUN_INFRA_DUMMY_STRLEN {
225         display       "Provide dummy strlen() function"
226         requires      !CYGINT_ISO_STRING_STRFUNCS
227         default_value { CYGINT_ISO_STRING_STRFUNCS == 0 }
228         compile       strlen.cxx
229         description   "
230             This option controls the inclusion of a dummy strlen() function.
231             Parts of the C and C++ compiler runtime systems contain references
232             to strlen(), particulary in the C++ exception handling code. It is
233             not possible to eliminate these references, so this dummy function
234             in included to satisfy them. While it is not expected that this function
235             will ever be called, it is functional but uses the simplest, smallest
236             algorithm. There is a faster version of strlen() in the C library."
237     }
238     
239     # ========================================================================
240     # Debugging-related miscellania.
241
242     define_proc {
243         puts $::cdl_header "/***** proc output start *****/"
244         puts $::cdl_header "#include <pkgconf/system.h>"
245         puts $::cdl_header "/*****  proc output end  *****/"
246     }
247
248
249     # ========================================================================
250     # Global compiler option controls
251
252     cdl_option CYGBLD_INFRA_CFLAGS_WARNINGS_AS_ERRORS {
253         display       "Make all compiler warnings show as errors"
254         requires      { is_substr(CYGBLD_GLOBAL_CFLAGS, " -Werror") }
255         default_value 0
256         description   "
257             Enabling this option will cause all compiler warnings to show
258             as errors and bring the library build to a halt. This is used
259             to ensure that the code base is warning free, and thus ensure
260             that newly introduced warnings stand out and get fixed before
261             they show up as weird run-time behavior."
262     }
263
264     cdl_option CYGBLD_INFRA_CFLAGS_PIPE {
265         display       "Make compiler and assembler communicate by pipe"
266         requires      { is_substr(CYGBLD_GLOBAL_CFLAGS, " -pipe") }
267         default_value 0
268         description   "
269             Enabling this option will cause the compiler to feed the
270             assembly output the the assembler via a pipe instead of
271             via a temporary file. This normally reduces the build
272             time."
273     }
274
275     # ========================================================================
276     # Package compiler options
277
278     cdl_component CYGPKG_INFRA_OPTIONS {
279         display "Infra build options"
280         flavor  none
281         description   "
282             Package specific build options including control over
283             compiler flags used only in building this package."
284
285
286         cdl_option CYGPKG_INFRA_CFLAGS_ADD {
287             display "Additional compiler flags"
288             flavor  data
289             no_define
290             default_value { "-fno-rtti -Woverloaded-virtual" }
291             description   "
292                 This option modifies the set of compiler flags for
293                 building the eCos infra package. These flags are used
294                 in addition to the set of global flags."
295         }
296
297         cdl_option CYGPKG_INFRA_CFLAGS_REMOVE {
298             display "Suppressed compiler flags"
299             flavor  data
300             no_define
301             default_value { "-Wno-pointer-sign" }
302             description   "
303                 This option modifies the set of compiler flags for
304                 building the eCos infra package. These flags are removed from
305                 the set of global flags if present."
306         }
307
308         cdl_option CYGPKG_INFRA_LDFLAGS_REMOVE {
309             display "Suppressed linker flags"
310             flavor  data
311             no_define
312             default_value { "-Wl,--gc-sections" }
313             description   "
314                 This option modifies the set of linker flags for
315                 building the eCos infra package tests. These flags are removed from
316                 the set of global flags if present."
317         }
318
319         cdl_option CYGPKG_INFRA_LDFLAGS_ADD {
320             display "Additional linker flags"
321             flavor  data
322             no_define
323             default_value { "-Wl,--fatal-warnings" }
324             description   "
325                 This option modifies the set of linker flags for
326                 building the eCos infra package tests. These flags are added to
327                 the set of global flags if present."
328         }
329
330         cdl_component CYGPKG_INFRA_TESTS {
331             display "Infra package tests"
332             flavor  data
333             no_define
334             calculated { "tests/cxxsupp tests/diag_sprintf1 tests/diag_sprintf2" }
335
336             cdl_option CYGNUM_TESTS_RUN_COUNT {
337                 display "Number of times a test runs"
338                 flavor  data
339                 default_value 1 
340                 description "
341                     This option controls the number of times tests will execute their
342                     basic function.  Not all tests will honor this setting, but those
343                     that do will execute the test N times before terminating.  A value
344                     less than 0 indicates to run forever."
345             }
346         }
347
348     }
349 }