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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [configure.host] - Blame information for rev 359

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
# 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
    ;;
84
esac
85
 
86
# Get the source directories to use for the CPU type.
87
# machine_dir should supply CPU dependent routines, such as setjmp.
88
# newlib_cflags is passed to gcc when compiling.
89
# THIS TABLE IS ALPHA SORTED.  KEEP IT THAT WAY.
90
 
91
case "${host_cpu}" in
92
  a29k)
93
        machine_dir=a29k
94
        ;;
95
  arc)
96
        machine_dir=
97
        ;;
98
  arm)
99
        machine_dir=arm
100
        ;;
101
  avr*)
102
        newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mcall-prologues"
103
        ;;
104
  bfin)
105
        machine_dir=bfin
106
        ;;
107
  cris | crisv32)
108
        machine_dir=cris
109
        ;;
110
  crx*)
111
        machine_dir=crx
112
        ;;
113
  d10v*)
114
        machine_dir=d10v
115
        ;;
116
  d30v*)
117
        machine_dir=d30v
118
        ;;
119
  ep9312)
120
        machine_dir=arm
121
        ;;
122
  fido)
123
        machine_dir=m68k
124
        newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE"
125
        ;;
126
  fr30)
127
        machine_dir=fr30
128
        ;;
129
  frv)
130
        machine_dir=frv
131
        ;;
132
  h8300)
133
        machine_dir=h8300
134
        ;;
135
  h8500)
136
        machine_dir=h8500
137
        ;;
138
  hppa*)
139
        machine_dir=hppa
140
        ;;
141
  i960)
142
        machine_dir=i960
143
        ;;
144
  i[34567]86)
145
        # Don't use for these since they provide their own setjmp.
146
        case ${host} in
147
        *-*-sco* | *-*-cygwin*)
148
                libm_machine_dir=i386
149
                machine_dir=i386
150
                ;;
151
        *)
152
                libm_machine_dir=i386
153
                machine_dir=i386
154
                mach_add_setjmp=true
155
                ;;
156
        esac
157
        ;;
158
  ia64*)
159
        ;;
160
  iq2000)
161
        machine_dir=iq2000
162
        ;;
163
  lm32)
164
        machine_dir=lm32
165
        ;;
166
  m32c)
167
        machine_dir=m32c
168
        newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY"
169
        ;;
170
 
171
  m32r*)
172
        machine_dir=m32r
173
        ;;
174
 
175
  m68hc11|m6811|m68hc12|m6812)
176
        machine_dir=m68hc11
177
        newlib_cflags="-DPREFER_SIZE_OVER_SPEED -Os -mrelax"
178
        CFLAGS="-g -Os"
179
        ;;
180
 
181
  m68*)
182
        machine_dir=m68k
183
        newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE"
184
        ;;
185
  m88k)
186
        machine_dir=m88k
187
        newlib_cflags="${newlib_cflags} -m88000"
188
        ;;
189
  m88110)
190
        machine_dir=m88k
191
        newlib_cflags="${newlib_cflags} -m88110"
192
        ;;
193
  mcore)
194
        ;;
195
  microblaze)
196
        machine_dir=microblaze
197
        ;;
198
  mep)
199
        machine_dir=mep
200
        ;;
201
  mips*)
202
        machine_dir=mips
203
        ;;
204
  mmix)
205
        ;;
206
  mn10200)
207
        machine_dir=mn10200
208
        ;;
209
  mn10300)
210
        default_newlib_io_long_long="yes"
211
        machine_dir=mn10300
212
        ;;
213
  moxie)
214
        machine_dir=moxie
215
        ;;
216
  mt*)
217
        machine_dir=mt
218
        ;;
219
  or16)
220
        ;;
221
  or32)
222
        machine_dir=or32
223
        ;;
224
  powerpc*)
225
        machine_dir=powerpc
226
        ;;
227
  rx)
228
        machine_dir=rx
229
        default_newlib_io_long_long="yes"
230
        newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
231
        ;;
232
  sh | sh64)
233
        machine_dir=sh
234
        ;;
235
  sparc*)
236
        machine_dir=sparc
237
        # FIXME: Might wish to make MALLOC_ALIGNMENT more generic.
238
        newlib_cflags="${newlib_cflags} -DMALLOC_ALIGNMENT=8"
239
        ;;
240
  strongarm)
