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 # ========================================================================
182 cdl_option CYGFUN_INFRA_DUMMY_ABORT {
183 display "Provide dummy abort() function"
184 requires !CYGINT_ISO_EXIT
185 default_value { CYGINT_ISO_EXIT == 0 }
188 This option controls the inclusion of a dummy abort() function.
189 Parts of the C and C++ compiler runtime systems contain references
190 to abort(), particulary in the C++ exception handling code. It is
191 not possible to eliminate these references, so this dummy function
192 in included to satisfy them. It is not expected that this function
193 will ever be called, so its current behaviour is to simply loop."
196 # ========================================================================
198 cdl_option CYGSEM_INFRA_RESET_ON_TEST_EXIT {
199 display "Reset platform at end of test case execution"
202 If this option is set then test case programs will reset the platform
203 when they terminate, as opposed to the default which is to just hang
207 # ========================================================================
209 cdl_option CYGFUN_INFRA_DUMMY_STRLEN {
210 display "Provide dummy strlen() function"
211 requires !CYGINT_ISO_STRING_STRFUNCS
212 default_value { CYGINT_ISO_STRING_STRFUNCS == 0 }
215 This option controls the inclusion of a dummy strlen() function.
216 Parts of the C and C++ compiler runtime systems contain references
217 to strlen(), particulary in the C++ exception handling code. It is
218 not possible to eliminate these references, so this dummy function
219 in included to satisfy them. While it is not expected that this function
220 will ever be called, it is functional but uses the simplest, smallest
221 algorithm. There is a faster version of strlen() in the C library."
224 # ========================================================================
225 # Debugging-related miscellania.
228 puts $::cdl_header "/***** proc output start *****/"
229 puts $::cdl_header "#include <pkgconf/system.h>"
230 puts $::cdl_header "/***** proc output end *****/"
234 # ========================================================================
235 # Global compiler option controls
237 cdl_option CYGBLD_INFRA_CFLAGS_WARNINGS_AS_ERRORS {
238 display "Make all compiler warnings show as errors"
239 requires { is_substr(CYGBLD_GLOBAL_CFLAGS, " -Werror") }
242 Enabling this option will cause all compiler warnings to show
243 as errors and bring the library build to a halt. This is used
244 to ensure that the code base is warning free, and thus ensure
245 that newly introduced warnings stand out and get fixed before
246 they show up as weird run-time behavior."
249 cdl_option CYGBLD_INFRA_CFLAGS_PIPE {
250 display "Make compiler and assembler communicate by pipe"
251 requires { is_substr(CYGBLD_GLOBAL_CFLAGS, " -pipe") }
254 Enabling this option will cause the compiler to feed the
255 assembly output the the assembler via a pipe instead of
256 via a temporary file. This normally reduces the build
260 # ========================================================================
261 # Package compiler options
263 cdl_component CYGPKG_INFRA_OPTIONS {
264 display "Infra build options"
267 Package specific build options including control over
268 compiler flags used only in building this package."
271 cdl_option CYGPKG_INFRA_CFLAGS_ADD {
272 display "Additional compiler flags"
277 This option modifies the set of compiler flags for
278 building the eCos infra package. These flags are used
279 in addition to the set of global flags."
282 cdl_option CYGPKG_INFRA_CFLAGS_REMOVE {
283 display "Suppressed compiler flags"
288 This option modifies the set of compiler flags for
289 building the eCos infra package. These flags are removed from
290 the set of global flags if present."
293 cdl_option CYGPKG_INFRA_LDFLAGS_REMOVE {
294 display "Suppressed linker flags"
297 default_value { "-Wl,--gc-sections" }
299 This option modifies the set of linker flags for
300 building the eCos infra package tests. These flags are removed from
301 the set of global flags if present."
304 cdl_option CYGPKG_INFRA_LDFLAGS_ADD {
305 display "Additional linker flags"
308 default_value { "-Wl,--fatal-warnings" }
310 This option modifies the set of linker flags for
311 building the eCos infra package tests. These flags are added to
312 the set of global flags if present."
315 cdl_component CYGPKG_INFRA_TESTS {
316 display "Infra package tests"
319 calculated { "tests/cxxsupp tests/diag_sprintf1 tests/diag_sprintf2" }
321 cdl_option CYGNUM_TESTS_RUN_COUNT {
322 display "Number of times a test runs"
326 This option controls the number of times tests will execute their
327 basic function. Not all tests will honor this setting, but those
328 that do will execute the test N times before terminating. A value
329 less than 0 indicates to run forever."