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