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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [config.gcc] - Blame information for rev 847

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 452 jeremybenn
        tm_defines="${tm_defines} OR32_LIBC_DEFAULT=or32_libc_newlib"
1918 280 jeremybenn
        ;;
1919
or32-*linux*)
1920 490 jeremybenn
        tm_file="${tm_file} dbxelf.h elfos.h or32/elf.h or32/linux-gas.h or32/linux-elf.h uclibc-stdint.h"
1921 399 jeremybenn
        tmake_file="${cpu_type}/t-${cpu_type} or32/t-linux"
1922 452 jeremybenn
        tm_defines="`echo $tm_defines|sed -e s/UCLIBC_DEFAULT=.//g`"
1923
        tm_defines="${tm_defines} UCLIBC_DEFAULT=1 OR32_LIBC_DEFAULT=or32_libc_uclibc"
1924 280 jeremybenn
        ;;
1925
pdp11-*-*)
1926
        tm_file="${tm_file} newlib-stdint.h"
1927
        use_gcc_stdint=wrap
1928
        ;;
1929
picochip-*)
1930
        tm_file="${tm_file} newlib-stdint.h"
1931
        use_gcc_stdint=wrap
1932
        ;;
1933
# port not yet contributed
1934
#powerpc-*-openbsd*)
1935
#       tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit "
1936
#       extra_headers=
1937
#       ;;
1938
powerpc-*-darwin*)
1939
        extra_options="${extra_options} rs6000/darwin.opt"
1940
        extra_parts="crt2.o"
1941
        case ${target} in
1942
          *-darwin1[0-9]* | *-darwin[8-9]*)
1943
            tmake_file="${tmake_file} rs6000/t-darwin8"
1944
            tm_file="${tm_file} rs6000/darwin8.h"
1945
            ;;
1946
          *-darwin7*)
1947
            tm_file="${tm_file} rs6000/darwin7.h"
1948
            ;;
1949
          *-darwin[0-6]*)
1950
            ;;
1951
        esac
1952
        tmake_file="${tmake_file} t-slibgcc-darwin"
1953
        extra_headers=altivec.h
1954
        ;;
1955
powerpc64-*-darwin*)
1956
        tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
1957
        extra_options="${extra_options} ${cpu_type}/darwin.opt"
1958
        # We're not including any t-darwin* fragments, to avoid building multilibs.
1959
        tmake_file="${tmake_file} t-slibgcc-darwin"
1960
        extra_headers=altivec.h
1961
        ;;
1962
powerpc*-*-freebsd*)
1963
        tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h rs6000/freebsd.h"
1964
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
1965
        extra_options="${extra_options} rs6000/sysv4.opt"
1966
        ;;
1967
powerpc-*-netbsd*)
1968
        tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
1969
        tmake_file="${tmake_file} rs6000/t-netbsd"
1970
        extra_options="${extra_options} rs6000/sysv4.opt"
1971
        ;;
1972
powerpc-*-eabispe*)
1973
        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"
1974
        extra_options="${extra_options} rs6000/sysv4.opt"
1975
        tmake_file="rs6000/t-spe rs6000/t-ppccomm"
1976
        use_gcc_stdint=wrap
1977
        ;;
1978
powerpc-*-eabisimaltivec*)
1979
        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"
1980
        extra_options="${extra_options} rs6000/sysv4.opt"
1981
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
1982
        use_gcc_stdint=wrap
1983
        ;;
1984
powerpc-*-eabisim*)
1985
        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"
1986
        extra_options="${extra_options} rs6000/sysv4.opt"
1987
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
1988
        use_gcc_stdint=wrap
1989
        ;;
1990
powerpc-*-elf*)
1991
        tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
1992
        extra_options="${extra_options} rs6000/sysv4.opt"
1993
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
1994
        ;;
1995
powerpc-*-eabialtivec*)
1996
        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"
1997
        extra_options="${extra_options} rs6000/sysv4.opt"
1998
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
1999
        use_gcc_stdint=wrap
2000
        ;;
2001
powerpc-xilinx-eabi*)
2002
        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"
2003
        extra_options="${extra_options} rs6000/sysv4.opt"
2004
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm rs6000/t-xilinx"
2005
        use_gcc_stdint=wrap
2006
        ;;
2007
powerpc-*-eabi*)
2008
        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"
2009
        extra_options="${extra_options} rs6000/sysv4.opt"
2010
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2011
        use_gcc_stdint=wrap
2012
        ;;
2013
powerpc-*-rtems*)
2014
        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"
2015
        extra_options="${extra_options} rs6000/sysv4.opt"
2016
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm"
2017
        ;;
2018
powerpc-*-linux* | powerpc64-*-linux*)
2019
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
2020
        extra_options="${extra_options} rs6000/sysv4.opt"
2021
        tmake_file="t-dfprules rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2022
        maybe_biarch=yes
2023
        case ${target} in
2024
            powerpc64-*-linux*spe* | powerpc64-*-linux*paired*)
2025
                echo "*** Configuration ${target} not supported" 1>&2
2026
                exit 1
2027
                ;;
2028
            powerpc-*-linux*spe* | powerpc-*-linux*paired*)
2029
                maybe_biarch=
2030
                ;;
2031
            powerpc64-*-linux*)
2032
                test x$with_cpu != x || cpu_is_64bit=yes
2033
                maybe_biarch=always
2034
                ;;
2035
        esac
2036
        case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
2037
            always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
2038
                if test x$cpu_is_64bit = xyes; then
2039
                    tm_file="${tm_file} rs6000/default64.h"
2040
                fi
2041
                tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
2042
                tmake_file="$tmake_file rs6000/t-linux64"
2043
                extra_options="${extra_options} rs6000/linux64.opt"
2044
                ;;
2045
            *)
2046
                tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
2047
                ;;
2048
        esac
2049
        tmake_file="${tmake_file} t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp"
2050
        case ${target} in
2051
            powerpc*-*-linux*altivec*)
2052
                tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
2053
            powerpc*-*-linux*spe*)
2054
                tm_file="${tm_file} rs6000/linuxspe.h rs6000/e500.h" ;;
2055
            powerpc*-*-linux*paired*)
2056
                tm_file="${tm_file} rs6000/750cl.h" ;;
2057
        esac
2058
        if test x${enable_secureplt} = xyes; then
2059
                tm_file="rs6000/secureplt.h ${tm_file}"
2060
        fi
2061
        ;;
2062
powerpc64-*-gnu*)
2063
        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"
2064
        extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
2065
        tmake_file="t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu"
2066
        ;;
2067
powerpc-*-gnu-gnualtivec*)
2068
        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"
2069
        extra_options="${extra_options} rs6000/sysv4.opt"
2070
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm"
2071
        if test x$enable_threads = xyes; then
2072
                thread_file='posix'
2073
        fi
2074
        ;;
2075
powerpc-*-gnu*)
2076
        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"
2077
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm"
2078
        extra_options="${extra_options} rs6000/sysv4.opt"
2079
        if test x$enable_threads = xyes; then
2080
                thread_file='posix'
2081
        fi
2082
        ;;
2083
powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
2084
        tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
2085
        tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppccomm rs6000/t-vxworks"
2086
        extra_options="${extra_options} rs6000/sysv4.opt"
2087
        extra_headers=ppc-asm.h
2088
        case ${target} in
2089
          *-vxworksae*)
2090
            tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/e500.h rs6000/vxworksae.h"
2091
            tmake_file="${tmake_file} rs6000/t-vxworksae"
2092
            ;;
2093
          *-vxworks*)
2094
            tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h rs6000/e500.h"
2095
            ;;
2096
        esac
2097
        ;;
2098
powerpc-*-lynxos*)
2099
        xm_defines=POSIX
2100
        tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
2101
        tmake_file="t-lynx rs6000/t-lynx"
2102
        extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
