OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [config.gcc] - Blame information for rev 399

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

Line No. Rev Author Line
1 280 jeremybenn
# GCC target-specific configuration file.
2
# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
3
# 2008, 2009, 2010 Free Software Foundation, Inc.
4 399 jeremybenn
# Copyright (C) 2010 Embecosm Limited
5 280 jeremybenn
 
6
#This file is part of GCC.
7
 
8
#GCC is free software; you can redistribute it and/or modify it under
9
#the terms of the GNU General Public License as published by the Free
10
#Software Foundation; either version 3, or (at your option) any later
11
#version.
12
 
13
#GCC is distributed in the hope that it will be useful, but WITHOUT
14
#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
#FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16
#for more details.
17
 
18
#You should have received a copy of the GNU General Public License
19
#along with GCC; see the file COPYING3.  If not see
20
#.
21
 
22
# This is the GCC target-specific configuration file
23
# where a configuration type is mapped to different system-specific
24
# definitions and files.  This is invoked by the autoconf-generated
25
# configure script.  Putting it in a separate shell file lets us skip
26
# running autoconf when modifying target-specific information.
27
 
28
# When you change the cases in the OS or target switches, consider
29
# updating ../libgcc/config.host also.
30
 
31
# This file switches on the shell variable ${target}, and also uses the
32
# following shell variables:
33
#
34
#  with_*               Various variables as set by configure.
35
#
36
#  enable_threads       Either the name, yes or no depending on whether
37
#                       threads support was requested.
38
#
39
#  default_use_cxa_atexit
40
#                         The default value for the $enable___cxa_atexit
41
#                       variable.  enable___cxa_atexit needs to be set to
42
#                       "yes" for the correct operation of C++ destructors
43
#                       but it relies upon the presence of a non-standard C
44
#                       library function called __cxa_atexit.
45
#                         Since not all C libraries provide __cxa_atexit the
46
#                       default value of $default_use_cxa_atexit is set to
47
#                       "no" except for targets which are known to be OK.
48
#
49
#  gas_flag             Either yes or no depending on whether GNU as was
50
#                       requested.
51
#
52
#  gnu_ld_flag          Either yes or no depending on whether GNU ld was
53
#                       requested.
54
 
55
# This file sets the following shell variables for use by the
56
# autoconf-generated configure script:
57
#
58
#  cpu_type             The name of the cpu, if different from the first
59
#                       chunk of the canonical target name.
60
#
61
#  tm_defines           List of target macros to define for all compilations.
62
#
63
#  tm_file              A list of target macro files, if different from
64
#                       "$cpu_type/$cpu_type.h". Usually it's constructed
65
#                       per target in a way like this:
66
#                       tm_file="${tm_file} dbxelf.h elfos.h svr4.h ${cpu_type.h}/elf.h"
67
#                       Note that the preferred order is:
68
#                       - specific target header "${cpu_type}/${cpu_type.h}"
69
#                       - generic headers like dbxelf.h elfos.h, etc.
70
#                       - specializing target headers like ${cpu_type.h}/elf.h
71
#                       This helps to keep OS specific stuff out of the CPU
72
#                       defining header ${cpu_type}/${cpu_type.h}.
73
#
74
#                       It is possible to include automatically-generated
75
#                       build-directory files by prefixing them with "./".
76
#                       All other files should relative to $srcdir/config.
77
#
78
#  tm_p_file            Location of file with declarations for functions
79
#                       in $out_file.
80
#
81
#  out_file             The name of the machine description C support
82
#                       file, if different from "$cpu_type/$cpu_type.c".
83
#
84
#  md_file              The name of the machine-description file, if
85
#                       different from "$cpu_type/$cpu_type.md".
86
#
87
#  tmake_file           A list of machine-description-specific
88
#                       makefile-fragments, if different from
89
#                       "$cpu_type/t-$cpu_type".
90
#
91
#  extra_modes          The name of the file containing a list of extra
92
#                       machine modes, if necessary and different from
93
#                       "$cpu_type/$cpu_type-modes.def".
94
#
95
#  extra_objs           List of extra objects that should be linked into
96
#                       the compiler proper (cc1, cc1obj, cc1plus)
97
#                       depending on target.
98
#
99
#  extra_gcc_objs       List of extra objects that should be linked into
100
#                       the compiler driver (gcc) depending on target.
101
#
102
#  extra_headers        List of used header files from the directory
103
#                       config/${cpu_type}.
104
#
105
#  use_gcc_tgmath       If set, add tgmath.h to the list of used header
106
#                       files.
107
#
108
#  use_gcc_stdint       If "wrap", install a version of stdint.h that
109
#                       wraps the system's copy for hosted compilations;
110
#                       if "provide", provide a version of systems without
111
#                       such a system header; otherwise "none", do not
112
#                       provide such a header at all.
113
#
114
#  extra_passes         List of extra executables compiled for this target
115
#                       machine, used for compiling from source to object.
116
#
117
#  extra_parts          List of extra object files that should be compiled
118
#                       for this target machine.
119
#
120
#  extra_programs       Like extra_passes, but these are used when linking.
121
#
122
#  extra_options        List of target-dependent .opt files.
123
#
124
#  c_target_objs        List of extra target-dependent objects that be
125
#                       linked into the C compiler only.
126
#
127
#  cxx_target_objs      List of extra target-dependent objects that be
128
#                       linked into the C++ compiler only.
129
#
130
#  fortran_target_objs  List of extra target-dependent objects that be
131
#                       linked into the fortran compiler only.
132
#
133
#  target_gtfiles       List of extra source files with type information.
134
#
135
#  xm_defines           List of macros to define when compiling for the
136
#                       target machine.
137
#
138
#  xm_file              List of files to include when compiling for the
139
#                       target machine.
140
#
141
#  use_collect2         Set to yes or no, depending on whether collect2
142
#                       will be used.
143
#
144
#  target_cpu_default   Set to override the default target model.
145
#
146
#  gdb_needs_out_file_path
147
#                       Set to yes if gdb needs a dir command with
148
#                       `dirname $out_file`.
149
#
150
#  thread_file          Set to control which thread package to use.
151
#
152
#  gas                  Set to yes or no depending on whether the target
153
#                       system normally uses GNU as.
154
#
155
#  need_64bit_hwint     Set to yes if HOST_WIDE_INT must be 64 bits wide
156
#                       for this target.  This is true if this target
157
#                       supports "long" or "wchar_t" wider than 32 bits,
158
#                       or BITS_PER_WORD is wider than 32 bits.
159
#                       The setting made here must match the one made in
160
#                       other locations such as libcpp/configure.ac
161
#
162
#  configure_default_options
163
#                       Set to an initializer for configure_default_options
164
#                       in configargs.h, based on --with-cpu et cetera.
165
 
166
# The following variables are used in each case-construct to build up the
167
# outgoing variables:
168
#
169
#  gnu_ld               Set to yes or no depending on whether the target
170
#                       system normally uses GNU ld.
171
 
172
out_file=
173
tmake_file=
174
extra_headers=
175
use_gcc_tgmath=yes
176
use_gcc_stdint=none
177
extra_passes=
178
extra_parts=
179
extra_programs=
180
extra_objs=
181
extra_gcc_objs=
182
extra_options=
183
c_target_objs=
184
cxx_target_objs=
185
fortran_target_objs=
186
tm_defines=
187
xm_defines=
188
# Set this to force installation and use of collect2.
189
use_collect2=
190
# Set this to override the default target model.
191
target_cpu_default=
192
# Set this if gdb needs a dir command with `dirname $out_file`
193
gdb_needs_out_file_path=
194
# Set this to control which thread package will be used.
195
thread_file=
196
# Reinitialize these from the flag values every loop pass, since some
197
# configure entries modify them.
198
gas="$gas_flag"
199
gnu_ld="$gnu_ld_flag"
200
default_use_cxa_atexit=no
201
target_gtfiles=
202
need_64bit_hwint=
203
need_64bit_isa=
204
# Selects the object file format reader/writer used by LTO.
205
lto_binary_reader=lto-elf
206
 
207
# Don't carry these over build->host->target.  Please.
208
xm_file=
209
md_file=
210
 
211
# Obsolete configurations.
212
case ${target} in
213
   alpha*-dec-osf4*                     \
214
 | alpha*-dec-osf5.0*                   \
215
 | mips-sgi-irix5*                      \
216
 | mips-sgi-irix6.[0-4]*                \
217
 | *-*-solaris2.7*                      \
218
 )
219
    if test "x$enable_obsolete" != xyes; then
220
      echo "*** Configuration ${target} is obsolete." >&2
221
      echo "*** Specify --enable-obsolete to build it anyway." >&2
222
      echo "*** Support will be REMOVED in the next major release of GCC," >&2
223
      echo "*** unless a maintainer comes forward." >&2
224
      exit 1
225
    fi;;
226
esac
227
 
228
# Unsupported targets list.  Do not put an entry in this list unless
229
# it would otherwise be caught by a more permissive pattern.  The list
230
# should be in alphabetical order.
231
case ${target} in
232
   i[34567]86-go32-*                    \
233
 | i[34567]86-*-go32*                   \
234
 | mips64orion*-*-rtems*                \
235
 | pdp11-*-bsd                          \
236
 | sparc-hal-solaris2*                  \
237
 | thumb-*-*                            \
238
 | *-*-linux*aout*                      \
239
 | *-*-linux*coff*                      \
240
 | *-*-linux*libc1*                     \
241
 | *-*-linux*oldld*                     \
242
 | *-*-rtemsaout*                       \
243
 | *-*-rtemscoff*                       \
244
 | *-*-solaris2.[0-6]                   \
245
 | *-*-solaris2.[0-6].*                 \
246
 | *-*-sysv*            \
247
 | vax-*-vms*                           \
248
 )
249
        echo "*** Configuration ${target} not supported" 1>&2
250
        exit 1
251
        ;;
252
esac
253
 
254
# Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
255
# updated in each machine entry.  Also set default extra_headers for some
256
# machines.
257
tm_p_file=
258
cpu_type=`echo ${target} | sed 's/-.*$//'`
259
cpu_is_64bit=
260
case ${target} in
261
m32c*-*-*)
262
        cpu_type=m32c
263
        tmake_file=m32c/t-m32c
264
        ;;
265
alpha*-*-*)
266
        cpu_type=alpha
267
        need_64bit_hwint=yes
268
        ;;
269
am33_2.0-*-linux*)
270
        cpu_type=mn10300
271
        ;;
272
arm*-*-*)
273
        cpu_type=arm
274
        extra_headers="mmintrin.h arm_neon.h"
275
        c_target_objs="arm-c.o"
276
        cxx_target_objs="arm-c.o"
277
        ;;
278
avr-*-*)
279
        cpu_type=avr
280
        c_target_objs="avr-c.o"
281
        cxx_target_objs="avr-c.o"
282
        ;;
283
bfin*-*)
284
        cpu_type=bfin
285
        ;;
286
crisv32-*)
287
        cpu_type=cris
288
        ;;
289
frv*)   cpu_type=frv
290
        ;;
291
moxie*) cpu_type=moxie
292
        ;;
293
fido-*-*)
294
        cpu_type=m68k
295
        extra_headers=math-68881.h
296
        ;;
297
i[34567]86-*-*)
298
        cpu_type=i386
299
        c_target_objs="i386-c.o"
300
        cxx_target_objs="i386-c.o"
301
        extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
302
                       pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
303
                       nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
304
                       immintrin.h x86intrin.h avxintrin.h xopintrin.h
305
                       ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
306
                       abmintrin.h"
307
        ;;
308
x86_64-*-*)
309
        cpu_type=i386
310
        c_target_objs="i386-c.o"
311
        cxx_target_objs="i386-c.o"
312
        extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
313
                       pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
314
                       nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
315
                       immintrin.h x86intrin.h avxintrin.h xopintrin.h
316
                       ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
317
                       abmintrin.h"
318
        need_64bit_hwint=yes
319
        ;;
320
ia64-*-*)
321
        extra_headers=ia64intrin.h
322
        need_64bit_hwint=yes
323
        ;;
324
hppa*-*-*)
325
        cpu_type=pa
326
        ;;
327
m32r*-*-*)
328
        cpu_type=m32r
329
        ;;
330
m68k-*-*)
331
        extra_headers=math-68881.h
332
        ;;
333
mips*-*-*)
334
        cpu_type=mips
335
        need_64bit_hwint=yes
336
        extra_headers="loongson.h"
337
        ;;
338
or32-*-*)
339
        cpu_type=or32
340
        ;;
341
picochip-*-*)
342
        cpu_type=picochip
343
        ;;
344
powerpc*-*-*)
345
        cpu_type=rs6000
346
        extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h"
347
        need_64bit_hwint=yes
348
        case x$with_cpu in
349
            xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[34567]|xpower6x|xrs64a|xcell|xa2|xe500mc64)
350
                cpu_is_64bit=yes
351
                ;;
352
        esac
353
        ;;
354
rs6000*-*-*)
355
        need_64bit_hwint=yes
356
        ;;
357
score*-*-*)
358
        cpu_type=score
359
        ;;
360
sparc*-*-*)
361
        cpu_type=sparc
362
        need_64bit_hwint=yes
363
        ;;
364
spu*-*-*)
365
        cpu_type=spu
366
        need_64bit_hwint=yes
367
        ;;
368
s390*-*-*)
369
        cpu_type=s390
370
        need_64bit_hwint=yes
371
        ;;
372
# Note the 'l'; we need to be able to match e.g. "shle" or "shl".
373
sh[123456789lbe]*-*-* | sh-*-*)
374
        cpu_type=sh
375
        need_64bit_hwint=yes
376
        ;;
377
esac
378
 
379
tm_file=${cpu_type}/${cpu_type}.h
380
if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h
381
then
382
        tm_p_file=${cpu_type}/${cpu_type}-protos.h
383
fi
384
extra_modes=
385
if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
386
then
387
        extra_modes=${cpu_type}/${cpu_type}-modes.def
388
fi
389
if test -f ${srcdir}/config/${cpu_type}/${cpu_type}.opt
390
then
391
        extra_options="${extra_options} ${cpu_type}/${cpu_type}.opt"
392
fi
393
 
394
case ${target} in
395
i[34567]86-*-*)
396
        if test "x$enable_cld" = xyes; then
397
                tm_defines="${tm_defines} USE_IX86_CLD=1"
398
        fi
399
        tm_file="vxworks-dummy.h ${tm_file}"
400
        ;;
401
x86_64-*-*)
402
        tm_file="i386/biarch64.h ${tm_file}"
403
        if test "x$enable_cld" = xyes; then
404
                tm_defines="${tm_defines} USE_IX86_CLD=1"
405
        fi
406
        tm_file="vxworks-dummy.h ${tm_file}"
407
        ;;
408
esac
409
 
410
# On a.out targets, we need to use collect2.
411
case ${target} in
412
*-*-*aout*)
413
        use_collect2=yes
414
        ;;
415
esac
416
 
417
# Common parts for widely ported systems.
418
case ${target} in
419
*-*-darwin*)
420
  tmake_file="t-darwin ${cpu_type}/t-darwin"
421
  tm_file="${tm_file} darwin.h"
422
  case ${target} in
423
  *-*-darwin9*)
424
    tm_file="${tm_file} darwin9.h"
425
    ;;
426
  *-*-darwin[12][0-9]*)
427
    tm_file="${tm_file} darwin9.h darwin10.h"
428
    ;;
429
  esac
430
  tm_file="${tm_file} ${cpu_type}/darwin.h"
431
  tm_p_file="${tm_p_file} darwin-protos.h"
432
  target_gtfiles="\$(srcdir)/config/darwin.c"
433
  extra_options="${extra_options} darwin.opt"
434
  c_target_objs="${c_target_objs} darwin-c.o"
435
  cxx_target_objs="${cxx_target_objs} darwin-c.o"
436
  fortran_target_objs="darwin-f.o"
437
  extra_objs="darwin.o"
438
  extra_gcc_objs="darwin-driver.o"
439
  default_use_cxa_atexit=yes
440
  use_gcc_stdint=wrap
441
  case ${enable_threads} in
442
    "" | yes | posix) thread_file='posix' ;;
443
  esac
444
  ;;
445
*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
446
  # This is the place-holder for the generic a.out configuration
447
  # of FreeBSD.  No actual configuration resides here since
448
  # there was only ever a bare-bones ix86 configuration for
449
  # a.out and it exists solely in the machine-specific section.
450
  # This place-holder must exist to avoid dropping into
451
  # the generic ELF configuration of FreeBSD (i.e. it must be
452
  # ordered before that section).
453
  ;;
454
*-*-freebsd*)
455
  # This is the generic ELF configuration of FreeBSD.  Later
456
  # machine-specific sections may refine and add to this
457
  # configuration.
458
  #
459
  # Due to tm_file entry ordering issues that vary between cpu
460
  # architectures, we only define fbsd_tm_file to allow the
461
  # machine-specific section to dictate the final order of all
