]> sourceware.org Git - newlib-cygwin.git/blob - newlib/configure.host
Minimize printf/scanf size on platforms that don't need C99.
[newlib-cygwin.git] / newlib / configure.host
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", "")
25 # newlib_multithread --enable-newlib-multithread ("yes", "no", "yes")
26 # newlib_elix_level --enable-newlib-elix-level ("1","2","3","4") ("4")
27 # newlib_io_c99_formats --enable-newlib-io-c99-formats ("yes", "no", "")
28 # newlib_io_long_long --enable-newlib-io-long-long ("yes", "no", "")
29 # newlib_io_long_double --enable-newlib-io-long-double ("yes", "no", "")
30
31 # It sets the following shell variables:
32 # newlib_cflags Special CFLAGS to use when building
33 # machine_dir Subdirectory of libc/machine to configure
34 # sys_dir Subdirectory of libc/sys to configure
35 # have_sys_mach_dir Is there a machine subdirectory in sys subdirectory
36 # posix_dir "posix" to build libc/posix, "" otherwise
37 # signal_dir "signal" to build libc/signal, "" otherwise
38 # stdio64_dir "stdio64" to build libc/stdio64, "" otherwise
39 # syscall_dir "syscalls" to build libc/syscalls, "" otherwise
40 # unix_dir "unix" to build libc/unix, "" otherwise
41 # use_libtool flag: use libtool to build newlib?
42 # aext library extension - needed for libtool support
43 # oext object file extension - needed for libtool support
44 # lpfx library object prefix - generated when no libtool
45 # crt1 name of crt1 object if one is provided
46 # crt1_dir directory where crt1 object is found
47 # have_crt0 "yes"/"no" if crt0 is/isn't provided.
48 # "" if crt0 is provided when sys_dir is set
49
50 newlib_cflags=
51 libm_machine_dir=
52 machine_dir=
53 sys_dir=
54 posix_dir=
55 signal_dir=signal
56 stdio_dir=stdio
57 stdio64_dir=
58 syscall_dir=
59 unix_dir=
60 mach_add_setjmp=
61 crt1=
62 crt1_dir=
63 have_crt0=
64 use_libtool=no
65 have_sys_mach_dir=no
66 default_newlib_io_c99_formats=no
67 default_newlib_io_long_long=no
68 default_newlib_io_long_double=no
69 default_newlib_io_pos_args=no
70 default_newlib_atexit_dynamic_alloc=yes
71 aext=a
72 oext=o
73 lpfx="lib_a-"
74
75 case "${target_optspace}:${host}" in
76 yes:*)
77 newlib_cflags="${newlib_cflags} -Os"
78 ;;
79 :m32r-* | :d10v-* | :d30v-* | :avr-* | :m32c-* )
80 newlib_cflags="${newlib_cflags} -Os"
81 ;;
82 no:* | :*)
83 newlib_cflags="${newlib_cflags} -O2"
84 ;;
85 esac
86
87 # Get the source directories to use for the CPU type.
88 # machine_dir should supply CPU dependent routines, such as setjmp.
89 # newlib_cflags is passed to gcc when compiling.
90 # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY.
91
92 case "${host_cpu}" in
93 a29k)
94 machine_dir=a29k
95 ;;
96 arc)
97 machine_dir=
98 ;;
99 arm)
100 machine_dir=arm
101 ;;
102 avr*)
103 newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mcall-prologues"
104 ;;
105 bfin)
106 machine_dir=bfin
107 ;;
108 cris | crisv32)
109 machine_dir=cris
110 ;;
111 crx*)
112 machine_dir=crx
113 ;;
114 d10v*)
115 machine_dir=d10v
116 ;;
117 d30v*)
118 machine_dir=d30v
119 ;;
120 ep9312)
121 machine_dir=arm
122 ;;
123 fido)
124 machine_dir=m68k
125 newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE"
126 ;;
127 fr30)
128 machine_dir=fr30
129 ;;
130 frv)
131 machine_dir=frv
132 ;;
133 h8300)
134 machine_dir=h8300
135 ;;
136 h8500)
137 machine_dir=h8500
138 ;;
139 hppa*)
140 machine_dir=hppa
141 ;;
142 i960)
143 machine_dir=i960
144 ;;
145 i[34567]86)
146 # Don't use for these since they provide their own setjmp.
147 case ${host} in
148 *-*-sco* | *-*-cygwin*)
149 libm_machine_dir=i386
150 machine_dir=i386
151 ;;
152 *)
153 libm_machine_dir=i386
154 machine_dir=i386
155 mach_add_setjmp=true
156 ;;
157 esac
158 ;;
159 ia64*)
160 ;;
161 iq2000)
162 machine_dir=iq2000
163 ;;
164 m32c)
165 machine_dir=m32c
166 newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DABORT_PROVIDED -DSMALL_MEMORY"
167 ;;
168
169 m32r*)
170 machine_dir=m32r
171 ;;
172
173 m68hc11|m6811|m68hc12|m6812)
174 machine_dir=m68hc11
175 newlib_cflags="-DPREFER_SIZE_OVER_SPEED -Os -mrelax"
176 CFLAGS="-g -Os"
177 ;;
178
179 m68*)
180 machine_dir=m68k
181 newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE"
182 ;;
183 m88k)
184 machine_dir=m88k
185 newlib_cflags="${newlib_cflags} -m88000"
186 ;;
187 m88110)
188 machine_dir=m88k
189 newlib_cflags="${newlib_cflags} -m88110"
190 ;;
191 mcore)
192 ;;
193 mips*)
194 machine_dir=mips
195 ;;
196 mmix)
197 ;;
198 mn10200)
199 machine_dir=mn10200
200 ;;
201 mn10300)
202 default_newlib_io_long_long="yes"
203 machine_dir=mn10300
204 ;;
205 mt*)
206 machine_dir=mt
207 ;;
208 or16)
209 ;;
210 or32)
211 ;;
212 powerpc*)
213 machine_dir=powerpc
214 ;;
215 sh | sh64)
216 machine_dir=sh
217 ;;
218 sparc*)
219 machine_dir=sparc
220 # FIXME: Might wish to make MALLOC_ALIGNMENT more generic.
221 newlib_cflags="${newlib_cflags} -DMALLOC_ALIGNMENT=8"
222 ;;
223 strongarm)
224 machine_dir=arm
225 ;;
226 xscale)
227 machine_dir=xscale
228 ;;
229 thumb)
230 machine_dir=arm
231 ;;
232 tic4x|c4x)
233 machine_dir=tic4x
234 ;;
235 tic80*)
236 machine_dir=tic80
237 ;;
238 v70)
239 ;;
240 v810)
241 ;;
242 v850)
243 machine_dir=v850
244 newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mv850 "
245 ;;
246 v850e)
247 machine_dir=v850
248 newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED "
249 ;;
250 w65*)
251 machine_dir=w65
252 ;;
253 xstormy16)
254 machine_dir=xstormy16
255 newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED"
256 newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED"
257 ;;
258 z8k)
259 machine_dir=z8k
260 ;;
261 spu)
262 stdio_dir=
263 libm_machine_dir=spu
264 machine_dir=spu
265 newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
266 ;;
267 *)
268 echo '***' "Newlib does not support CPU ${host_cpu}" 1>&2
269 exit 1
270 ;;
271 esac
272
273 # Disable thread support if requested.
274
275 if [ "${newlib_multithread}" = "no" ] ; then
276 newlib_cflags="${newlib_cflags} -D__SINGLE_THREAD__"
277 fi
278
279 # Disable syscall support if requested.
280
281 if [ "${newlib_may_supply_syscalls}" = "no" ] ; then
282 newlib_cflags="${newlib_cflags} -D__NO_SYSCALLS__"
283 fi
284
285 # Enable multibyte support if requested or it is defaulted
286 # for target.
287
288 if [ "x${newlib_mb}" = "x" ]; then
289 case "${host}" in
290 i[34567]86-pc-linux-*|*-*-cygwin*)
291 newlib_mb=yes
292 ;;
293 esac
294 fi
295
296 # Disable printf/scanf floating-point support if requested.
297
298 if [ "${newlib_io_float}" = "no" ] ; then
299 newlib_cflags="${newlib_cflags} -DNO_FLOATING_POINT"
300 fi
301
302 # Verify if shared newlib support is allowed and set appropriate variables
303 # We don't want to use libtool for platforms that we are not going to
304 # support shared libraries. This is because it adds executable tests which
305 # we don't want for most embedded platforms.
306 case "${host}" in
307 i[34567]86-pc-linux-*)
308 use_libtool=yes
309 have_sys_mach_dir=yes
310 stdio64_dir=stdio64
311 oext=lo
312 lpfx=
313 aext=la ;;
314 *) ;; #shared library not supported for ${host}
315 esac
316
317 # Get the source directories to use for the host. unix_dir is set
318 # to unix to get some standard Unix routines. posix_dir is set to get some
319 # standard Posix routines. sys_dir should supply system dependent routines
320 # including crt0.
321 # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY.
322
323 case "${host}" in
324 *-*-cygwin*)
325 posix_dir=posix
326 stdio64_dir=stdio64
327 ;;
328 *-*-netware*)
329 signal_dir=
330 sys_dir=netware
331 ;;
332 *-*-rtems*) # generic RTEMS support
333 sys_dir=rtems
334 # RTEMS POSIX support is all inside RTEMS
335 ;;
336 a29k-*-*)
337 sys_dir=a29khif
338 signal_dir=
339 ;;
340 arc-*-*)
341 sys_dir=arc
342 ;;
343 arm-*-*)
344 sys_dir=arm
345 if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
346 have_crt0="no"
347 fi
348 ;;
349 bfin-*-*)
350 sys_dir=
351 ;;
352 crx*)
353 sys_dir=
354 ;;
355 d10v*)
356 sys_dir=d10v
357 ;;
358 d30v*)
359 sys_dir=
360 ;;
361 ep9312-*-*)
362 sys_dir=arm
363 if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
364 have_crt0="no"
365 fi
366 ;;
367 frv*)
368 sys_dir=
369 ;;
370 h8300-*-hms*)
371 sys_dir=h8300hms
372 ;;
373 h8300-*-elf*)
374 sys_dir=h8300hms
375 ;;
376 h8300-*-coff*)
377 sys_dir=h8300hms
378 ;;
379 h8300-*-xray*)
380 sys_dir=h8300xray
381 ;;
382 h8500-*-hms*)
383 sys_dir=h8500hms
384 ;;
385 h8500-*-elf*)
386 sys_dir=h8500hms
387 ;;
388 i[34567]86-*-rdos*)
389 sys_dir=rdos
390 newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
391 ;;
392 i[34567]86-*-sco*)
393 sys_dir=sysvi386
394 unix_dir=unix
395 ;;
396 i[34567]86-pc-linux-*)
397 sys_dir=linux
398 unix_dir=unix
399 posix_dir=posix
400 crt1=crt1.o
401 crt1_dir=libc/sys/${sys_dir}
402 gcc_dir=`gcc -print-search-dirs | awk '/^install:/{print $2}'`
403 default_newlib_io_c99_formats="yes"
404 default_newlib_io_long_double="yes"
405 default_newlib_io_long_long="yes"
406 default_newlib_io_pos_args="yes"
407 #newlib_cflags="${newlib_cflags} -Werror" # DEBUGGING ONLY;BREAKS BUILD
408 newlib_cflags="${newlib_cflags} -Wall"
409 newlib_cflags="${newlib_cflags} -D_I386MACH_ALLOW_HW_INTERRUPTS"
410 newlib_cflags="${newlib_cflags} -DHAVE_FCNTL"
411 # --- Required when building a shared library ------------------------
412 newlib_cflags="${newlib_cflags} -fPIC -D_I386MACH_NEED_SOTYPE_FUNCTION"
413 # --- The three lines below are optional ------------------------------
414 ##newlib_cflags="${newlib_cflags} -nostdinc"
415 ##newlib_cflags="${newlib_cflags} -I`newlib-flags --kernel-dir`/include"
416 ##newlib_cflags="${newlib_cflags} -idirafter ${gcc_dir}include"
417 ;;
418
419 m68hc11-*-*|m6811-*-*|m6812-*-*|m68hc12-*-*)
420 ;;
421
422 m68k-sun-sunos*)
423 unix_dir=unix
424 ;;
425 m8*-bug-*)
426 sys_dir=m88kbug
427 ;;
428 mips*-dec-*)
429 sys_dir=decstation
430 ;;
431 mmix-knuth-mmixware)
432 sys_dir=mmixware
433 ;;
434 powerpcle-*-pe)
435 posix_dir=posix
436 ;;
437 sh*-*)
438 sys_dir=sh
439 ;;
440 sparc-sun-sunos*)
441 sys_dir=sun4
442 unix_dir=unix
443 ;;
444 sparc64*)
445 sys_dir=sparc64
446 unix_dir=unix
447 ;;
448 spu-*-*)
449 default_newlib_io_long_long="yes"
450 default_newlib_atexit_dynamic_alloc="no"
451 ;;
452 strongarm-*-*)
453 sys_dir=arm
454 if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
455 have_crt0="no"
456 fi
457 ;;
458 thumb-*-*)
459 sys_dir=arm
460 if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
461 have_crt0="no"
462 fi
463 ;;
464 tic80*)
465 sys_dir=tic80
466 ;;
467 v70-nec-*)
468 sys_dir=sysvnecv70
469 ;;
470 v810-*-*)
471 sys_dir=sysnec810
472 ;;
473 v850-*-*)
474 sys_dir=sysnecv850
475 ;;
476 v850e-*-*)
477 sys_dir=sysnecv850
478 ;;
479 v850ea-*-*)
480 sys_dir=sysnecv850
481 ;;
482 w65-*-*)
483 sys_dir=w65
484 ;;
485 xscale-*-*)
486 sys_dir=arm
487 if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
488 have_crt0="no"
489 fi
490 ;;
491 z8k-*-coff)
492 sys_dir=z8ksim
493 ;;
494 esac
495
496 # Host specific flag settings -- usually for features that are not
497 # general enough or broad enough to be handled above.
498 # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY.
499
500 case "${host}" in
501 *-*-cygwin*)
502 test -z "$cygwin_srcdir" && cygwin_srcdir=`cd ${srcdir}/../winsup/cygwin; pwd`
503 export cygwin_srcdir
504 default_newlib_io_c99_formats="yes"
505 default_newlib_io_long_long="yes"
506 default_newlib_io_long_double="yes"
507 default_newlib_io_pos_args="yes"
508 CC="${CC} -I${cygwin_srcdir}/include"
509 newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DSIGNAL_PROVIDED -D_COMPILING_NEWLIB -DHAVE_BLKSIZE -DHAVE_FCNTL -DMALLOC_PROVIDED"
510 syscall_dir=syscalls
511 ;;
512 # RTEMS supplies its own versions of some routines:
513 # malloc() (reentrant version)
514 # exit() RTEMS has a "global" reent to flush
515 # signal()/raise() RTEMS has its own including pthread signals
516 # _XYZ_r() RTEMS has its own reentrant routines
517 #
518 # NOTE: When newlib malloc uses a semaphore, RTEMS will switch to that.
519 *-*-rtems*)
520 default_newlib_io_long_long="yes"
521 newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DMISSING_SYSCALL_NAMES -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_OPENDIR -DNO_EXEC -DHAVE_FCNTL"
522 ;;
523 # VxWorks supplies its own version of malloc, and the newlib one
524 # doesn't work because VxWorks does not have sbrk.
525 *-wrs-vxworks*)
526 newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DMISSING_SYSCALL_NAMES -DHAVE_FCNTL"
527 ;;
528 # UDI doesn't have exec, so system() should fail the right way
529 a29k-amd-udi)
530 newlib_cflags="${newlib_cflags} -DNO_EXEC"
531 syscall_dir=syscalls
532 ;;
533 arc-*-*)
534 syscall_dir=syscalls
535 ;;
536 arm-*-pe)
537 syscall_dir=syscalls
538 ;;
539 arm-*-*)
540 syscall_dir=syscalls
541 # If newlib is supplying syscalls, select which debug protocol is being used.
542 # ARM_RDP_MONITOR selects the Demon monitor.
543 # ARM_RDI_MONITOR selects the Angel monitor.
544 # If neither are defined, then hard coded defaults will be used
545 # to create the program's environment.
546 # If --disable-newlib-supplied-syscalls is specified, then the end-user
547 # may specify the protocol via gcc spec files supplied by libgloss.
548 # See also thumb below.
549 if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
550 # newlib_cflags="${newlib_cflags} -DARM_RDP_MONITOR"
551 newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
552 fi
553 ;;
554 arc*)
555 newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED"
556 ;;
557 avr*)
558 newlib_cflags="${newlib_cflags} -DNO_EXEC -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
559 ;;
560 bfin*)
561 syscall_dir=syscalls
562 ;;
563 cris-*-* | crisv32-*-*)
564 default_newlib_io_long_long="yes"
565 newlib_cflags="${newlib_cflags} -DHAVE_RENAME -D_USE_WRITE -DCOMPACT_CTYPE"
566 syscall_dir=syscalls
567 ;;
568 crx-*-*)
569 newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DMISSING_SYSCALL_NAMES"
570 syscall_dir=
571 ;;
572 d10v*)
573 newlib_cflags="${newlib_cflags} -DSMALL_MEMORY"
574 syscall_dir=syscalls
575 ;;
576 d30v*)
577 newlib_cflags="${newlib_cflags} -DABORT_MESSAGE -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
578 syscall_dir=
579 ;;
580 ep9312-*-*)
581 syscall_dir=syscalls
582 if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
583 newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
584 fi
585 ;;
586 fido-*-elf)
587 newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"
588 syscall_dir=
589 ;;
590 fr30-*-*)
591 syscall_dir=syscalls
592 ;;
593 frv-*-*)
594 syscall_dir=syscalls
595 default_newlib_io_long_long="yes"
596 ;;
597 h8300*-*-*)
598 syscall_dir=syscalls
599 default_newlib_io_long_long="yes"
600 newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
601 # Simulator only extensions for H8300.
602 # Uncomment the next line to enable them.
603 # newlib_cflags="${newlib_cflags} -D__SIMULATOR__"
604 ;;
605 h8500-*-*)
606 syscall_dir=syscalls
607 newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
608 ;;
609 i[34567]86-*-sco*)
610 newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED -DHAVE_FCNTL"
611 ;;
612 i[34567]86-*-netware*)
613 newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DNO_EXEC -DABORT_PROVIDED -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DHAVE_FCNTL"
614 ;;
615 iq2000*)
616 syscall_dir=syscalls
617 default_newlib_io_long_long="yes"
618 ;;
619 m32r-*-*)
620 # Pass -msdata=sdata so _impure_ptr goes in .sdata.
621 # We don't generate sda relocs however for upward compatibility.
622 # FIXME: This is necessary because the default multilib doesn't
623 # use --print-multi-lib.
624 newlib_cflags="${newlib_cflags} -msdata=sdata"
625 syscall_dir=syscalls
626 ;;
627 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
628 newlib_cflags="${newlib_cflags} -DNO_EXEC -DABORT_PROVIDED -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
629 ;;
630 m68k-unknown-elf)
631 newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"
632 syscall_dir=
633 ;;
634 mcore-*-*)
635 syscall_dir=syscalls
636 ;;
637 mips64vr*-*-*)
638 default_newlib_io_long_long="yes"
639 newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
640 ;;
641 mips*-*-elf*)
642 default_newlib_io_long_long="yes"
643 newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
644 ;;
645 mmix-*)
646 syscall_dir=syscalls
647 # We need every symbol 32-bit aligned, so the invalid
648 # construct with attribute ((alias ("_ctype_b+127"))) breaks.
649 newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE"
650 ;;
651 mn10?00-*-*)
652 syscall_dir=syscalls
653 ;;
654 powerpc*-*-eabialtivec*)
655 default_newlib_io_long_long="yes"
656 newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
657 ;;
658 powerpc*-*-eabispe*)
659 default_newlib_io_long_long="yes"
660 newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
661 ;;
662 powerpc*-*-eabi* | \
663 powerpc*-*-elf* | \
664 powerpc*-*-linux* | \
665 powerpc*-*-rtem* | \
666 powerpc*-*-sysv* | \
667 powerpc*-*-solaris*)
668 default_newlib_io_long_long="yes"
669 newlib_cflags="${newlib_cflags} -mrelocatable-lib -mno-eabi -mstrict-align -DMISSING_SYSCALL_NAMES"
670 ;;
671 powerpcle-*-pe)
672 newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DHAVE_FCNTL"
673 syscall_dir=syscalls
674 ;;
675 sh*-*-*)
676 default_newlib_io_long_long="yes"
677 syscall_dir=syscalls
678 ;;
679 sparc-sun-sunos*)
680 newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED"
681 ;;
682 sparc64-*-*)
683 newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_BLKSIZE -DHAVE_FCNTL"
684 # This either belongs elsewhere or nowhere. But I need *something*,
685 # so for now it's here ...
686 case "${host_os}" in
687 aoutv8 | *32p)
688 newlib_cflags="${newlib_cflags} -DTARGET_PTR_SIZE=32" ;;
689 *)
690 newlib_cflags="${newlib_cflags} -DTARGET_PTR_SIZE=64" ;;
691 esac
692 ;;
693 strongarm-*-*)
694 syscall_dir=syscalls
695 ;;
696 thumb-*-pe)
697 syscall_dir=syscalls
698 # Don't use the debugging protocols just yet.
699 ;;
700 thumb-*-*)
701 syscall_dir=syscalls
702 # If newlib is supplying syscalls, select which debug protocol is being used.
703 # ARM_RDP_MONITOR selects the Demon monitor.
704 # ARM_RDI_MONITOR selects the Angel monitor.
705 # If neither are defined, then hard coded defaults will be used
706 # to create the program's environment.
707 # If --disable-newlib-supplied-syscalls is specified, then the end-user
708 # may specify the protocol via gcc spec files supplied by libgloss.
709 if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
710 # newlib_cflags="${newlib_cflags} -DARM_RDP_MONITOR"
711 newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
712 fi
713 ;;
714 tic80*)
715 syscall_dir=syscalls
716 ;;
717 v850-*-*)
718 syscall_dir=syscalls
719 ;;
720 v850e-*-*)
721 syscall_dir=syscalls
722 ;;
723 v850ea-*-*)
724 syscall_dir=syscalls
725 ;;
726 w65-*-*)
727 syscall_dir=syscalls
728 newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
729 ;;
730 xscale-*-*)
731 syscall_dir=syscalls
732 newlib_cflags="${newlib_cflags} -DHAVE_SYSTEM -DHAVE_RENAME"
733 if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
734 newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
735 fi
736 ;;
737 xstormy16-*-*)
738 syscall_dir=syscalls
739 ;;
740 z8k-*-*)
741 syscall_dir=syscalls
742 ;;
743 *)
744 newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
745 syscall_dir=
746 ;;
747 esac
748
749 # Use defaults for certain settings if not specified by user
750
751 # Enable C99 format support in I/O routines if requested.
752 if [ "x${newlib_io_c99_formats}" = "x" ]; then
753 if [ ${default_newlib_io_c99_formats} = "yes" ]; then
754 newlib_io_c99_formats="yes";
755 fi
756 fi
757
758 # Enable long long support in I/O routines if requested.
759 if [ "x${newlib_io_long_long}" = "x" ]; then
760 if [ ${default_newlib_io_long_long} = "yes" ]; then
761 newlib_io_long_long="yes";
762 fi
763 fi
764
765 # Enable long double support in I/O routines if requested.
766 if [ "x${newlib_io_long_double}" = "x" ]; then
767 if [ ${default_newlib_io_long_double} = "yes" ]; then
768 newlib_io_long_double="yes";
769 fi
770 fi
771
772 # Enable printf positional argument support if requested.
773 if [ "x${newlib_io_pos_args}" = "x" ]; then
774 if [ ${default_newlib_io_pos_args} = "yes" ]; then
775 newlib_io_pos_args="yes";
776 fi
777 fi
778
779 # Disable atexit dynamic allocation if requested.
780 if [ "x${newlib_atexit_dynamic_alloc}" = "x" ]; then
781 if [ ${default_newlib_atexit_dynamic_alloc} = "yes" ]; then
782 newlib_atexit_dynamic_alloc="yes";
783 fi
784 fi
785
786 if test -z "${have_crt0}" && test -n "${sys_dir}"; then
787 have_crt0="yes"
788 fi
This page took 0.069877 seconds and 6 git commands to generate.