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

Subversion Repositories openrisc

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

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

powered by: WebSVN 2.1.0

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