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