2103
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2104
        extra_options="${extra_options} lynx.opt"
2105
        thread_file=lynx
2106
        gnu_ld=yes
2107
        gas=yes
2108
        ;;
2109
powerpcle-*-elf*)
2110
        tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
2111
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2112
        extra_options="${extra_options} rs6000/sysv4.opt"
2113
        ;;
2114
powerpcle-*-eabisim*)
2115
        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"
2116
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2117
        extra_options="${extra_options} rs6000/sysv4.opt"
2118
        use_gcc_stdint=wrap
2119
        ;;
2120
powerpcle-*-eabi*)
2121
        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"
2122
        tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2123
        extra_options="${extra_options} rs6000/sysv4.opt"
2124
        use_gcc_stdint=wrap
2125
        ;;
2126
rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
2127
        tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h rs6000/aix-stdint.h"
2128
        tmake_file=rs6000/t-aix43
2129
        extra_options="${extra_options} rs6000/aix64.opt"
2130
        use_collect2=yes
2131
        thread_file='aix'
2132
        use_gcc_stdint=provide
2133
        extra_headers=
2134
        ;;
2135
rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
2136
        tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h rs6000/aix-stdint.h"
2137
        extra_options="${extra_options} rs6000/aix64.opt"
2138
        tmake_file=rs6000/t-aix43
2139
        use_collect2=yes
2140
        thread_file='aix'
2141
        use_gcc_stdint=wrap
2142
        extra_headers=
2143
        ;;
2144
rs6000-ibm-aix5.2.* | powerpc-ibm-aix5.2.*)
2145
        tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h rs6000/aix-stdint.h"
2146
        tmake_file=rs6000/t-aix52
2147
        extra_options="${extra_options} rs6000/aix64.opt"
2148
        use_collect2=yes
2149
        thread_file='aix'
2150
        use_gcc_stdint=wrap
2151
        extra_headers=
2152
        ;;
2153
rs6000-ibm-aix5.3.* | powerpc-ibm-aix5.3.*)
2154
        tm_file="${tm_file} rs6000/aix.h rs6000/aix53.h rs6000/xcoff.h rs6000/aix-stdint.h"
2155
        tmake_file=rs6000/t-aix52
2156
        extra_options="${extra_options} rs6000/aix64.opt"
2157
        use_collect2=yes
2158
        thread_file='aix'
2159
        use_gcc_stdint=wrap
2160
        extra_headers=altivec.h
2161
        ;;
2162
rs6000-ibm-aix[6789].* | powerpc-ibm-aix[6789].*)
2163
        tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h rs6000/aix-stdint.h"
2164
        tmake_file=rs6000/t-aix52
2165
        extra_options="${extra_options} rs6000/aix64.opt"
2166
        use_collect2=yes
2167
        thread_file='aix'
2168
        use_gcc_stdint=wrap
2169
        extra_headers=altivec.h
2170
        ;;
2171
rx-*-elf*)
2172
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file} ../../libgcc/config/rx/rx-abi.h"
2173
        tmake_file="${tmake_file} rx/t-rx"
2174
        ;;
2175
s390-*-linux*)
2176
        tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h s390/linux.h"
2177
        ;;
2178
s390x-*-linux*)
2179
        tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h s390/linux.h"
2180
        tm_p_file=s390/s390-protos.h
2181
        md_file=s390/s390.md
2182
        extra_modes=s390/s390-modes.def
2183
        out_file=s390/s390.c
2184
        tmake_file="${tmake_file} s390/t-linux64"
2185
        ;;
2186
s390x-ibm-tpf*)
2187
        tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h s390/tpf.h"
2188
        tm_p_file=s390/s390-protos.h
2189
        md_file=s390/s390.md
2190
        extra_modes=s390/s390-modes.def
2191
        out_file=s390/s390.c
2192
        extra_parts="crtbeginS.o crtendS.o"
2193
        thread_file='tpf'
2194
        extra_options="${extra_options} s390/tpf.opt"
2195
        ;;
2196
score-*-elf)
2197
        tm_file="dbxelf.h elfos.h score/elf.h score/score.h newlib-stdint.h"
2198
        tmake_file=score/t-score-elf
2199
        extra_objs="score7.o score3.o"
2200
        ;;
2201
sh-*-elf* | sh[12346l]*-*-elf* | \
2202
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
2203
  sh-*-linux* | sh[2346lbe]*-*-linux* | \
2204
  sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
2205
   sh64-*-netbsd* | sh64l*-*-netbsd*)
2206
        tmake_file="${tmake_file} sh/t-sh sh/t-elf"
2207
        if test x${with_endian} = x; then
2208
                case ${target} in
2209
                sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
2210
                shbe-*-* | sheb-*-*)               with_endian=big,little ;;
2211
                sh[1234]l* | sh[34]*-*-linux*)     with_endian=little ;;
2212
                shl* | sh64l* | sh*-*-linux* | \
2213
                  sh5l* | sh-superh-elf)           with_endian=little,big ;;
2214
                sh[1234]*-*-*)                     with_endian=big ;;
2215
                *)                                 with_endian=big,little ;;
2216
                esac
2217
        fi
2218
        # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
2219
        #  First word : the default endian.
2220
        #  Second word: the secondary endian (optional).
2221
        case ${with_endian} in
2222
        big)            TM_ENDIAN_CONFIG=mb ;;
2223
        little)         TM_ENDIAN_CONFIG=ml ;;
2224
        big,little)     TM_ENDIAN_CONFIG="mb ml" ;;
2225
        little,big)     TM_ENDIAN_CONFIG="ml mb" ;;
2226
        *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
2227
        esac
2228
        case ${with_endian} in
2229
        little*)        tm_file="sh/little.h ${tm_file}" ;;
2230
        esac
2231
        tm_file="${tm_file} dbxelf.h elfos.h"
2232
        case ${target} in
2233
        sh*-*-netbsd*)  ;;
2234
        *)              tm_file="${tm_file} svr4.h" ;;
2235
        esac
2236
        tm_file="${tm_file} sh/elf.h"
2237
        case ${target} in
2238
        sh*-*-linux*)   tmake_file="${tmake_file} sh/t-linux"
2239
                        tm_file="${tm_file} linux.h glibc-stdint.h sh/linux.h" ;;
2240
        sh*-*-netbsd*)  tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h" ;;
2241
        sh*-superh-elf) if test x$with_libgloss != xno; then
2242
                                with_libgloss=yes
2243
                                tm_file="${tm_file} sh/newlib.h"
2244
                        fi
2245
                        tm_file="${tm_file} sh/embed-elf.h"
2246
                        tm_file="${tm_file} sh/superh.h"
2247
                        tmake_file="${tmake_file} sh/t-superh"
2248
                        extra_options="${extra_options} sh/superh.opt" ;;
2249
        *)              if test x$with_newlib = xyes \
2250
                           && test x$with_libgloss = xyes; then
2251
                                tm_file="${tm_file} sh/newlib.h"
2252
                        fi
2253
                        tm_file="${tm_file} sh/embed-elf.h" ;;
2254
        esac
2255
        case ${target} in
2256
        sh5*-*-netbsd*)
2257
                # SHmedia, 32-bit ABI
2258
                tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd"
2259
                ;;
2260
        sh64*-netbsd*)
2261
                # SHmedia, 64-bit ABI
2262
                tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd sh/t-netbsd-sh5-64"
2263
                ;;
2264
        *-*-netbsd)
2265
                tmake_file="${tmake_file} sh/t-netbsd"
2266
                ;;
2267
        sh64*-*-linux*)
2268
                tmake_file="${tmake_file} sh/t-sh64 sh/t-linux64"
2269
                tm_file="${tm_file} sh/sh64.h"
2270
                extra_headers="shmedia.h ushmedia.h sshmedia.h"
2271
                ;;
2272
        sh64*)
2273
                tmake_file="${tmake_file} sh/t-sh64"
