]>
Commit | Line | Data |
---|---|---|
8a0efa53 CF |
1 | # configure.host |
2 | ||
3 | # This shell script handles all host based configuration for newlib. | |
4 | # It sets various shell variables based on the the host and the | |
5 | # configuration options. You can modify this shell script without | |
6 | # needing to rerun autoconf. | |
7 | ||
8 | # This shell script should be invoked as | |
9 | # . configure.host | |
10 | # If it encounters an error, it will exit with a message. | |
11 | ||
12 | # FIXME: This script is too complicated. It does things in too many | |
13 | # different ways. This was taken from the old Cygnus configure script | |
14 | # with only minor changes. It should be cleaned up. | |
15 | ||
16 | # FIXME: The general approach of picking and choosing which | |
17 | # directories to configure, other than machine_dir and sys_dir, is | |
18 | # potentially confusing. | |
19 | ||
20 | # It uses the following shell variables: | |
21 | # host The configuration host | |
22 | # host_cpu The configuration host CPU | |
23 | # newlib_mb --enable-newlib-mb ("yes", "no") | |
24 | # target_optspace --enable-target-optspace ("yes", "no", "") | |
da25e61f JJ |
25 | # newlib_multithread --enable-newlib-multithread ("yes", "no", "yes") |
26 | # newlib_elix_level --enable-newlib-elix-level ("1","2","3","4") ("4") | |
0962fe91 | 27 | # newlib_io_c99_formats --enable-newlib-io-c99-formats ("yes", "no", "") |
227e6ef6 JJ |
28 | # newlib_io_long_long --enable-newlib-io-long-long ("yes", "no", "") |
29 | # newlib_io_long_double --enable-newlib-io-long-double ("yes", "no", "") | |
cd31fbb2 | 30 | # newlib_global_stdio_streams --enable-global-stdio-streams ("yes", "no, "") |
a9cfb33b | 31 | # newlib_fno_builtin --disable-newlib-fno-builtin ("yes", "no, "") |
e06f2fbd | 32 | # newlib_reent_check_verify --enable-newlib-reent-check-verify ("yes", "no, "") |
8a0efa53 CF |
33 | |
34 | # It sets the following shell variables: | |
35 | # newlib_cflags Special CFLAGS to use when building | |
36 | # machine_dir Subdirectory of libc/machine to configure | |
80bd01ef CV |
37 | # shared_machine_dir Subdirectory of libc/machine for files shared |
38 | # between specific architectures, optional | |
8a0efa53 | 39 | # sys_dir Subdirectory of libc/sys to configure |
bfc27bae | 40 | # have_sys_mach_dir Is there a machine subdirectory in sys subdirectory |
8a0efa53 CF |
41 | # posix_dir "posix" to build libc/posix, "" otherwise |
42 | # signal_dir "signal" to build libc/signal, "" otherwise | |
9b022d6d | 43 | # stdio64_dir "stdio64" to build libc/stdio64, "" otherwise |
8a0efa53 CF |
44 | # syscall_dir "syscalls" to build libc/syscalls, "" otherwise |
45 | # unix_dir "unix" to build libc/unix, "" otherwise | |
34e66679 | 46 | # lpfx library object prefix - generated when no libtool |
6e6cd5bd JJ |
47 | # crt1 name of crt1 object if one is provided |
48 | # crt1_dir directory where crt1 object is found | |
45c8bb8f JJ |
49 | # have_crt0 "yes"/"no" if crt0 is/isn't provided. |
50 | # "" if crt0 is provided when sys_dir is set | |
6158b30e | 51 | # have_init_fini have init/fini ("yes" or "no", set to "yes" by default) |
0597fe0a | 52 | # noinclude list of include files to not install |
8a0efa53 | 53 | |
6226bad0 | 54 | newlib_cflags="-D_LIBC" |
2e1a7175 | 55 | libm_machine_dir= |
8a0efa53 | 56 | machine_dir= |
80bd01ef | 57 | shared_machine_dir= |
8a0efa53 CF |
58 | sys_dir= |
59 | posix_dir= | |
60 | signal_dir=signal | |
0733ae3b | 61 | stdio_dir=stdio |
dee51391 | 62 | stdio64_dir= |
3d7c4998 | 63 | xdr_dir= |
8a0efa53 CF |
64 | syscall_dir= |
65 | unix_dir= | |
0597fe0a | 66 | noinclude= |
8a0efa53 | 67 | mach_add_setjmp= |
6e6cd5bd JJ |
68 | crt1= |
69 | crt1_dir= | |
45c8bb8f | 70 | have_crt0= |
6158b30e | 71 | have_init_fini=yes |
0962fe91 | 72 | default_newlib_io_c99_formats=no |
227e6ef6 JJ |
73 | default_newlib_io_long_long=no |
74 | default_newlib_io_long_double=no | |
75 | default_newlib_io_pos_args=no | |
ce93dfe4 | 76 | default_newlib_atexit_dynamic_alloc=yes |
d043b4c5 | 77 | default_newlib_nano_malloc=no |
f5da56ab | 78 | default_newlib_reent_check_verify=yes |
34e66679 | 79 | lpfx="lib_a-" |
cd31fbb2 | 80 | newlib_msg_warn= |
8a0efa53 CF |
81 | |
82 | case "${target_optspace}:${host}" in | |
83 | yes:*) | |
84 | newlib_cflags="${newlib_cflags} -Os" | |
85 | ;; | |
0c773467 | 86 | :m32r-* | :d10v-* | :d30v-* | :avr-* | :m32c-* | :msp430*-* | :nds32* | :pru-* | :rl78-* ) |
8a0efa53 CF |
87 | newlib_cflags="${newlib_cflags} -Os" |
88 | ;; | |
89 | no:* | :*) | |
8a0efa53 CF |
90 | ;; |
91 | esac | |
92 | ||
a9cfb33b JB |
93 | case "${newlib_fno_builtin}:${host}" in |
94 | yes:*) | |
95 | newlib_cflags="${newlib_cflags} -fno-builtin" | |
96 | ;; | |
97 | no:*) | |
98 | newlib_cflags="${newlib_cflags}" | |
99 | ;; | |
100 | *:*) | |
101 | # For now, all targets default to using -fno-builtin until tested without | |
102 | newlib_cflags="${newlib_cflags} -fno-builtin" | |
103 | ;; | |
104 | esac | |
105 | ||
8a0efa53 CF |
106 | # Get the source directories to use for the CPU type. |
107 | # machine_dir should supply CPU dependent routines, such as setjmp. | |
108 | # newlib_cflags is passed to gcc when compiling. | |
109 | # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY. | |
110 | ||
111 | case "${host_cpu}" in | |
112 | a29k) | |
113 | machine_dir=a29k | |
114 | ;; | |
c3fe5bf7 JJ |
115 | aarch64*) |
116 | machine_dir=aarch64 | |
117 | libm_machine_dir=aarch64 | |
118 | ;; | |
1787e9d0 JJ |
119 | amdgcn*) |
120 | newlib_cflags="${newlib_cflags} -D__DYNAMIC_REENT__" | |
121 | machine_dir=amdgcn | |
e1874307 | 122 | libm_machine_dir=amdgcn |
d5ebf527 | 123 | newlib_cv_initfinit_array=yes |
1787e9d0 | 124 | ;; |
820dd500 | 125 | arc | arceb) |
c0a99f02 | 126 | machine_dir=arc |
8a0efa53 | 127 | ;; |
820dd500 YK |
128 | arc64 | arc32) |
129 | machine_dir=arc64 | |
130 | ;; | |
b680a27c | 131 | arm*) |
8a0efa53 | 132 | machine_dir=arm |
25e21cbc | 133 | libm_machine_dir=arm |
8a0efa53 | 134 | ;; |
4634da64 JJ |
135 | avr*) |
136 | newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mcall-prologues" | |
137 | ;; | |
292f8e23 JJ |
138 | bfin) |
139 | machine_dir=bfin | |
140 | ;; | |
874a87f8 JJ |
141 | cr16*) |
142 | machine_dir=cr16 | |
143 | ;; | |
1815fdea | 144 | cris | crisv32) |
e3ddbeb8 HPN |
145 | # The size of the (kernel_)time_t passed from or to a |
146 | # simulator or a Linux kernel is mandated by the | |
147 | # gettimeofday and time system calls and fixed to 32 bits, the | |
148 | # size of a long. Instead of churning as 64 bits what is anyway | |
149 | # 32 bits, it makes more sense to default to long. | |
150 | test -z "${enable_newlib_long_time_t}" && newlib_long_time_t=yes | |
1815fdea JJ |
151 | machine_dir=cris |
152 | ;; | |
1185687a JJ |
153 | crx*) |
154 | machine_dir=crx | |
155 | ;; | |
8315a908 J |
156 | csky*) |
157 | machine_dir=csky | |
158 | default_newlib_atexit_dynamic_alloc="no" | |
159 | ;; | |
8a0efa53 CF |
160 | d10v*) |
161 | machine_dir=d10v | |
162 | ;; | |
163 | d30v*) | |
164 | machine_dir=d30v | |
165 | ;; | |
9edde1d2 JJ |
166 | epiphany) |
167 | machine_dir=epiphany | |
168 | ;; | |
def943c1 JJ |
169 | fido) |
170 | machine_dir=m68k | |
171 | newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE" | |
172 | ;; | |
8a0efa53 CF |
173 | fr30) |
174 | machine_dir=fr30 | |
175 | ;; | |
bac50d6b NC |
176 | frv) |
177 | machine_dir=frv | |
178 | ;; | |
948b5f00 JJ |
179 | ft32*) |
180 | machine_dir=ft32 | |
f296bb35 | 181 | newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED" |
948b5f00 | 182 | ;; |
8a0efa53 CF |
183 | h8300) |
184 | machine_dir=h8300 | |
185 | ;; | |
186 | h8500) | |
187 | machine_dir=h8500 | |
188 | ;; | |
189 | hppa*) | |
190 | machine_dir=hppa | |
191 | ;; | |
192 | i960) | |
193 | machine_dir=i960 | |
194 | ;; | |
102861c9 | 195 | i[34567]86) |
c326ca16 CV |
196 | libm_machine_dir=i386 |
197 | machine_dir=i386 | |
198 | shared_machine_dir=shared_x86 | |
8a0efa53 CF |
199 | # Don't use for these since they provide their own setjmp. |
200 | case ${host} in | |
d693ad84 | 201 | *-*-sco* | *-*-cygwin*) |
8a0efa53 CF |
202 | ;; |
203 | *) | |
8a0efa53 CF |
204 | mach_add_setjmp=true |
205 | ;; | |
206 | esac | |
207 | ;; | |
ec463fc7 JW |
208 | ia64*) |
209 | ;; | |
bfdfd7e6 AG |
210 | iq2000) |
211 | machine_dir=iq2000 | |
212 | ;; | |
0e859ad1 JJ |
213 | lm32) |
214 | machine_dir=lm32 | |
215 | ;; | |
56448afa | 216 | m32c) |
0a0f33e5 | 217 | machine_dir=m32c |
c3f3d59e | 218 | newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY" |
56448afa JJ |
219 | ;; |
220 | ||
8a0efa53 CF |
221 | m32r*) |
222 | machine_dir=m32r | |
223 | ;; | |
a703e0f2 JJ |
224 | |
225 | m68hc11|m6811|m68hc12|m6812) | |
226 | machine_dir=m68hc11 | |
227 | newlib_cflags="-DPREFER_SIZE_OVER_SPEED -Os -mrelax" | |
228 | CFLAGS="-g -Os" | |
229 | ;; | |
230 | ||
8a0efa53 CF |
231 | m68*) |
232 | machine_dir=m68k | |
55500bf1 | 233 | newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE" |
8a0efa53 CF |
234 | ;; |
235 | m88k) | |
236 | machine_dir=m88k | |
237 | newlib_cflags="${newlib_cflags} -m88000" | |
238 | ;; | |
239 | m88110) | |
240 | machine_dir=m88k | |
241 | newlib_cflags="${newlib_cflags} -m88110" | |
242 | ;; | |
243 | mcore) | |
244 | ;; | |
6041792e | 245 | microblaze*) |
6c249577 JJ |
246 | machine_dir=microblaze |
247 | ;; | |
7b4cad4a DB |
248 | mep) |
249 | machine_dir=mep | |
250 | ;; | |
8a0efa53 CF |
251 | mips*) |
252 | machine_dir=mips | |
65918715 | 253 | libm_machine_dir=mips |
8a0efa53 | 254 | ;; |
8be9b48b JJ |
255 | mmix) |
256 | ;; | |
8a0efa53 CF |
257 | mn10200) |
258 | machine_dir=mn10200 | |
259 | ;; | |
260 | mn10300) | |
cf55bf5e | 261 | default_newlib_io_long_long="yes" |
8a0efa53 CF |
262 | machine_dir=mn10300 |
263 | ;; | |
2beb9fbb JJ |
264 | moxie) |
265 | machine_dir=moxie | |
266 | ;; | |
2f2a3042 DD |
267 | msp430*) |
268 | newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY" | |
269 | newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections " | |
270 | newlib_cflags="${newlib_cflags} -mOs " | |
d5692c71 | 271 | newlib_cflags="${newlib_cflags} -mhwmult=none " |
2f2a3042 | 272 | machine_dir=msp430 |
d043b4c5 | 273 | default_newlib_nano_malloc="yes" |
2f2a3042 | 274 | ;; |
74ecef0d | 275 | mt*) |
7ad96224 JJ |
276 | machine_dir=mt |
277 | ;; | |
dc0cb474 JJ |
278 | nds32*) |
279 | machine_dir=nds32 | |
0cbcde7b | 280 | libm_machine_dir=nds32 |
dc0cb474 | 281 | newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections" |
0cbcde7b | 282 | newlib_cflags="${newlib_cflags} -DHAVE_RENAME" |
dc0cb474 | 283 | ;; |
c16862d8 JJ |
284 | nios2*) |
285 | machine_dir=nios2 | |
286 | ;; | |
cd31fbb2 JJ |
287 | nvptx*) |
288 | machine_dir=nvptx | |
6bb96d13 | 289 | newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED" |
cd31fbb2 | 290 | ;; |
f58bc599 | 291 | or1k*|or1knd*) |
81fd6210 | 292 | machine_dir=or1k |
8ac94ca7 | 293 | have_init_fini=no |
9e5dd5ea | 294 | ;; |
8a0efa53 CF |
295 | powerpc*) |
296 | machine_dir=powerpc | |
e6ce6f14 | 297 | libm_machine_dir=powerpc |
8a0efa53 | 298 | ;; |
0c773467 DD |
299 | pru*) |
300 | newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED" | |
301 | newlib_cflags="${newlib_cflags} -DNO_EXEC" | |
302 | newlib_cflags="${newlib_cflags} -DSMALL_MEMORY" | |
b5851510 | 303 | newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections " |
0c773467 DD |
304 | default_newlib_nano_malloc="yes" |
305 | default_newlib_atexit_dynamic_alloc="no" | |
306 | machine_dir=pru | |
a1f61746 | 307 | libm_machine_dir=pru |
0c773467 | 308 | ;; |
363dbb9e KC |
309 | riscv*) |
310 | libm_machine_dir=riscv | |
311 | machine_dir=riscv | |
a6633677 | 312 | newlib_cflags="${newlib_cflags} -DHAVE_NANOSLEEP" |
363dbb9e | 313 | default_newlib_atexit_dynamic_alloc="no" |
6158b30e | 314 | have_init_fini=no |
363dbb9e | 315 | ;; |
d1fc7732 DD |
316 | rl78) |
317 | machine_dir=rl78 | |
318 | newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY" | |
57cfbb7b | 319 | newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections " |
d1fc7732 | 320 | ;; |
fd6942ab NC |
321 | rx) |
322 | machine_dir=rx | |
323 | default_newlib_io_long_long="yes" | |
324 | newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections " | |
325 | ;; | |
9f25eed9 | 326 | sh | sh64) |
8a0efa53 CF |
327 | machine_dir=sh |
328 | ;; | |
329 | sparc*) | |
03bf9f43 | 330 | libm_machine_dir=sparc |
8a0efa53 CF |
331 | machine_dir=sparc |
332 | # FIXME: Might wish to make MALLOC_ALIGNMENT more generic. | |
333 | newlib_cflags="${newlib_cflags} -DMALLOC_ALIGNMENT=8" | |
334 | ;; | |
94d61fcb JJ |
335 | tic4x|c4x) |
336 | machine_dir=tic4x | |
337 | ;; | |
1571d0a5 JJ |
338 | tic6x) |
339 | machine_dir=tic6x | |
340 | ;; | |
8a0efa53 CF |
341 | tic80*) |
342 | machine_dir=tic80 | |
343 | ;; | |
344 | v70) | |
345 | ;; | |
346 | v810) | |
347 | ;; | |
d95769eb | 348 | v850*) |
8a0efa53 | 349 | machine_dir=v850 |
0302dfe5 | 350 | newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED " |
8a0efa53 | 351 | ;; |
bf8f43ae EB |
352 | visium) |
353 | machine_dir=visium | |
354 | ;; | |
8a0efa53 CF |
355 | w65*) |
356 | machine_dir=w65 | |
357 | ;; | |
d4a27886 JJ |
358 | x86_64) |
359 | machine_dir=x86_64 | |
cfc49552 | 360 | libm_machine_dir=x86_64 |
c326ca16 | 361 | shared_machine_dir=shared_x86 |
d4a27886 | 362 | ;; |
655e4353 | 363 | xc16x*) |
57cfbb7b NC |
364 | machine_dir=xc16x |
365 | ;; | |
f6eff1c0 GK |
366 | xstormy16) |
367 | machine_dir=xstormy16 | |
9c2e7642 | 368 | newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED" |
578a3560 | 369 | newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED" |
f6eff1c0 | 370 | ;; |
7ba103eb AL |
371 | xtensa) |
372 | libm_machine_dir=xtensa | |
373 | machine_dir=xtensa | |
374 | newlib_cflags="${newlib_cflags} -mlongcalls" | |
375 | default_newlib_atexit_dynamic_alloc="no" | |
376 | have_init_fini=no | |
377 | ;; | |
8a0efa53 CF |
378 | z8k) |
379 | machine_dir=z8k | |
380 | ;; | |
734e8414 | 381 | spu) |
7d592bb1 | 382 | stdio_dir= |
958e329d | 383 | libm_machine_dir=spu |
734e8414 | 384 | machine_dir=spu |
71f3a8f5 JJ |
385 | newlib_cflags="${newlib_cflags} -D_POSIX_MODE" |
386 | newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED" | |
387 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" | |
388 | newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections " | |
734e8414 | 389 | ;; |
8a0efa53 CF |
390 | *) |
391 | echo '***' "Newlib does not support CPU ${host_cpu}" 1>&2 | |
392 | exit 1 | |
393 | ;; | |
394 | esac | |
395 | ||
0c048a9a TF |
396 | # Disable thread support if requested. |
397 | ||
398 | if [ "${newlib_multithread}" = "no" ] ; then | |
399 | newlib_cflags="${newlib_cflags} -D__SINGLE_THREAD__" | |
400 | fi | |
401 | ||
313f1349 JJ |
402 | # Disable syscall support if requested. |
403 | ||
404 | if [ "${newlib_may_supply_syscalls}" = "no" ] ; then | |
405 | newlib_cflags="${newlib_cflags} -D__NO_SYSCALLS__" | |
406 | fi | |
407 | ||
a8615092 JJ |
408 | # Enable multibyte support if requested or it is defaulted |
409 | # for target. | |
8a0efa53 | 410 | |
a8615092 JJ |
411 | if [ "x${newlib_mb}" = "x" ]; then |
412 | case "${host}" in | |
462d6942 | 413 | *-*-cygwin*) |
a8615092 | 414 | newlib_mb=yes |
da25e61f | 415 | ;; |
a8615092 JJ |
416 | esac |
417 | fi | |
418 | ||
afecf2fa JJ |
419 | # Disable printf/scanf floating-point support if requested. |
420 | ||
421 | if [ "${newlib_io_float}" = "no" ] ; then | |
422 | newlib_cflags="${newlib_cflags} -DNO_FLOATING_POINT" | |
423 | fi | |
424 | ||
8a0efa53 CF |
425 | # Get the source directories to use for the host. unix_dir is set |
426 | # to unix to get some standard Unix routines. posix_dir is set to get some | |
427 | # standard Posix routines. sys_dir should supply system dependent routines | |
428 | # including crt0. | |
429 | # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY. | |
430 | ||
431 | case "${host}" in | |
432 | *-*-cygwin*) | |
8a0efa53 | 433 | posix_dir=posix |
3d7c4998 | 434 | xdr_dir=xdr |
8a0efa53 CF |
435 | ;; |
436 | *-*-netware*) | |
437 | signal_dir= | |
438 | sys_dir=netware | |
439 | ;; | |
440 | *-*-rtems*) # generic RTEMS support | |
441 | sys_dir=rtems | |
aa677662 | 442 | posix_dir=posix |
e707c2c9 | 443 | unix_dir=unix |
8a0efa53 | 444 | ;; |
d3925b72 JJ |
445 | *-*-tirtos*) |
446 | sys_dir=tirtos | |
447 | have_crt0="no" | |
448 | ;; | |
cc0d1bf2 AL |
449 | *-esp-*) |
450 | sys_dir=esp | |
451 | have_crt0="no" | |
452 | posix_dir=posix | |
453 | newlib_cflags="${newlib_cflags} -D_NO_GLOB -D_NO_EXECVE -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT" | |
454 | newlib_cflags="${newlib_cflags} -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN" | |
455 | newlib_cflags="${newlib_cflags} -DHAVE_FCNTL -DHAVE_BLKSIZE -DHAVE_OPENDIR -DHAVE_RENAME" | |
456 | newlib_cflags="${newlib_cflags} -DGETREENT_PROVIDED -DSIGNAL_PROVIDED" | |
457 | ;; | |
8a0efa53 CF |
458 | a29k-*-*) |
459 | sys_dir=a29khif | |
460 | signal_dir= | |
461 | ;; | |
1787e9d0 JJ |
462 | amdgcn*) |
463 | sys_dir=amdgcn | |
464 | have_crt0="no" | |
465 | ;; | |
b680a27c | 466 | arm*-*-*) |
45c8bb8f JJ |
467 | sys_dir=arm |
468 | if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then | |
469 | have_crt0="no" | |
a170abec | 470 | fi |
8a0efa53 | 471 | ;; |
292f8e23 JJ |
472 | bfin-*-*) |
473 | sys_dir= | |
474 | ;; | |
874a87f8 JJ |
475 | cr16-*-*) |
476 | sys_dir= | |
477 | ;; | |
1185687a JJ |
478 | crx*) |
479 | sys_dir= | |
480 | ;; | |
8a0efa53 CF |
481 | d10v*) |
482 | sys_dir=d10v | |
483 | ;; | |
484 | d30v*) | |
485 | sys_dir= | |
486 | ;; | |
9edde1d2 JJ |
487 | epiphany-*-*) |
488 | sys_dir=epiphany | |
489 | # crt0 is provided by libgloss. | |
490 | have_crt0="no" | |
491 | ;; | |
a170abec JJ |
492 | frv*) |
493 | sys_dir= | |
494 | ;; | |
948b5f00 JJ |
495 | ft32*) |
496 | sys_dir= | |
497 | ;; | |
8a0efa53 CF |
498 | h8300-*-hms*) |
499 | sys_dir=h8300hms | |
500 | ;; | |
1ae900d6 JR |
501 | h8300-*-elf*) |
502 | sys_dir=h8300hms | |
503 | ;; | |
dd671cde TF |
504 | h8300-*-coff*) |
505 | sys_dir=h8300hms | |
506 | ;; | |
8a0efa53 CF |
507 | h8300-*-xray*) |
508 | sys_dir=h8300xray | |
509 | ;; | |
510 | h8500-*-hms*) | |
511 | sys_dir=h8500hms | |
512 | ;; | |
1ae900d6 JR |
513 | h8500-*-elf*) |
514 | sys_dir=h8500hms | |
515 | ;; | |
d968b3c8 JJ |
516 | i[34567]86-*-rdos*) |
517 | sys_dir=rdos | |
518 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" | |
b9217601 | 519 | newlib_cflags="${newlib_cflags} -D_I386MACH_DISABLE_HW_INTERRUPTS" |
d968b3c8 | 520 | ;; |
102861c9 | 521 | i[34567]86-*-sco*) |
8a0efa53 CF |
522 | sys_dir=sysvi386 |
523 | unix_dir=unix | |
524 | ;; | |
8d9112f2 | 525 | |
a703e0f2 JJ |
526 | m68hc11-*-*|m6811-*-*|m6812-*-*|m68hc12-*-*) |
527 | ;; | |
528 | ||
8a0efa53 CF |
529 | m68k-sun-sunos*) |
530 | unix_dir=unix | |
531 | ;; | |
532 | m8*-bug-*) | |
533 | sys_dir=m88kbug | |
534 | ;; | |
7b4cad4a DB |
535 | mep-*-*) |
536 | default_newlib_io_long_long="yes" | |
537 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" | |
538 | ;; | |
6041792e | 539 | microblaze*-*-*) |
6c249577 JJ |
540 | machine_dir=microblaze |
541 | ;; | |
8be9b48b JJ |
542 | mmix-knuth-mmixware) |
543 | sys_dir=mmixware | |
544 | ;; | |
2beb9fbb JJ |
545 | moxie*) |
546 | sys_dir= | |
547 | ;; | |
c16862d8 JJ |
548 | nios2*) |
549 | sys_dir= | |
550 | ;; | |
d0695096 CV |
551 | or1k-*-elf | or1knd-*-elf) |
552 | sys_dir=or1k | |
553 | newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED " | |
554 | have_crt0="no" | |
81fd6210 | 555 | ;; |
8a0efa53 | 556 | powerpcle-*-pe) |
8a0efa53 CF |
557 | posix_dir=posix |
558 | ;; | |
559 | sh*-*) | |
560 | sys_dir=sh | |
561 | ;; | |
734e8414 JJ |
562 | spu-*-*) |
563 | default_newlib_io_long_long="yes" | |
547c5c61 | 564 | default_newlib_atexit_dynamic_alloc="no" |
734e8414 | 565 | ;; |
1571d0a5 JJ |
566 | tic6x*) |
567 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" | |
568 | have_crt0="no" | |
569 | ;; | |
8a0efa53 CF |
570 | tic80*) |
571 | sys_dir=tic80 | |
572 | ;; | |
573 | v70-nec-*) | |
574 | sys_dir=sysvnecv70 | |
575 | ;; | |
576 | v810-*-*) | |
577 | sys_dir=sysnec810 | |
578 | ;; | |
d95769eb | 579 | v850*-*-*) |
8a0efa53 | 580 | sys_dir=sysnecv850 |
d95769eb JJ |
581 | if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then |
582 | have_crt0="no" | |
583 | fi | |
8a0efa53 | 584 | ;; |
bf8f43ae EB |
585 | visium-*-*) |
586 | sys_dir= | |
587 | ;; | |
8a0efa53 CF |
588 | w65-*-*) |
589 | sys_dir=w65 | |
590 | ;; | |
591 | z8k-*-coff) | |
592 | sys_dir=z8ksim | |
593 | ;; | |
594 | esac | |
595 | ||
596 | # Host specific flag settings -- usually for features that are not | |
597 | # general enough or broad enough to be handled above. | |
598 | # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY. | |
599 | ||
600 | case "${host}" in | |
601 | *-*-cygwin*) | |
6a59fc44 | 602 | test -z "$cygwin_srcdir" && cygwin_srcdir="${abs_newlib_basedir}/../winsup/cygwin" |
03536757 | 603 | export cygwin_srcdir |
0962fe91 | 604 | default_newlib_io_c99_formats="yes" |
227e6ef6 JJ |
605 | default_newlib_io_long_long="yes" |
606 | default_newlib_io_long_double="yes" | |
607 | default_newlib_io_pos_args="yes" | |
e633fde1 | 608 | CC="${CC} -I${cygwin_srcdir}/include" |
7e03fc35 | 609 | newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DGETREENT_PROVIDED -DSIGNAL_PROVIDED -DHAVE_BLKSIZE -DHAVE_FCNTL -DMALLOC_PROVIDED -DHAVE_CHDIR -DHAVE_FCHDIR" |
8a0efa53 CF |
610 | syscall_dir=syscalls |
611 | ;; | |
612 | # RTEMS supplies its own versions of some routines: | |
613 | # malloc() (reentrant version) | |
614 | # exit() RTEMS has a "global" reent to flush | |
615 | # signal()/raise() RTEMS has its own including pthread signals | |
616 | # _XYZ_r() RTEMS has its own reentrant routines | |
617 | # | |
618 | # NOTE: When newlib malloc uses a semaphore, RTEMS will switch to that. | |
619 | *-*-rtems*) | |
227e6ef6 | 620 | default_newlib_io_long_long="yes" |
7851320a | 621 | default_newlib_io_c99_formats="yes" |
58356884 | 622 | newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections " |
b1a38879 | 623 | newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DGETREENT_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC" |
e707c2c9 | 624 | # turn off unsupported items in posix directory |
c7c1a1ca | 625 | newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN" |
8a0efa53 CF |
626 | ;; |
627 | # VxWorks supplies its own version of malloc, and the newlib one | |
628 | # doesn't work because VxWorks does not have sbrk. | |
629 | *-wrs-vxworks*) | |
3a8fc0e4 | 630 | newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DMISSING_SYSCALL_NAMES -DHAVE_FCNTL" |
8a0efa53 | 631 | ;; |
d3925b72 JJ |
632 | # TIRTOS supplies its own version of malloc |
633 | *-*-tirtos*) | |
634 | newlib_cflags="${newlib_cflags} -D__DYNAMIC_REENT__ -DMALLOC_PROVIDED" | |
635 | ;; | |
8a0efa53 CF |
636 | # UDI doesn't have exec, so system() should fail the right way |
637 | a29k-amd-udi) | |
638 | newlib_cflags="${newlib_cflags} -DNO_EXEC" | |
639 | syscall_dir=syscalls | |
640 | ;; | |
c3fe5bf7 JJ |
641 | aarch64*-*-*) |
642 | default_newlib_io_long_long="yes" | |
643 | syscall_dir=syscalls | |
644 | ;; | |
c0a99f02 | 645 | arc*-*-*) |
8a0efa53 | 646 | syscall_dir=syscalls |
c0a99f02 | 647 | default_newlib_io_long_long="yes" |
8a0efa53 | 648 | ;; |
b680a27c | 649 | arm*-*-pe) |
8a0efa53 | 650 | syscall_dir=syscalls |
5230eb7f | 651 | newlib_cflags="${newlib_cflags} -DHAVE_SYSCONF_PAGESIZE" |
8a0efa53 | 652 | ;; |
b680a27c | 653 | arm*-*-*) |
8a0efa53 | 654 | syscall_dir=syscalls |
a170abec | 655 | # If newlib is supplying syscalls, select which debug protocol is being used. |
8a0efa53 CF |
656 | # ARM_RDP_MONITOR selects the Demon monitor. |
657 | # ARM_RDI_MONITOR selects the Angel monitor. | |
658 | # If neither are defined, then hard coded defaults will be used | |
659 | # to create the program's environment. | |
a170abec JJ |
660 | # If --disable-newlib-supplied-syscalls is specified, then the end-user |
661 | # may specify the protocol via gcc spec files supplied by libgloss. | |
a170abec JJ |
662 | if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then |
663 | # newlib_cflags="${newlib_cflags} -DARM_RDP_MONITOR" | |
664 | newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR" | |
665 | fi | |
5230eb7f | 666 | newlib_cflags="${newlib_cflags} -DHAVE_SYSCONF_PAGESIZE" |
8a0efa53 | 667 | ;; |
4634da64 JJ |
668 | avr*) |
669 | newlib_cflags="${newlib_cflags} -DNO_EXEC -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES" | |
670 | ;; | |
292f8e23 JJ |
671 | bfin*) |
672 | syscall_dir=syscalls | |
673 | ;; | |
1815fdea | 674 | cris-*-* | crisv32-*-*) |
1c74754f | 675 | default_newlib_io_long_long="yes" |
3cc3705c | 676 | newlib_cflags="${newlib_cflags} -DHAVE_RENAME -D_USE_WRITE -DCOMPACT_CTYPE" |
1815fdea JJ |
677 | syscall_dir=syscalls |
678 | ;; | |
874a87f8 JJ |
679 | cr16-*-*) |
680 | syscall_dir=syscalls | |
681 | ;; | |
1185687a | 682 | crx-*-*) |
fcfb0117 | 683 | newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DMISSING_SYSCALL_NAMES" |
1185687a JJ |
684 | syscall_dir= |
685 | ;; | |
8315a908 J |
686 | csky*) |
687 | newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES" | |
688 | syscall_dir= | |
689 | ;; | |
8a0efa53 CF |
690 | d10v*) |
691 | newlib_cflags="${newlib_cflags} -DSMALL_MEMORY" | |
692 | syscall_dir=syscalls | |
693 | ;; | |
694 | d30v*) | |
695 | newlib_cflags="${newlib_cflags} -DABORT_MESSAGE -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES" | |
696 | syscall_dir= | |
697 | ;; | |
9edde1d2 JJ |
698 | epiphany*) |
699 | syscall_dir=syscalls | |
700 | newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED" | |
701 | ;; | |
def943c1 JJ |
702 | fido-*-elf) |
703 | newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES" | |
704 | syscall_dir= | |
705 | ;; | |
8a0efa53 | 706 | fr30-*-*) |
8a0efa53 CF |
707 | syscall_dir=syscalls |
708 | ;; | |
bac50d6b NC |
709 | frv-*-*) |
710 | syscall_dir=syscalls | |
227e6ef6 | 711 | default_newlib_io_long_long="yes" |
bac50d6b | 712 | ;; |
948b5f00 JJ |
713 | ft32*-*-*) |
714 | syscall_dir=syscalls | |
715 | ;; | |
8a0efa53 CF |
716 | h8300*-*-*) |
717 | syscall_dir=syscalls | |
63b9dcc4 | 718 | default_newlib_io_long_long="yes" |
8a0efa53 | 719 | newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY" |
e65d559e JJ |
720 | # Simulator only extensions for H8300. |
721 | # Uncomment the next line to enable them. | |
722 | # newlib_cflags="${newlib_cflags} -D__SIMULATOR__" | |
8a0efa53 CF |
723 | ;; |
724 | h8500-*-*) | |
725 | syscall_dir=syscalls | |
726 | newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY" | |
727 | ;; | |
102861c9 | 728 | i[34567]86-*-sco*) |
3a8fc0e4 | 729 | newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED -DHAVE_FCNTL" |
8a0efa53 | 730 | ;; |
102861c9 | 731 | i[34567]86-*-netware*) |
3a8fc0e4 | 732 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DNO_EXEC -DABORT_PROVIDED -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DHAVE_FCNTL" |
8a0efa53 | 733 | ;; |
5d3ad3b1 IV |
734 | i[3-7]86-*-elfiamcu) |
735 | newlib_cflags="${newlib_cflags} -Os -DPREFER_SIZE_OVER_SPEED -ffunction-sections -fomit-frame-pointer -DREENTRANT_SYSCALL_PROVIDED" | |
736 | if [ "${newlib_multithread}" = "no" ] ; then | |
737 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" | |
738 | else | |
739 | syscall_dir=syscalls | |
740 | newlib_cflags="${newlib_cflags} -D__DYNAMIC_REENT__" | |
741 | fi | |
742 | ;; | |
bfdfd7e6 | 743 | iq2000*) |
5a74f2aa | 744 | syscall_dir=syscalls |
227e6ef6 | 745 | default_newlib_io_long_long="yes" |
5a74f2aa | 746 | ;; |
a3cf0304 JJ |
747 | lm32-*-*) |
748 | syscall_dir=syscalls | |
749 | ;; | |
dcad8199 DD |
750 | m32c-*-*) |
751 | default_newlib_io_long_long="yes" | |
c3f3d59e | 752 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DABORT_PROVIDED" |
dcad8199 DD |
753 | syscall_dir= |
754 | ;; | |
8a0efa53 CF |
755 | m32r-*-*) |
756 | # Pass -msdata=sdata so _impure_ptr goes in .sdata. | |
757 | # We don't generate sda relocs however for upward compatibility. | |
758 | # FIXME: This is necessary because the default multilib doesn't | |
759 | # use --print-multi-lib. | |
760 | newlib_cflags="${newlib_cflags} -msdata=sdata" | |
761 | syscall_dir=syscalls | |
762 | ;; | |
a703e0f2 | 763 | m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) |
8d9112f2 TF |
764 | newlib_cflags="${newlib_cflags} -DNO_EXEC -DABORT_PROVIDED -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES" |
765 | ;; | |
c023e783 KH |
766 | m68k-unknown-elf) |
767 | newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES" | |
768 | syscall_dir= | |
769 | ;; | |
8a0efa53 | 770 | mcore-*-*) |
8a0efa53 CF |
771 | syscall_dir=syscalls |
772 | ;; | |
6041792e | 773 | microblaze*-*-*) |
6c249577 JJ |
774 | default_newlib_io_long_long="yes" |
775 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DSMALL_MEMORY -D_REENT_SMALL" | |
776 | ;; | |
b3934ab3 | 777 | mips64vr*-*-*) |
227e6ef6 JJ |
778 | default_newlib_io_long_long="yes" |
779 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" | |
b3934ab3 | 780 | ;; |
2bc257e3 JJ |
781 | mips*-*-elf*) |
782 | default_newlib_io_long_long="yes" | |
783 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" | |
784 | ;; | |
8be9b48b JJ |
785 | mmix-*) |
786 | syscall_dir=syscalls | |
787 | # We need every symbol 32-bit aligned, so the invalid | |
788 | # construct with attribute ((alias ("_ctype_b+127"))) breaks. | |
789 | newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE" | |
790 | ;; | |
8a0efa53 CF |
791 | mn10?00-*-*) |
792 | syscall_dir=syscalls | |
793 | ;; | |
0a0f33e5 | 794 | moxie-*-elf* | moxie-*-rtems*) |
2beb9fbb JJ |
795 | syscall_dir=syscalls |
796 | default_newlib_io_long_long="yes" | |
797 | ;; | |
0a0f33e5 AG |
798 | moxie-*-moxiebox) |
799 | syscall_dir=syscalls | |
800 | default_newlib_io_long_long="yes" | |
801 | newlib_cflags="${newlib_cflags} -Os -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY" | |
802 | ;; | |
c16862d8 JJ |
803 | nios2*) |
804 | syscall_dir= | |
805 | newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES" | |
806 | ;; | |
dc0cb474 JJ |
807 | nds32*) |
808 | syscall_dir=syscalls | |
809 | ;; | |
d0695096 CV |
810 | or1k*|or1knd*) |
811 | syscall_dir=syscalls | |
812 | ;; | |
0d844014 | 813 | powerpc*-*-eabialtivec*) |
227e6ef6 JJ |
814 | default_newlib_io_long_long="yes" |
815 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" | |
0d844014 | 816 | ;; |
936b520f | 817 | powerpc*-*-eabispe*) |
227e6ef6 JJ |
818 | default_newlib_io_long_long="yes" |
819 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" | |
936b520f | 820 | ;; |
8a0efa53 CF |
821 | powerpc*-*-eabi* | \ |
822 | powerpc*-*-elf* | \ | |
823 | powerpc*-*-linux* | \ | |
824 | powerpc*-*-rtem* | \ | |
825 | powerpc*-*-sysv* | \ | |
826 | powerpc*-*-solaris*) | |
227e6ef6 JJ |
827 | default_newlib_io_long_long="yes" |
828 | newlib_cflags="${newlib_cflags} -mrelocatable-lib -mno-eabi -mstrict-align -DMISSING_SYSCALL_NAMES" | |
8a0efa53 CF |
829 | ;; |
830 | powerpcle-*-pe) | |
c7c1a1ca | 831 | newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DHAVE_FCNTL -D_NO_POSIX_SPAWN" |
8a0efa53 CF |
832 | syscall_dir=syscalls |
833 | ;; | |
0c773467 DD |
834 | pru*) |
835 | syscall_dir=syscalls | |
836 | newlib_cflags="${newlib_cflags} -DSMALL_MEMORY -D_REENT_SMALL" | |
837 | ;; | |
363dbb9e KC |
838 | riscv*-*-*) |
839 | syscall_dir=syscalls | |
840 | ;; | |
8a0efa53 | 841 | sh*-*-*) |
227e6ef6 | 842 | default_newlib_io_long_long="yes" |
8a0efa53 CF |
843 | syscall_dir=syscalls |
844 | ;; | |
845 | sparc-sun-sunos*) | |
846 | newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED" | |
847 | ;; | |
848 | sparc64-*-*) | |
3cc3705c | 849 | newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_BLKSIZE -DHAVE_FCNTL" |
8a0efa53 CF |
850 | # This either belongs elsewhere or nowhere. But I need *something*, |
851 | # so for now it's here ... | |
852 | case "${host_os}" in | |
853 | aoutv8 | *32p) | |
854 | newlib_cflags="${newlib_cflags} -DTARGET_PTR_SIZE=32" ;; | |
855 | *) | |
856 | newlib_cflags="${newlib_cflags} -DTARGET_PTR_SIZE=64" ;; | |
857 | esac | |
858 | ;; | |
1571d0a5 JJ |
859 | tic6x*) |
860 | syscall_dir= | |
f8ff5e47 | 861 | newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED" |
1571d0a5 | 862 | ;; |
8a0efa53 CF |
863 | tic80*) |
864 | syscall_dir=syscalls | |
865 | ;; | |
d95769eb | 866 | v850*-*-*) |
8a0efa53 CF |
867 | syscall_dir=syscalls |
868 | ;; | |
bf8f43ae EB |
869 | visium-*-*) |
870 | newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES" | |
871 | syscall_dir= | |
872 | ;; | |
8a0efa53 CF |
873 | w65-*-*) |
874 | syscall_dir=syscalls | |
875 | newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY" | |
655e4353 JJ |
876 | ;; |
877 | xc16x-*) | |
878 | syscall_dir=syscalls | |
879 | ;; | |
f6eff1c0 | 880 | xstormy16-*-*) |
bfc27bae TF |
881 | syscall_dir=syscalls |
882 | ;; | |
7ba103eb AL |
883 | xtensa*-*-* | xtensa*-*) |
884 | syscall_dir=syscalls | |
885 | ;; | |
8a0efa53 CF |
886 | z8k-*-*) |
887 | syscall_dir=syscalls | |
888 | ;; | |
889 | *) | |
890 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" | |
891 | syscall_dir= | |
892 | ;; | |
893 | esac | |
227e6ef6 JJ |
894 | |
895 | # Use defaults for certain settings if not specified by user | |
896 | ||
0962fe91 EB |
897 | # Enable C99 format support in I/O routines if requested. |
898 | if [ "x${newlib_io_c99_formats}" = "x" ]; then | |
899 | if [ ${default_newlib_io_c99_formats} = "yes" ]; then | |
900 | newlib_io_c99_formats="yes"; | |
901 | fi | |
902 | fi | |
903 | ||
227e6ef6 JJ |
904 | # Enable long long support in I/O routines if requested. |
905 | if [ "x${newlib_io_long_long}" = "x" ]; then | |
906 | if [ ${default_newlib_io_long_long} = "yes" ]; then | |
907 | newlib_io_long_long="yes"; | |
908 | fi | |
909 | fi | |
910 | ||
911 | # Enable long double support in I/O routines if requested. | |
912 | if [ "x${newlib_io_long_double}" = "x" ]; then | |
913 | if [ ${default_newlib_io_long_double} = "yes" ]; then | |
914 | newlib_io_long_double="yes"; | |
915 | fi | |
916 | fi | |
917 | ||
918 | # Enable printf positional argument support if requested. | |
919 | if [ "x${newlib_io_pos_args}" = "x" ]; then | |
920 | if [ ${default_newlib_io_pos_args} = "yes" ]; then | |
921 | newlib_io_pos_args="yes"; | |
922 | fi | |
923 | fi | |
45c8bb8f | 924 | |
ce93dfe4 MM |
925 | # Disable atexit dynamic allocation if requested. |
926 | if [ "x${newlib_atexit_dynamic_alloc}" = "x" ]; then | |
927 | if [ ${default_newlib_atexit_dynamic_alloc} = "yes" ]; then | |
928 | newlib_atexit_dynamic_alloc="yes"; | |
929 | fi | |
930 | fi | |
931 | ||
d043b4c5 DD |
932 | # Enable nano-malloc if requested. |
933 | if [ "x${newlib_nano_malloc}" = "x" ]; then | |
934 | if [ ${default_newlib_nano_malloc} = "yes" ]; then | |
935 | newlib_nano_malloc="yes"; | |
936 | fi | |
937 | fi | |
938 | ||
e06f2fbd JJ |
939 | # Enable _REENT_CHECK macro memory allocation verification. |
940 | if [ "x${newlib_reent_check_verify}" = "x" ]; then | |
8b39f740 JJ |
941 | if [ ${default_newlib_reent_check_verify} = "yes" ]; then |
942 | newlib_reent_check_verify="yes"; | |
e06f2fbd JJ |
943 | fi |
944 | fi | |
945 | ||
0597fe0a | 946 | # Remove rpc headers if xdr_dir not specified |
2d192e1e | 947 | if [ "x${xdr_dir}" = "x" ]; then |
0597fe0a JJ |
948 | noinclude="${noinclude} rpc/types.h rpc/xdr.h" |
949 | fi | |
950 | ||
6158b30e SH |
951 | # Have init/finit if not explicitly specified otherwise |
952 | if [ "x${have_init_fini}" != "xno" ]; then | |
437c5c50 | 953 | newlib_cflags="${newlib_cflags} -D_HAVE_INIT_FINI" |
6158b30e SH |
954 | fi |
955 | ||
45c8bb8f JJ |
956 | if test -z "${have_crt0}" && test -n "${sys_dir}"; then |
957 | have_crt0="yes" | |
958 | fi | |
cd31fbb2 JJ |
959 | |
960 | # Target-specific defaults | |
961 | case "${host_cpu}" in | |
962 | nvptx*) | |
cd31fbb2 JJ |
963 | if [[ -z ${newlib_global_stdio_streams} ]]; then |
964 | newlib_global_stdio_streams="yes"; | |
965 | fi | |
966 | ;; | |
967 | esac |