1 # ====================================================================
5 # C library stdlib related 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####
47 #####DESCRIPTIONEND####
49 # ====================================================================
51 cdl_package CYGPKG_LIBC_STDLIB {
52 display "ISO C library general utility functions"
54 This package provides general utility functions in <stdlib.h>
55 as specified by the ISO C standard - ISO/IEC 9899:1990."
57 include_dir cyg/libc/stdlib
59 requires CYGPKG_ISOINFRA
60 implements CYGINT_ISO_STDLIB_STRCONV
61 implements CYGINT_ISO_STDLIB_ENVIRON
62 implements CYGINT_ISO_STDLIB_SYSTEM
63 implements CYGINT_ISO_BSEARCH
64 implements CYGINT_ISO_QSORT
65 implements CYGINT_ISO_ABS
66 implements CYGINT_ISO_DIV
67 requires CYGINT_ISO_CTYPE
68 requires CYGINT_ISO_STRING_STRFUNCS
70 compile abs.cxx atox.cxx bsearch.cxx \
71 div.cxx getenv.cxx qsort.cxx \
72 rand.cxx strtod.cxx strtol.cxx \
73 strtoul.cxx system.cxx
75 # ====================================================================
77 cdl_component CYGIMP_LIBC_STDLIB_INLINES {
78 display "Inline versions of <stdlib.h> functions"
82 This option chooses whether some of the
83 particularly simple standard utility functions
84 from <stdlib.h> are available as inline
85 functions. This may improve performance, and as
86 the functions are small, may even improve code
89 cdl_option CYGIMP_LIBC_STDLIB_INLINE_ABS {
90 display "abs() / labs()"
93 requires { CYGBLD_ISO_STDLIB_ABS_HEADER == \
94 "<cyg/libc/stdlib/abs.inl>" }
97 cdl_option CYGIMP_LIBC_STDLIB_INLINE_DIV {
98 display "div() / ldiv()"
101 requires { CYGBLD_ISO_STDLIB_DIV_HEADER == \
102 "<cyg/libc/stdlib/div.inl>" }
105 cdl_option CYGIMP_LIBC_STDLIB_INLINE_ATOX {
106 display "atof() / atoi() / atol()"
109 requires { CYGBLD_ISO_STDLIB_STRCONV_HEADER == \
110 "<cyg/libc/stdlib/atox.inl>" }
114 cdl_component CYGPKG_LIBC_RAND {
115 display "Random number generation"
118 These options control the behaviour of the
119 functions rand(), srand() and rand_r()"
121 cdl_option CYGSEM_LIBC_PER_THREAD_RAND {
122 display "Per-thread random seed"
123 doc ref/libc-thread-safety.html
124 requires CYGVAR_KERNEL_THREADS_DATA
127 This option controls whether the pseudo-random
128 number generation functions rand() and srand()
129 have their state recorded on a per-thread
130 basis rather than global. If this option is
131 disabled, some per-thread space can be saved.
132 Note there is also a POSIX-standard rand_r()
133 function to achieve a similar effect with user
134 support. Enabling this option will use one slot
135 of kernel per-thread data. You should ensure you
136 have enough slots configured for all your
140 cdl_option CYGNUM_LIBC_RAND_SEED {
141 display "Random number seed"
143 legal_values 0 to 0x7fffffff
146 This selects the initial random number seed for
147 rand()'s pseudo-random number generator. For
148 strict ISO standard compliance, this should be 1,
149 as per section 7.10.2.2 of the standard."
152 cdl_option CYGNUM_LIBC_RAND_TRACE_LEVEL {
153 display "Tracing level"
158 Trace verbosity level for debugging the rand(),
159 srand() and rand_r() functions. Increase this
160 value to get additional trace output."
163 cdl_option CYGIMP_LIBC_RAND_SIMPLEST {
164 display "Simplest implementation"
167 implements CYGINT_ISO_RAND
169 This provides a very simple implementation of rand()
170 that does not perform well with randomness in the
171 lower significant bits. However it is exceptionally
172 fast. It uses the sample algorithm from the ISO C
176 cdl_option CYGIMP_LIBC_RAND_SIMPLE1 {
177 display "Simple implementation #1"
180 implements CYGINT_ISO_RAND
182 This provides a very simple implementation of rand()
183 based on the simplest implementation above. However
184 it does try to work around the lack of randomness
185 in the lower significant bits, at the expense of a
189 cdl_option CYGIMP_LIBC_RAND_KNUTH1 {
190 display "Knuth implementation #1"
193 implements CYGINT_ISO_RAND
195 This implements a slightly more complex algorithm
196 published in Donald E. Knuth's Art of Computer
197 Programming Vol.2 section 3.6 (p.185 in the 3rd ed.).
198 This produces better random numbers than the
199 simplest approach but is slower."
203 cdl_option CYGFUN_LIBC_strtod {
204 display "Provides strtod()"
206 default_value { 0 != CYGPKG_LIBM }
207 implements CYGINT_ISO_STDLIB_STRCONV_FLOAT
209 This option allows use of the utility function
210 strtod() (and consequently atof()) to convert
211 from string to double precision floating point
212 numbers. Disabling this option removes the
213 dependency on the math library package."
216 cdl_option CYGFUN_LIBC_STDLIB_CONV_LONGLONG {
217 display "Provides long long conversion functions"
219 compile strtoll.cxx strtoull.cxx
221 Enabling this option will provide support for the strtoll(),
222 strtoull() and atoll() conversion functions, which are
223 the long long variants of the standard versions of these
224 functions. Supporting this requires extra code and compile
228 cdl_option CYGNUM_LIBC_BSEARCH_TRACE_LEVEL {
229 display "bsearch() tracing level"
234 Trace verbosity level for debugging the <stdlib.h>
235 binary search function bsearch(). Increase this
236 value to get additional trace output."
239 cdl_option CYGNUM_LIBC_QSORT_TRACE_LEVEL {
240 display "qsort() tracing level"
245 Trace verbosity level for debugging the <stdlib.h>
246 quicksort function qsort(). Increase this value
247 to get additional trace output."
251 # ====================================================================
253 cdl_component CYGPKG_LIBC_STDLIB_OPTIONS {
254 display "C library stdlib build options"
258 Package specific build options including control over
259 compiler flags used only in building this package,
260 and details of which tests are built."
263 cdl_option CYGPKG_LIBC_STDLIB_CFLAGS_ADD {
264 display "Additional compiler flags"
269 This option modifies the set of compiler flags for
270 building this package. These flags are used in addition
271 to the set of global flags."
274 cdl_option CYGPKG_LIBC_STDLIB_CFLAGS_REMOVE {
275 display "Suppressed compiler flags"
280 This option modifies the set of compiler flags for
281 building this package. These flags are removed from
282 the set of global flags if present."
285 cdl_option CYGPKG_LIBC_STDLIB_TESTS {
286 display "C library stdlib tests"
289 calculated { "tests/abs tests/atoi tests/atol tests/bsearch tests/div tests/getenv tests/labs tests/ldiv tests/qsort tests/rand1 tests/rand2 tests/rand3 tests/rand4 tests/srand tests/strtol tests/strtoul" }
291 This option specifies the set of tests for this package."
296 # ====================================================================