2274
                tm_file="${tm_file} sh/sh64.h"
2275
                extra_headers="shmedia.h ushmedia.h sshmedia.h"
2276
                ;;
2277
        *-*-symbianelf*)
2278
                tmake_file="sh/t-symbian"
2279
                tm_file="sh/symbian-pre.h sh/little.h ${tm_file} sh/symbian-post.h"
2280
                c_target_objs="symbian-base.o symbian-c.o"
2281
                cxx_target_objs="symbian-base.o symbian-cxx.o"
2282
                extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
2283
                ;;
2284
        *-*-elf*)
2285
                tm_file="${tm_file} newlib-stdint.h"
2286
                ;;
2287
        esac
2288
        # sed el/eb endian suffixes away to avoid confusion with sh[23]e
2289
        case `echo ${target} | sed 's/e[lb]-/-/'` in
2290
        sh64*-*-netbsd*)        sh_cpu_target=sh5-64media ;;
2291
        sh64* | sh5*-*-netbsd*) sh_cpu_target=sh5-32media ;;
2292
        sh4a_single_only*)      sh_cpu_target=sh4a-single-only ;;
2293
        sh4a_single*)           sh_cpu_target=sh4a-single ;;
2294
        sh4a_nofpu*)            sh_cpu_target=sh4a-nofpu ;;
2295
        sh4al)                  sh_cpu_target=sh4al ;;
2296
        sh4a*)                  sh_cpu_target=sh4a ;;
2297
        sh4_single_only*)       sh_cpu_target=sh4-single-only ;;
2298
        sh4_single*)            sh_cpu_target=sh4-single ;;
2299
        sh4_nofpu*)             sh_cpu_target=sh4-nofpu ;;
2300
        sh4* | sh-superh-*)     sh_cpu_target=sh4 ;;
2301
        sh3e*)                  sh_cpu_target=sh3e ;;
2302
        sh*-*-netbsd* | sh3*)   sh_cpu_target=sh3 ;;
2303
        sh2a_single_only*)      sh_cpu_target=sh2a-single-only ;;
2304
        sh2a_single*)           sh_cpu_target=sh2a-single ;;
2305
        sh2a_nofpu*)            sh_cpu_target=sh2a-nofpu ;;
2306
        sh2a*)                  sh_cpu_target=sh2a ;;
2307
        sh2e*)                  sh_cpu_target=sh2e ;;
2308
        sh2*)                   sh_cpu_target=sh2 ;;
2309
        *)                      sh_cpu_target=sh1 ;;
2310
        esac
2311
        # did the user say --without-fp ?
2312
        if test x$with_fp = xno; then
2313
                case ${sh_cpu_target} in
2314
                sh5-*media)     sh_cpu_target=${sh_cpu_target}-nofpu ;;
2315
                sh4al | sh1)    ;;
2316
                sh4a* )         sh_cpu_target=sh4a-nofpu ;;
2317
                sh4*)           sh_cpu_target=sh4-nofpu ;;
2318
                sh3*)           sh_cpu_target=sh3 ;;
2319
                sh2a*)          sh_cpu_target=sh2a-nofpu ;;
2320
                sh2*)           sh_cpu_target=sh2 ;;
2321
                *)      echo --without-fp not available for $target: ignored
2322
                esac
2323
                tm_defines="$tm_defines STRICT_NOFPU=1"
2324
        fi
2325
        sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
2326
        case $sh_cpu_default in
2327
        sh5-64media-nofpu | sh5-64media | \
2328
          sh5-32media-nofpu | sh5-32media | sh5-compact-nofpu | sh5-compact | \
2329
          sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
2330
          sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
2331
          sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
2332
          sh3e | sh3 | sh2e | sh2 | sh1) ;;
2333
        "")     sh_cpu_default=${sh_cpu_target} ;;
2334
        *)      echo "with_cpu=$with_cpu not supported"; exit 1 ;;
2335
        esac
2336
        sh_multilibs=${with_multilib_list}
2337
        if test "$sh_multilibs" = "default" ; then
2338
                case ${target} in
2339
                sh64-superh-linux* | \
2340
                sh[1234]*)      sh_multilibs=${sh_cpu_target} ;;
2341
                sh64* | sh5*)   sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
2342
                sh-superh-*)    sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
2343
                sh*-*-linux*)   sh_multilibs=m1,m3e,m4 ;;
2344
                sh*-*-netbsd*)  sh_multilibs=m3,m3e,m4 ;;
2345
                *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
2346
                esac
2347
                if test x$with_fp = xno; then