462
  # entries of tm_file with the minor exception that components
463
  # of the tm_file set here will always be of the form:
464
  #
465
  # freebsd.h [freebsd-.h ...] freebsd-spec.h freebsd.h
466
  #
467
  # The machine-specific section should not tamper with this
468
  # ordering but may order all other entries of tm_file as it
469
  # pleases around the provided core setting.
470
  gas=yes
471
  gnu_ld=yes
472
  extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
473
  fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
474
  tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
475
  tmake_file="t-slibgcc-elf-ver t-freebsd"
476
  case ${enable_threads} in
477
    no)
478
      fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h"
479
      ;;
480
    "" | yes | posix)
481
      thread_file='posix'
482
      tmake_file="${tmake_file} t-freebsd-thread"
483
      # Before 5.0, FreeBSD can't bind shared libraries to -lc
484
      # when "optionally" threaded via weak pthread_* checks.
485
      case ${target} in
486
        *-*-freebsd[34] | *-*-freebsd[34].*)
487
          tmake_file="${tmake_file} t-slibgcc-nolc-override"
488
          ;;
489
      esac
490
      ;;
491
    *)
492
      echo 'Unknown thread configuration for FreeBSD'
493
      exit 1
494
      ;;
495
  esac
496
  fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h freebsd-stdint.h"
497
  case ${target} in
498
    *-*-freebsd[345].*)
499
      :;;
500
    *)
501
      default_use_cxa_atexit=yes;;
502
  esac
503
  # need_64bit_hwint=yes # system compiler has this for all arch!
504
  use_gcc_stdint=wrap
505
  ;;
506
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
507
  extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
508
  gas=yes
509
  gnu_ld=yes
510
  case ${enable_threads} in
511
    "" | yes | posix) thread_file='posix' ;;
512
  esac
513
  tmake_file="t-slibgcc-elf-ver t-linux"
514
  case $target in
515
    *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-kopensolaris*-gnu)
516
      :;;
517
    *-*-gnu*)
518
      tmake_file="$tmake_file t-gnu";;
519
  esac
520
  # glibc / uclibc switch.  uclibc isn't usable for GNU/Hurd and neither for
521
  # GNU/k*BSD.
522
  case $target in
523
    *linux*)
524
      extra_options="$extra_options linux.opt";;
525
    *)
526
      tm_defines="$tm_defines OPTION_GLIBC=1";;
527
  esac
528
  case ${target} in
529
    *-*-*uclibc*)
530
      tm_defines="${tm_defines} UCLIBC_DEFAULT=1"
531
      ;;
532
    *)
533
      tm_defines="${tm_defines} UCLIBC_DEFAULT=0"
534
      ;;
535
  esac
536
  # Assume that glibc or uClibc are being used and so __cxa_atexit is provided.
537
  default_use_cxa_atexit=yes
538
  use_gcc_tgmath=no
539
  use_gcc_stdint=wrap
540
  ;;
541
*-*-netbsd*)
542
  tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"
543
  gas=yes
544
  gnu_ld=yes
545
 
546
  # NetBSD 2.0 and later get POSIX threads enabled by default.
547
  # Allow them to be explicitly enabled on any other version.
548
  case ${enable_threads} in
549
    "")
550
      case ${target} in
551
        *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
552
          thread_file='posix'
553
          tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
554
          ;;
555
      esac
556
      ;;
557
    yes | posix)
558
      thread_file='posix'
559
      tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
560
      ;;
561
  esac
562
 
563
  # NetBSD 1.7 and later are set up to use GCC's crtstuff for
564
  # ELF configurations.  We will clear extra_parts in the
565
  # a.out configurations.
566
  case ${target} in
567
    *-*-netbsd*1.[7-9]* | *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
568
      extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
569
      ;;
570
  esac
571
 
572
  # NetBSD 2.0 and later provide __cxa_atexit(), which we use by
573
  # default (unless overridden by --disable-__cxa_atexit).
574
  case ${target} in
575
    *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
576
      default_use_cxa_atexit=yes
577
      ;;
578
  esac
579
  ;;
580
*-*-openbsd*)
581
  tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
582
  case ${enable_threads} in
583
    yes)
584
      thread_file='posix'
585
      tmake_file="${tmake_file} t-openbsd-thread"
586
      ;;
587
  esac
588
  case ${target} in
589
    *-*-openbsd2.*|*-*-openbsd3.[012])
590
      tm_defines="${tm_defines} HAS_LIBC_R=1" ;;
591
  esac
592
  ;;
593
*-*-rtems*)
594
  case ${enable_threads} in
595
    yes) thread_file='rtems' ;;
596
  esac
597
  use_gcc_stdint=wrap
598
  ;;
599
*-*-uclinux*)
600
  use_gcc_stdint=wrap
601
  ;;
602
*-*-vxworks*)
603
  tmake_file=t-vxworks
604
  xm_defines=POSIX
605
  extra_options="${extra_options} vxworks.opt"
606
  extra_objs=vxworks.o
607
  case ${enable_threads} in
608
    no) ;;
609
    "" | yes | vxworks) thread_file='vxworks' ;;
610
    *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
611
  esac
612
  ;;
613
*-*-elf)
614
  # Assume that newlib is being used and so __cxa_atexit is provided.
615
  default_use_cxa_atexit=yes
616
  use_gcc_stdint=wrap
617
  ;;
618
esac
619
 
620
case ${target} in
621
# Support site-specific machine types.
622
*local*)
623
        rest=`echo ${target} | sed -e "s/$cpu_type-//"`
624
        tm_file=${cpu_type}/$rest.h
625
        if test -f $srcdir/config/${cpu_type}/xm-$rest.h
626
        then xm_file=${cpu_type}/xm-$rest.h
627
        fi
628
        if test -f $srcdir/config/${cpu_type}/t-$rest
629
        then tmake_file=${cpu_type}/t-$rest
630
        fi
631
        ;;
632
alpha*-*-linux*)
633
        tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
634
        target_cpu_default="MASK_GAS"
635
        tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee alpha/t-linux"
636
        ;;
637
alpha*-*-gnu*)
638
        tm_file="$tm_file alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h glibc-stdint.h alpha/gnu.h"
639
        target_cpu_default="MASK_GAS"
640
        tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
641
        ;;
642
alpha*-*-freebsd*)
643
        tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
644
        target_cpu_default="MASK_GAS"
645
        tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
646
        extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
647
        ;;
648
alpha*-*-netbsd*)
649
        tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
650
        target_cpu_default="MASK_GAS"
651
        tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
652
        ;;
653
alpha*-*-openbsd*)
654
        tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
655
        tm_file="alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
656
        # default x-alpha is only appropriate for dec-osf.
657
        target_cpu_default="MASK_GAS"
658
        tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
659
        ;;
660
alpha*-dec-osf[45]*)
661
        if test x$stabs = xyes
662
        then
663
                tm_file="${tm_file} dbx.h"
664
        fi
665
        if test x$gas != xyes
666
        then
667
                extra_passes="mips-tfile mips-tdump"
668
        fi
669
        use_collect2=yes
670
        tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm alpha/t-osf4"
671
        tm_file="${tm_file} alpha/osf.h"
672
        extra_headers=va_list.h
673
        use_gcc_stdint=provide
674
        case ${target} in
675
          *-*-osf4*)
676
            # Define TARGET_SUPPORT_ARCH except on 4.0a.
677
            case ${target} in
678
                *-*-osf4.0a) ;;
679
                *) tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1"
680
            esac
681
            ;;
682
          *-*-osf5*)
683
            tm_file="${tm_file} alpha/osf5.h"
684
            tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1"
685
            ;;
686
        esac
687
        case ${enable_threads} in
688
          "" | yes | posix)
689
            thread_file='posix'
690
            tmake_file="${tmake_file} alpha/t-osf-pthread"
691
            ;;
692
        esac
693
        ;;
694
alpha64-dec-*vms*)
695
        tm_file="${tm_file} alpha/vms.h alpha/vms64.h"
696
        xm_file="alpha/xm-vms.h vms/xm-vms64.h"
697
        tmake_file="alpha/t-alpha vms/t-vms vms/t-vms64 alpha/t-vms alpha/t-ieee"
698
        xmake_file=vms/x-vms
699
        exeext=.exe
700
        install_headers_dir=install-headers-cp
701
        extra_options="${extra_options} vms/vms.opt"
702
        ;;
703
alpha*-dec-*vms*)
704
        tm_file="${tm_file} alpha/vms.h"
705
        xm_file="alpha/xm-vms.h"
706
        tmake_file="alpha/t-alpha vms/t-vms alpha/t-vms alpha/t-ieee"
707
        xmake_file=vms/x-vms
708
        exeext=.exe
709
        install_headers_dir=install-headers-cp
710
        extra_options="${extra_options} vms/vms.opt"
711
        ;;
712
arc-*-elf*)
713
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file}"
714
        extra_parts="crtinit.o crtfini.o"
715
        ;;
716
arm-wrs-vxworks)
717
        tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
718
        tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
719
        ;;
720
arm*-*-freebsd*)
721
        tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h arm/aout.h arm/freebsd.h arm/arm.h"
722
        tmake_file="${tmake_file} arm/t-arm arm/t-strongarm-elf"
723
        ;;
724
arm*-*-netbsdelf*)
725
        tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h"
726
        tmake_file="${tmake_file} arm/t-arm arm/t-netbsd"
727
        ;;
728
arm*-*-netbsd*)
729
        tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h"
730
        tmake_file="t-netbsd arm/t-arm arm/t-netbsd"
731
        extra_parts=""
732
        use_collect2=yes
733
        ;;
734
arm*-*-linux*)                  # ARM GNU/Linux with ELF
735
        tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
736
        case $target in
737
        arm*b-*)
738
                tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
739
                ;;
740
        esac
741
        tmake_file="${tmake_file} t-linux arm/t-arm"
742
        case ${target} in
743
        arm*-*-linux-*eabi)
744
            tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
745
            tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
746
            # The BPABI long long divmod functions return a 128-bit value in
747
            # registers r0-r3.  Correctly modeling that requires the use of
748
            # TImode.
749
            need_64bit_hwint=yes
750
            # The EABI requires the use of __cxa_atexit.
751
            default_use_cxa_atexit=yes
752
            ;;
753
        *)
754
            tmake_file="$tmake_file arm/t-linux"
755
            ;;
756
        esac
757
        tm_file="$tm_file arm/aout.h arm/arm.h"
758
        tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
759
        ;;
760
arm*-*-uclinux*)                # ARM ucLinux
761
        tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
762
        tmake_file="arm/t-arm arm/t-arm-elf"
763
        case ${target} in
764
        arm*-*-uclinux*eabi)
765
            tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
766
            tmake_file="$tmake_file arm/t-bpabi"
767
            # The BPABI long long divmod functions return a 128-bit value in
768
            # registers r0-r3.  Correctly modeling that requires the use of
769
            # TImode.
770
            need_64bit_hwint=yes
771
            # The EABI requires the use of __cxa_atexit.
772
            default_use_cxa_atexit=yes
773
        esac
774
        tm_file="$tm_file arm/aout.h arm/arm.h"
775
        tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
776
        ;;
777
arm*-*-ecos-elf)
778
        tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
779
        tmake_file="arm/t-arm arm/t-arm-elf"
780
        tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
781
        ;;
782
arm*-*-eabi* | arm*-*-symbianelf* )
783
        # The BPABI long long divmod functions return a 128-bit value in
784
        # registers r0-r3.  Correctly modeling that requires the use of
785
        # TImode.
786
        need_64bit_hwint=yes
787
        default_use_cxa_atexit=yes
788
        tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
789
        tmake_file="arm/t-arm arm/t-arm-elf"
790
        case ${target} in
791
        arm*-*-eabi*)
792
          tm_file="$tm_file arm/eabi.h newlib-stdint.h"
793
          tmake_file="${tmake_file} arm/t-bpabi"
794
          extra_options="${extra_options} arm/eabi.opt"
795
          use_gcc_stdint=wrap
796
          ;;
797
        arm*-*-symbianelf*)
798
          tm_file="${tm_file} arm/symbian.h"
799
          # We do not include t-bpabi for Symbian OS because the system
800
          # provides its own implementation of the BPABI functions.
801
          tmake_file="${tmake_file} arm/t-symbian"
802
          ;;
803
        esac
804
        tm_file="${tm_file} arm/aout.h arm/arm.h"
805
        tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
806
        ;;
807
arm*-*-rtems*)
808
        tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h newlib-stdint.h"
809
        tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
810
        tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
811
        ;;
812
arm*-*-elf)
813
        tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
814
        tmake_file="arm/t-arm arm/t-arm-elf"
815
        tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
816
        ;;
817
arm*-wince-pe*)
818
        tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h arm/wince-pe.h"
819
        tmake_file="arm/t-arm arm/t-wince-pe"
820
        extra_options="${extra_options} arm/pe.opt"
821
        extra_objs="pe.o"
822
        ;;
823
arm-*-pe*)
824
        tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h newlib-stdint.h"
825
        tmake_file="arm/t-arm arm/t-pe"
826
        use_gcc_stdint=wrap
827
        extra_options="${extra_options} arm/pe.opt"
828
        extra_objs="pe.o"
829
        ;;
830
avr-*-rtems*)
831
        tm_file="avr/avr.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
832
        tmake_file="avr/t-avr t-rtems avr/t-rtems"
833
        extra_gcc_objs="driver-avr.o avr-devices.o"
834
        extra_objs="avr-devices.o"
835
        ;;
836
avr-*-*)
837
        tm_file="avr/avr.h dbxelf.h newlib-stdint.h"
838
        use_gcc_stdint=wrap
839
        extra_gcc_objs="driver-avr.o avr-devices.o"
840
        extra_objs="avr-devices.o"
841
        ;;
842
bfin*-elf*)
843
        tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
844
        tmake_file=bfin/t-bfin-elf
845
        use_collect2=no
846
        ;;
847
bfin*-uclinux*)
848
        tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h glibc-stdint.h bfin/uclinux.h"
849
        tmake_file=bfin/t-bfin-uclinux
850
        tm_defines="${tm_defines} UCLIBC_DEFAULT=1"
851
        extra_options="${extra_options} linux.opt"
852
        use_collect2=no
853
        ;;
854
bfin*-linux-uclibc*)
855
        tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h glibc-stdint.h bfin/linux.h ./linux-sysroot-suffix.h"
856
        tmake_file="t-slibgcc-elf-ver bfin/t-bfin-linux"
857
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
858
        use_collect2=no
859
        ;;
860
bfin*-rtems*)
861
        tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h"
862
        tmake_file="bfin/t-bfin t-rtems bfin/t-rtems"
863
        ;;
864
bfin*-*)
865
        tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
866
        tmake_file=bfin/t-bfin
867
        use_collect2=no
868
        use_gcc_stdint=wrap
869
        ;;
870
crisv32-*-elf | crisv32-*-none)
871
        tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
872
        tmake_file="cris/t-cris"
873
        target_cpu_default=32
874
        gas=yes
875
        extra_options="${extra_options} cris/elf.opt"
876
        use_gcc_stdint=wrap
877
        ;;
878
cris-*-elf | cris-*-none)
879
        tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
880
        tmake_file="cris/t-cris cris/t-elfmulti"
881
        gas=yes
882
        extra_options="${extra_options} cris/elf.opt"
883
        use_gcc_stdint=wrap
884
        ;;
885
crisv32-*-linux* | cris-*-linux*)
886
        tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h glibc-stdint.h cris/linux.h"
887
        # We need to avoid using t-linux, so override default tmake_file
888
        tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
889
        extra_options="${extra_options} cris/linux.opt"
890
        case $target in
891
          cris-*-*)
892
                target_cpu_default=10
893
                ;;
894
          crisv32-*-*)
895
                target_cpu_default=32
896
                ;;
897
        esac
898
        ;;
899
crx-*-elf)
900
        tm_file="elfos.h newlib-stdint.h ${tm_file}"
901
        extra_parts="crtbegin.o crtend.o"
902
        use_collect2=no
903
        ;;
904
fr30-*-elf)
905
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file}"
906
        tmake_file=fr30/t-fr30
907
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
908
        ;;
909
frv-*-elf)
910
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file} frv/frv-abi.h"
911
        tmake_file=frv/t-frv
912
        ;;
913
frv-*-*linux*)
914
        tm_file="dbxelf.h elfos.h svr4.h ${tm_file} \
915
                 linux.h glibc-stdint.h frv/linux.h frv/frv-abi.h"
916
        tmake_file="${tmake_file} frv/t-frv frv/t-linux"
917
        ;;
918
moxie-*-elf)
919
        gas=yes
920
        gnu_ld=yes
921
        tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
922
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
923
        tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp"
924
        ;;
925
moxie-*-uclinux*)
926
        gas=yes
927
        gnu_ld=yes
928
        tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h glibc-stdint.h moxie/uclinux.h"
929
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
930
        tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp"
