1 |
27 |
unneback |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# libm.cdl
|
4 |
|
|
#
|
5 |
|
|
# Maths library 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: jlarmour
|
45 |
|
|
# Contributors:
|
46 |
|
|
# Date: 1999-06-13
|
47 |
|
|
#
|
48 |
|
|
#####DESCRIPTIONEND####
|
49 |
|
|
#
|
50 |
|
|
# ====================================================================
|
51 |
|
|
|
52 |
|
|
cdl_package CYGPKG_LIBM {
|
53 |
|
|
display "Math library"
|
54 |
|
|
doc ref/libc.html
|
55 |
|
|
description "
|
56 |
|
|
ISO standard floating point mathematical library
|
57 |
|
|
containing many useful functions for mathematical
|
58 |
|
|
calculations."
|
59 |
|
|
|
60 |
|
|
compile misc/matherr.c misc/standard.c misc/compatmode.cxx \
|
61 |
|
|
misc/infconst.c \
|
62 |
|
|
\
|
63 |
|
|
double/ieee754-core/e_acos.c double/ieee754-core/e_asin.c \
|
64 |
|
|
double/ieee754-core/e_atan2.c double/ieee754-core/e_cosh.c \
|
65 |
|
|
double/ieee754-core/e_exp.c double/ieee754-core/e_fmod.c \
|
66 |
|
|
double/ieee754-core/e_log.c double/ieee754-core/e_log10.c \
|
67 |
|
|
double/ieee754-core/e_pow.c \
|
68 |
|
|
double/ieee754-core/e_rem_pio2.c \
|
69 |
|
|
double/ieee754-core/e_scalb.c double/ieee754-core/e_sinh.c \
|
70 |
|
|
double/ieee754-core/e_sqrt.c \
|
71 |
|
|
\
|
72 |
|
|
double/ieee754-api/w_acos.c double/ieee754-api/w_asin.c \
|
73 |
|
|
double/ieee754-api/w_atan2.c double/ieee754-api/w_cosh.c \
|
74 |
|
|
double/ieee754-api/w_exp.c double/ieee754-api/w_fmod.c \
|
75 |
|
|
double/ieee754-api/w_log.c double/ieee754-api/w_log10.c \
|
76 |
|
|
double/ieee754-api/w_pow.c double/ieee754-api/w_scalb.c \
|
77 |
|
|
double/ieee754-api/w_sinh.c double/ieee754-api/w_sqrt.c \
|
78 |
|
|
\
|
79 |
|
|
double/internal/k_cos.c double/internal/k_rem_pio2.c \
|
80 |
|
|
double/internal/k_sin.c double/internal/k_tan.c \
|
81 |
|
|
\
|
82 |
|
|
double/portable-api/s_atan.c double/portable-api/s_ceil.c \
|
83 |
|
|
double/portable-api/s_copysign.c \
|
84 |
|
|
double/portable-api/s_cos.c double/portable-api/s_expm1.c \
|
85 |
|
|
double/portable-api/s_fabs.c double/portable-api/s_finite.c \
|
86 |
|
|
double/portable-api/s_floor.c double/portable-api/s_frexp.c \
|
87 |
|
|
double/portable-api/s_isnan.c double/portable-api/s_ldexp.c \
|
88 |
|
|
double/portable-api/s_rint.c double/portable-api/s_scalbn.c \
|
89 |
|
|
double/portable-api/s_sin.c double/portable-api/s_tan.c \
|
90 |
|
|
double/portable-api/s_modf.c double/portable-api/s_tanh.c
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
# COMPATIBILITY-MODE RELATED CONFIGURATION OPTIONS
|
94 |
|
|
cdl_component CYGPKG_LIBM_COMPATIBILITY {
|
95 |
|
|
display "Compatibility mode"
|
96 |
|
|
flavor none
|
97 |
|
|
description "
|
98 |
|
|
These options deal with behaviour related to
|
99 |
|
|
the various compatibility modes - POSIX, IEEE,
|
100 |
|
|
X/OPEN and SVID."
|
101 |
|
|
|
102 |
|
|
script compat.cdl
|
103 |
|
|
}
|
104 |
|
|
|
105 |
|
|
# THREAD-SAFETY CONFIGURATION OPTIONS
|
106 |
|
|
cdl_component CYGPKG_LIBM_THREAD_SAFETY {
|
107 |
|
|
display "Thread safety"
|
108 |
|
|
flavor none
|
109 |
|
|
description "
|
110 |
|
|
This option controls whether the C library has
|
111 |
|
|
support for thread safe operation in general.
|
112 |
|
|
This requires eCos kernel support for per-thread
|
113 |
|
|
data, and adjustment of the stack limit."
|
114 |
|
|
|
115 |
|
|
cdl_option CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE {
|
116 |
|
|
display "Compatibility mode setting"
|
117 |
|
|
requires !CYGSEM_LIBM_COMPAT_IEEE_ONLY
|
118 |
|
|
requires CYGVAR_KERNEL_THREADS_DATA
|
119 |
|
|
default_value 0
|
120 |
|
|
description "
|
121 |
|
|
This option makes the setting of the compatiblity
|
122 |
|
|
mode be a per-thread property. This directly
|
123 |
|
|
implies that it also becomes thread-safe."
|
124 |
|
|
}
|
125 |
|
|
|
126 |
|
|
cdl_option CYGSEM_LIBM_THREAD_SAFE_GAMMA_FUNCTIONS {
|
127 |
|
|
display "gamma() and lgamma()"
|
128 |
|
|
requires CYGVAR_KERNEL_THREADS_DATA
|
129 |
|
|
default_value 0
|
130 |
|
|
description "
|
131 |
|
|
This option makes the gamma() and lgamma()
|
132 |
|
|
functions be thread-safe. Note that these
|
133 |
|
|
functions are identical - they take the log of
|
134 |
|
|
the absolute value of their argument. The sign
|
135 |
|
|
of the argument is stored in a variable called
|
136 |
|
|
signgam. Enabling this option makes signgam
|
137 |
|
|
a per-thread variable. Note there are also
|
138 |
|
|
gamma_r() and lgamma_r() alternatives that
|
139 |
|
|
allow signgam to be passed in by reference as
|
140 |
|
|
an argument."
|
141 |
|
|
}
|
142 |
|
|
}
|
143 |
|
|
|
144 |
|
|
# TRACING OPTIONS
|
145 |
|
|
cdl_component CYGPKG_LIBM_TRACE {
|
146 |
|
|
display "Tracing output levels in math library"
|
147 |
|
|
flavor bool
|
148 |
|
|
requires CYGDBG_USE_TRACING
|
149 |
|
|
default_value 0
|
150 |
|
|
description "
|
151 |
|
|
Tracing support is useful for debugging. Some
|
152 |
|
|
Math library modules can be configured with
|
153 |
|
|
different levels of tracing verbosity. These
|
154 |
|
|
levels can be configured here."
|
155 |
|
|
|
156 |
|
|
|
157 |
|
|
cdl_option CYGNUM_LIBM_COMPATMODE_TRACE_LEVEL {
|
158 |
|
|
display "Compatibility mode get/set"
|
159 |
|
|
requires CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE
|
160 |
|
|
flavor data
|
161 |
|
|
legal_values 0 to 1
|
162 |
|
|
default_value 0
|
163 |
|
|
description "
|
164 |
|
|
Trace level for debugging the getting and
|
165 |
|
|
setting of the compatibility mode when it is
|
166 |
|
|
configured to be thread-safe."
|
167 |
|
|
}
|
168 |
|
|
|
169 |
|
|
cdl_option CYGNUM_LIBM_SIGNGAM_TRACE_LEVEL {
|
170 |
|
|
display "signgam variable access"
|
171 |
|
|
requires CYGSEM_LIBM_THREAD_SAFE_GAMMA_FUNCTIONS
|
172 |
|
|
flavor data
|
173 |
|
|
legal_values 0 to 1
|
174 |
|
|
default_value 0
|
175 |
|
|
description "
|
176 |
|
|
Trace level for debugging all accesses to the
|
177 |
|
|
signgam variable in thread-safe mode."
|
178 |
|
|
}
|
179 |
|
|
}
|
180 |
|
|
|
181 |
|
|
# OTHER CONFIGURATION SETTINGS
|
182 |
|
|
cdl_option X_TLOSS {
|
183 |
|
|
display "Bessel function limit of significance"
|
184 |
|
|
flavor data
|
185 |
|
|
default_value 1.41484755040568800000e+16; # pi*(2**52)
|
186 |
|
|
legal_values 1 to 1e308; # FIXME
|
187 |
|
|
description "
|
188 |
|
|
For the Bessel functions (j0(), j1(), jn(),
|
189 |
|
|
y0(), y1(), yn()) this option defines the
|
190 |
|
|
maximum absolute value of the ordinate
|
191 |
|
|
before we assume total loss of significance.
|
192 |
|
|
This number must be a floating-point number (e.g.
|
193 |
|
|
contains a decimal point), and should be
|
194 |
|
|
large."
|
195 |
|
|
}
|
196 |
|
|
|
197 |
|
|
define_proc {
|
198 |
|
|
puts $::cdl_header "/***** proc output start *****/"
|
199 |
|
|
|
200 |
|
|
puts $::cdl_header "#include "
|
201 |
|
|
|
202 |
|
|
# TYPE DEFINITIONS
|
203 |
|
|
# Compatibility mode selector - required for default below
|
204 |
|
|
|
205 |
|
|
puts $::cdl_header "typedef enum {"
|
206 |
|
|
puts $::cdl_header " CYGNUM_LIBM_COMPAT_UNINIT= 0, // Default state. DO NOT set it to this"
|
207 |
|
|
puts $::cdl_header " CYGNUM_LIBM_COMPAT_POSIX = 1, // ANSI/POSIX 1003.1"
|
208 |
|
|
puts $::cdl_header " CYGNUM_LIBM_COMPAT_IEEE = 2, // IEEE-754"
|
209 |
|
|
puts $::cdl_header " CYGNUM_LIBM_COMPAT_XOPEN = 3, // X/OPEN Portability guide issue 3"
|
210 |
|
|
puts $::cdl_header " // (XPG3)"
|
211 |
|
|
puts $::cdl_header " CYGNUM_LIBM_COMPAT_SVID = 4 // System V Interface Definition 3rd"
|
212 |
|
|
puts $::cdl_header " // edition"
|
213 |
|
|
puts $::cdl_header "} Cyg_libm_compat_t;"
|
214 |
|
|
puts $::cdl_header ""
|
215 |
|
|
|
216 |
|
|
puts $::cdl_header "/****** proc output end ******/"
|
217 |
|
|
}
|
218 |
|
|
|
219 |
|
|
cdl_component CYGPKG_LIBM_OPTIONS {
|
220 |
|
|
display "Math library build options"
|
221 |
|
|
flavor none
|
222 |
|
|
description "
|
223 |
|
|
Package specific build options including control over
|
224 |
|
|
compiler flags used only in building this package,
|
225 |
|
|
and details of which tests are built."
|
226 |
|
|
|
227 |
|
|
|
228 |
|
|
cdl_option CYGPKG_LIBM_CFLAGS_ADD {
|
229 |
|
|
display "Additional compiler flags"
|
230 |
|
|
flavor data
|
231 |
|
|
no_define
|
232 |
|
|
default_value { ((0 == CYGPKG_HAL_I386) && (0 == CYGPKG_HAL_SYNTH_I386)) ? "" : "-ffloat-store" }
|
233 |
|
|
description "
|
234 |
|
|
This option modifies the set of compiler flags for
|
235 |
|
|
building the math library. These flags are used in addition
|
236 |
|
|
to the set of global flags."
|
237 |
|
|
}
|
238 |
|
|
|
239 |
|
|
cdl_option CYGPKG_LIBM_CFLAGS_REMOVE {
|
240 |
|
|
display "Suppressed compiler flags"
|
241 |
|
|
flavor data
|
242 |
|
|
no_define
|
243 |
|
|
default_value { "" }
|
244 |
|
|
description "
|
245 |
|
|
This option modifies the set of compiler flags for
|
246 |
|
|
building the math library. These flags are removed from
|
247 |
|
|
the set of global flags if present."
|
248 |
|
|
}
|
249 |
|
|
|
250 |
|
|
cdl_option CYGPKG_LIBM_TESTS {
|
251 |
|
|
display "Math library tests"
|
252 |
|
|
flavor data
|
253 |
|
|
no_define
|
254 |
|
|
calculated { "tests/vectors/acos tests/vectors/asin tests/vectors/atan tests/vectors/atan2 tests/vectors/ceil tests/vectors/cos tests/vectors/cosh tests/vectors/exp tests/vectors/fabs tests/vectors/floor tests/vectors/fmod tests/vectors/frexp tests/vectors/ldexp tests/vectors/log tests/vectors/log10 tests/vectors/modf tests/vectors/pow tests/vectors/sin tests/vectors/sinh tests/vectors/sqrt tests/vectors/tan tests/vectors/tanh" }
|
255 |
|
|
description "
|
256 |
|
|
This option specifies the set of tests for the math library."
|
257 |
|
|
}
|
258 |
|
|
}
|
259 |
|
|
}
|