2348
                        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`"
2349
                fi
2350
        fi
2351
        target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
2352
        tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
2353
        tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2354
        sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
2355
        for sh_multilib in ${sh_multilibs}; do
2356
                case ${sh_multilib} in
2357
                m1 | m2 | m2e | m3 | m3e | \
2358
                m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
2359
                m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
2360
                m2a | m2a-single | m2a-single-only | m2a-nofpu | \
2361
                m5-64media | m5-64media-nofpu | \
2362
                m5-32media | m5-32media-nofpu | \
2363
                m5-compact | m5-compact-nofpu)
2364
                        # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
2365
                        # It is passed to MULTIILIB_OPTIONS verbatim.
2366
                        TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
2367
                        tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2368
                        ;;
2369
                \!*)    # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
2370
                        # It is passed the MULTILIB_EXCEPTIONS verbatim.
2371
                        TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
2372
                *)
2373
                        echo "with_multilib_list=${sh_multilib} not supported."
2374
                        exit 1
2375
                        ;;
2376
                esac
2377
        done
2378
        TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
2379
        if test x${enable_incomplete_targets} = xyes ; then
2380
                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"
2381
        fi
2382
        tm_file="$tm_file ./sysroot-suffix.h"
2383
        tmake_file="$tmake_file t-sysroot-suffix"
2384
        ;;
2385
sh-*-rtems*)
2386
        tmake_file="sh/t-sh sh/t-elf t-rtems sh/t-rtems"
2387
        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"
2388
        ;;
2389
sh-wrs-vxworks)
2390
        tmake_file="$tmake_file sh/t-sh sh/t-elf sh/t-vxworks"
2391
        tm_file="${tm_file} elfos.h svr4.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
2392
        ;;
2393
sparc-*-netbsdelf*)
2394
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2395
        extra_options="${extra_options} sparc/long-double-switch.opt"
2396
        ;;
2397
sparc64-*-openbsd*)
2398
        tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h"
2399
        tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
2400
        extra_options="${extra_options} sparc/little-endian.opt"
2401
        gas=yes gnu_ld=yes
2402
        with_cpu=ultrasparc
2403
        ;;
2404
sparc-*-elf*)
2405
        tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h svr4.h sparc/sysv4.h sparc/sp-elf.h"
2406
        tmake_file="sparc/t-elf sparc/t-crtfm"
2407
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2408
        ;;
2409
sparc-*-linux*)         # SPARC's running GNU/Linux, libc6
2410
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h glibc-stdint.h"
2411
        extra_options="${extra_options} sparc/long-double-switch.opt"
2412
        tmake_file="${tmake_file} sparc/t-linux"
2413
        if test x$enable_targets = xall; then
2414
                tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
2415
                tmake_file="${tmake_file} sparc/t-linux64"
2416
        else
2417
                tm_file="${tm_file} sparc/linux.h"
2418
        fi
2419
        tmake_file="${tmake_file} sparc/t-crtfm"
2420
        ;;
2421
sparc-*-rtems*)
2422
        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"
2423
        tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
2424
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2425
        ;;
2426
sparc*-*-solaris2*)
2427
        tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h"
2428
        case ${target} in
2429
            *-*-solaris2.1[0-9]*)
2430
                tm_file="${tm_file} sol2-10.h"
2431
                use_gcc_stdint=wrap
2432
                ;;
2433
            *)
2434
                use_gcc_stdint=provide
2435
                ;;
2436
        esac
2437
        tm_file="${tm_file} sparc/sol2.h"
2438
        case ${target} in
2439
            sparc64-*-* | sparcv9-*-*)
2440
                tm_file="${tm_file} sparc/sol2-64.h"
2441
                ;;
2442
            *)
2443
                test x$with_cpu != x || with_cpu=v9
2444
                ;;
2445
        esac
2446
        tm_file="${tm_file} sparc/sol2-bi.h"
2447
        if test x$gas = xyes; then
2448
                tm_file="${tm_file} sparc/sol2-gas.h sparc/sol2-gas-bi.h"
2449
        fi
2450
        if test x$gnu_ld = xyes; then
2451
                tm_file="${tm_file} sol2-gld.h sparc/sol2-gld-bi.h"
2452
        fi
2453
        tm_file="${tm_file} tm-dwarf2.h"
2454
        tmake_file="t-sol2 sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtfm"
2455
        if test x$gnu_ld = xyes; then
2456
                tmake_file="$tmake_file t-slibgcc-elf-ver"
2457
        else
2458
                tmake_file="$tmake_file t-slibgcc-sld"
2459
        fi
2460
        if test x$gas = xyes; then
2461
                tm_file="usegas.h ${tm_file}"
2462
        fi
2463
        c_target_objs="sol2-c.o"
2464
        cxx_target_objs="sol2-c.o"
2465
        extra_objs="sol2.o"
2466
        tm_p_file="${tm_p_file} sol2-protos.h"
2467
        extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2468
        case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
2469
          "":yes:* | yes:yes:* )
2470
                thread_file=posix
2471
                ;;
2472
          "":*:yes | yes:*:yes )
2473
                thread_file=solaris
2474
                ;;
2475
        esac
2476
        ;;
2477
sparc-wrs-vxworks)
2478
        tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
2479
        tmake_file="${tmake_file} sparc/t-vxworks"
2480
        ;;
2481
sparc64-*-elf*)
2482
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
2483
        extra_options="${extra_options} sparc/little-endian.opt"
2484
        tmake_file="${tmake_file} sparc/t-crtfm"
2485
        extra_parts="crtbegin.o crtend.o"
2486
        ;;
2487
sparc64-*-freebsd*|ultrasparc-*-freebsd*)
2488
        tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
2489
        extra_options="${extra_options} sparc/long-double-switch.opt"
2490
        tmake_file="${tmake_file} sparc/t-crtfm"
2491
        case "x$with_cpu" in
2492
                xultrasparc) ;;
2493
                x) with_cpu=ultrasparc ;;
2494
                *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
2495
        esac
2496
        ;;
2497
sparc64-*-linux*)               # 64-bit SPARC's running GNU/Linux
2498
        tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h glibc-stdint.h sparc/linux64.h"
2499
        extra_options="${extra_options} sparc/long-double-switch.opt"
2500
        tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
2501
        ;;
2502
sparc64-*-netbsd*)
2503
        tm_file="sparc/biarch64.h ${tm_file}"
2504
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2505
        extra_options="${extra_options} sparc/long-double-switch.opt"
2506
        tmake_file="${tmake_file} sparc/t-netbsd64"
2507
        ;;
2508
spu-*-elf*)
2509
        tm_file="dbxelf.h elfos.h spu/spu-elf.h spu/spu.h newlib-stdint.h"
2510
        tmake_file="spu/t-spu-elf"
2511
        extra_headers="spu_intrinsics.h spu_internals.h vmx2spu.h spu_mfcio.h vec_types.h spu_cache.h"
2512
        extra_modes=spu/spu-modes.def
2513
        c_target_objs="${c_target_objs} spu-c.o"
2514
        cxx_target_objs="${cxx_target_objs} spu-c.o"
2515
        ;;
2516
v850e1-*-*)
2517
        target_cpu_default="TARGET_CPU_v850e1"
2518
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h v850/v850.h"
2519
        tm_p_file=v850/v850-protos.h
2520
        tmake_file=v850/t-v850e
2521
        md_file=v850/v850.md
2522
        out_file=v850/v850.c
2523
        extra_options="${extra_options} v850/v850.opt"
2524
        if test x$stabs = xyes
2525
        then
2526
                tm_file="${tm_file} dbx.h"
2527
        fi
2528
        use_collect2=no
2529
        c_target_objs="v850-c.o"
2530
        cxx_target_objs="v850-c.o"
2531
        use_gcc_stdint=wrap
2532
        ;;
2533
v850e-*-*)
2534
        target_cpu_default="TARGET_CPU_v850e"
2535
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h v850/v850.h"
2536
        tm_p_file=v850/v850-protos.h
2537
        tmake_file=v850/t-v850e
2538
        md_file=v850/v850.md
2539
        out_file=v850/v850.c
2540
        extra_options="${extra_options} v850/v850.opt"
2541
        if test x$stabs = xyes
2542
        then
2543
                tm_file="${tm_file} dbx.h"
2544
        fi
2545
        use_collect2=no
2546
        c_target_objs="v850-c.o"
2547
        cxx_target_objs="v850-c.o"
2548
        use_gcc_stdint=wrap
2549
        ;;
2550
v850-*-*)
2551
        target_cpu_default="TARGET_CPU_generic"
2552
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file}"
2553
        tmake_file=v850/t-v850
2554
        if test x$stabs = xyes
2555
        then
2556
                tm_file="${tm_file} dbx.h"
2557
        fi
2558
        use_collect2=no
2559
        c_target_objs="v850-c.o"
2560
        cxx_target_objs="v850-c.o"
2561
        use_gcc_stdint=wrap
2562
        ;;
2563
vax-*-linux*)
2564
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h vax/elf.h vax/linux.h"
2565
        tmake_file="${tmake_file} vax/t-linux"
2566
        ;;
2567
vax-*-netbsdelf*)
2568
        tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
2569
        ;;
2570
vax-*-netbsd*)
2571
        tm_file="${tm_file} netbsd.h netbsd-aout.h vax/netbsd.h"
2572
        tmake_file=t-netbsd
2573
        extra_parts=""
2574
        use_collect2=yes
2575
        ;;
2576
vax-*-openbsd*)
2577
        tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-pthread.h vax/openbsd.h"
2578
        use_collect2=yes
2579
        ;;
2580
xstormy16-*-elf)
2581
        # For historical reasons, the target files omit the 'x'.
2582
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h stormy16/stormy16.h"
2583
        tm_p_file=stormy16/stormy16-protos.h
2584
        md_file=stormy16/stormy16.md
2585
        out_file=stormy16/stormy16.c
2586
        extra_options=stormy16/stormy16.opt
2587
        tmake_file="stormy16/t-stormy16"
2588
        extra_parts="crtbegin.o crtend.o"
2589
        ;;
2590
xtensa*-*-elf*)
2591
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h newlib-stdint.h xtensa/elf.h"
2592
        tmake_file="xtensa/t-xtensa xtensa/t-elf"
2593
        ;;
2594
xtensa*-*-linux*)
2595
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h xtensa/linux.h"
2596
        tmake_file="${tmake_file} xtensa/t-xtensa xtensa/t-linux"
2597
        ;;
2598
am33_2.0-*-linux*)
2599
        tm_file="mn10300/mn10300.h dbxelf.h elfos.h linux.h glibc-stdint.h mn10300/linux.h"
2600
        tmake_file="${tmake_file} mn10300/t-linux"
2601
        gas=yes gnu_ld=yes
2602
        extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2603
        use_collect2=no
2604
        ;;
2605
m32c-*-rtems*)
2606
        tm_file="dbxelf.h elfos.h svr4.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
2607
        tmake_file="${tmake_file} t-rtems"
2608
        c_target_objs="m32c-pragma.o"
2609
        cxx_target_objs="m32c-pragma.o"
2610
        ;;
2611
m32c-*-elf*)
2612
        tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file}"
2613
        c_target_objs="m32c-pragma.o"
2614
        cxx_target_objs="m32c-pragma.o"
2615
        ;;
2616
*)
2617
        echo "*** Configuration ${target} not supported" 1>&2
2618
        exit 1
2619
        ;;
2620
esac
2621
 
2622
case ${target} in
2623
i[34567]86-*-linux* | x86_64-*-linux*)
2624
        tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
2625
        ;;
2626
i[34567]86-*-* | x86_64-*-*)
2627
        tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
2628
        ;;
2629
powerpc*-*-* | rs6000-*-*)
2630
        tm_file="${tm_file} rs6000/option-defaults.h"
2631
esac
2632
 
2633
# Support for --with-cpu and related options (and a few unrelated options,
2634
# too).
2635
case ${with_cpu} in
2636
  yes | no)
2637
    echo "--with-cpu must be passed a value" 1>&2
2638
    exit 1
2639
    ;;
2640
esac
2641
 
2642
# Set arch and cpu from ${target} and ${target_noncanonical}.  Set cpu
2643
# to generic if there is no processor scheduler model for the target.
2644
arch=
2645
cpu=
2646
arch_without_sse2=no
2647
arch_without_64bit=no
2648
case ${target} in
2649
  i386-*-*)
2650
    arch=i386
2651
    cpu=i386
2652
    arch_without_sse2=yes
2653
    arch_without_64bit=yes
2654
    ;;
2655
  i486-*-*)
2656
    arch=i486
2657
    cpu=i486
2658
    arch_without_sse2=yes
2659
    arch_without_64bit=yes
2660
    ;;
2661
  i586-*-*)
2662
    arch_without_sse2=yes
2663
    arch_without_64bit=yes
2664
    case ${target_noncanonical} in
2665
      k6_2-*)
2666
        arch=k6-2
2667
        cpu=k6-2
2668
        ;;
2669
      k6_3-*)
2670
        arch=k6-3
2671
        cpu=k6-3
2672
        ;;
2673
      k6-*)
2674
        arch=k6
2675
        cpu=k6
2676
        ;;
2677
      pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
2678
        arch=pentium-mmx
2679
        cpu=pentium-mmx
2680
        ;;
2681
      *)
2682
        arch=pentium
2683
        cpu=pentium
2684
        ;;
2685
    esac
2686
    ;;
2687
  i686-*-* | i786-*-*)
2688
    case ${target_noncanonical} in
2689
      amdfam10-*|barcelona-*)
2690
        arch=amdfam10
2691
        cpu=amdfam10
2692
        ;;
2693
      k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
2694
        arch=k8-sse3
2695
        cpu=k8-sse3
2696
        ;;
2697
      k8-*|opteron-*|athlon64-*|athlon_fx-*)
2698
        arch=k8
2699
        cpu=k8
2700
        ;;
2701
      athlon_xp-*|athlon_mp-*|athlon_4-*)
2702
        arch=athlon-4
2703
        cpu=athlon-4
2704
        arch_without_sse2=yes
2705
        arch_without_64bit=yes
2706
        ;;
2707
      athlon_tbird-*|athlon-*)
2708
        arch=athlon
2709
        cpu=athlon
2710
        arch_without_sse2=yes
2711
        ;;
2712
      geode-*)
2713
        arch=geode
2714
        cpu=geode
2715
        arch_without_sse2=yes
2716
        ;;
2717
      pentium2-*)
2718
        arch=pentium2
2719
        cpu=pentium2
2720
        arch_without_sse2=yes
2721
        ;;
2722
      pentium3-*|pentium3m-*)
2723
        arch=pentium3
2724
        cpu=pentium3
2725
        arch_without_sse2=yes
2726
        ;;
2727
      pentium4-*|pentium4m-*)
2728
        arch=pentium4
2729
        cpu=pentium4
2730
        ;;
2731
      prescott-*)
2732
        arch=prescott
2733
        cpu=prescott
2734
        ;;
2735
      nocona-*)
2736
        arch=nocona
2737
        cpu=nocona
2738
        ;;
2739
      atom-*)
2740
        arch=atom
2741
        cpu=atom
2742
        ;;
2743
      core2-*)
2744
        arch=core2
2745
        cpu=core2
2746
        ;;
2747
      pentium_m-*)
2748
        arch=pentium-m
2749
        cpu=pentium-m
2750
        ;;
2751
      pentiumpro-*)
2752
        arch=pentiumpro
2753
        cpu=pentiumpro
2754
        arch_without_sse2=yes
2755
        ;;
2756
      *)
2757
        arch=pentiumpro
2758
        cpu=generic
2759
        arch_without_sse2=yes
2760
        arch_without_64bit=yes
2761
        ;;
2762
    esac
2763
    ;;
2764
  x86_64-*-*)
2765
    case ${target_noncanonical} in
2766
      amdfam10-*|barcelona-*)
2767
        arch=amdfam10
2768
        cpu=amdfam10
2769
        ;;
2770
      k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
2771
        arch=k8-sse3
2772
        cpu=k8-sse3
2773
        ;;
2774
      k8-*|opteron-*|athlon_64-*)
2775
        arch=k8
2776
        cpu=k8
2777
        ;;
2778
      nocona-*)
2779
        arch=nocona
2780
        cpu=nocona
2781
        ;;
2782
      atom-*)
2783
        arch=atom
2784
        cpu=atom
2785
        ;;
2786
      core2-*)
2787
        arch=core2
2788
        cpu=core2
2789
        ;;
2790
      *)
2791
        arch=x86-64
2792
        cpu=generic
2793
        ;;
2794
    esac
2795
    ;;
2796
esac
2797
 
2798
# If there is no $with_cpu option, try to infer one from ${target}.
2799
# This block sets nothing except for with_cpu.
2800
if test x$with_cpu = x ; then
2801
  case ${target} in
2802
    i[34567]86-*-*|x86_64-*-*)
2803
      with_cpu=$cpu
2804
      ;;
2805
    alphaev6[78]*-*-*)
2806
      with_cpu=ev67
2807
      ;;
2808
    alphaev6*-*-*)
2809
      with_cpu=ev6
2810
      ;;
2811
    alphapca56*-*-*)
2812
      with_cpu=pca56
2813
      ;;
2814
    alphaev56*-*-*)
2815
      with_cpu=ev56
2816
      ;;
2817
    alphaev5*-*-*)
2818
      with_cpu=ev5
2819
      ;;
2820
    frv-*-*linux* | frv400-*-*linux*)
2821
      with_cpu=fr400
2822
      ;;
2823
    frv550-*-*linux*)
2824
      with_cpu=fr550
2825
      ;;
2826
    m68k*-*-*)
2827
      case "$with_arch" in
2828
        "cf")
2829
          with_cpu=${default_cf_cpu}
2830
          ;;
2831
        "" | "m68k")
2832
          with_cpu=m${default_m68k_cpu}
2833
          ;;
2834
      esac
2835
      ;;
2836
    mips*-*-vxworks)
2837
      with_arch=mips2
2838
      ;;
2839
    sparc*-*-*)
2840
      with_cpu="`echo ${target} | sed 's/-.*$//'`"
2841
      ;;
2842
  esac
2843
 
2844
  # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
2845
  case ${target} in
2846
    i[34567]86-*-*|x86_64-*-*)
2847
      if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
2848
        if test x$with_cpu_32 = x; then
2849
          with_cpu_32=$with_cpu
2850
        fi
2851
        if test x$with_cpu_64 = x; then
2852
          with_cpu_64=$with_cpu
2853
        fi
2854
        with_cpu=
2855
      fi
2856
      ;;
2857
  esac
2858
fi
2859
 
2860
# Support for --with-arch and related options (and a few unrelated options,
2861
# too).
2862
case ${with_arch} in
2863
  yes | no)
2864
    echo "--with-arch must be passed a value" 1>&2
2865
    exit 1
2866
    ;;
2867
esac
2868
 
2869
# If there is no $with_arch option, try to infer one from ${target}.
2870
# This block sets nothing except for with_arch.
2871
if test x$with_arch = x ; then
2872
  case ${target} in
2873
    i[34567]86-*-darwin*|x86_64-*-darwin*)
2874
      # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
2875
      # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
2876
      ;;
2877
    i[34567]86-*-*)
2878
      # --with-fpmath sets the default ISA to SSE2, which is the same
2879
      # ISA supported by Pentium 4.
2880
      if test x$with_fpmath = x || test $arch_without_sse2 = no; then
2881
        with_arch=$arch
2882
      else
2883
        with_arch=pentium4
2884
      fi
2885
      ;;
2886
    x86_64-*-*)
2887
      with_arch=$arch
2888
      ;;
2889
  esac
2890
 
2891
  # Avoid overriding --with-arch-32 and --with-arch-64 values.
2892
  case ${target} in
2893
    i[34567]86-*-darwin*|x86_64-*-darwin*)
2894
      # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
2895
      # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
2896
      ;;
2897
    i[34567]86-*-*|x86_64-*-*)
2898
      if test x$with_arch_32 != x || test x$with_arch_64 != x; then
2899
        if test x$with_arch_32 = x; then
2900
          with_arch_32=$with_arch
2901
        fi
2902
        if test x$with_arch_64 = x; then
2903
          if test $arch_without_64bit = yes; then
2904
            # Set the default 64bit arch to x86-64 if the default arch
2905
            # doesn't support 64bit.
2906
            with_arch_64=x86-64
2907
          else
2908
            with_arch_64=$with_arch
2909
          fi
2910
        fi
2911
        with_arch=
2912
      elif test $arch_without_64bit$need_64bit_isa = yesyes; then
2913
        # Set the default 64bit arch to x86-64 if the default arch
2914
        # doesn't support 64bit and we need 64bit ISA.
2915
        with_arch_32=$with_arch
2916
        with_arch_64=x86-64
2917
        with_arch=
2918
      fi
2919
      ;;
2920
  esac
2921
fi
2922
 
2923
# Support --with-fpmath.
2924
if test x$with_fpmath != x; then
2925
  case ${target} in
2926
    i[34567]86-*-* | x86_64-*-*)
2927
      case ${with_fpmath} in
2928
      sse)
2929
        tm_file="${tm_file} i386/ssemath.h"
2930
        ;;
2931
      *)
2932
        echo "Invalid --with-fpmath=$with_fpmath" 1>&2
2933
        exit 1
2934
        ;;
2935
      esac
2936
      ;;
2937
    *)
2938
      echo "--with-fpmath isn't supported for $target." 1>&2
2939
      exit 1
2940
      ;;
2941
  esac
2942
fi
2943
 
2944
# Similarly for --with-schedule.
2945
if test x$with_schedule = x; then
2946
        case ${target} in
2947
        hppa1*)
2948
                # Override default PA8000 scheduling model.
2949
                with_schedule=7100LC
2950
                ;;
2951
        esac
2952
fi
2953
 
2954
# Validate and mark as valid any --with options supported
2955
# by this target.  In order to use a particular --with option
2956
# you must list it in supported_defaults; validating the value
2957
# is optional.  This case statement should set nothing besides
2958
# supported_defaults.
2959
 
2960
supported_defaults=
2961
case "${target}" in
2962
        alpha*-*-*)
2963
                supported_defaults="cpu tune"
2964
                for which in cpu tune; do
2965
                        eval "val=\$with_$which"
2966
                        case "$val" in
2967
                        "" \
2968
                        | ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
2969
                        | pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
2970
                        | 21264a)
2971
                                ;;
2972
                        *)
2973
                                echo "Unknown CPU used in --with-$which=$val" 1>&2
2974
                                exit 1
2975
                                ;;
2976
                        esac
2977
                done
2978
                ;;
2979
 
2980
        arm*-*-*)
2981
                supported_defaults="arch cpu float tune fpu abi mode"
2982
                for which in cpu tune; do
2983
                        # See if it matches any of the entries in arm-cores.def
2984
                        eval "val=\$with_$which"
2985
                        if [ x"$val" = x ] \
2986
                            || grep "^ARM_CORE(\"$val\"," \
2987
                                    ${srcdir}/config/arm/arm-cores.def \
2988
                                    > /dev/null; then
2989
                          # Ok
2990
                          new_val=`grep "^ARM_CORE(\"$val\"," \