931
        tm_defines="${tm_defines} UCLIBC_DEFAULT=1"
932
        extra_options="${extra_options} linux.opt"
933
        ;;
934
h8300-*-rtems*)
935
        tmake_file="h8300/t-h8300 h8300/t-elf t-rtems h8300/t-rtems"
936
        tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h newlib-stdint.h"
937
        ;;
938
h8300-*-elf*)
939
        tmake_file="h8300/t-h8300 h8300/t-elf"
940
        tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
941
        ;;
942
hppa*64*-*-linux*)
943
        target_cpu_default="MASK_PA_11|MASK_PA_20"
944
        tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h svr4.h linux.h \
945
                 glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
946
                 pa/pa64-linux.h"
947
        tmake_file="${tmake_file} pa/t-linux64"
948
        gas=yes gnu_ld=yes
949
        need_64bit_hwint=yes
950
        ;;
951
hppa*-*-linux*)
952
        target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
953
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h pa/pa-linux.h \
954
                 pa/pa32-regs.h pa/pa32-linux.h"
955
        tmake_file="${tmake_file} pa/t-linux t-slibgcc-libgcc"
956
        # Set the libgcc version number
957
        if test x$sjlj = x1; then
958
            tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
959
        else
960
            tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
961
        fi
962
        ;;
963
# port not yet contributed.
964
#hppa*-*-openbsd*)
965
#       target_cpu_default="MASK_PA_11"
966
#       ;;
967
hppa[12]*-*-hpux10*)
968
        case ${target} in
969
        hppa1.1-*-* | hppa2*-*-*)
970
                target_cpu_default="MASK_PA_11"
971
                ;;
972
        esac
973
        tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
974
                 pa/pa-hpux.h pa/pa-hpux10.h"
975
        extra_options="${extra_options} pa/pa-hpux.opt"
976
        case ${target} in
977
        *-*-hpux10.[1-9]*)
978
                tm_file="${tm_file} pa/pa-hpux1010.h"
979
                extra_options="${extra_options} pa/pa-hpux1010.opt"
980
                ;;
981
        esac
982
        use_gcc_stdint=provide
983
        tm_file="${tm_file} hpux-stdint.h"
984
        tmake_file="pa/t-pa-hpux10 pa/t-pa-hpux pa/t-hpux-shlib"
985
        case ${enable_threads} in
986
          "")
987
            if test x$have_pthread_h = xyes ; then
988
              tmake_file="${tmake_file} pa/t-dce-thr"
989
            fi
990
            ;;
991
          yes | dce)
992
            tmake_file="${tmake_file} pa/t-dce-thr"
993
            ;;
994
        esac
995
        # Set the libgcc version number
996
        if test x$sjlj = x1; then
997
            tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
998
        else
999
            tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
1000
        fi
1001
        use_collect2=yes
1002
        gas=yes
1003
        ;;
1004
hppa*64*-*-hpux11*)
1005
        target_cpu_default="MASK_PA_11|MASK_PA_20"
1006
        if test x$gnu_ld = xyes
1007
        then
1008
                target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1009
        fi
1010
        tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
1011
                 pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
1012
                 pa/pa-hpux11.h"
1013
        case ${target} in
1014
        *-*-hpux11.[1-9]*)
1015
                tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
1016
                extra_options="${extra_options} pa/pa-hpux1111.opt"
1017
                ;;
1018
        *)
1019
                tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
1020
                ;;
1021
        esac
1022
        extra_options="${extra_options} pa/pa-hpux.opt \
1023
                       pa/pa-hpux1010.opt pa/pa64-hpux.opt"
1024
        need_64bit_hwint=yes
1025
        tmake_file="pa/t-pa64 pa/t-pa-hpux pa/t-hpux-shlib"
1026
        # Set the libgcc version number
1027
        if test x$sjlj = x1; then
1028
            tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
1029
        else
1030
            tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
1031
        fi
1032
        extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o \
1033
                     libgcc_stub.a"
1034
        case x${enable_threads} in
1035
        x | xyes | xposix )
1036
                thread_file=posix
1037
                ;;
1038
        esac
1039
        gas=yes
1040
        case ${target} in
1041
          *-*-hpux11.[01]*)
1042
                use_gcc_stdint=provide
1043
                tm_file="${tm_file} hpux-stdint.h"
1044
                ;;
1045
          *-*-hpux11.[23]*)
1046
                use_gcc_stdint=wrap
1047
                tm_file="${tm_file} hpux-stdint.h"
1048
                ;;
1049
        esac
1050
        ;;
1051
hppa[12]*-*-hpux11*)
1052
        case ${target} in
1053
        hppa1.1-*-* | hppa2*-*-*)
1054
                target_cpu_default="MASK_PA_11"
1055
                ;;
1056
        esac
1057
        tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1058
                 pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
1059
        extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt"
1060
        case ${target} in
1061
        *-*-hpux11.[1-9]*)
1062
                tm_file="${tm_file} pa/pa-hpux1111.h"
1063
                extra_options="${extra_options} pa/pa-hpux1111.opt"
1064
                ;;
1065
        esac
1066
        tmake_file="pa/t-pa-hpux11 pa/t-pa-hpux pa/t-hpux-shlib"
1067
        # Set the libgcc version number
1068
        if test x$sjlj = x1; then
1069
            tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
1070
        else
1071
            tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
1072
        fi
1073
        case x${enable_threads} in
1074
        x | xyes | xposix )
1075
                thread_file=posix
1076
                ;;
1077
        esac
1078
        use_collect2=yes
1079
        gas=yes
1080
        case ${target} in
1081
          *-*-hpux11.[01]*)
1082
                use_gcc_stdint=provide
1083
                tm_file="${tm_file} hpux-stdint.h"
1084
                ;;
1085
          *-*-hpux11.[23]*)
1086
                use_gcc_stdint=wrap
1087
                tm_file="${tm_file} hpux-stdint.h"
1088
                ;;
1089
        esac
1090
        ;;
1091
i[34567]86-*-darwin*)
1092
        need_64bit_hwint=yes
1093
        need_64bit_isa=yes
1094
 
1095
        # This is so that '.../configure && make' doesn't fail due to
1096
        # config.guess deciding that the configuration is i386-*-darwin* and
1097
        # then this file using that to set --with-cpu=i386 which has no -m64
1098
        # support.
1099
        with_cpu=${with_cpu:-generic}
1100
        tmake_file="${tmake_file} t-slibgcc-darwin i386/t-crtpc i386/t-crtfm"
1101
        lto_binary_reader=lto-macho
1102
        ;;
1103
x86_64-*-darwin*)
1104
        with_cpu=${with_cpu:-generic}
1105
        tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc-darwin i386/t-crtpc i386/t-crtfm"
1106
        tm_file="${tm_file} ${cpu_type}/darwin64.h"
1107
        lto_binary_reader=lto-macho
1108
        ;;
1109
i[34567]86-*-elf*)
1110
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
1111
        tmake_file="${tmake_file} i386/t-i386elf t-svr4"
1112
        ;;
1113
x86_64-*-elf*)
1114
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
1115
        tmake_file="${tmake_file} i386/t-i386elf t-svr4"
1116
        ;;
1117
i[34567]86-*-freebsd*)
1118
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
1119
        ;;
1120
x86_64-*-freebsd*)
1121
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
1122
        tmake_file="${tmake_file} i386/t-crtstuff"
1123
        ;;
1124
i[34567]86-*-netbsdelf*)
1125
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
1126
        ;;
1127
i[34567]86-*-netbsd*)
1128
        tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h"
1129
        tmake_file="${tmake_file} t-netbsd"
1130
        extra_parts=""
1131
        use_collect2=yes
1132
        ;;
1133
x86_64-*-netbsd*)
1134
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
1135
        tmake_file="${tmake_file} i386/t-crtstuff"
1136
        ;;
1137
i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
1138
        tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h"
1139
        # needed to unconfuse gdb
1140
        tmake_file="${tmake_file} t-libc-ok t-openbsd i386/t-openbsd"
1141
        # we need collect2 until our bug is fixed...
1142
        use_collect2=yes
1143
        ;;
1144
i[34567]86-*-openbsd*)
1145
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1146
        tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
1147
        gas=yes
1148
        gnu_ld=yes
1149
        ;;
1150
i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
1151
                        # Intel 80386's running GNU/*
1152
                        # with ELF format using glibc 2
1153
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h"
1154
        case ${target} in
1155
        i[34567]86-*-linux*)
1156
                if test x$enable_targets = xall; then
1157
                        tm_file="${tm_file} i386/x86-64.h i386/linux64.h"
1158
                        tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1159
                        tmake_file="${tmake_file} i386/t-linux64"
1160
                        need_64bit_hwint=yes
1161
                        need_64bit_isa=yes
1162
                        case X"${with_cpu}" in
1163
                        Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
1164
                                ;;
1165
                        X)
1166
                                if test x$with_cpu_64 = x; then
1167
                                        with_cpu_64=generic
1168
                                fi
1169
                                ;;
1170
                        *)
1171
                                echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1172
                                echo "generic atom core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
1173
                                exit 1
1174
                                ;;
1175
                        esac
1176
                else
1177
                        tm_file="${tm_file} i386/linux.h"
1178
                fi
1179
                ;;
1180
        i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} i386/linux.h knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
1181
        i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} i386/linux.h kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
1182
        i[34567]86-*-kopensolaris*-gnu) tm_file="${tm_file} i386/linux.h kopensolaris-gnu.h i386/kopensolaris-gnu.h" ;;
1183
        i[34567]86-*-gnu*) tm_file="$tm_file i386/linux.h gnu.h i386/gnu.h";;
1184
        esac
1185
        tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
1186
        ;;
1187
x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
1188
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h \
1189
                 i386/x86-64.h i386/linux64.h"
1190
        case ${target} in
1191
        x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h" ;;
1192
        x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;;
1193
        esac
1194
        tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
1195
        ;;
1196
i[34567]86-pc-msdosdjgpp*)
1197
        xm_file=i386/xm-djgpp.h
1198
        tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h"
1199
        tmake_file="${tmake_file} i386/t-djgpp"
1200
        extra_options="${extra_options} i386/djgpp.opt"
1201
        gnu_ld=yes
1202
        gas=yes
1203
        use_gcc_stdint=wrap
1204
        ;;
1205
i[34567]86-*-lynxos*)
1206
        xm_defines=POSIX
1207
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
1208
        tmake_file="${tmake_file} i386/t-crtstuff t-lynx"
1209
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1210
        extra_options="${extra_options} lynx.opt"
1211
        thread_file=lynx
1212
        gnu_ld=yes
1213
        gas=yes
1214
        ;;
1215
i[3456x]86-*-netware*)
1216
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h tm-dwarf2.h i386/netware.h"
1217
        tmake_file="${tmake_file} i386/t-netware"
1218
        extra_objs=netware.o
1219
        case /${with_ld} in
1220
        */nwld)
1221
                extra_objs="$extra_objs nwld.o"
1222
                tm_file="${tm_file} i386/nwld.h"
1223
                tmake_file="${tmake_file} i386/t-nwld"
1224
                extra_parts="crt0.o libgcc.def libc.def libcpre.def posixpre.def"
1225
                ;;
1226
        esac
1227
        case x${enable_threads} in
1228
        x | xyes | xposix) thread_file='posix';;
1229
        xnks) thread_file='nks';;
1230
        xno) ;;
1231
        *) echo 'Unknown thread configuration for NetWare' >&2; exit 1;;
1232
        esac
1233
        ;;
1234
i[34567]86-*-nto-qnx*)
1235
        tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h svr4.h i386/unix.h i386/nto.h"
1236
        tmake_file="${tmake_file} i386/t-nto"
1237
        gnu_ld=yes
1238
        gas=yes
1239
        ;;
1240
i[34567]86-*-rtems*)
1241
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h newlib-stdint.h"
1242
        extra_parts="crtbegin.o crtend.o crti.o crtn.o"
1243
        tmake_file="${tmake_file} i386/t-rtems-i386 i386/t-crtstuff t-rtems"
1244
        ;;
1245
i[34567]86-*-solaris2*)
1246
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h"
1247
        # Set default arch_32 to pentium4, tune_32 to generic like the other
1248
        # i386 targets, although config.guess defaults to i386-pc-solaris2*.
1249
        case ${target} in
1250
        *-*-solaris2.[89]*)
1251
                # Solaris 8 and 9/x86 cannot execute SSE/SSE2 instructions by
1252
                # default.
1253
                with_arch_32=${with_arch_32:-pentiumpro}
1254
                ;;
1255
        *)
1256
                with_arch_32=${with_arch_32:-pentium4}
1257
                ;;
1258
        esac
1259
        with_tune_32=${with_tune_32:-generic}
1260
        case ${target} in
1261
        *-*-solaris2.1[0-9]*)
1262
                tm_file="${tm_file} sol2-10.h"
1263
                ;;
1264
        esac
1265
        tm_file="${tm_file} i386/sol2.h"
1266
        if test x$gnu_ld = xyes; then
1267
                tm_file="${tm_file} sol2-gld.h"
1268
        fi
1269
        if test x$gas = xyes; then
1270
                tm_file="${tm_file} i386/sol2-gas.h"
1271
        fi
1272
        tmake_file="${tmake_file} t-sol2 t-svr4"
1273
        c_target_objs="${c_target_objs} sol2-c.o"
1274
        cxx_target_objs="${cxx_target_objs} sol2-c.o"
1275
        extra_objs="sol2.o"
1276
        tm_p_file="${tm_p_file} sol2-protos.h"
1277
        if test x$gnu_ld = xyes; then
1278
                tmake_file="$tmake_file t-slibgcc-elf-ver"
1279
                tm_defines="${tm_defines} TARGET_GNU_LD=1"
1280
        else
1281
                tmake_file="$tmake_file t-slibgcc-sld"
1282
        fi
1283
        if test x$gas = xyes; then
1284
                tm_file="usegas.h ${tm_file}"
1285
        fi
1286
        tm_file="$tm_file tm-dwarf2.h"
1287
        case ${target} in
1288
        *-*-solaris2.1[0-9]*)
1289
                tm_file="${tm_file} i386/x86-64.h i386/sol2-10.h"
1290
                tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1291
                tmake_file="$tmake_file i386/t-sol2-10"
1292
                # i386/t-crtstuff only affects libgcc.  Its inclusion
1293
                # depends on a runtime test and is thus performed in
1294
                # libgcc/configure.ac instead.
1295
                need_64bit_hwint=yes
1296
                need_64bit_isa=yes
1297
                use_gcc_stdint=wrap
1298
                case X"${with_cpu}" in
1299
                Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
1300
                        ;;
1301
                X)
1302
                        if test x$with_cpu_64 = x; then
1303
                                with_cpu_64=generic
1304
                        fi
1305
                        ;;
1306
                *)
1307
                        echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1308
                        echo "generic atom core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
1309
                        exit 1
1310
                        ;;
1311
                esac
1312
                ;;
1313
        *)
1314
                use_gcc_stdint=provide
1315
                ;;
1316
        esac
1317
        case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
1318
          "":yes:* | yes:yes:* )
1319
                thread_file=posix
1320
                ;;
1321
          "":*:yes | yes:*:yes )
1322
                thread_file=solaris
1323
                ;;
1324
        esac
1325
        ;;
1326
i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
1327
        tm_file="${tm_file} i386/unix.h i386/att.h elfos.h svr4.h vx-common.h"
1328
        case ${target} in
1329
          *-vxworksae*)
1330
            tm_file="${tm_file} vxworksae.h i386/vx-common.h i386/vxworksae.h"
1331
            tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
1332
            ;;
1333
          *)
1334
            tm_file="${tm_file} vxworks.h i386/vx-common.h i386/vxworks.h"
1335
            tmake_file="${tmake_file} i386/t-vxworks"
1336
            ;;
1337
        esac
1338
        ;;
1339
i[34567]86-*-pe | i[34567]86-*-cygwin*)
1340
        tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h i386/cygwin-stdint.h"
1341
        xm_file=i386/xm-cygwin.h
1342
        # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
1343
        if test x$sjlj = x0; then
1344
                tmake_eh_file="i386/t-dw2-eh"
1345
        else
1346
                tmake_eh_file="i386/t-sjlj-eh"
1347
        fi
1348
        tmake_file="${tmake_file} ${tmake_eh_file} i386/t-cygming i386/t-cygwin"
1349
        target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1350
        extra_options="${extra_options} i386/cygming.opt"
1351
        extra_objs="winnt.o winnt-stubs.o"
1352
        c_target_objs="${c_target_objs} cygwin2.o msformat-c.o"
1353
        cxx_target_objs="${cxx_target_objs} cygwin2.o winnt-cxx.o msformat-c.o"
1354
        extra_gcc_objs=cygwin1.o
1355
        if test x$enable_threads = xyes; then
1356
                thread_file='posix'
1357
        fi
1358
        use_gcc_stdint=wrap
