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

Subversion Repositories openrisc_me

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

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

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

powered by: WebSVN 2.1.0

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