2991
                                ${srcdir}/config/arm/arm-cores.def | \
2992
                                sed -e 's/^[^,]*,[      ]*//' | \
2993
                                sed -e 's/,.*$//'`
2994
                          eval "target_${which}_cname=$new_val"
2995
                        echo "For $val real value is $new_val"
2996
                          true
2997
                        else
2998
                          echo "Unknown CPU used in --with-$which=$val" 1>&2
2999
                          exit 1
3000
                        fi
3001
                done
3002
 
3003
                case "$with_arch" in
3004
                "" \
3005
                | armv[23456] | armv2a | armv3m | armv4t | armv5t \
3006
                | armv5te | armv6j |armv6k | armv6z | armv6zk | armv6-m \
3007
                | armv7 | armv7-a | armv7-r | armv7-m \
3008
                | iwmmxt | ep9312)
3009
                        # OK
3010
                        ;;
3011
                *)
3012
                        echo "Unknown arch used in --with-arch=$with_arch" 1>&2
3013
                        exit 1
3014
                        ;;
3015
                esac
3016
 
3017
                case "$with_float" in
3018
                "" \
3019
                | soft | hard | softfp)
3020
                        # OK
3021
                        ;;
3022
                *)
3023
                        echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3024
                        exit 1
3025
                        ;;
3026
                esac
3027
 
3028
                case "$with_fpu" in
3029
                "" \
3030
                | fpa | fpe2 | fpe3 | maverick | vfp | vfp3 | vfpv3 \
3031
                | vfpv3-fp16 | vfpv3-d16 | vfpv3-d16-fp16 | vfpv3xd \
3032
                | vfpv3xd-fp16 | neon | neon-fp16 | vfpv4 | vfpv4-d16 \
3033
                | fpv4-sp-d16 | neon-vfpv4)
3034
                        # OK
3035
                        ;;
3036
                *)
3037
                        echo "Unknown fpu used in --with-fpu=$with_fpu" 2>&1
3038
                        exit 1
3039
                        ;;
3040
                esac
3041
 
3042
                case "$with_abi" in
3043
                "" \
3044
                | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
3045
                        #OK
3046
                        ;;
3047
                *)
3048
                        echo "Unknown ABI used in --with-abi=$with_abi"
3049
                        exit 1
3050
                        ;;
3051
                esac
3052
 
3053
                case "$with_mode" in
3054
                "" \
3055
                | arm | thumb )
3056
                        #OK
3057
                        ;;
3058
                *)
3059
                        echo "Unknown mode used in --with-mode=$with_mode"
3060
                        exit 1
3061
                        ;;
3062
                esac
3063
 
3064
                if test "x$with_arch" != x && test "x$with_cpu" != x; then
3065
                        echo "Warning: --with-arch overrides --with-cpu=$with_cpu" 1>&2
3066
                fi
3067
                ;;
3068
 
3069
        fr*-*-*linux*)
3070
                supported_defaults=cpu
3071
                case "$with_cpu" in
3072
                fr400) ;;
3073
                fr550) ;;
3074
                *)
3075
                        echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3076
                        exit 1
3077
                        ;;
3078
                esac
3079
                ;;
3080
 
3081
        fido-*-* | m68k*-*-*)
3082
                supported_defaults="arch cpu"
3083
                case "$with_arch" in
3084
                "" | "m68k"| "cf")
3085
                        m68k_arch_family="$with_arch"
3086
                        ;;
3087
                *)
3088
                        echo "Invalid --with-arch=$with_arch" 1>&2
3089
                        exit 1
3090
                        ;;
3091
                esac
3092
 
3093
                # We always have a $with_cpu setting here.
3094
                case "$with_cpu" in
3095
                "m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
3096
                        m68k_cpu_ident=$with_cpu
3097
                        ;;
3098
                "m68020-40")
3099
                        m68k_cpu_ident=m68020
3100
                        tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
3101
                        ;;
3102
                "m68020-60")
3103
                        m68k_cpu_ident=m68020
3104
                        tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
3105
                        ;;
3106
                *)
3107
                        # We need the C identifier rather than the string.
3108
                        m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
3109
                           'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
3110
                            $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
3111
                                 ${srcdir}/config/m68k/m68k-devices.def`