1359
        lto_binary_reader=lto-coff
1360
        ;;
1361
i[34567]86-*-mingw* | x86_64-*-mingw*)
1362
        tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/mingw32.h"
1363
        xm_file=i386/xm-mingw32.h
1364
        case ${target} in
1365
                x86_64-*-* | *-w64-*)
1366
                        need_64bit_hwint=yes
1367
                        need_64bit_isa=yes
1368
                        ;;
1369
                *)
1370
                        ;;
1371
        esac
1372
        # This makes the logic if mingw's or the w64 feature set has to be used
1373
        case ${target} in
1374
                *-w64-*)
1375
                        tm_file="${tm_file} i386/mingw-w64.h"
1376
                        if test x$enable_targets = xall; then
1377
                                tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1378
                                case X"${with_cpu}" in
1379
                                Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
1380
                                        ;;
1381
                                X)
1382
                                        if test x$with_cpu_64 = x; then
1383
                                                with_cpu_64=generic
1384
                                        fi
1385
                                        ;;
1386
                                *)
1387
                                        echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1388
                                        echo "generic atom core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
1389
                                        exit 1
1390
                                        ;;
1391
                                esac
1392
                        fi
1393
                        ;;
1394
                *)
1395
                        ;;
1396
        esac
1397
        tm_file="${tm_file} i386/mingw-stdint.h"
1398
        # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
1399
        if test x$sjlj = x0; then
1400
                tmake_eh_file="i386/t-dw2-eh"
1401
        else
1402
                tmake_eh_file="i386/t-sjlj-eh"
1403
        fi
1404
        tmake_file="${tmake_file} ${tmake_eh_file} i386/t-cygming"
1405
        case ${target} in
1406
               *-w64-*)
1407
                        tmake_file="${tmake_file} i386/t-mingw-w64"
1408
                        ;;
1409
               *)
1410
                        tmake_file="${tmake_file} i386/t-mingw32"
1411
                        ;;
1412
        esac
1413
        target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1414
        extra_options="${extra_options} i386/cygming.opt i386/mingw.opt"
1415
        case ${target} in
1416
                *-w64-*)
1417
                        extra_options="${extra_options} i386/mingw-w64.opt"
1418
                        ;;
1419
                *)
1420
                        ;;
1421
        esac
1422
        extra_objs="winnt.o winnt-stubs.o"
1423
        c_target_objs="${c_target_objs} msformat-c.o"
1424
        cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1425
        default_use_cxa_atexit=yes
1426
        use_gcc_stdint=wrap
1427
        lto_binary_reader=lto-coff
1428
        case ${enable_threads} in
1429
          "" | yes | win32)       thread_file='win32'
1430
          tmake_file="${tmake_file} i386/t-gthr-win32"
1431
          ;;
1432
        esac
1433
        case ${target} in
1434
                x86_64-*-mingw*)
1435
                        tmake_file="${tmake_file} i386/t-crtfm"
1436
                        ;;
1437
                *)
1438
                        ;;
1439
        esac
1440
        case ${target} in
1441
                *mingw32crt*)
1442
                        tm_file="${tm_file} i386/crtdll.h"
1443
                        ;;
1444
                *mingw32msv* | *mingw*)
1445
                        ;;
1446
        esac
1447
        ;;
1448
i[34567]86-*-interix3*)
1449
        tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/i386-interix.h i386/i386-interix3.h interix.h interix3.h"
1450
        tmake_file="${tmake_file} i386/t-interix"
1451
        extra_objs=winnt.o
1452
        target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1453
        if test x$enable_threads = xyes ; then
1454
                thread_file='posix'
1455
        fi
1456
        if test x$stabs = xyes ; then
1457
                tm_file="${tm_file} dbxcoff.h"
1458
        fi
1459
        ;;
1460
ia64*-*-elf*)
1461
        tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
1462
        tmake_file="ia64/t-ia64"
1463
        target_cpu_default="0"
1464
        if test x$gas = xyes
1465
        then
1466
                target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1467
        fi
1468
        if test x$gnu_ld = xyes
1469
        then
1470
                target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1471
        fi
1472
        extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
1473
        ;;
1474
ia64*-*-freebsd*)
1475
        tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
1476
        target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1477
        tmake_file="${tmake_file} ia64/t-ia64"
1478
        extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
1479
        ;;
1480
ia64*-*-linux*)
1481
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
1482
        tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
1483
        if test x$with_system_libunwind != xyes ; then
1484
                tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
1485
        fi
1486
        target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1487
        extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
1488
        ;;
1489
ia64*-*-hpux*)
1490
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h ia64/sysv4.h ia64/hpux.h"
1491
        tmake_file="ia64/t-ia64 ia64/t-hpux"
1492
        target_cpu_default="MASK_GNU_AS"
1493
        case x$enable_threads in
1494
        x | xyes | xposix )
1495
                thread_file=posix
1496
                ;;
1497
        esac
1498
        use_collect2=no
1499
        c_target_objs="ia64-c.o"
1500
        cxx_target_objs="ia64-c.o"
1501
        extra_options="${extra_options} ia64/ilp32.opt"
1502
        use_gcc_stdint=wrap
1503
        tm_file="${tm_file} hpux-stdint.h"
1504
        ;;
1505
ia64-hp-*vms*)
1506
        tm_file="${tm_file} elfos.h ia64/sysv4.h ia64/elf.h ia64/vms.h ia64/vms64.h"
1507
        xm_file="vms/xm-vms.h vms/xm-vms64.h"
1508
        tmake_file="vms/t-vms vms/t-vms64 ia64/t-ia64 ia64/t-vms"
1509
        xmake_file=vms/x-vms
1510
        target_cpu_default="0"
1511
        if test x$gas = xyes
1512
        then
1513
                target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1514
        fi
1515
        exeext=.exe
1516
        install_headers_dir=install-headers-cp
1517
        extra_options="${extra_options} vms/vms.opt"
1518
        ;;
1519
iq2000*-*-elf*)
1520
        tm_file="svr4.h elfos.h newlib-stdint.h iq2000/iq2000.h"
1521
        tmake_file=iq2000/t-iq2000
1522
        out_file=iq2000/iq2000.c
1523
        md_file=iq2000/iq2000.md
1524
        ;;
1525
lm32-*-elf*)
1526
        tm_file="dbxelf.h elfos.h ${tm_file}"
1527
        tmake_file="${tmake_file} lm32/t-lm32 lm32/t-fprules-softfp soft-fp/t-softfp"
1528
        ;;
1529
lm32-*-rtems*)
1530
        tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h"
1531
        tmake_file="${tmake_file} lm32/t-lm32 lm32/t-fprules-softfp soft-fp/t-softfp"
1532
        tmake_file="${tmake_file} t-rtems"
1533
         ;;
1534
lm32-*-uclinux*)
1535
        tm_file="dbxelf.h elfos.h ${tm_file} linux.h lm32/uclinux-elf.h"
1536
        tmake_file="${tmake_file} lm32/t-lm32 lm32/t-fprules-softfp soft-fp/t-softfp"
1537
        ;;
1538
m32r-*-elf*)
1539
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file}"
1540
        extra_parts="crtinit.o crtfini.o"
1541
        ;;
1542
m32rle-*-elf*)
1543
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h m32r/little.h ${tm_file}"
1544
        extra_parts="crtinit.o crtfini.o m32rx/crtinit.o m32rx/crtfini.o"
1545
        ;;
1546
m32r-*-rtems*)
1547
        tm_file="dbxelf.h elfos.h svr4.h ${tm_file} m32r/rtems.h rtems.h newlib-stdint.h"
1548
        tmake_file="m32r/t-m32r t-rtems"
1549
        extra_parts="crtinit.o crtfini.o"
1550
        ;;
1551
m32r-*-linux*)
1552
        tm_file="dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h"
1553
        # We override the tmake_file for linux -- why?
1554
        tmake_file="t-slibgcc-elf-ver m32r/t-linux"
1555
        gnu_ld=yes
1556
        if test x$enable_threads = xyes; then
1557
                thread_file='posix'
1558
        fi
1559
        ;;
1560
m32rle-*-linux*)
1561
        tm_file="dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h m32r/little.h ${tm_file} m32r/linux.h"
1562
        # We override the tmake_file for linux -- why?
1563
        tmake_file="t-slibgcc-elf-ver m32r/t-linux"
1564
        gnu_ld=yes
1565
        if test x$enable_threads = xyes; then
1566
                thread_file='posix'
1567
        fi
1568
        ;;
1569
# m68hc11 and m68hc12 share the same machine description.
1570
m68hc11-*-*|m6811-*-*)
1571
        tm_file="dbxelf.h elfos.h usegas.h newlib-stdint.h m68hc11/m68hc11.h"
1572
        tm_p_file="m68hc11/m68hc11-protos.h"
1573
        md_file="m68hc11/m68hc11.md"
1574
        out_file="m68hc11/m68hc11.c"
1575
        tmake_file="m68hc11/t-m68hc11"
1576
        use_gcc_stdint=wrap
1577
        ;;
1578
m68hc12-*-*|m6812-*-*)
1579
        tm_file="m68hc11/m68hc12.h dbxelf.h elfos.h usegas.h newlib-stdint.h m68hc11/m68hc11.h"
1580
        tm_p_file="m68hc11/m68hc11-protos.h"
1581
        md_file="m68hc11/m68hc11.md"
1582
        out_file="m68hc11/m68hc11.c"
1583
        tmake_file="m68hc11/t-m68hc11"
1584
        extra_options="${extra_options} m68hc11/m68hc11.opt"
1585
        use_gcc_stdint=wrap
1586
        ;;
1587
m68k-*-elf* | fido-*-elf*)
1588
        case ${target} in
1589
        fido-*-elf*)
1590
                # Check that $with_cpu makes sense.
1591
                case $with_cpu in
1592
                "" | "fidoa")
1593
                        ;;
1594
                *)
1595
                        echo "Cannot accept --with-cpu=$with_cpu"
1596
                        exit 1
1597
                        ;;
1598
                esac
1599
                with_cpu=fidoa
1600
                ;;
1601
        *)
1602
                default_m68k_cpu=68020
1603
                default_cf_cpu=5206
1604
                ;;
1605
        esac
1606
        tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h newlib-stdint.h m68k/m68kemb.h m68k/m68020-elf.h"
1607
        tm_defines="${tm_defines} MOTOROLA=1"
1608
        tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
1609
        # Add multilibs for targets other than fido.
1610
        case ${target} in
1611
        fido-*-elf*)
1612
                ;;
1613
        *)
1614
                tmake_file="$tmake_file m68k/t-mlibs"
1615
                ;;
1616
        esac
1617
        extra_parts="crtbegin.o crtend.o"
1618
        ;;
1619
m68k*-*-netbsdelf*)
1620
        default_m68k_cpu=68020
1621
        default_cf_cpu=5475
1622
        tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h"
1623
        tm_defines="${tm_defines} MOTOROLA=1"
1624
        ;;
1625
m68k*-*-openbsd*)
1626
        default_m68k_cpu=68020
1627
        default_cf_cpu=5475
1628
        # needed to unconfuse gdb
1629
        tm_defines="${tm_defines} OBSD_OLD_GAS"
1630
        tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h m68k/openbsd.h"
1631
        tmake_file="t-libc-ok t-openbsd m68k/t-openbsd"
1632
        # we need collect2 until our bug is fixed...
1633
        use_collect2=yes
1634
        ;;
1635
m68k-*-uclinuxoldabi*)          # Motorola m68k/ColdFire running uClinux
1636
                                # with uClibc, using the original
1637
                                # m68k-elf-based ABI
1638
        default_m68k_cpu=68020
1639
        default_cf_cpu=5206
1640
        tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/uclinux-oldabi.h glibc-stdint.h"
1641
        tm_defines="${tm_defines} MOTOROLA=1"
1642
        tmake_file="m68k/t-floatlib m68k/t-uclinux"
1643
        ;;
1644
m68k-*-uclinux*)                # Motorola m68k/ColdFire running uClinux
1645
                                # with uClibc, using the new GNU/Linux-style
1646
                                # ABI.
1647
        default_m68k_cpu=68020
1648
        default_cf_cpu=5206
1649
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
1650
        tm_defines="${tm_defines} MOTOROLA=1 UCLIBC_DEFAULT=1"
1651
        extra_options="${extra_options} linux.opt"
1652
        tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
1653
        ;;
1654
m68k-*-linux*)          # Motorola m68k's running GNU/Linux
1655
                                # with ELF format using glibc 2
1656
                                # aka the GNU/Linux C library 6.
1657
        default_m68k_cpu=68020
1658
        default_cf_cpu=5475
1659
        with_arch=${with_arch:-m68k}
1660
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
1661
        extra_options="${extra_options} m68k/ieee.opt"
1662
        tm_defines="${tm_defines} MOTOROLA=1"
1663
        tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
1664
        # if not configured with --enable-sjlj-exceptions, bump the
1665
        # libgcc version number
1666
        if test x$sjlj != x1; then
1667
            tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
1668
        fi
1669
        ;;
1670
m68k-*-rtems*)
1671
        default_m68k_cpu=68020
1672
        default_cf_cpu=5206
1673
        tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff t-rtems m68k/t-rtems m68k/t-mlibs"
1674
        tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h m68k/rtemself.h rtems.h newlib-stdint.h"
1675
        tm_defines="${tm_defines} MOTOROLA=1"
1676
        extra_parts="crtbegin.o crtend.o"
1677
        ;;
1678
mcore-*-elf)
1679
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
1680
        tmake_file=mcore/t-mcore
1681
        inhibit_libc=true
1682
        ;;
1683
mcore-*-pe*)
1684
        tm_file="svr3.h dbxcoff.h newlib-stdint.h ${tm_file} mcore/mcore-pe.h"
1685
        tmake_file=mcore/t-mcore-pe
1686
        inhibit_libc=true
1687
        use_gcc_stdint=wrap
1688
        ;;
1689
mep-*-*)
1690
        tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
1691
        tmake_file=mep/t-mep
1692
        extra_parts="crtbegin.o crtend.o"
1693
        c_target_objs="mep-pragma.o"
1694
        cxx_target_objs="mep-pragma.o"
1695
        if test -d "${srcdir}/../newlib/libc/include" &&
1696
           test "x$with_headers" = x; then
1697
                with_headers=yes
1698
        fi
1699
        use_gcc_stdint=wrap
1700
        ;;
1701
mips-sgi-irix[56]*)
1702
        tm_file="elfos.h ${tm_file} mips/iris.h"
1703
        tmake_file="mips/t-iris mips/t-slibgcc-irix"
1704
        target_cpu_default="MASK_ABICALLS"
1705
        case ${target} in
1706
        *-*-irix5*)
1707
                tm_file="${tm_file} mips/iris5.h"
1708
                use_gcc_stdint=provide
1709
                ;;
1710
 
1711
        *-*-irix6*)
1712
                tm_file="${tm_file} mips/iris6.h"
1713
                tmake_file="${tmake_file} mips/t-iris6"
1714
                tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
1715
                case ${target} in
1716
                *-*-irix6.[0-4]*)
1717
                        use_gcc_stdint=provide
1718
                        ;;
1719
                *-*-irix6.5*)
1720
                        # Only IRIX Development Foundation 1.3 for IRIX 6.5
1721
                        # provides stdint.h.
1722
                        use_gcc_stdint=wrap
1723
                        ;;
1724
                esac
1725
                ;;
1726
        esac
1727
        if test "x$stabs" = xyes
1728
        then
1729
                tm_file="${tm_file} dbx.h"
1730
        fi
1731
        if test "x$gnu_ld" = xyes
1732
        then
1733
                tm_defines="${tm_defines} IRIX_USING_GNU_LD"
1734
        fi
1735
        case ${enable_threads}:${have_pthread_h} in
1736
          "":yes | yes:yes ) thread_file=posix ;;
1737
        esac
1738
        ;;
1739
mips*-*-netbsd*)                        # NetBSD/mips, either endian.
1740
        target_cpu_default="MASK_ABICALLS"
1741
        tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
1742
        ;;
1743
mips64*-*-linux* | mipsisa64*-*-linux*)
1744
        tm_file="dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h ${tm_file} mips/linux.h mips/linux64.h"
1745
        tmake_file="${tmake_file} mips/t-linux64 mips/t-libgcc-mips16"
1746
        tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
1747
        case ${target} in
1748
                mips64el-st-linux-gnu)
1749
                        tm_file="${tm_file} mips/st.h"
1750
                        tmake_file="${tmake_file} mips/t-st"
1751
                        ;;
1752
                mips64octeon*-*-linux*)
1753
                        tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
1754
                        target_cpu_default=MASK_SOFT_FLOAT_ABI
1755
                        ;;
1756
                mipsisa64r2*-*-linux*)
1757
                        tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
1758
                        ;;
1759
        esac
1760
        gnu_ld=yes
1761
        gas=yes
1762
        test x$with_llsc != x || with_llsc=yes
