1 # ====================================================================
5 # Infrastructure configuration data
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.
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.
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
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.
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.
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.
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####
44 # Original data: bartv,hmt
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_package CYGPKG_INFRA {
53 display "Infrastructure"
56 Common types and useful macros.
57 Tracing and assertion facilities.
58 Package startup options."
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 \
66 # ====================================================================
67 # cdl_component CYGPKG_INFRA_TYPES {
68 # display "Common Types"
70 # active_if 0 ;# Not yet configurable.
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."
78 # ====================================================================
79 cdl_component CYGPKG_INFRA_DEBUG {
80 display "Asserts & Tracing"
83 The eCos source code contains a significant amount of
84 internal debugging support, in the form of assertions and
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
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
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."
105 # ====================================================================
106 cdl_component CYGPKG_INFRA_STARTUP {
107 display "Startup options"
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."
120 # ========================================================================
121 # memcpy()/memset() configuration
122 cdl_option CYGIMP_INFRA_PREFER_SMALL_TO_FAST_MEMCPY {
123 display "Smaller slower memcpy()"
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."
137 cdl_option CYGIMP_INFRA_PREFER_SMALL_TO_FAST_MEMSET {
138 display "Smaller slower memset()"
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."
152 # ========================================================================
154 cdl_option CYGFUN_INFRA_EMPTY_DELETE_FUNCTIONS {
155 display "Provide empty C++ delete functions"
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.
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
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."
180 cdl_option CYGNUM_INFRA_EMPTY_DELETE_THRESHOLD {
181 display "Threshold for valid number of delete calls"
184 active_if CYGPKG_INFRA_DEBUG
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. "
195 # ========================================================================
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 }
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."
211 # ========================================================================
213 cdl_option CYGSEM_INFRA_RESET_ON_TEST_EXIT {
214 display "Reset platform at end of test case execution"
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
222 # ========================================================================
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 }
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."
239 # ========================================================================
240 # Debugging-related miscellania.
243 puts $::cdl_header "/***** proc output start *****/"
244 puts $::cdl_header "#include <pkgconf/system.h>"
245 puts $::cdl_header "/***** proc output end *****/"
249 # ========================================================================
250 # Global compiler option controls
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") }
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."
264 cdl_option CYGBLD_INFRA_CFLAGS_PIPE {
265 display "Make compiler and assembler communicate by pipe"
266 requires { is_substr(CYGBLD_GLOBAL_CFLAGS, " -pipe") }
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
275 # ========================================================================
276 # Package compiler options
278 cdl_component CYGPKG_INFRA_OPTIONS {
279 display "Infra build options"
282 Package specific build options including control over
283 compiler flags used only in building this package."
286 cdl_option CYGPKG_INFRA_CFLAGS_ADD {
287 display "Additional compiler flags"
290 default_value { "-fno-rtti -Woverloaded-virtual" }
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."
297 cdl_option CYGPKG_INFRA_CFLAGS_REMOVE {
298 display "Suppressed compiler flags"
301 default_value { "-Wno-pointer-sign" }
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."
308 cdl_option CYGPKG_INFRA_LDFLAGS_REMOVE {
309 display "Suppressed linker flags"
312 default_value { "-Wl,--gc-sections" }
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."
319 cdl_option CYGPKG_INFRA_LDFLAGS_ADD {
320 display "Additional linker flags"
323 default_value { "-Wl,--fatal-warnings" }
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."
330 cdl_component CYGPKG_INFRA_TESTS {
331 display "Infra package tests"
334 calculated { "tests/cxxsupp tests/diag_sprintf1 tests/diag_sprintf2" }
336 cdl_option CYGNUM_TESTS_RUN_COUNT {
337 display "Number of times a test runs"
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."