3112
                        if [ x"$m68k_cpu_ident" = x ] ; then
3113
                                echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
3114
                                exit 1
3115
                        fi
3116
                        with_cpu="mcpu=$with_cpu"
3117
                        ;;
3118
                esac
3119
                ;;
3120
 
3121
        hppa*-*-*)
3122
                supported_defaults="arch schedule"
3123
 
3124
                case "$with_arch" in
3125
                "" | 1.0 | 1.1 | 2.0)
3126
                        # OK
3127
                        ;;
3128
                *)
3129
                        echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
3130
                        exit 1
3131
                        ;;
3132
                esac
3133
 
3134
                case "$with_schedule" in
3135
                "" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
3136
                        # OK
3137
                        ;;
3138
                *)
3139
                        echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
3140
                        exit 1
3141
                        ;;
3142
                esac
3143
                ;;
3144
 
3145
        i[34567]86-*-* | x86_64-*-*)
3146
                supported_defaults="arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
3147
                for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
3148
                        eval "val=\$with_$which"
3149
                        case ${val} in
3150
                        i386 | i486 \
3151
                        | i586 | pentium | pentium-mmx | winchip-c6 | winchip2 \
3152
                        | c3 | c3-2 | i686 | pentiumpro | pentium2 | pentium3 \