1763
        ;;
1764
mips*-*-linux*)                         # Linux MIPS, either endian.
1765
        tm_file="dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h ${tm_file} mips/linux.h"
1766
        tmake_file="${tmake_file} mips/t-libgcc-mips16"
1767
        case ${target} in
1768
        mipsisa32r2*)
1769
                tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
1770
                ;;
1771
        mipsisa32*)
1772
                tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
1773
        esac
1774
        test x$with_llsc != x || with_llsc=yes
1775
        ;;
1776
mips*-*-openbsd*)
1777
        tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_OBJECT OBSD_HAS_CORRECT_SPECS"
1778
        target_cpu_default="MASK_ABICALLS"
1779
        tm_file="mips/mips.h openbsd.h openbsd-stdint.h openbsd-libpthread.h mips/openbsd.h mips/sdb.h"
1780
        case ${target} in
1781
        mips*el-*-openbsd*)
1782
            tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=0";;
1783
        *)  tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_ENDIAN";;
1784
        esac
1785
        ;;
1786
mips*-sde-elf*)
1787
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/sde.h"
1788
        tmake_file="mips/t-sde mips/t-libgcc-mips16"
1789
        case "${with_newlib}" in
1790
          yes)
1791
            # newlib / libgloss.
1792
            ;;
1793
          *)
1794
            # MIPS toolkit libraries.
1795
            tm_file="$tm_file mips/sdemtk.h"
1796
            tmake_file="$tmake_file mips/t-sdemtk"
1797
            extra_options="$extra_options mips/sdemtk.opt"
1798
            case ${enable_threads} in
1799
              "" | yes | mipssde)
1800
                thread_file='mipssde'
1801
                ;;
1802
            esac
1803
            ;;
1804
        esac
1805
        case ${target} in
1806
          mipsisa32r2*)
1807
            tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
1808
            ;;
1809
          mipsisa32*)
1810
            tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_32"
1811
            ;;
1812
          mipsisa64r2*)
1813
            tm_defines="MIPS_ISA_DEFAULT=65 MIPS_ABI_DEFAULT=ABI_N32"
1814
            ;;
1815
          mipsisa64*)
1816
            tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_N32"
1817
            ;;
1818
        esac
1819
        ;;
1820
mipsisa32-*-elf* | mipsisa32el-*-elf* | \
1821
mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
1822
mipsisa64-*-elf* | mipsisa64el-*-elf* | \
1823
mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
1824
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1825
        tmake_file="mips/t-isa3264 mips/t-libgcc-mips16"
1826
        case ${target} in
1827
          mipsisa32r2*)
1828
            tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
1829
            ;;
1830
          mipsisa32*)
1831
            tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
1832
            ;;
1833
          mipsisa64r2*)
1834
            tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
1835
            ;;
1836
          mipsisa64*)
1837
            tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64"
1838
            ;;
1839
        esac
1840
        case ${target} in
1841
          mipsisa32*-*-elfoabi*)
1842
            tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
1843
            tm_file="${tm_file} mips/elfoabi.h"
1844
            ;;
1845
          mipsisa64*-*-elfoabi*)
1846
            tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_O64"
1847
            tm_file="${tm_file} mips/elfoabi.h"
1848
            ;;
1849
          *-*-elf*)
1850
            tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
1851
            ;;
1852
        esac
1853
        ;;
1854
mipsisa64sr71k-*-elf*)
1855
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1856
        tmake_file=mips/t-sr71k
1857
        target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1858
        tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
1859
        ;;
1860
mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
1861
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1862
        tmake_file="mips/t-elf mips/t-libgcc-mips16 mips/t-sb1"
1863
        target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1864
        tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
1865
        ;;
1866
mips-*-elf* | mipsel-*-elf*)
1867
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1868
        tmake_file="mips/t-elf mips/t-libgcc-mips16"
1869
        ;;
1870
mips64-*-elf* | mips64el-*-elf*)
1871
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1872
        tmake_file="mips/t-elf mips/t-libgcc-mips16"
1873
        target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1874
        tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
1875
        ;;
1876
mips64vr-*-elf* | mips64vrel-*-elf*)
1877
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/vr.h mips/elf.h"
1878
        tmake_file=mips/t-vr
1879
        tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
1880
        ;;
1881
mips64orion-*-elf* | mips64orionel-*-elf*)
1882
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elforion.h mips/elf.h"
1883
        tmake_file="mips/t-elf mips/t-libgcc-mips16"
1884
        target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1885
        tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
1886
        ;;
1887
mips*-*-rtems*)
1888
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
1889
        tmake_file="mips/t-elf mips/t-libgcc-mips16 t-rtems mips/t-rtems"
1890
        ;;
1891
mips-wrs-vxworks)
1892
        tm_file="elfos.h ${tm_file} svr4.h mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
1893
        tmake_file="${tmake_file} mips/t-vxworks"
1894
        ;;
1895
mipstx39-*-elf* | mipstx39el-*-elf*)
1896
        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
1897
        tmake_file="mips/t-r3900 mips/t-libgcc-mips16"
1898
        ;;
1899
mmix-knuth-mmixware)
1900
        tm_file="${tm_file} newlib-stdint.h"
1901
        need_64bit_hwint=yes
1902
        use_gcc_stdint=wrap
1903
        ;;
1904
mn10300-*-*)
1905
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file}"
1906
        if test x$stabs = xyes
1907
        then
1908
                tm_file="${tm_file} dbx.h"
1909
        fi
1910
        use_collect2=no
1911
        use_gcc_stdint=wrap
1912
        ;;
1913
or32-*-elf*)
1914 399 jeremybenn
        tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ${cpu_type}/elf.h"
1915
        extra_parts="crti.o crtbegin.o crtend.o crtn.o"
1916 280 jeremybenn
        tmake_file=${cpu_type}/t-${cpu_type}
1917
        ;;
1918
or32-*linux*)
1919
        tm_file="${tm_file} dbxelf.h elfos.h or32/elf.h or32/linux-gas.h or32/linux-elf.h"
1920 399 jeremybenn
        tmake_file="${cpu_type}/t-${cpu_type} or32/t-linux"
1921 280 jeremybenn
        ;;
1922
pdp11-*-*)
1923
        tm_file="${tm_file} newlib-stdint.h"
1924
        use_gcc_stdint=wrap
1925
        ;;
1926
picochip-*)
1927
        tm_file="${tm_file} newlib-stdint.h"
1928
        use_gcc_stdint=wrap
1929
        ;;
1930
# port not yet contributed
1931
#powerpc-*-openbsd*)
1932
#       tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit "
1933
#       extra_headers=
1934
#       ;;
1935
powerpc-*-darwin*)
1936
        extra_options="${extra_options} rs6000/darwin.opt"
1937
        extra_parts="crt2.o"
1938
        case ${target} in
1939
          *-darwin1[0-9]* | *-darwin[8-9]*)
1940
            tmake_file="${tmake_file} rs6000/t-darwin8"
1941
            tm_file="${tm_file} rs6000/darwin8.h"
1942
            ;;
1943
          *-darwin7*)
1944
            tm_file="${tm_file} rs6000/darwin7.h"
1945
            ;;
1946
          *-darwin[0-6]*)
1947
            ;;
1948
        esac
1949
        tmake_file="${tmake_file} t-slibgcc-darwin"
1950
        extra_headers=altivec.h
1951
        ;;
1952
powerpc64-*-darwin*)
1953
        tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
1954
        extra_options="${extra_options} ${cpu_type}/darwin.opt"
1955
        # We're not including any t-darwin* fragments, to avoid building multilibs.
1956
        tmake_file="${tmake_file} t-slibgcc-darwin"
1957
        extra_headers=altivec.h
1958
        ;;
1959
powerpc*-*-freebsd*)
1960
        tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h rs6000/freebsd.h"
1961
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
1962
        extra_options="${extra_options} rs6000/sysv4.opt"
1963
        ;;
1964
powerpc-*-netbsd*)
1965
        tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
1966
        tmake_file="${tmake_file} rs6000/t-netbsd"
1967
        extra_options="${extra_options} rs6000/sysv4.opt"
1968
        ;;
1969
powerpc-*-eabispe*)
1970
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabispe.h"
1971
        extra_options="${extra_options} rs6000/sysv4.opt"
1972
        tmake_file="rs6000/t-spe rs6000/t-ppccomm"
1973
        use_gcc_stdint=wrap
1974
        ;;
1975
powerpc-*-eabisimaltivec*)
1976
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h rs6000/eabialtivec.h"
1977
        extra_options="${extra_options} rs6000/sysv4.opt"
1978
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
1979
        use_gcc_stdint=wrap
1980
        ;;
1981
powerpc-*-eabisim*)
1982
        tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h"
1983
        extra_options="${extra_options} rs6000/sysv4.opt"
1984
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
1985
        use_gcc_stdint=wrap
1986
        ;;
1987
powerpc-*-elf*)
1988
        tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
1989
        extra_options="${extra_options} rs6000/sysv4.opt"
1990
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
1991
        ;;
1992
powerpc-*-eabialtivec*)
1993
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabialtivec.h"
1994
        extra_options="${extra_options} rs6000/sysv4.opt"
1995
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
1996
        use_gcc_stdint=wrap
1997
        ;;
1998
powerpc-xilinx-eabi*)
1999
        tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/singlefp.h rs6000/xfpu.h rs6000/xilinx.h"
2000
        extra_options="${extra_options} rs6000/sysv4.opt"
2001
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm rs6000/t-xilinx"
2002
        use_gcc_stdint=wrap
2003
        ;;
2004
powerpc-*-eabi*)
2005
        tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h"
2006
        extra_options="${extra_options} rs6000/sysv4.opt"
2007
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2008
        use_gcc_stdint=wrap
2009
        ;;
2010
powerpc-*-rtems*)
2011
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
2012
        extra_options="${extra_options} rs6000/sysv4.opt"
2013
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm"
2014
        ;;
2015
powerpc-*-linux* | powerpc64-*-linux*)
2016
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
2017
        extra_options="${extra_options} rs6000/sysv4.opt"
2018
        tmake_file="t-dfprules rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2019
        maybe_biarch=yes
2020
        case ${target} in
2021
            powerpc64-*-linux*spe* | powerpc64-*-linux*paired*)
2022
                echo "*** Configuration ${target} not supported" 1>&2
2023
                exit 1
2024
                ;;
2025
            powerpc-*-linux*spe* | powerpc-*-linux*paired*)
2026
                maybe_biarch=
2027
                ;;
2028
            powerpc64-*-linux*)
2029
                test x$with_cpu != x || cpu_is_64bit=yes
2030
                maybe_biarch=always
2031
                ;;
2032
        esac
2033
        case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
2034
            always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
2035
                if test x$cpu_is_64bit = xyes; then
2036
                    tm_file="${tm_file} rs6000/default64.h"
2037
                fi
2038
                tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
2039
                tmake_file="$tmake_file rs6000/t-linux64"
2040
                extra_options="${extra_options} rs6000/linux64.opt"
2041
                ;;
2042
            *)
2043
                tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
2044
                ;;
2045
        esac
2046
        tmake_file="${tmake_file} t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp"
2047
        case ${target} in
2048
            powerpc*-*-linux*altivec*)
2049
                tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
2050
            powerpc*-*-linux*spe*)
2051
                tm_file="${tm_file} rs6000/linuxspe.h rs6000/e500.h" ;;
2052
            powerpc*-*-linux*paired*)
2053
                tm_file="${tm_file} rs6000/750cl.h" ;;
2054
        esac
2055
        if test x${enable_secureplt} = xyes; then
2056
                tm_file="rs6000/secureplt.h ${tm_file}"
2057
        fi
2058
        ;;
2059
powerpc64-*-gnu*)
2060
        tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/default64.h rs6000/linux64.h rs6000/gnu.h glibc-stdint.h"
2061
        extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
2062
        tmake_file="t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu"
2063
        ;;
2064
powerpc-*-gnu-gnualtivec*)
2065
        tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h rs6000/gnu.h glibc-stdint.h"
2066
        extra_options="${extra_options} rs6000/sysv4.opt"
2067
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm"
2068
        if test x$enable_threads = xyes; then
2069
                thread_file='posix'
2070
        fi
2071
        ;;
2072
powerpc-*-gnu*)
2073
        tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/gnu.h glibc-stdint.h"
2074
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm"
2075
        extra_options="${extra_options} rs6000/sysv4.opt"
2076
        if test x$enable_threads = xyes; then
2077
                thread_file='posix'
2078
        fi
2079
        ;;
2080
powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
2081
        tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
2082
        tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppccomm rs6000/t-vxworks"
2083
        extra_options="${extra_options} rs6000/sysv4.opt"
2084
        extra_headers=ppc-asm.h
2085
        case ${target} in
2086
          *-vxworksae*)
2087
            tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/e500.h rs6000/vxworksae.h"
2088
            tmake_file="${tmake_file} rs6000/t-vxworksae"
2089
            ;;
2090
          *-vxworks*)
2091
            tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h rs6000/e500.h"
2092
            ;;
2093
        esac
2094
        ;;
2095
powerpc-*-lynxos*)
2096
        xm_defines=POSIX
2097
        tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
2098
        tmake_file="t-lynx rs6000/t-lynx"
2099
        extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
2100
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2101
        extra_options="${extra_options} lynx.opt"
2102
        thread_file=lynx
2103
        gnu_ld=yes
2104
        gas=yes
2105
        ;;
2106
powerpcle-*-elf*)
2107
        tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
2108
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2109
        extra_options="${extra_options} rs6000/sysv4.opt"
2110
        ;;
2111
powerpcle-*-eabisim*)
2112
        tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h"
2113
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2114
        extra_options="${extra_options} rs6000/sysv4.opt"
2115
        use_gcc_stdint=wrap
2116
        ;;
2117
powerpcle-*-eabi*)
2118
        tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h"
2119
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2120
        extra_options="${extra_options} rs6000/sysv4.opt"
2121
        use_gcc_stdint=wrap
2122
        ;;
2123
rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
2124
        tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h rs6000/aix-stdint.h"
2125
        tmake_file=rs6000/t-aix43
2126
        extra_options="${extra_options} rs6000/aix64.opt"
2127
        use_collect2=yes
2128
        thread_file='aix'
2129
        use_gcc_stdint=provide
2130
        extra_headers=
2131
        ;;
2132
rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
2133
        tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h rs6000/aix-stdint.h"
2134
        extra_options="${extra_options} rs6000/aix64.opt"
2135
        tmake_file=rs6000/t-aix43
2136
        use_collect2=yes
2137
        thread_file='aix'
2138
        use_gcc_stdint=wrap
2139
        extra_headers=
2140
        ;;
2141
rs6000-ibm-aix5.2.* | powerpc-ibm-aix5.2.*)
2142
        tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h rs6000/aix-stdint.h"
2143
        tmake_file=rs6000/t-aix52
2144
        extra_options="${extra_options} rs6000/aix64.opt"
2145
        use_collect2=yes
2146
        thread_file='aix'
2147
        use_gcc_stdint=wrap
2148
        extra_headers=
2149
        ;;
2150
rs6000-ibm-aix5.3.* | powerpc-ibm-aix5.3.*)
2151
        tm_file="${tm_file} rs6000/aix.h rs6000/aix53.h rs6000/xcoff.h rs6000/aix-stdint.h"
2152
        tmake_file=rs6000/t-aix52
2153
        extra_options="${extra_options} rs6000/aix64.opt"
2154
        use_collect2=yes
2155
        thread_file='aix'
2156
        use_gcc_stdint=wrap
2157
        extra_headers=altivec.h
2158
        ;;
2159
rs6000-ibm-aix[6789].* | powerpc-ibm-aix[6789].*)
2160
        tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h rs6000/aix-stdint.h"
2161
        tmake_file=rs6000/t-aix52
2162
        extra_options="${extra_options} rs6000/aix64.opt"
2163
        use_collect2=yes
2164
        thread_file='aix'
2165
        use_gcc_stdint=wrap
2166
        extra_headers=altivec.h
2167
        ;;
2168
rx-*-elf*)
2169
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file} ../../libgcc/config/rx/rx-abi.h"
2170
        tmake_file="${tmake_file} rx/t-rx"
2171
        ;;
2172
s390-*-linux*)
2173
        tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h s390/linux.h"
2174
        ;;
2175
s390x-*-linux*)
2176
        tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h s390/linux.h"
2177
        tm_p_file=s390/s390-protos.h
2178
        md_file=s390/s390.md
2179
        extra_modes=s390/s390-modes.def
2180
        out_file=s390/s390.c
2181
        tmake_file="${tmake_file} s390/t-linux64"
2182
        ;;
2183
s390x-ibm-tpf*)
2184
        tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h s390/tpf.h"
2185
        tm_p_file=s390/s390-protos.h
2186
        md_file=s390/s390.md
2187
        extra_modes=s390/s390-modes.def
2188
        out_file=s390/s390.c