241
        machine_dir=arm
242
        ;;
243
  xscale)
244
        machine_dir=xscale
245
        ;;
246
  thumb)
247
        machine_dir=arm
248
        ;;
249
  tic4x|c4x)
250
        machine_dir=tic4x
251
        ;;
252
  tic80*)
253
        machine_dir=tic80
254
        ;;
255
  v70)
256
        ;;
257
  v810)
258
        ;;
259
  v850)
260
        machine_dir=v850
261
        newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mv850 "
262
        ;;
263
  v850e)
264
        machine_dir=v850
265
        newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED "
266
        ;;
267
  w65*)
268
        machine_dir=w65
269
        ;;
270
  x86_64)
271
        machine_dir=x86_64
272
        ;;
273
  xc16x*)
274
    machine_dir=xc16x
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
  microblaze-*-*)
461
        machine_dir=microblaze
462
        ;;
463
  mips*-dec-*)
464
        sys_dir=decstation
465
        ;;
466
  mmix-knuth-mmixware)
467
        sys_dir=mmixware
468
        ;;
469
  moxie*)
470
        sys_dir=
471
        ;;
472
  powerpcle-*-pe)
473
        posix_dir=posix
474
        ;;
475
  sh*-*)
476
        sys_dir=sh
477
        ;;
478
  sparc-sun-sunos*)
479
        sys_dir=sun4
480
        unix_dir=unix
481
        ;;
482
  sparc64*)
483
        sys_dir=sparc64
484
        unix_dir=unix
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 -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC"
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 -D_NO_WORDEXP -D_NO_POPEN"
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
  m32c-*-*)
664
        default_newlib_io_long_long="yes"
665
        newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DABORT_PROVIDED"
666
        syscall_dir=
667
        ;;
668
  m32r-*-*)
669
        # Pass -msdata=sdata so _impure_ptr goes in .sdata.
670
        # We don't generate sda relocs however for upward compatibility.
671
        # FIXME: This is necessary because the default multilib doesn't
672
        # use --print-multi-lib.
673
        newlib_cflags="${newlib_cflags} -msdata=sdata"
674
        syscall_dir=syscalls
675
        ;;
676
  m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
677
        newlib_cflags="${newlib_cflags} -DNO_EXEC -DABORT_PROVIDED -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
678
        ;;
679
  m68k-unknown-elf)
680
        newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"
681
        syscall_dir=
682
        ;;
683
  mcore-*-*)
684
        syscall_dir=syscalls
685
        ;;
686
  microblaze-*-*)
687
        default_newlib_io_long_long="yes"
688
        newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DSMALL_MEMORY -D_REENT_SMALL"
689
        ;;
690
  mips64vr*-*-*)
691
        default_newlib_io_long_long="yes"
692
        newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
693
        ;;
694
  mips*-*-elf*)
695
        default_newlib_io_long_long="yes"
696
        newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
697
        ;;
698
  mmix-*)
699
        syscall_dir=syscalls
700
        # We need every symbol 32-bit aligned, so the invalid
701
        # construct with attribute ((alias ("_ctype_b+127"))) breaks.
702
        newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE"
703
        ;;
704
  mn10?00-*-*)
705
        syscall_dir=syscalls
706
        ;;
707
  moxie-*-*)
708
        syscall_dir=syscalls
709
        default_newlib_io_long_long="yes"
710
        ;;
711
  or32-*-*)
712
        syscall_dir=syscalls
713
        ;;
714
  powerpc*-*-eabialtivec*)
715
        default_newlib_io_long_long="yes"
716
        newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
717
        ;;
718
  powerpc*-*-eabispe*)
719
        default_newlib_io_long_long="yes"
720
        newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
721
        ;;
722
  powerpc*-*-eabi* | \
723
  powerpc*-*-elf* | \
724
  powerpc*-*-linux* | \
725
  powerpc*-*-rtem* | \
726
  powerpc*-*-sysv* | \
727
  powerpc*-*-solaris*)
728
        default_newlib_io_long_long="yes"
729
        newlib_cflags="${newlib_cflags} -mrelocatable-lib -mno-eabi -mstrict-align -DMISSING_SYSCALL_NAMES"
730
        ;;
731
  powerpcle-*-pe)
732
        newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DHAVE_FCNTL"
733
        syscall_dir=syscalls
734
        ;;
735
  sh*-*-*)