3153
                        | pentium4 | k6 | k6-2 | k6-3 | athlon | athlon-tbird \
3154
                        | athlon-4 | athlon-xp | athlon-mp | geode \
3155
                        | prescott | pentium-m | pentium4m | pentium3m)
3156
                                case "${target}" in
3157
                                  x86_64-*-*)
3158
                                      case "x$which" in
3159
                                        *_32)
3160
                                                ;;
3161
                                        *)
3162
                                                echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
3163
                                                exit 1
3164
                                                ;;
3165
                                      esac
3166
                                      ;;
3167
                                esac
3168
                                # OK
3169
                                ;;
3170
                        "" | x86-64 | generic | native \
3171
                        | k8 | k8-sse3 | athlon64 | athlon64-sse3 | opteron \
3172
                        | opteron-sse3 | athlon-fx | amdfam10 | barcelona \
3173
                        | nocona | core2 | atom)
3174
                                # OK
3175
                                ;;
3176
                        *)
3177
                                echo "Unknown CPU given in --with-$which=$val." 1>&2
3178
                                exit 1
3179
                                ;;
3180
                        esac
3181
                done
3182
                ;;
3183
 
3184
        mips*-*-*)
3185
                supported_defaults="abi arch arch_32 arch_64 float tune tune_32 tune_64 divide llsc mips-plt synci"
3186
 
3187
                case ${with_float} in
3188
                "" | soft | hard)
3189
                        # OK
3190
                        ;;
3191
                *)
3192
                        echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3193
                        exit 1
3194
                        ;;
3195
                esac
3196
 
3197
                case ${with_abi} in
3198
                "" | 32 | o64 | n32 | 64 | eabi)
3199
                        # OK
3200
                        ;;
3201
                *)
3202
                        echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
3203
                        exit 1
3204
                        ;;
3205
                esac
3206
 
3207
                case ${with_divide} in
3208
                "" | breaks | traps)
3209
                        # OK
3210
                        ;;
3211
                *)
3212
                        echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
3213
                        exit 1
3214
                        ;;
3215
                esac
3216
 
3217
                case ${with_llsc} in
3218
                yes)
3219
                        with_llsc=llsc
3220
                        ;;
3221
                no)
3222
                        with_llsc="no-llsc"
3223
                        ;;
3224
                "")
3225
                        # OK
3226
                        ;;
3227
                *)
3228
                        echo "Unknown llsc type used in --with-llsc" 1>&2
3229
                        exit 1
3230
                        ;;
3231
                esac
3232
 
3233
                case ${with_mips_plt} in
3234
                yes)
3235
                        with_mips_plt=plt
3236
                        ;;
3237
                no)
3238
                        with_mips_plt=no-plt
3239
                        ;;
3240
                "")
3241
                        ;;
3242
                *)
3243
                        echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2
3244
                        exit 1
3245
                        ;;
3246
                esac
3247
 
3248
                case ${with_synci} in
3249
                yes)
3250
                        with_synci=synci
3251
                        ;;
3252
                "" | no)
3253
                        # No is the default.
3254
                        with_synci=no-synci
3255
                        ;;
3256
                *)
3257
                        echo "Unknown synci type used in --with-synci" 1>&2
3258
                        exit 1
3259
                        ;;
3260
                esac
3261
                ;;
3262
 
3263
        powerpc*-*-* | rs6000-*-*)
3264
                supported_defaults="cpu cpu_32 cpu_64 float tune tune_32 tune_64"
3265
 
3266
                for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
3267
                        eval "val=\$with_$which"
3268
                        case ${val} in
3269
                        default32 | default64)
3270
                                case $which in
3271
                                cpu | tune)
3272
                                        ;;
3273
                                *)
3274
                                        echo "$val only valid for --with-cpu and --with-tune." 1>&2
3275
                                        exit 1
3276
                                        ;;
3277
                                esac
3278
                                with_which="with_$which"
3279
                                eval $with_which=
3280
                                ;;
3281
                        405cr)
3282
                                tm_defines="${tm_defines} CONFIG_PPC405CR"
3283
                                eval "with_$which=405"
3284
                                ;;
3285
                        "" | common \
3286
                        | power | power[234567] | power6x | powerpc | powerpc64 \
3287
                        | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
3288
                        | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
3289
                        | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
3290
                        | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
3291
                        | a2 | e300c[23] | 854[08] | e500mc | e500mc64 \
3292
                        | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
3293
                                # OK
3294
                                ;;
3295
                        *)
3296
                                echo "Unknown cpu used in --with-$which=$val." 1>&2
3297
                                exit 1
3298
                                ;;
3299
                        esac
3300
                done
3301
                ;;
3302
 
3303
        s390*-*-*)
3304
                supported_defaults="arch mode tune"
3305
 
3306
                for which in arch tune; do
3307
                        eval "val=\$with_$which"
3308
                        case ${val} in
3309
                        "" | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10)
3310
                                # OK
3311
                                ;;
3312
                        *)
3313
                                echo "Unknown cpu used in --with-$which=$val." 1>&2
3314
                                exit 1
3315
                                ;;
3316
                        esac
3317
                done
3318
 
3319
                case ${with_mode} in
3320
                "" | esa | zarch)
3321
                        # OK
3322
                        ;;
3323
                *)
3324
                        echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
3325
                        exit 1
3326
                        ;;
3327
                esac
3328
                ;;
3329
 
3330
        sh[123456ble]-*-* | sh-*-*)
3331
                supported_defaults="cpu"
3332
                case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
3333
                "" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
3334
                        # OK
3335
                        ;;
3336
                m2a | m2a-single | m2a-single-only | m2a-nofpu)
3337
                        ;;
3338
                m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
3339
                        ;;
3340
                *)