2189
        extra_parts="crtbeginS.o crtendS.o"
2190
        thread_file='tpf'
2191
        extra_options="${extra_options} s390/tpf.opt"
2192
        ;;
2193
score-*-elf)
2194
        tm_file="dbxelf.h elfos.h score/elf.h score/score.h newlib-stdint.h"
2195
        tmake_file=score/t-score-elf
2196
        extra_objs="score7.o score3.o"
2197
        ;;
2198
sh-*-elf* | sh[12346l]*-*-elf* | \
2199
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
2200
  sh-*-linux* | sh[2346lbe]*-*-linux* | \
2201
  sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
2202
   sh64-*-netbsd* | sh64l*-*-netbsd*)
2203
        tmake_file="${tmake_file} sh/t-sh sh/t-elf"
2204
        if test x${with_endian} = x; then
2205
                case ${target} in
2206
                sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
2207
                shbe-*-* | sheb-*-*)               with_endian=big,little ;;
2208
                sh[1234]l* | sh[34]*-*-linux*)     with_endian=little ;;
2209
                shl* | sh64l* | sh*-*-linux* | \
2210
                  sh5l* | sh-superh-elf)           with_endian=little,big ;;
2211
                sh[1234]*-*-*)                     with_endian=big ;;
2212
                *)                                 with_endian=big,little ;;
2213
                esac
2214
        fi
2215
        # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
2216
        #  First word : the default endian.
2217
        #  Second word: the secondary endian (optional).
2218
        case ${with_endian} in
2219
        big)            TM_ENDIAN_CONFIG=mb ;;
2220
        little)         TM_ENDIAN_CONFIG=ml ;;
2221
        big,little)     TM_ENDIAN_CONFIG="mb ml" ;;
2222
        little,big)     TM_ENDIAN_CONFIG="ml mb" ;;
2223
        *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
2224
        esac
2225
        case ${with_endian} in
2226
        little*)        tm_file="sh/little.h ${tm_file}" ;;
2227
        esac
2228
        tm_file="${tm_file} dbxelf.h elfos.h"
2229
        case ${target} in
2230
        sh*-*-netbsd*)  ;;
2231
        *)              tm_file="${tm_file} svr4.h" ;;
2232
        esac
2233
        tm_file="${tm_file} sh/elf.h"
2234
        case ${target} in
2235
        sh*-*-linux*)   tmake_file="${tmake_file} sh/t-linux"
2236
                        tm_file="${tm_file} linux.h glibc-stdint.h sh/linux.h" ;;
2237
        sh*-*-netbsd*)  tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h" ;;
2238
        sh*-superh-elf) if test x$with_libgloss != xno; then
2239
                                with_libgloss=yes
2240
                                tm_file="${tm_file} sh/newlib.h"
2241
                        fi
2242
                        tm_file="${tm_file} sh/embed-elf.h"
2243
                        tm_file="${tm_file} sh/superh.h"
2244
                        tmake_file="${tmake_file} sh/t-superh"
2245
                        extra_options="${extra_options} sh/superh.opt" ;;
2246
        *)              if test x$with_newlib = xyes \
2247
                           && test x$with_libgloss = xyes; then
2248
                                tm_file="${tm_file} sh/newlib.h"
2249
                        fi
2250
                        tm_file="${tm_file} sh/embed-elf.h" ;;
2251
        esac
2252
        case ${target} in
2253
        sh5*-*-netbsd*)
2254
                # SHmedia, 32-bit ABI
2255
                tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd"
2256
                ;;
2257
        sh64*-netbsd*)
2258
                # SHmedia, 64-bit ABI
2259
                tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd sh/t-netbsd-sh5-64"
2260
                ;;
2261
        *-*-netbsd)
2262
                tmake_file="${tmake_file} sh/t-netbsd"
2263
                ;;
2264
        sh64*-*-linux*)
2265
                tmake_file="${tmake_file} sh/t-sh64 sh/t-linux64"
2266
                tm_file="${tm_file} sh/sh64.h"
2267
                extra_headers="shmedia.h ushmedia.h sshmedia.h"
2268
                ;;
2269
        sh64*)
2270
                tmake_file="${tmake_file} sh/t-sh64"
2271
                tm_file="${tm_file} sh/sh64.h"
2272
                extra_headers="shmedia.h ushmedia.h sshmedia.h"
2273
                ;;
2274
        *-*-symbianelf*)
2275
                tmake_file="sh/t-symbian"
2276
                tm_file="sh/symbian-pre.h sh/little.h ${tm_file} sh/symbian-post.h"
2277
                c_target_objs="symbian-base.o symbian-c.o"
2278
                cxx_target_objs="symbian-base.o symbian-cxx.o"
2279
                extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
2280
                ;;
2281
        *-*-elf*)
2282
                tm_file="${tm_file} newlib-stdint.h"
2283
                ;;
2284
        esac
2285
        # sed el/eb endian suffixes away to avoid confusion with sh[23]e
2286
        case `echo ${target} | sed 's/e[lb]-/-/'` in
2287
        sh64*-*-netbsd*)        sh_cpu_target=sh5-64media ;;
2288
        sh64* | sh5*-*-netbsd*) sh_cpu_target=sh5-32media ;;
2289
        sh4a_single_only*)      sh_cpu_target=sh4a-single-only ;;
2290
        sh4a_single*)           sh_cpu_target=sh4a-single ;;
2291
        sh4a_nofpu*)            sh_cpu_target=sh4a-nofpu ;;
2292
        sh4al)                  sh_cpu_target=sh4al ;;
2293
        sh4a*)                  sh_cpu_target=sh4a ;;
2294
        sh4_single_only*)       sh_cpu_target=sh4-single-only ;;
2295
        sh4_single*)            sh_cpu_target=sh4-single ;;
2296
        sh4_nofpu*)             sh_cpu_target=sh4-nofpu ;;
2297
        sh4* | sh-superh-*)     sh_cpu_target=sh4 ;;
2298
        sh3e*)                  sh_cpu_target=sh3e ;;
2299
        sh*-*-netbsd* | sh3*)   sh_cpu_target=sh3 ;;
2300
        sh2a_single_only*)      sh_cpu_target=sh2a-single-only ;;
2301
        sh2a_single*)           sh_cpu_target=sh2a-single ;;
2302
        sh2a_nofpu*)            sh_cpu_target=sh2a-nofpu ;;
2303
        sh2a*)                  sh_cpu_target=sh2a ;;
2304
        sh2e*)                  sh_cpu_target=sh2e ;;
2305
        sh2*)                   sh_cpu_target=sh2 ;;
2306
        *)                      sh_cpu_target=sh1 ;;
2307
        esac
2308
        # did the user say --without-fp ?
2309
        if test x$with_fp = xno; then
2310
                case ${sh_cpu_target} in
2311
                sh5-*media)     sh_cpu_target=${sh_cpu_target}-nofpu ;;
2312
                sh4al | sh1)    ;;
2313
                sh4a* )         sh_cpu_target=sh4a-nofpu ;;
2314
                sh4*)           sh_cpu_target=sh4-nofpu ;;
2315
                sh3*)           sh_cpu_target=sh3 ;;
2316
                sh2a*)          sh_cpu_target=sh2a-nofpu ;;
2317
                sh2*)           sh_cpu_target=sh2 ;;
2318
                *)      echo --without-fp not available for $target: ignored
2319
                esac
2320
                tm_defines="$tm_defines STRICT_NOFPU=1"
2321
        fi
2322
        sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
2323
        case $sh_cpu_default in
2324
        sh5-64media-nofpu | sh5-64media | \
2325
          sh5-32media-nofpu | sh5-32media | sh5-compact-nofpu | sh5-compact | \
2326
          sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
2327
          sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
2328
          sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
2329
          sh3e | sh3 | sh2e | sh2 | sh1) ;;
2330
        "")     sh_cpu_default=${sh_cpu_target} ;;
2331
        *)      echo "with_cpu=$with_cpu not supported"; exit 1 ;;
2332
        esac
2333
        sh_multilibs=${with_multilib_list}
2334
        if test "$sh_multilibs" = "default" ; then
2335
                case ${target} in
2336
                sh64-superh-linux* | \
2337
                sh[1234]*)      sh_multilibs=${sh_cpu_target} ;;
2338
                sh64* | sh5*)   sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
2339
                sh-superh-*)    sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
2340
                sh*-*-linux*)   sh_multilibs=m1,m3e,m4 ;;
2341
                sh*-*-netbsd*)  sh_multilibs=m3,m3e,m4 ;;
2342
                *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
2343
                esac
2344
                if test x$with_fp = xno; then
2345
                        sh_multilibs="`echo $sh_multilibs|sed -e s/m4/sh4-nofpu/ -e s/,m4-[^,]*//g -e s/,m[23]e// -e s/m2a,m2a-single/m2a-nofpu/ -e s/m5-..m....,//g`"
2346
                fi
2347
        fi
2348
        target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
2349
        tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
2350
        tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2351
        sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
2352
        for sh_multilib in ${sh_multilibs}; do
2353
                case ${sh_multilib} in
2354
                m1 | m2 | m2e | m3 | m3e | \
2355
                m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
2356
                m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
2357
                m2a | m2a-single | m2a-single-only | m2a-nofpu | \
2358
                m5-64media | m5-64media-nofpu | \
2359
                m5-32media | m5-32media-nofpu | \
2360
                m5-compact | m5-compact-nofpu)
2361
                        # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
2362
                        # It is passed to MULTIILIB_OPTIONS verbatim.
2363
                        TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
2364
                        tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2365
                        ;;
2366
                \!*)    # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
2367
                        # It is passed the MULTILIB_EXCEPTIONS verbatim.
2368
                        TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
2369
                *)
2370
                        echo "with_multilib_list=${sh_multilib} not supported."
2371
                        exit 1
2372
                        ;;
2373
                esac
2374
        done
2375
        TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
2376
        if test x${enable_incomplete_targets} = xyes ; then
2377
                tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
2378
        fi
2379
        tm_file="$tm_file ./sysroot-suffix.h"
2380
        tmake_file="$tmake_file t-sysroot-suffix"
2381
        ;;
2382
sh-*-rtems*)
2383
        tmake_file="sh/t-sh sh/t-elf t-rtems sh/t-rtems"
2384
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
2385
        ;;
2386
sh-wrs-vxworks)
2387
        tmake_file="$tmake_file sh/t-sh sh/t-elf sh/t-vxworks"
2388
        tm_file="${tm_file} elfos.h svr4.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
2389
        ;;
2390
sparc-*-netbsdelf*)
2391
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2392
        extra_options="${extra_options} sparc/long-double-switch.opt"
2393
        ;;
2394
sparc64-*-openbsd*)
2395
        tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h"
2396
        tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
2397
        extra_options="${extra_options} sparc/little-endian.opt"
2398
        gas=yes gnu_ld=yes
2399
        with_cpu=ultrasparc
2400
        ;;
2401
sparc-*-elf*)
2402
        tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h svr4.h sparc/sysv4.h sparc/sp-elf.h"
2403
        tmake_file="sparc/t-elf sparc/t-crtfm"
2404
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2405
        ;;
2406
sparc-*-linux*)         # SPARC's running GNU/Linux, libc6
2407
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h glibc-stdint.h"
2408
        extra_options="${extra_options} sparc/long-double-switch.opt"
2409
        tmake_file="${tmake_file} sparc/t-linux"
2410
        if test x$enable_targets = xall; then
2411
                tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
2412
                tmake_file="${tmake_file} sparc/t-linux64"
2413
        else
2414
                tm_file="${tm_file} sparc/linux.h"
2415
        fi
2416
        tmake_file="${tmake_file} sparc/t-crtfm"
2417
        ;;
2418
sparc-*-rtems*)
2419
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
2420
        tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
2421
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2422
        ;;
2423
sparc*-*-solaris2*)
2424
        tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h"
2425
        case ${target} in
2426
            *-*-solaris2.1[0-9]*)
2427
                tm_file="${tm_file} sol2-10.h"
2428
                use_gcc_stdint=wrap
2429
                ;;
2430
            *)
2431
                use_gcc_stdint=provide
2432
                ;;
2433
        esac
2434
        tm_file="${tm_file} sparc/sol2.h"
2435
        case ${target} in
2436
            sparc64-*-* | sparcv9-*-*)
2437
                tm_file="${tm_file} sparc/sol2-64.h"
2438
                ;;
2439
            *)
2440
                test x$with_cpu != x || with_cpu=v9
2441
                ;;
2442
        esac
2443
        tm_file="${tm_file} sparc/sol2-bi.h"
2444
        if test x$gas = xyes; then
2445
                tm_file="${tm_file} sparc/sol2-gas.h sparc/sol2-gas-bi.h"
2446
        fi
2447
        if test x$gnu_ld = xyes; then
2448
                tm_file="${tm_file} sol2-gld.h sparc/sol2-gld-bi.h"
2449
        fi
2450
        tm_file="${tm_file} tm-dwarf2.h"
2451
        tmake_file="t-sol2 sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtfm"
2452
        if test x$gnu_ld = xyes; then
2453
                tmake_file="$tmake_file t-slibgcc-elf-ver"
2454
        else
2455
                tmake_file="$tmake_file t-slibgcc-sld"
2456
        fi
2457
        if test x$gas = xyes; then
2458
                tm_file="usegas.h ${tm_file}"
2459
        fi
2460
        c_target_objs="sol2-c.o"
2461
        cxx_target_objs="sol2-c.o"
2462
        extra_objs="sol2.o"
2463
        tm_p_file="${tm_p_file} sol2-protos.h"
2464
        extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2465
        case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
2466
          "":yes:* | yes:yes:* )
2467
                thread_file=posix
2468
                ;;
2469
          "":*:yes | yes:*:yes )
2470
                thread_file=solaris
2471
                ;;
2472
        esac
2473
        ;;
2474
sparc-wrs-vxworks)
2475
        tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
2476
        tmake_file="${tmake_file} sparc/t-vxworks"
2477
        ;;
2478
sparc64-*-elf*)
2479
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
2480
        extra_options="${extra_options} sparc/little-endian.opt"
2481
        tmake_file="${tmake_file} sparc/t-crtfm"
2482
        extra_parts="crtbegin.o crtend.o"
2483
        ;;
2484
sparc64-*-freebsd*|ultrasparc-*-freebsd*)
2485
        tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
2486
        extra_options="${extra_options} sparc/long-double-switch.opt"
2487
        tmake_file="${tmake_file} sparc/t-crtfm"
2488
        case "x$with_cpu" in
2489
                xultrasparc) ;;
2490
                x) with_cpu=ultrasparc ;;
2491
                *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
2492
        esac
2493
        ;;
2494
sparc64-*-linux*)               # 64-bit SPARC's running GNU/Linux
2495
        tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h glibc-stdint.h sparc/linux64.h"
2496
        extra_options="${extra_options} sparc/long-double-switch.opt"
2497
        tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
2498
        ;;
2499
sparc64-*-netbsd*)
2500
        tm_file="sparc/biarch64.h ${tm_file}"
2501
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2502
        extra_options="${extra_options} sparc/long-double-switch.opt"
2503
        tmake_file="${tmake_file} sparc/t-netbsd64"
2504
        ;;
2505
spu-*-elf*)
2506
        tm_file="dbxelf.h elfos.h spu/spu-elf.h spu/spu.h newlib-stdint.h"
2507
        tmake_file="spu/t-spu-elf"
2508
        extra_headers="spu_intrinsics.h spu_internals.h vmx2spu.h spu_mfcio.h vec_types.h spu_cache.h"
2509
        extra_modes=spu/spu-modes.def
2510
        c_target_objs="${c_target_objs} spu-c.o"
2511
        cxx_target_objs="${cxx_target_objs} spu-c.o"
2512
        ;;
2513
v850e1-*-*)
2514
        target_cpu_default="TARGET_CPU_v850e1"
2515
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h v850/v850.h"
2516
        tm_p_file=v850/v850-protos.h
2517
        tmake_file=v850/t-v850e
2518
        md_file=v850/v850.md
2519
        out_file=v850/v850.c
2520
        extra_options="${extra_options} v850/v850.opt"
2521
        if test x$stabs = xyes
2522
        then
2523
                tm_file="${tm_file} dbx.h"
2524
        fi
2525
        use_collect2=no
2526
        c_target_objs="v850-c.o"
2527
        cxx_target_objs="v850-c.o"
2528
        use_gcc_stdint=wrap
2529
        ;;
2530
v850e-*-*)
2531
        target_cpu_default="TARGET_CPU_v850e"
2532
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h v850/v850.h"
2533
        tm_p_file=v850/v850-protos.h
2534
        tmake_file=v850/t-v850e
2535
        md_file=v850/v850.md
2536
        out_file=v850/v850.c
2537
        extra_options="${extra_options} v850/v850.opt"
2538
        if test x$stabs = xyes
2539
        then
2540
                tm_file="${tm_file} dbx.h"
2541
        fi
