OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-newlib/] [newlib-1.17.0/] [newlib/] [configure.host] - Blame information for rev 9

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.