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