3341
                        echo "Unknown CPU used in --with-cpu=$with_cpu, known values:"  1>&2
3342
                        echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
3343
                        echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
3344
                        echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
3345
                        exit 1
3346
                        ;;
3347
                esac
3348
                ;;
3349
        sparc*-*-*)
3350
                supported_defaults="cpu float tune"
3351
 
3352
                for which in cpu tune; do
3353
                        eval "val=\$with_$which"
3354
                        case ${val} in
3355
                        "" | sparc | sparcv9 | sparc64 | sparc86x \
3356
                        | v7 | cypress | v8 | supersparc | sparclite | f930 \
3357
                        | f934 | hypersparc | sparclite86x | sparclet | tsc701 \
3358
                        | v9 | ultrasparc | ultrasparc3 | niagara | niagara2)
3359
                                # OK
3360
                                ;;
3361
                        *)
3362
                                echo "Unknown cpu used in --with-$which=$val" 1>&2
3363
                                exit 1
3364
                                ;;
3365
                        esac
3366
                done
3367
 
3368
                case ${with_float} in
3369
                "" | soft | hard)
3370
                        # OK
3371
                        ;;
3372
                *)
3373
                        echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3374
                        exit 1
3375
                        ;;
3376
                esac
3377
                ;;
3378
 
3379
        spu-*-*)
3380
                supported_defaults="arch tune"
3381
 
3382
                for which in arch tune; do
3383
                        eval "val=\$with_$which"
3384
                        case ${val} in
3385
                        "" | cell | celledp)
3386
                                # OK
3387
                                ;;
3388
                        *)
3389
                                echo "Unknown cpu used in --with-$which=$val." 1>&2
3390
                                exit 1
3391
                                ;;
3392
                        esac
3393
                done
3394
                ;;
3395
 
3396
        v850*-*-*)
3397
                supported_defaults=cpu
3398
                case ${with_cpu} in
3399
                "" | v850e | v850e1)
3400
                        # OK
3401
                        ;;
3402
                *)
3403
                        echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3404
                        exit 1
3405
                        ;;
3406
                esac
3407
                ;;
3408
esac
3409
 
3410
# Set some miscellaneous flags for particular targets.
3411
target_cpu_default2=
3412
case ${target} in
3413
        alpha*-*-*)
3414
                if test x$gas = xyes
3415
                then
3416
                        target_cpu_default2="MASK_GAS"
3417
                fi
3418
                ;;
3419
 
3420
        arm*-*-*)
3421
                if test x$target_cpu_cname = x
3422
                then
3423
                        target_cpu_default2=TARGET_CPU_generic
3424
                else
3425
                        target_cpu_default2=TARGET_CPU_$target_cpu_cname
3426
                fi
3427
                ;;
3428
 
3429
        hppa*-*-*)
3430
                target_cpu_default2="MASK_BIG_SWITCH"
3431
                if test x$gas = xyes
3432
                then
3433
                        target_cpu_default2="${target_cpu_default2}|MASK_GAS|MASK_JUMP_IN_DELAY"
3434
                fi
3435
                ;;
3436
 
3437
        fido*-*-* | m68k*-*-*)
3438
                target_cpu_default2=$m68k_cpu_ident
3439
                if [ x"$m68k_arch_family" != x ]; then
3440
                        tmake_file="m68k/t-$m68k_arch_family $tmake_file"
3441
                fi
3442
                ;;
3443
 
3444
        i[34567]86-*-darwin* | x86_64-*-darwin*)
3445
                tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
3446
                ;;
3447
        i[34567]86-*-linux* | x86_64-*-linux* | \
3448
          i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
3449
          i[34567]86-*-gnu*)
3450
                tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp i386/t-linux"
3451
                ;;
3452
        i[34567]86-*-solaris2*)
3453
                tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
3454
                ;;
3455
        i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
3456
                tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
3457
                ;;
3458
        ia64*-*-linux*)
3459
                tmake_file="${tmake_file} ia64/t-fprules-softfp soft-fp/t-softfp"
3460
                ;;
3461
 
3462
        mips*-*-*)
3463
                if test x$gnu_ld = xyes
3464
                then
3465
                        target_cpu_default2="MASK_SPLIT_ADDRESSES"
3466
                fi
3467
                case ${target} in
3468
                        mips*el-*-*)
3469
                                tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
3470
                                ;;
3471
                esac
3472
                if test "x$enable_gofast" = xyes
3473
                then
3474
                        tm_defines="US_SOFTWARE_GOFAST $tm_defines"
3475
                        tmake_file="mips/t-gofast $tmake_file"
3476
                else
3477
                        tmake_file="mips/t-mips $tmake_file"
3478
                fi
3479
                ;;
3480
 
3481
        powerpc*-*-* | rs6000-*-*)
3482
                # FIXME: The PowerPC port uses the value set at compile time,
3483
                # although it's only cosmetic.
3484
                if test "x$with_cpu" != x
3485
                then
3486
                        target_cpu_default2="\\\"$with_cpu\\\""
3487
                fi
3488
                out_file=rs6000/rs6000.c
3489
                c_target_objs="${c_target_objs} rs6000-c.o"
3490
                cxx_target_objs="${cxx_target_objs} rs6000-c.o"
3491
                tmake_file="rs6000/t-rs6000 ${tmake_file}"
3492
 
3493
                if test x$enable_e500_double = xyes
3494
                then
3495
                        tm_file="$tm_file rs6000/e500-double.h"
3496
                fi
3497
                ;;
3498
 
3499
        sh[123456ble]*-*-* | sh-*-*)
3500
                c_target_objs="${c_target_objs} sh-c.o"
3501
                cxx_target_objs="${cxx_target_objs} sh-c.o"
3502
                ;;
3503
 
3504
        sparc*-*-*)
3505
                # Some standard aliases.
3506
                case x$with_cpu in
3507
                xsparc)
3508
                        with_cpu=v7
3509
                        ;;
3510
                xsparcv9 | xsparc64)
3511
                        with_cpu=v9
3512
                        ;;
3513
                esac
3514
 
3515
                # The SPARC port checks this value at compile-time.
3516
                target_cpu_default2="TARGET_CPU_$with_cpu"
3517
                ;;
3518
        v850*-*-*)
3519
                # FIXME: The v850 is "special" in that it does not support
3520
                # runtime CPU selection, only --with-cpu.
3521
                case "x$with_cpu" in
3522
                x)
3523
                        ;;
3524
                xv850e)
3525
                        target_cpu_default2="TARGET_CPU_$with_cpu"
3526
                        ;;
3527
                esac
3528
                ;;
3529
esac
3530
 
3531
t=
3532
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"
3533
for option in $all_defaults
3534
do
3535
        eval "val=\$with_"`echo $option | sed s/-/_/g`
3536
        if test -n "$val"; then
3537
                case " $supported_defaults " in
3538
                *" $option "*)
3539
                        ;;
3540
                *)
3541
                        echo "This target does not support --with-$option." 2>&1
3542
                        echo "Valid --with options are: $supported_defaults" 2>&1
3543
                        exit 1
3544
                        ;;
3545
                esac
3546
 
3547
                if test "x$t" = x
3548
                then
3549
                        t="{ \"$option\", \"$val\" }"
3550
                else
3551
                        t="${t}, { \"$option\", \"$val\" }"
3552
                fi
3553
        fi
3554
done
3555
 
3556
if test "x$t" = x
3557
then
3558
        configure_default_options="{ { NULL, NULL} }"
3559
else
3560
        configure_default_options="{ ${t} }"
3561
fi
3562
 
3563
if test "$target_cpu_default2" != ""
3564
then
3565
        if test "$target_cpu_default" != ""
3566
        then
3567
                target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3568
        else
3569
                target_cpu_default=$target_cpu_default2
3570
        fi
3571
fi

powered by: WebSVN 2.1.0

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