OSDN Git Service

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