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