2542
        use_collect2=no
2543
        c_target_objs="v850-c.o"
2544
        cxx_target_objs="v850-c.o"
2545
        use_gcc_stdint=wrap
2546
        ;;
2547
v850-*-*)
2548
        target_cpu_default="TARGET_CPU_generic"
2549
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file}"
2550
        tmake_file=v850/t-v850
2551
        if test x$stabs = xyes
2552
        then
2553
                tm_file="${tm_file} dbx.h"
2554
        fi
2555
        use_collect2=no
2556
        c_target_objs="v850-c.o"
2557
        cxx_target_objs="v850-c.o"
2558
        use_gcc_stdint=wrap
2559
        ;;
2560
vax-*-linux*)
2561
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h vax/elf.h vax/linux.h"
2562
        tmake_file="${tmake_file} vax/t-linux"
2563
        ;;
2564
vax-*-netbsdelf*)
2565
        tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
2566
        ;;
2567
vax-*-netbsd*)
2568
        tm_file="${tm_file} netbsd.h netbsd-aout.h vax/netbsd.h"
2569
        tmake_file=t-netbsd
2570
        extra_parts=""
2571
        use_collect2=yes
2572
        ;;
2573
vax-*-openbsd*)
2574
        tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-pthread.h vax/openbsd.h"
2575
        use_collect2=yes
2576
        ;;
2577
xstormy16-*-elf)
2578
        # For historical reasons, the target files omit the 'x'.
2579
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h stormy16/stormy16.h"
2580
        tm_p_file=stormy16/stormy16-protos.h
2581
        md_file=stormy16/stormy16.md
2582
        out_file=stormy16/stormy16.c
2583
        extra_options=stormy16/stormy16.opt
2584
        tmake_file="stormy16/t-stormy16"
2585
        extra_parts="crtbegin.o crtend.o"
2586
        ;;
2587
xtensa*-*-elf*)
2588
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h newlib-stdint.h xtensa/elf.h"
2589
        tmake_file="xtensa/t-xtensa xtensa/t-elf"
2590
        ;;
2591
xtensa*-*-linux*)
2592
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h xtensa/linux.h"
2593
        tmake_file="${tmake_file} xtensa/t-xtensa xtensa/t-linux"
2594
        ;;
2595
am33_2.0-*-linux*)
2596
        tm_file="mn10300/mn10300.h dbxelf.h elfos.h linux.h glibc-stdint.h mn10300/linux.h"
2597
        tmake_file="${tmake_file} mn10300/t-linux"
2598
        gas=yes gnu_ld=yes
2599
        extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2600
        use_collect2=no
2601
        ;;
2602
m32c-*-rtems*)
2603
        tm_file="dbxelf.h elfos.h svr4.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
2604
        tmake_file="${tmake_file} t-rtems"
2605
        c_target_objs="m32c-pragma.o"
2606
        cxx_target_objs="m32c-pragma.o"
2607
        ;;
2608
m32c-*-elf*)
2609
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file}"
2610
        c_target_objs="m32c-pragma.o"
2611
        cxx_target_objs="m32c-pragma.o"
2612
        ;;
2613
*)
2614
        echo "*** Configuration ${target} not supported" 1>&2
2615
        exit 1
2616
        ;;
2617
esac
2618
 
2619
case ${target} in
2620
i[34567]86-*-linux* | x86_64-*-linux*)
2621
        tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
2622
        ;;
2623
i[34567]86-*-* | x86_64-*-*)
2624
        tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
2625
        ;;
2626
powerpc*-*-* | rs6000-*-*)
2627
        tm_file="${tm_file} rs6000/option-defaults.h"
2628
esac
2629
 
2630
# Support for --with-cpu and related options (and a few unrelated options,
2631
# too).
2632
case ${with_cpu} in
2633
  yes | no)
2634
    echo "--with-cpu must be passed a value" 1>&2
2635
    exit 1
2636
    ;;
2637
esac
2638
 
2639
# Set arch and cpu from ${target} and ${target_noncanonical}.  Set cpu
2640
# to generic if there is no processor scheduler model for the target.
2641
arch=
2642
cpu=
2643
arch_without_sse2=no
2644
arch_without_64bit=no
2645
case ${target} in
2646
  i386-*-*)
2647
    arch=i386
2648
    cpu=i386
2649
    arch_without_sse2=yes
2650
    arch_without_64bit=yes
2651
    ;;
2652
  i486-*-*)
2653
    arch=i486
2654
    cpu=i486
2655
    arch_without_sse2=yes
2656
    arch_without_64bit=yes
2657
    ;;
2658
  i586-*-*)
2659
    arch_without_sse2=yes
2660
    arch_without_64bit=yes
2661
    case ${target_noncanonical} in
2662
      k6_2-*)
2663
        arch=k6-2
2664
        cpu=k6-2
2665
        ;;
2666
      k6_3-*)
2667
        arch=k6-3
2668
        cpu=k6-3
2669
        ;;
2670
      k6-*)
2671
        arch=k6
2672
        cpu=k6
2673
        ;;
2674
      pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
2675
        arch=pentium-mmx
2676
        cpu=pentium-mmx
2677
        ;;
2678
      *)
2679
        arch=pentium
2680
        cpu=pentium
2681
        ;;
2682
    esac
2683
    ;;
2684
  i686-*-* | i786-*-*)
2685
    case ${target_noncanonical} in
2686
      amdfam10-*|barcelona-*)
2687
        arch=amdfam10
2688
        cpu=amdfam10
2689
        ;;
2690
      k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
2691
        arch=k8-sse3
2692
        cpu=k8-sse3
2693
        ;;
2694
      k8-*|opteron-*|athlon64-*|athlon_fx-*)
2695
        arch=k8
2696
        cpu=k8
2697
        ;;
2698
      athlon_xp-*|athlon_mp-*|athlon_4-*)
2699
        arch=athlon-4
2700
        cpu=athlon-4
2701
        arch_without_sse2=yes
2702
        arch_without_64bit=yes
2703
        ;;
2704
      athlon_tbird-*|athlon-*)
2705
        arch=athlon
2706
        cpu=athlon
2707
        arch_without_sse2=yes
2708
        ;;
2709
      geode-*)
2710
        arch=geode
2711
        cpu=geode
2712
        arch_without_sse2=yes
2713
        ;;
2714
      pentium2-*)
2715
        arch=pentium2
2716
        cpu=pentium2
2717
        arch_without_sse2=yes
2718
        ;;
2719
      pentium3-*|pentium3m-*)
2720
        arch=pentium3
2721
        cpu=pentium3
2722
        arch_without_sse2=yes
2723
        ;;
2724
      pentium4-*|pentium4m-*)
2725
        arch=pentium4
2726
        cpu=pentium4
2727
        ;;
2728
      prescott-*)
2729
        arch=prescott
2730
        cpu=prescott
2731
        ;;
2732
      nocona-*)
2733
        arch=nocona
2734
        cpu=nocona
2735
        ;;
2736
      atom-*)
2737
        arch=atom
2738
        cpu=atom
2739
        ;;
2740
      core2-*)
2741
        arch=core2
2742
        cpu=core2
2743
        ;;
2744
      pentium_m-*)
2745
        arch=pentium-m
2746
        cpu=pentium-m
2747
        ;;
2748
      pentiumpro-*)
2749
        arch=pentiumpro
2750
        cpu=pentiumpro
2751
        arch_without_sse2=yes
2752
        ;;
2753
      *)
2754
        arch=pentiumpro
2755
        cpu=generic
2756
        arch_without_sse2=yes
2757
        arch_without_64bit=yes
2758
        ;;
2759
    esac
2760
    ;;
2761
  x86_64-*-*)
2762
    case ${target_noncanonical} in
2763
      amdfam10-*|barcelona-*)
2764
        arch=amdfam10
2765
        cpu=amdfam10
2766
        ;;
2767
      k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
2768
        arch=k8-sse3
2769
        cpu=k8-sse3
2770
        ;;
2771
      k8-*|opteron-*|athlon_64-*)
2772
        arch=k8
2773
        cpu=k8
2774
        ;;
2775
      nocona-*)
2776
        arch=nocona
2777
        cpu=nocona
2778
        ;;
2779
      atom-*)
2780
        arch=atom
2781
        cpu=atom
2782
        ;;
2783
      core2-*)
2784
        arch=core2
2785
        cpu=core2
2786
        ;;
2787
      *)
2788
        arch=x86-64
2789
        cpu=generic
2790
        ;;
2791
    esac
2792
    ;;
2793
esac
2794
 
2795
# If there is no $with_cpu option, try to infer one from ${target}.
2796
# This block sets nothing except for with_cpu.
2797
if test x$with_cpu = x ; then
2798
  case ${target} in
2799
    i[34567]86-*-*|x86_64-*-*)
2800
      with_cpu=$cpu
2801
      ;;
2802
    alphaev6[78]*-*-*)
2803
      with_cpu=ev67
2804
      ;;
2805
    alphaev6*-*-*)
2806
      with_cpu=ev6
2807
      ;;
2808
    alphapca56*-*-*)
2809
      with_cpu=pca56
2810
      ;;
2811
    alphaev56*-*-*)
2812
      with_cpu=ev56
2813
      ;;
2814
    alphaev5*-*-*)
2815
      with_cpu=ev5
2816
      ;;
2817
    frv-*-*linux* | frv400-*-*linux*)
2818
      with_cpu=fr400
2819
      ;;
2820
    frv550-*-*linux*)
2821
      with_cpu=fr550
2822
      ;;
2823
    m68k*-*-*)
2824
      case "$with_arch" in
2825
        "cf")
2826
          with_cpu=${default_cf_cpu}
2827
          ;;
2828
        "" | "m68k")
2829
          with_cpu=m${default_m68k_cpu}
2830
          ;;
2831
      esac
2832
      ;;
2833
    mips*-*-vxworks)
2834
      with_arch=mips2
2835
      ;;
2836
    sparc*-*-*)
2837
      with_cpu="`echo ${target} | sed 's/-.*$//'`"
2838
      ;;
2839
  esac
2840
 
2841
  # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
2842
  case ${target} in
2843
    i[34567]86-*-*|x86_64-*-*)
2844
      if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
2845
        if test x$with_cpu_32 = x; then
2846
          with_cpu_32=$with_cpu
2847
        fi
2848
        if test x$with_cpu_64 = x; then
2849
          with_cpu_64=$with_cpu
2850
        fi
2851
        with_cpu=
2852
      fi
2853
      ;;
2854
  esac
2855
fi
2856
 
2857
# Support for --with-arch and related options (and a few unrelated options,
2858
# too).
2859
case ${with_arch} in
2860
  yes | no)
2861
    echo "--with-arch must be passed a value" 1>&2
2862
    exit 1
2863
    ;;
2864
esac
2865
 
2866
# If there is no $with_arch option, try to infer one from ${target}.
2867
# This block sets nothing except for with_arch.
2868
if test x$with_arch = x ; then
2869
  case ${target} in
2870
    i[34567]86-*-darwin*|x86_64-*-darwin*)
2871
      # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
2872
      # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
2873
      ;;
2874
    i[34567]86-*-*)
2875
      # --with-fpmath sets the default ISA to SSE2, which is the same
2876
      # ISA supported by Pentium 4.
2877
      if test x$with_fpmath = x || test $arch_without_sse2 = no; then
2878
        with_arch=$arch
2879
      else
2880
        with_arch=pentium4
2881
      fi
2882
      ;;
2883
    x86_64-*-*)
2884
      with_arch=$arch
2885
      ;;
2886
  esac
2887
 
2888
  # Avoid overriding --with-arch-32 and --with-arch-64 values.
2889
  case ${target} in
2890
    i[34567]86-*-darwin*|x86_64-*-darwin*)
2891
      # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
2892
      # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
2893
      ;;
2894
    i[34567]86-*-*|x86_64-*-*)
2895
      if test x$with_arch_32 != x || test x$with_arch_64 != x; then
2896
        if test x$with_arch_32 = x; then
2897
          with_arch_32=$with_arch
2898
        fi
2899
        if test x$with_arch_64 = x; then
2900
          if test $arch_without_64bit = yes; then
2901
            # Set the default 64bit arch to x86-64 if the default arch
2902
            # doesn't support 64bit.
2903
            with_arch_64=x86-64
2904
          else
2905
            with_arch_64=$with_arch
2906
          fi
2907
        fi
2908
        with_arch=
2909
      elif test $arch_without_64bit$need_64bit_isa = yesyes; then
2910
        # Set the default 64bit arch to x86-64 if the default arch
2911
        # doesn't support 64bit and we need 64bit ISA.
2912
        with_arch_32=$with_arch
2913
        with_arch_64=x86-64
2914
        with_arch=
2915
      fi
2916
      ;;
2917
  esac
2918
fi
2919
 
2920
# Support --with-fpmath.
2921
if test x$with_fpmath != x; then
2922
  case ${target} in
2923
    i[34567]86-*-* | x86_64-*-*)
2924
      case ${with_fpmath} in
2925
      sse)
2926
        tm_file="${tm_file} i386/ssemath.h"
2927
        ;;
2928
      *)
2929
        echo "Invalid --with-fpmath=$with_fpmath" 1>&2
2930
        exit 1
2931
        ;;
2932
      esac
2933
      ;;
2934
    *)
2935
      echo "--with-fpmath isn't supported for $target." 1>&2
2936
      exit 1
2937
      ;;
2938
  esac
2939
fi
2940
 
2941
# Similarly for --with-schedule.
2942
if test x$with_schedule = x; then
2943
        case ${target} in
2944
        hppa1*)
2945
                # Override default PA8000 scheduling model.
2946
                with_schedule=7100LC
2947
                ;;
2948
        esac
2949
fi
2950
 
2951
# Validate and mark as valid any --with options supported
2952
# by this target.  In order to use a particular --with option
2953
# you must list it in supported_defaults; validating the value
2954
# is optional.  This case statement should set nothing besides
2955
# supported_defaults.
2956
 
2957
supported_defaults=
2958
case "${target}" in
2959
        alpha*-*-*)
2960
                supported_defaults="cpu tune"
2961
                for which in cpu tune; do
2962
                        eval "val=\$with_$which"
2963
                        case "$val" in
2964
                        "" \
2965
                        | ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
2966
                        | pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
2967
                        | 21264a)
2968
                                ;;
2969
                        *)
2970
                                echo "Unknown CPU used in --with-$which=$val" 1>&2
2971
                                exit 1
2972
                                ;;
2973
                        esac
2974
                done
2975
                ;;
2976
 
2977
        arm*-*-*)
2978
                supported_defaults="arch cpu float tune fpu abi mode"
2979
                for which in cpu tune; do
2980
                        # See if it matches any of the entries in arm-cores.def
2981
                        eval "val=\$with_$which"
2982
                        if [ x"$val" = x ] \
2983
                            || grep "^ARM_CORE(\"$val\"," \
2984
                                    ${srcdir}/config/arm/arm-cores.def \
2985
                                    > /dev/null; then
2986
                          # Ok
2987
                          new_val=`grep "^ARM_CORE(\"$val\"," \
2988
                                ${srcdir}/config/arm/arm-cores.def | \
2989
                                sed -e 's/^[^,]*,[      ]*//' | \
2990
                                sed -e 's/,.*$//'`
2991
                          eval "target_${which}_cname=$new_val"
2992
                        echo "For $val real value is $new_val"
2993
                          true
2994
                        else
2995
                          echo "Unknown CPU used in --with-$which=$val" 1>&2
2996
                          exit 1
2997
                        fi
2998
                done
2999
 
3000
                case "$with_arch" in
3001
                "" \
3002
                | armv[23456] | armv2a | armv3m | armv4t | armv5t \
3003
                | armv5te | armv6j |armv6k | armv6z | armv6zk | armv6-m \
3004
                | armv7 | armv7-a | armv7-r | armv7-m \
3005
                | iwmmxt | ep9312)
3006
                        # OK
3007
                        ;;
3008
                *)
3009
                        echo "Unknown arch used in --with-arch=$with_arch" 1>&2
3010
                        exit 1
3011
                        ;;
3012
                esac
3013
 
3014
                case "$with_float" in
3015
                "" \
3016
                | soft | hard | softfp)
3017
                        # OK
3018
                        ;;
3019
                *)
3020
                        echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3021
                        exit 1
3022
                        ;;
3023
                esac
3024
 
3025
                case "$with_fpu" in
3026
                "" \
3027
                | fpa | fpe2 | fpe3 | maverick | vfp | vfp3 | vfpv3 \
3028
                | vfpv3-fp16 | vfpv3-d16 | vfpv3-d16-fp16 | vfpv3xd \
3029
                | vfpv3xd-fp16 | neon | neon-fp16 | vfpv4 | vfpv4-d16 \
3030
                | fpv4-sp-d16 | neon-vfpv4)
3031
                        # OK
3032
                        ;;
3033
                *)
3034
                        echo "Unknown fpu used in --with-fpu=$with_fpu" 2>&1