736
        default_newlib_io_long_long="yes"
737
        syscall_dir=syscalls
738
        ;;
739
  sparc-sun-sunos*)
740
        newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED"
741
        ;;
742
  sparc64-*-*)
743
        newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_BLKSIZE -DHAVE_FCNTL"
744
        # This either belongs elsewhere or nowhere. But I need *something*,
745
        # so for now it's here ...
746
        case "${host_os}" in
747
          aoutv8 | *32p)
748
                newlib_cflags="${newlib_cflags} -DTARGET_PTR_SIZE=32" ;;
749
          *)
750
                newlib_cflags="${newlib_cflags} -DTARGET_PTR_SIZE=64" ;;
751
        esac
752
        ;;
753
  strongarm-*-*)
754
        syscall_dir=syscalls
755
        ;;
756
  thumb-*-pe)
757
        syscall_dir=syscalls
758
# Don't use the debugging protocols just yet.
759
        ;;
760
  thumb-*-*)
761
        syscall_dir=syscalls
762
# If newlib is supplying syscalls, select which debug protocol is being used.
763
# ARM_RDP_MONITOR selects the Demon monitor.
764
# ARM_RDI_MONITOR selects the Angel monitor.
765
# If neither are defined, then hard coded defaults will be used
766
# to create the program's environment.
767
# If --disable-newlib-supplied-syscalls is specified, then the end-user
768
# may specify the protocol via gcc spec files supplied by libgloss.
769
        if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
770
#         newlib_cflags="${newlib_cflags} -DARM_RDP_MONITOR"
771
          newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
772
        fi
773
        ;;
774
  tic80*)
775
        syscall_dir=syscalls
776
        ;;
777
  v850-*-*)
778
        syscall_dir=syscalls
779
        ;;
780
  v850e-*-*)
781
        syscall_dir=syscalls
782
        ;;
783
  v850ea-*-*)
784
        syscall_dir=syscalls
785
        ;;
786
  w65-*-*)
787
        syscall_dir=syscalls
788
        newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
789
        ;;
790
  xc16x-*)
791
          syscall_dir=syscalls
792
        ;;
793
  xscale-*-*)
794
        syscall_dir=syscalls
795
        newlib_cflags="${newlib_cflags} -DHAVE_SYSTEM -DHAVE_RENAME"
796
        if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
797
          newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
798
        fi
799
        ;;
800
  xstormy16-*-*)
801
        syscall_dir=syscalls
802
        ;;
803
  z8k-*-*)
804
        syscall_dir=syscalls
805
        ;;
806
  *)
807
        newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
808
        syscall_dir=
809
        ;;
810
esac
811
 
812
# Use defaults for certain settings if not specified by user
813
 
814
# Enable C99 format support in I/O routines if requested.
815
if [ "x${newlib_io_c99_formats}" = "x" ]; then
816
        if [ ${default_newlib_io_c99_formats} = "yes" ]; then
817
                newlib_io_c99_formats="yes";
818
        fi
819
fi
820
 
821
# Enable long long support in I/O routines if requested.
822
if [ "x${newlib_io_long_long}" = "x" ]; then
823
        if [ ${default_newlib_io_long_long} = "yes" ]; then
824
                newlib_io_long_long="yes";
825
        fi
826
fi
827
 
828
# Enable long double support in I/O routines if requested.
829
if [ "x${newlib_io_long_double}" = "x" ]; then
830
        if [ ${default_newlib_io_long_double} = "yes" ]; then
831
                newlib_io_long_double="yes";
832
        fi
833
fi
834
 
835
# Enable printf positional argument support if requested.
836
if [ "x${newlib_io_pos_args}" = "x" ]; then
837
        if [ ${default_newlib_io_pos_args} = "yes" ]; then
838
                newlib_io_pos_args="yes";
839
        fi
840
fi
841
 
842
# Disable atexit dynamic allocation if requested.
843
if [ "x${newlib_atexit_dynamic_alloc}" = "x" ]; then
844
        if [ ${default_newlib_atexit_dynamic_alloc} = "yes" ]; then
845
                newlib_atexit_dynamic_alloc="yes";
846
        fi
847
fi
848
 
849
if test -z "${have_crt0}" && test -n "${sys_dir}"; then
850
  have_crt0="yes"
851
fi

powered by: WebSVN 2.1.0

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