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