3035
                        exit 1
3036
                        ;;
3037
                esac
3038
 
3039
                case "$with_abi" in
3040
                "" \
3041
                | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
3042
                        #OK
3043
                        ;;
3044
                *)
3045
                        echo "Unknown ABI used in --with-abi=$with_abi"
3046
                        exit 1
3047
                        ;;
3048
                esac
3049
 
3050
                case "$with_mode" in
3051
                "" \
3052
                | arm | thumb )
3053
                        #OK
3054
                        ;;
3055
                *)
3056
                        echo "Unknown mode used in --with-mode=$with_mode"
3057
                        exit 1
3058
                        ;;
3059
                esac
3060
 
3061
                if test "x$with_arch" != x && test "x$with_cpu" != x; then
3062
                        echo "Warning: --with-arch overrides --with-cpu=$with_cpu" 1>&2
3063
                fi
3064
                ;;
3065
 
3066
        fr*-*-*linux*)
3067
                supported_defaults=cpu
3068
                case "$with_cpu" in
3069
                fr400) ;;
3070
                fr550) ;;
3071
                *)
3072
                        echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3073
                        exit 1
3074
                        ;;
3075
                esac
3076
                ;;
3077
 
3078
        fido-*-* | m68k*-*-*)
3079
                supported_defaults="arch cpu"
3080
                case "$with_arch" in
3081
                "" | "m68k"| "cf")
3082
                        m68k_arch_family="$with_arch"
3083
                        ;;
3084
                *)
3085
                        echo "Invalid --with-arch=$with_arch" 1>&2
3086
                        exit 1
3087
                        ;;
3088
                esac
3089
 
3090
                # We always have a $with_cpu setting here.
3091
                case "$with_cpu" in
3092
                "m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
3093
                        m68k_cpu_ident=$with_cpu
3094
                        ;;
3095
                "m68020-40")
3096
                        m68k_cpu_ident=m68020
3097
                        tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
3098
                        ;;
3099
                "m68020-60")
3100
                        m68k_cpu_ident=m68020
3101
                        tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
3102
                        ;;
3103
                *)
3104
                        # We need the C identifier rather than the string.
3105
                        m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
3106
                           'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
3107
                            $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
3108
                                 ${srcdir}/config/m68k/m68k-devices.def`
3109
                        if [ x"$m68k_cpu_ident" = x ] ; then
3110
                                echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
3111
                                exit 1
3112
                        fi
3113
                        with_cpu="mcpu=$with_cpu"
3114
                        ;;
3115
                esac
3116
                ;;
3117
 
3118
        hppa*-*-*)
3119
                supported_defaults="arch schedule"
3120
 
3121
                case "$with_arch" in
3122
                "" | 1.0 | 1.1 | 2.0)
3123
                        # OK
3124
                        ;;
3125
                *)
3126
                        echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
3127
                        exit 1
3128
                        ;;
3129
                esac
3130
 
3131
                case "$with_schedule" in
3132
                "" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
3133
                        # OK
3134
                        ;;
3135
                *)
3136
                        echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
3137
                        exit 1
3138
                        ;;
3139
                esac
3140
                ;;
3141
 
3142
        i[34567]86-*-* | x86_64-*-*)
3143
                supported_defaults="arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
3144
                for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
3145
                        eval "val=\$with_$which"
3146
                        case ${val} in
3147
                        i386 | i486 \
3148
                        | i586 | pentium | pentium-mmx | winchip-c6 | winchip2 \
3149
                        | c3 | c3-2 | i686 | pentiumpro | pentium2 | pentium3 \
3150
                        | pentium4 | k6 | k6-2 | k6-3 | athlon | athlon-tbird \
3151
                        | athlon-4 | athlon-xp | athlon-mp | geode \
3152
                        | prescott | pentium-m | pentium4m | pentium3m)
3153
                                case "${target}" in
3154
                                  x86_64-*-*)
3155
                                      case "x$which" in
3156
                                        *_32)
3157
                                                ;;
3158
                                        *)
3159
                                                echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
3160
                                                exit 1
3161
                                                ;;
3162
                                      esac
3163
                                      ;;
3164
                                esac
3165
                                # OK
3166
                                ;;
3167
                        "" | x86-64 | generic | native \
3168
                        | k8 | k8-sse3 | athlon64 | athlon64-sse3 | opteron \
3169
                        | opteron-sse3 | athlon-fx | amdfam10 | barcelona \
3170
                        | nocona | core2 | atom)
3171
                                # OK
3172
                                ;;
3173
                        *)
3174
                                echo "Unknown CPU given in --with-$which=$val." 1>&2
3175
                                exit 1
3176
                                ;;
3177
                        esac
3178
                done
3179
                ;;
3180
 
3181
        mips*-*-*)
3182
                supported_defaults="abi arch arch_32 arch_64 float tune tune_32 tune_64 divide llsc mips-plt synci"
3183
 
3184
                case ${with_float} in
3185
                "" | soft | hard)
3186
                        # OK
3187
                        ;;
3188
                *)
3189
                        echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3190
                        exit 1
3191
                        ;;
3192
                esac
3193
 
3194
                case ${with_abi} in
3195
                "" | 32 | o64 | n32 | 64 | eabi)
3196
                        # OK
3197
                        ;;
3198
                *)
3199
                        echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
3200
                        exit 1
3201
                        ;;
3202
                esac
3203
 
3204
                case ${with_divide} in
3205
                "" | breaks | traps)
3206
                        # OK
3207
                        ;;
3208
                *)
3209
                        echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
3210
                        exit 1
3211
                        ;;
3212
                esac
3213
 
3214
                case ${with_llsc} in
3215
                yes)
3216
                        with_llsc=llsc
3217
                        ;;
3218
                no)
3219
                        with_llsc="no-llsc"
3220
                        ;;
3221
                "")
3222
                        # OK
3223
                        ;;
3224
                *)
3225
                        echo "Unknown llsc type used in --with-llsc" 1>&2
3226
                        exit 1
3227
                        ;;
3228
                esac
3229
 
3230
                case ${with_mips_plt} in
3231
                yes)
3232
                        with_mips_plt=plt
3233
                        ;;
3234
                no)
3235
                        with_mips_plt=no-plt
3236
                        ;;
3237
                "")
3238
                        ;;
3239
                *)
3240
                        echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2
3241
                        exit 1
3242
                        ;;
3243
                esac
3244
 
3245
                case ${with_synci} in
3246
                yes)
3247
                        with_synci=synci
3248
                        ;;
3249
                "" | no)
3250
                        # No is the default.
3251
                        with_synci=no-synci
3252
                        ;;
3253
                *)
3254
                        echo "Unknown synci type used in --with-synci" 1>&2
3255
                        exit 1
3256
                        ;;
3257
                esac
3258
                ;;
3259
 
3260
        powerpc*-*-* | rs6000-*-*)
3261
                supported_defaults="cpu cpu_32 cpu_64 float tune tune_32 tune_64"
3262
 
3263
                for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
3264
                        eval "val=\$with_$which"
3265
                        case ${val} in
3266
                        default32 | default64)
3267
                                case $which in
3268
                                cpu | tune)
3269
                                        ;;
3270
                                *)
3271
                                        echo "$val only valid for --with-cpu and --with-tune." 1>&2
3272
                                        exit 1
3273
                                        ;;
3274
                                esac
3275
                                with_which="with_$which"
3276
                                eval $with_which=
3277
                                ;;
3278
                        405cr)
3279
                                tm_defines="${tm_defines} CONFIG_PPC405CR"
3280
                                eval "with_$which=405"
3281
                                ;;
3282
                        "" | common \
3283
                        | power | power[234567] | power6x | powerpc | powerpc64 \
3284
                        | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
3285
                        | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
3286
                        | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
3287
                        | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
3288
                        | a2 | e300c[23] | 854[08] | e500mc | e500mc64 \
3289
                        | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
3290
                                # OK
3291
                                ;;
3292
                        *)
3293
                                echo "Unknown cpu used in --with-$which=$val." 1>&2
3294
                                exit 1
3295
                                ;;
3296
                        esac
3297
                done
3298
                ;;
3299
 
3300
        s390*-*-*)
3301
                supported_defaults="arch mode tune"
3302
 
3303
                for which in arch tune; do
3304
                        eval "val=\$with_$which"
3305
                        case ${val} in
3306
                        "" | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10)
3307
                                # OK
3308
                                ;;
3309
                        *)
3310
                                echo "Unknown cpu used in --with-$which=$val." 1>&2
3311
                                exit 1
3312
                                ;;
3313
                        esac
3314
                done
3315
 
3316
                case ${with_mode} in
3317
                "" | esa | zarch)
3318
                        # OK
3319
                        ;;
3320
                *)
3321
                        echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
3322
                        exit 1
3323
                        ;;
3324
                esac
3325
                ;;
3326
 
3327
        sh[123456ble]-*-* | sh-*-*)
3328
                supported_defaults="cpu"
3329
                case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
3330
                "" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
3331
                        # OK
3332
                        ;;
3333
                m2a | m2a-single | m2a-single-only | m2a-nofpu)
3334
                        ;;
3335
                m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
3336
                        ;;
3337
                *)
3338
                        echo "Unknown CPU used in --with-cpu=$with_cpu, known values:"  1>&2
3339
                        echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
3340
                        echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
3341
                        echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
3342
                        exit 1
3343
                        ;;
3344
                esac
3345
                ;;
3346
        sparc*-*-*)
3347
                supported_defaults="cpu float tune"
3348
 
3349
                for which in cpu tune; do
3350
                        eval "val=\$with_$which"
3351
                        case ${val} in
3352
                        "" | sparc | sparcv9 | sparc64 | sparc86x \
3353
                        | v7 | cypress | v8 | supersparc | sparclite | f930 \
3354
                        | f934 | hypersparc | sparclite86x | sparclet | tsc701 \
3355
                        | v9 | ultrasparc | ultrasparc3 | niagara | niagara2)
3356
                                # OK
3357
                                ;;
3358
                        *)
3359
                                echo "Unknown cpu used in --with-$which=$val" 1>&2
3360
                                exit 1
3361
                                ;;
3362
                        esac
3363
                done
3364
 
3365
                case ${with_float} in
3366
                "" | soft | hard)
3367
                        # OK
3368
                        ;;
3369
                *)
3370
                        echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3371
                        exit 1
3372
                        ;;
3373
                esac
3374
                ;;
3375
 
3376
        spu-*-*)
3377
                supported_defaults="arch tune"
3378
 
3379
                for which in arch tune; do
3380
                        eval "val=\$with_$which"
3381
                        case ${val} in
3382
                        "" | cell | celledp)
3383
                                # OK
3384
                                ;;
3385
                        *)
3386
                                echo "Unknown cpu used in --with-$which=$val." 1>&2
3387
                                exit 1
3388
                                ;;
3389
                        esac
3390
                done
3391
                ;;
3392
 
3393
        v850*-*-*)
3394
                supported_defaults=cpu
3395
                case ${with_cpu} in
3396
                "" | v850e | v850e1)
3397
                        # OK
3398
                        ;;
3399
                *)
3400
                        echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3401
                        exit 1
3402
                        ;;
3403
                esac
3404
                ;;
3405
esac
3406
 
3407
# Set some miscellaneous flags for particular targets.
3408
target_cpu_default2=
3409
case ${target} in
3410
        alpha*-*-*)
3411
                if test x$gas = xyes
3412
                then
3413
                        target_cpu_default2="MASK_GAS"
3414
                fi
3415
                ;;
3416
 
3417
        arm*-*-*)
3418
                if test x$target_cpu_cname = x
3419
                then
3420
                        target_cpu_default2=TARGET_CPU_generic
3421
                else
3422
                        target_cpu_default2=TARGET_CPU_$target_cpu_cname
3423
                fi
3424
                ;;
3425
 
3426
        hppa*-*-*)
3427
                target_cpu_default2="MASK_BIG_SWITCH"
3428
                if test x$gas = xyes
3429
                then
3430
                        target_cpu_default2="${target_cpu_default2}|MASK_GAS|MASK_JUMP_IN_DELAY"
3431
                fi
3432
                ;;
3433
 
3434
        fido*-*-* | m68k*-*-*)
3435
                target_cpu_default2=$m68k_cpu_ident
3436
                if [ x"$m68k_arch_family" != x ]; then
3437
                        tmake_file="m68k/t-$m68k_arch_family $tmake_file"
3438
                fi
3439
                ;;
3440
 
3441
        i[34567]86-*-darwin* | x86_64-*-darwin*)
3442
                tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
3443
                ;;
3444
        i[34567]86-*-linux* | x86_64-*-linux* | \
3445
          i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
3446
          i[34567]86-*-gnu*)
3447
                tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp i386/t-linux"
3448
                ;;
3449
        i[34567]86-*-solaris2*)
3450
                tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
3451
                ;;
3452
        i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
3453
                tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
3454
                ;;
3455
        ia64*-*-linux*)
3456
                tmake_file="${tmake_file} ia64/t-fprules-softfp soft-fp/t-softfp"
3457
                ;;
3458
 
3459
        mips*-*-*)
3460
                if test x$gnu_ld = xyes
3461
                then
3462
                        target_cpu_default2="MASK_SPLIT_ADDRESSES"
3463
                fi
3464
                case ${target} in
3465
                        mips*el-*-*)
3466
                                tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
3467
                                ;;
3468
                esac
3469
                if test "x$enable_gofast" = xyes
3470
                then
3471
                        tm_defines="US_SOFTWARE_GOFAST $tm_defines"
3472
                        tmake_file="mips/t-gofast $tmake_file"
3473
                else
3474
                        tmake_file="mips/t-mips $tmake_file"
3475
                fi
3476
                ;;
3477
 
3478
        powerpc*-*-* | rs6000-*-*)
3479
                # FIXME: The PowerPC port uses the value set at compile time,
3480
                # although it's only cosmetic.
3481
                if test "x$with_cpu" != x
3482
                then
3483
                        target_cpu_default2="\\\"$with_cpu\\\""
3484
                fi
3485
                out_file=rs6000/rs6000.c
3486
                c_target_objs="${c_target_objs} rs6000-c.o"
3487
                cxx_target_objs="${cxx_target_objs} rs6000-c.o"
3488
                tmake_file="rs6000/t-rs6000 ${tmake_file}"
3489
 
3490
                if test x$enable_e500_double = xyes
3491
                then
3492
                        tm_file="$tm_file rs6000/e500-double.h"
3493
                fi
3494
                ;;
3495
 
3496
        sh[123456ble]*-*-* | sh-*-*)
3497
                c_target_objs="${c_target_objs} sh-c.o"
3498
                cxx_target_objs="${cxx_target_objs} sh-c.o"
3499
                ;;
3500
 
3501
        sparc*-*-*)
3502
                # Some standard aliases.
3503
                case x$with_cpu in
3504
                xsparc)
3505
                        with_cpu=v7
3506
                        ;;
3507
                xsparcv9 | xsparc64)
3508
                        with_cpu=v9
3509
                        ;;
3510
                esac
3511
 
3512
                # The SPARC port checks this value at compile-time.
3513
                target_cpu_default2="TARGET_CPU_$with_cpu"
3514
                ;;
3515
        v850*-*-*)
3516
                # FIXME: The v850 is "special" in that it does not support
3517
                # runtime CPU selection, only --with-cpu.
3518
                case "x$with_cpu" in
3519
                x)
3520
                        ;;
3521
                xv850e)
3522
                        target_cpu_default2="TARGET_CPU_$with_cpu"
3523
                        ;;
3524
                esac
3525
                ;;
3526
esac
3527
 
3528
t=
3529
all_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64 schedule float mode fpu divide llsc mips-plt synci"
3530
for option in $all_defaults
3531
do
3532
        eval "val=\$with_"`echo $option | sed s/-/_/g`
3533
        if test -n "$val"; then
3534
                case " $supported_defaults " in
3535
                *" $option "*)
3536
                        ;;
3537
                *)
3538
                        echo "This target does not support --with-$option." 2>&1
3539
                        echo "Valid --with options are: $supported_defaults" 2>&1
3540
                        exit 1
3541
                        ;;
3542
                esac
3543
 
3544
                if test "x$t" = x
3545
                then
3546
                        t="{ \"$option\", \"$val\" }"
3547
                else
3548
                        t="${t}, { \"$option\", \"$val\" }"
3549
                fi
3550
        fi
3551
done
3552
 
3553
if test "x$t" = x
3554
then
3555
        configure_default_options="{ { NULL, NULL} }"
3556
else
3557
        configure_default_options="{ ${t} }"
3558
fi
3559
 
3560
if test "$target_cpu_default2" != ""
3561
then
3562
        if test "$target_cpu_default" != ""
3563
        then
3564
                target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3565
        else
3566
                target_cpu_default=$target_cpu_default2
3567
        fi
3568
fi

powered by: WebSVN 2.1.0

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