]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure.in
* configure.in: Don't turn on collect2 unconditionally.
[thirdparty/gcc.git] / gcc / configure.in
CommitLineData
46f18e7b
RK
1# configure.in for GNU CC
2# Process this file with autoconf to generate a configuration script.
3
db0d1ed9 4# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
46f18e7b
RK
5
6#This file is part of GNU CC.
7
8#GNU CC is free software; you can redistribute it and/or modify
9#it under the terms of the GNU General Public License as published by
10#the Free Software Foundation; either version 2, or (at your option)
11#any later version.
12
13#GNU CC is distributed in the hope that it will be useful,
14#but WITHOUT ANY WARRANTY; without even the implied warranty of
15#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16#GNU General Public License for more details.
17
18#You should have received a copy of the GNU General Public License
19#along with GNU CC; see the file COPYING. If not, write to
20#the Free Software Foundation, 59 Temple Place - Suite 330,
21#Boston, MA 02111-1307, USA.
22
23# Initialization and defaults
24AC_INIT(tree.c)
b7cb92ad 25AC_CONFIG_HEADER(auto-host.h:config.in)
cdcc6a01 26
46f18e7b
RK
27remove=rm
28hard_link=ln
29symbolic_link='ln -s'
30copy=cp
31
32# Check for additional parameters
33
34# With GNU ld
35AC_ARG_WITH(gnu-ld,
36[ --with-gnu-ld arrange to work with GNU ld.],
df6faf79
JW
37gnu_ld_flag="$with_gnu_ld",
38gnu_ld_flag=no)
46f18e7b
RK
39
40# With GNU as
41AC_ARG_WITH(gnu-as,
4d8392b7 42[ --with-gnu-as arrange to work with GNU as.],
df6faf79
JW
43gas_flag="$with_gnu_as",
44gas_flag=no)
46f18e7b
RK
45
46# With stabs
47AC_ARG_WITH(stabs,
48[ --with-stabs arrange to use stabs instead of host debug format.],
535b86ce 49stabs="$with_stabs",
46f18e7b
RK
50stabs=no)
51
52# With ELF
53AC_ARG_WITH(elf,
54[ --with-elf arrange to use ELF instead of host debug format.],
535b86ce 55elf="$with_elf",
46f18e7b
RK
56elf=no)
57
4d8392b7
RK
58# Specify the local prefix
59AC_ARG_WITH(local-prefix,
60[ --with-local-prefix=DIR specifies directory to put local include.],
61local_prefix=$with_local_prefix,
62local_prefix=/usr/local)
63
64# Default local prefix if it is empty
65if [[ x$local_prefix = x ]]; then
66 local_prefix=/usr/local
67fi
68
9514f0d1
RK
69# Specify the g++ header file directory
70AC_ARG_WITH(gxx-include-dir,
71[ --with-gxx-include-dir=DIR
72 specifies directory to put g++ header files.],
73gxx_include_dir=$with_gxx_include_dir,
74gxx_include_dir='${prefix}/include/g++')
75
76# Default g++ header file directory if it is empty
77if [[ x$gxx_include_dir = x ]]; then
78 gxx_include_dir='${prefix}/include/g++'
79fi
46f18e7b 80
a494747c
MM
81# Enable expensive internal checks
82AC_ARG_ENABLE(checking,
83[ --enable-checking enable expensive run-time checks.],
84AC_DEFINE(ENABLE_CHECKING)
85)
86
b4294351 87# Enable use of cpplib for C.
e061d1ce 88cpp_main=cccp
b4294351
PB
89AC_ARG_ENABLE(c-cpplib,
90[ --enable-c-cpplib Use cpplib for C.],
91if [[[ x$enable_c_cpplib != xno ]]]; then
92 extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
c8724862
DB
93 extra_c_objs="${extra_c_objs} prefix.o"
94 extra_cxx_objs="${extra_cxx_objs} ../cpplib.o ../cppexp.o ../cpphash.o ../cpperror.o ../prefix.o"
b4294351 95 extra_c_flags=-DUSE_CPPLIB=1
e061d1ce 96 cpp_main=cppmain
b4294351 97fi)
9101297d
DL
98
99# Enable Haifa scheduler.
100AC_ARG_ENABLE(haifa,
101[ --enable-haifa Use the experimental scheduler.
102 --disable-haifa Don't use the experimental scheduler for the
103 targets which normally enable it.])
4b104d6e
JL
104# Fast fixincludes
105#
106# This is a work in progress...
34a4c466 107AC_ARG_WITH(fast-fixincludes,
4b104d6e
JL
108[ --with-fast-fixincludes Use a faster fixinclude program. Experimental],
109fast_fixinc="$with_fast_fixincludes",
110fast_fixinc=no)
b4294351 111
0bbb1697
RK
112# Enable threads
113# Pass with no value to take the default
114# Pass with a value to specify a thread package
115AC_ARG_ENABLE(threads,
116[ --enable-threads enable thread usage for target GCC.
117 --enable-threads=LIB use LIB thread package for target GCC.],
118if [[[ x$enable_threads = xno ]]]; then
119 enable_threads=''
120fi,
121enable_threads='')
122
e445171e 123enable_threads_flag=$enable_threads
0bbb1697 124# Check if a valid thread package
e445171e 125case x${enable_threads_flag} in
0bbb1697
RK
126 x | xno)
127 # No threads
a851212a 128 target_thread_file='single'
0bbb1697
RK
129 ;;
130 xyes)
131 # default
a851212a 132 target_thread_file=''
0bbb1697
RK
133 ;;
134 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
7cc34889 135 xsolaris | xwin32 | xdce | xvxworks)
e445171e 136 target_thread_file=$enable_threads_flag
0bbb1697
RK
137 ;;
138 *)
139 echo "$enable_threads is an unknown thread package" 1>&2
140 exit 1
141 ;;
142esac
143
46f18e7b
RK
144# Determine the host, build, and target systems
145AC_CANONICAL_SYSTEM
146
e9a25f70
JL
147# Find the native compiler
148AC_PROG_CC
149AC_PROG_MAKE_SET
150
46f18e7b
RK
151# Find some useful tools
152AC_PROG_AWK
153AC_PROG_LEX
ac64120e
JW
154GCC_PROG_LN
155GCC_PROG_LN_S
e9b4fabf 156GCC_C_VOLATILE
46f18e7b
RK
157AC_PROG_RANLIB
158AC_PROG_YACC
76143254 159EGCS_PROG_INSTALL
46f18e7b 160
956d6950
JL
161AC_HEADER_STDC
162AC_HEADER_TIME
76b4b31e 163AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h wait.h sys/wait.h)
7636d567 164
f24af81b
TT
165# Check for thread headers.
166AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
167AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
168
76844337
RH
169# See if the system preprocessor understands the ANSI C preprocessor
170# stringification operator.
171AC_MSG_CHECKING(whether cpp understands the stringify operator)
172AC_CACHE_VAL(gcc_cv_c_have_stringify,
173[AC_TRY_COMPILE(,
174[#define S(x) #x
175char *test = S(foo);],
176gcc_cv_c_have_stringify=yes, gcc_cv_c_have_stringify=no)])
177AC_MSG_RESULT($gcc_cv_c_have_stringify)
178if test $gcc_cv_c_have_stringify = yes; then
179 AC_DEFINE(HAVE_CPP_STRINGIFY)
180fi
181
7636d567
JW
182# Use <inttypes.h> only if it exists,
183# doesn't clash with <sys/types.h>, and declares intmax_t.
184AC_MSG_CHECKING(for inttypes.h)
185AC_CACHE_VAL(gcc_cv_header_inttypes_h,
186[AC_TRY_COMPILE(
187 [#include <sys/types.h>
188#include <inttypes.h>],
189 [intmax_t i = -1;],
190 [AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H)
191 gcc_cv_header_inttypes_h=yes],
192 gcc_cv_header_inttypes_h=no)])
193AC_MSG_RESULT($gcc_cv_header_inttypes_h)
cdcc6a01 194
76b4b31e 195AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
8f81384f
KG
196 index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
197 sysconf isascii)
a81fb89e 198
76b4b31e 199GCC_FUNC_VFPRINTF_DOPRNT
f1b54f9b
KG
200GCC_FUNC_PRINTF_PTR
201
a81fb89e 202GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
8f81384f 203 index rindex getenv atol sbrk abort atof)
cdcc6a01 204
e3512ac2
JL
205AC_DECL_SYS_SIGLIST
206
46f18e7b
RK
207# File extensions
208manext='.1'
209objext='.o'
46f18e7b
RK
210AC_SUBST(manext)
211AC_SUBST(objext)
46f18e7b
RK
212
213build_xm_file=
61536478 214build_xm_defines=
46f18e7b
RK
215build_install_headers_dir=install-headers-tar
216build_exeext=
217host_xm_file=
61536478 218host_xm_defines=
46f18e7b
RK
219host_xmake_file=
220host_truncate_target=
6e26218f 221host_exeext=
46f18e7b
RK
222
223# Decode the host machine, then the target machine.
224# For the host machine, we save the xm_file variable as host_xm_file;
225# then we decode the target machine and forget everything else
226# that came from the host machine.
227for machine in $build $host $target; do
228
229 out_file=
230 xmake_file=
231 tmake_file=
232 extra_headers=
233 extra_passes=
234 extra_parts=
235 extra_programs=
236 extra_objs=
237 extra_host_objs=
238 extra_gcc_objs=
61536478 239 xm_defines=
46f18e7b
RK
240 float_format=
241 # Set this to force installation and use of collect2.
242 use_collect2=
243 # Set this to override the default target model.
244 target_cpu_default=
46f18e7b 245 # Set this to control which fixincludes program to use.
34a4c466 246 if [[ x$fast_fixinc != xyes ]] ; then
4b104d6e
JL
247 fixincludes=fixincludes
248 else fixincludes=fixinc.sh ; fi
46f18e7b
RK
249 # Set this to control how the header file directory is installed.
250 install_headers_dir=install-headers-tar
251 # Set this to a non-empty list of args to pass to cpp if the target
252 # wants its .md file passed through cpp.
253 md_cppflags=
254 # Set this if directory names should be truncated to 14 characters.
255 truncate_target=
256 # Set this if gdb needs a dir command with `dirname $out_file`
257 gdb_needs_out_file_path=
46f18e7b
RK
258 # Set this if the build machine requires executables to have a
259 # file name suffix.
260 exeext=
a851212a
JW
261 # Set this to control which thread package will be used.
262 thread_file=
df6faf79
JW
263 # Reinitialize these from the flag values every loop pass, since some
264 # configure entries modify them.
265 gas="$gas_flag"
266 gnu_ld="$gnu_ld_flag"
e445171e 267 enable_threads=$enable_threads_flag
46f18e7b
RK
268
269 # Set default cpu_type, tm_file and xm_file so it can be updated in
270 # each machine entry.
271 cpu_type=`echo $machine | sed 's/-.*$//'`
272 case $machine in
08fc0184
RK
273 alpha*-*-*)
274 cpu_type=alpha
275 ;;
46f18e7b
RK
276 arm*-*-*)
277 cpu_type=arm
278 ;;
279 c*-convex-*)
280 cpu_type=convex
281 ;;
61536478 282 i[[34567]]86-*-*)
46f18e7b
RK
283 cpu_type=i386
284 ;;
285 hppa*-*-*)
286 cpu_type=pa
287 ;;
288 m68000-*-*)
289 cpu_type=m68k
290 ;;
291 mips*-*-*)
292 cpu_type=mips
293 ;;
294 powerpc*-*-*)
295 cpu_type=rs6000
296 ;;
297 pyramid-*-*)
298 cpu_type=pyr
299 ;;
300 sparc*-*-*)
301 cpu_type=sparc
302 ;;
303 esac
304
305 tm_file=${cpu_type}/${cpu_type}.h
306 xm_file=${cpu_type}/xm-${cpu_type}.h
307
61536478
JL
308 # Set the default macros to define for GNU/Linux systems.
309 case $machine in
310 *-*-linux-gnu*)
c7391272 311 xm_defines="HAVE_ATEXIT POSIX BSTRING"
61536478
JL
312 ;;
313 esac
314
46f18e7b
RK
315 case $machine in
316 # Support site-specific machine types.
317 *local*)
318 cpu_type=`echo $machine | sed -e 's/-.*//'`
319 rest=`echo $machine | sed -e "s/$cpu_type-//"`
320 xm_file=${cpu_type}/xm-$rest.h
321 tm_file=${cpu_type}/$rest.h
322 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
323 then xmake_file=${cpu_type}/x-$rest; \
324 else true; \
325 fi
326 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
327 then tmake_file=${cpu_type}/t-$rest; \
328 else true; \
329 fi
330 ;;
331 1750a-*-*)
332 ;;
333 a29k-*-bsd* | a29k-*-sym1*)
334 tm_file="${tm_file} a29k/unix.h"
61536478 335 xm_defines=USG
46f18e7b
RK
336 xmake_file=a29k/x-unix
337 use_collect2=yes
338 ;;
339 a29k-*-udi | a29k-*-coff)
340 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
341 tmake_file=a29k/t-a29kbare
342 ;;
7cc34889 343 a29k-wrs-vxworks*)
46f18e7b
RK
344 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
345 tmake_file=a29k/t-vx29k
346 extra_parts="crtbegin.o crtend.o"
7cc34889 347 thread_file='vxworks'
46f18e7b
RK
348 ;;
349 a29k-*-*) # Default a29k environment.
350 use_collect2=yes
351 ;;
08fc0184 352 alpha*-*-linux-gnuecoff*)
8983c716 353 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
61536478 354 target_cpu_default="MASK_GAS"
e71c3bb0 355 gas=no
46f18e7b 356 xmake_file=none
46f18e7b
RK
357 gas=yes gnu_ld=yes
358 ;;
704a6306 359 alpha*-*-linux-gnulibc1*)
9d654bba 360 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
61536478 361 target_cpu_default="MASK_GAS"
574badbc
RH
362 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
363 extra_parts="crtbegin.o crtend.o"
9d654bba 364 fixincludes=fixinc.wrap
704a6306 365 xmake_file=none
704a6306
RH
366 gas=yes gnu_ld=yes
367 if [[ x$enable_threads = xyes ]]; then
368 thread_file='posix'
369 fi
370 ;;
08fc0184 371 alpha*-*-linux-gnu*)
9d654bba 372 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
61536478 373 target_cpu_default="MASK_GAS"
574badbc
RH
374 tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
375 extra_parts="crtbegin.o crtend.o"
46f18e7b
RK
376 xmake_file=none
377 fixincludes=Makefile.in
46f18e7b 378 gas=yes gnu_ld=yes
d1054723 379 if [[ x$enable_threads = xyes ]]; then
c811d261
RK
380 thread_file='posix'
381 fi
46f18e7b 382 ;;
9d654bba
RH
383 alpha*-*-netbsd*)
384 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsdl-elf.h"
385 target_cpu_default="MASK_GAS"
386 tmake_file="alpha/t-crtbe"
387 extra_parts="crtbegin.o crtend.o"
388 xmake_file=none
389 fixincludes=fixinc.wrap
390 gas=yes gnu_ld=yes
391 ;;
392
e9a25f70 393 alpha*-dec-osf*)
dec3e070
JW
394 if [[ x$stabs = xyes ]]
395 then
396 tm_file="${tm_file} dbx.h"
397 fi
398 if [[ x$gas != xyes ]]
399 then
400 extra_passes="mips-tfile mips-tdump"
401 fi
dec3e070 402 use_collect2=yes
dec3e070 403 case $machine in
6ecd4e53 404 *-*-osf1*)
b0435cf4 405 tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
e9a25f70
JL
406 ;;
407 *-*-osf[[23]]*)
b0435cf4 408 tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
e9a25f70
JL
409 ;;
410 *-*-osf4*)
b0435cf4 411 tm_file="${tm_file} alpha/osf.h"
e9a25f70
JL
412 # Some versions of OSF4 (specifically X4.0-9 296.7) have
413 # a broken tar, so we use cpio instead.
dec3e070
JW
414 install_headers_dir=install-headers-cpio
415 ;;
416 esac
e9a25f70
JL
417 case $machine in
418 *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
419 target_cpu_default=MASK_SUPPORT_ARCH
420 ;;
421 esac
46f18e7b 422 ;;
b0435cf4 423 alpha*-*-winnt*)
46f18e7b 424 tm_file="${tm_file} alpha/win-nt.h"
46f18e7b
RK
425 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
426 tmake_file=t-libc-ok
427 xmake_file=winnt/x-winnt
428 extra_host_objs=oldnames.o
429 extra_gcc_objs="spawnv.o oldnames.o"
430 fixincludes=fixinc.winnt
431 if [[ x$gnu_ld != xyes ]]
432 then
433 extra_programs=ld.exe
434 fi
434332b5 435 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
436 thread_file='win32'
437 fi
46f18e7b 438 ;;
08fc0184 439 alpha*-dec-vms*)
46f18e7b
RK
440 tm_file=alpha/vms.h
441 xm_file="${xm_file} alpha/xm-vms.h"
442 tmake_file=alpha/t-vms
443 fixincludes=Makefile.in
444 ;;
66ed0683
JL
445 arc-*-elf*)
446 extra_parts="crtinit.o crtfini.o"
447 ;;
46f18e7b
RK
448 arm-*-coff* | armel-*-coff*)
449 tm_file=arm/coff.h
450 tmake_file=arm/t-bare
451 ;;
452 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
453 tm_file=arm/riscix1-1.h
454 use_collect2=yes
455 ;;
456 arm-*-riscix*) # Acorn RISC machine
457 if [[ x$gas = xyes ]]
458 then
459 tm_file=arm/rix-gas.h
460 else
461 tm_file=arm/riscix.h
462 fi
463 xmake_file=arm/x-riscix
464 tmake_file=arm/t-riscix
465 use_collect2=yes
466 ;;
467 arm-semi-aout | armel-semi-aout)
468 tm_file=arm/semi.h
469 tmake_file=arm/t-semi
470 fixincludes=Makefile.in # There is nothing to fix
471 ;;
472 arm-semi-aof | armel-semi-aof)
473 tm_file=arm/semiaof.h
474 tmake_file=arm/t-semiaof
475 fixincludes=Makefile.in # There is nothing to fix
476 ;;
d23f4158
RE
477 arm-*-netbsd*)
478 tm_file=arm/netbsd.h
61536478 479 xm_file="xm-siglist.h ${xm_file}"
e9a25f70 480 tmake_file="t-netbsd arm/t-netbsd"
be1ed94f 481 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 482 fixincludes=fixinc.wrap
d23f4158 483 ;;
956d6950 484 arm-*-linux-gnuaout*) # ARM GNU/Linux
618d2e70 485 cpu_type=arm
618d2e70
RK
486 xmake_file=x-linux
487 tm_file=arm/linux-gas.h
488 tmake_file=arm/t-linux
489 fixincludes=Makefile.in
618d2e70
RK
490 gnu_ld=yes
491 ;;
f5967c59
RE
492 arm-*-aout)
493 tm_file=arm/aout.h
e9a25f70 494 tmake_file=arm/t-bare
46f18e7b
RK
495 ;;
496 c1-convex-*) # Convex C1
497 target_cpu_default=1
498 use_collect2=yes
499 fixincludes=Makefile.in
500 ;;
501 c2-convex-*) # Convex C2
502 target_cpu_default=2
503 use_collect2=yes
504 fixincludes=Makefile.in
505 ;;
506 c32-convex-*)
507 target_cpu_default=4
508 use_collect2=yes
509 fixincludes=Makefile.in
510 ;;
511 c34-convex-*)
512 target_cpu_default=8
513 use_collect2=yes
514 fixincludes=Makefile.in
515 ;;
516 c38-convex-*)
517 target_cpu_default=16
518 use_collect2=yes
519 fixincludes=Makefile.in
520 ;;
521 clipper-intergraph-clix*)
522 tm_file="${tm_file} svr3.h clipper/clix.h"
523 xm_file=clipper/xm-clix.h
524 xmake_file=clipper/x-clix
525 extra_headers=va-clipper.h
526 extra_parts="crtbegin.o crtend.o"
527 install_headers_dir=install-headers-cpio
46f18e7b
RK
528 ;;
529 dsp16xx-*)
530 ;;
531 elxsi-elxsi-*)
532 use_collect2=yes
533 ;;
534# This hasn't been upgraded to GCC 2.
535# fx80-alliant-*) # Alliant FX/80
536# ;;
537 h8300-*-*)
538 float_format=i32
539 ;;
540 hppa1.1-*-pro*)
541 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
542 xm_file=pa/xm-papro.h
543 tmake_file=pa/t-pro
544 ;;
545 hppa1.1-*-osf*)
546 target_cpu_default=1
547 tm_file="${tm_file} pa/pa-osf.h"
548 use_collect2=yes
549 fixincludes=Makefile.in
550 ;;
dec3e070
JW
551 hppa1.1-*-rtems*)
552 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
553 xm_file=pa/xm-papro.h
554 tmake_file=pa/t-pro
555 ;;
46f18e7b
RK
556 hppa1.0-*-osf*)
557 tm_file="${tm_file} pa/pa-osf.h"
558 use_collect2=yes
559 fixincludes=Makefile.in
560 ;;
561 hppa1.1-*-bsd*)
562 target_cpu_default=1
563 use_collect2=yes
564 fixincludes=Makefile.in
565 ;;
566 hppa1.0-*-bsd*)
567 use_collect2=yes
568 fixincludes=Makefile.in
569 ;;
570 hppa1.0-*-hpux7*)
571 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
572 xm_file=pa/xm-pahpux.h
573 xmake_file=pa/x-pa-hpux
574 if [[ x$gas = xyes ]]
575 then
576 tm_file="${tm_file} pa/gas.h"
577 fi
46f18e7b
RK
578 install_headers_dir=install-headers-cpio
579 use_collect2=yes
580 ;;
581 hppa1.0-*-hpux8.0[[0-2]]*)
582 tm_file="${tm_file} pa/pa-hpux.h"
583 xm_file=pa/xm-pahpux.h
584 xmake_file=pa/x-pa-hpux
585 if [[ x$gas = xyes ]]
586 then
587 tm_file="${tm_file} pa/pa-gas.h"
588 else
589 tm_file="pa/pa-oldas.h ${tm_file}"
590 fi
46f18e7b
RK
591 install_headers_dir=install-headers-cpio
592 use_collect2=yes
593 ;;
594 hppa1.1-*-hpux8.0[[0-2]]*)
595 target_cpu_default=1
596 tm_file="${tm_file} pa/pa-hpux.h"
597 xm_file=pa/xm-pahpux.h
598 xmake_file=pa/x-pa-hpux
599 if [[ x$gas = xyes ]]
600 then
601 tm_file="${tm_file} pa/pa-gas.h"
602 else
603 tm_file="pa/pa-oldas.h ${tm_file}"
604 fi
46f18e7b
RK
605 install_headers_dir=install-headers-cpio
606 use_collect2=yes
607 ;;
608 hppa1.1-*-hpux8*)
609 target_cpu_default=1
610 tm_file="${tm_file} pa/pa-hpux.h"
611 xm_file=pa/xm-pahpux.h
612 xmake_file=pa/x-pa-hpux
613 if [[ x$gas = xyes ]]
614 then
615 tm_file="${tm_file} pa/pa-gas.h"
616 fi
46f18e7b
RK
617 install_headers_dir=install-headers-cpio
618 use_collect2=yes
619 ;;
620 hppa1.0-*-hpux8*)
621 tm_file="${tm_file} pa/pa-hpux.h"
622 xm_file=pa/xm-pahpux.h
623 xmake_file=pa/x-pa-hpux
624 if [[ x$gas = xyes ]]
625 then
626 tm_file="${tm_file} pa/pa-gas.h"
627 fi
46f18e7b
RK
628 install_headers_dir=install-headers-cpio
629 use_collect2=yes
630 ;;
631 hppa1.1-*-hpux10*)
632 target_cpu_default=1
633 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
634 xm_file=pa/xm-pahpux.h
635 xmake_file=pa/x-pa-hpux
f24af81b 636 tmake_file=pa/t-pa
46f18e7b
RK
637 if [[ x$gas = xyes ]]
638 then
639 tm_file="${tm_file} pa/pa-gas.h"
640 fi
f24af81b
TT
641 if [[ x$enable_threads = x ]]; then
642 enable_threads=$have_pthread_h
643 fi
644 if [[ x$enable_threads = xyes ]]; then
645 thread_file='dce'
646 tmake_file="${tmake_file} pa/t-dce-thr"
647 fi
46f18e7b
RK
648 install_headers_dir=install-headers-cpio
649 use_collect2=yes
650 ;;
651 hppa1.0-*-hpux10*)
652 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
653 xm_file=pa/xm-pahpux.h
654 xmake_file=pa/x-pa-hpux
655 if [[ x$gas = xyes ]]
656 then
657 tm_file="${tm_file} pa/pa-gas.h"
658 fi
d005a5a4
JL
659 if [[ x$enable_threads = x ]]; then
660 enable_threads=$have_pthread_h
661 fi
662 if [[ x$enable_threads = xyes ]]; then
663 thread_file='dce'
664 tmake_file="${tmake_file} pa/t-dce-thr"
665 fi
46f18e7b
RK
666 install_headers_dir=install-headers-cpio
667 use_collect2=yes
668 ;;
669 hppa1.1-*-hpux*)
670 target_cpu_default=1
671 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
672 xm_file=pa/xm-pahpux.h
673 xmake_file=pa/x-pa-hpux
674 if [[ x$gas = xyes ]]
675 then
676 tm_file="${tm_file} pa/pa-gas.h"
677 fi
46f18e7b
RK
678 install_headers_dir=install-headers-cpio
679 use_collect2=yes
680 ;;
681 hppa1.0-*-hpux*)
682 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
683 xm_file=pa/xm-pahpux.h
684 xmake_file=pa/x-pa-hpux
685 if [[ x$gas = xyes ]]
686 then
687 tm_file="${tm_file} pa/pa-gas.h"
688 fi
46f18e7b
RK
689 install_headers_dir=install-headers-cpio
690 use_collect2=yes
691 ;;
692 hppa1.1-*-hiux*)
693 target_cpu_default=1
694 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
695 xm_file=pa/xm-pahpux.h
696 xmake_file=pa/x-pa-hpux
697 if [[ x$gas = xyes ]]
698 then
699 tm_file="${tm_file} pa/pa-gas.h"
700 fi
46f18e7b
RK
701 install_headers_dir=install-headers-cpio
702 use_collect2=yes
703 ;;
704 hppa1.0-*-hiux*)
705 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
706 xm_file=pa/xm-pahpux.h
707 xmake_file=pa/x-pa-hpux
708 if [[ x$gas = xyes ]]
709 then
710 tm_file="${tm_file} pa/pa-gas.h"
711 fi
46f18e7b
RK
712 install_headers_dir=install-headers-cpio
713 use_collect2=yes
714 ;;
715 hppa*-*-lites*)
716 target_cpu_default=1
717 use_collect2=yes
718 fixincludes=Makefile.in
719 ;;
720 i370-*-mvs*)
721 ;;
61536478 722 i[[34567]]86-ibm-aix*) # IBM PS/2 running AIX
46f18e7b
RK
723 if [[ x$gas = xyes ]]
724 then
725 tm_file=i386/aix386.h
726 extra_parts="crtbegin.o crtend.o"
727 tmake_file=i386/t-crtstuff
728 else
729 tm_file=i386/aix386ng.h
730 use_collect2=yes
731 fi
61536478
JL
732 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
733 xm_defines=USG
46f18e7b 734 xmake_file=i386/x-aix
46f18e7b 735 ;;
61536478
JL
736 i[[34567]]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
737 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
738 xm_defines="USG POSIX SMALL_ARG_MAX"
46f18e7b
RK
739 xmake_file=i386/x-ncr3000
740 if [[ x$stabs = xyes -a x$gas = xyes ]]
741 then
742 tm_file=i386/sysv4gdb.h
743 else
744 tm_file=i386/sysv4.h
745 fi
746 extra_parts="crtbegin.o crtend.o"
747 tmake_file=i386/t-crtpic
748 ;;
61536478 749 i[[34567]]86-next-*)
46f18e7b
RK
750 tm_file=i386/next.h
751 xm_file=i386/xm-next.h
752 tmake_file=i386/t-next
753 xmake_file=i386/x-next
754 extra_objs=nextstep.o
434332b5 755 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
756 thread_file='mach'
757 fi
46f18e7b 758 ;;
61536478 759 i[[34567]]86-sequent-bsd*) # 80386 from Sequent
46f18e7b
RK
760 use_collect2=yes
761 if [[ x$gas = xyes ]]
762 then
763 tm_file=i386/seq-gas.h
764 else
765 tm_file=i386/sequent.h
766 fi
767 ;;
61536478
JL
768 i[[34567]]86-sequent-ptx1*)
769 xm_defines="USG SVR3"
46f18e7b
RK
770 xmake_file=i386/x-sysv3
771 tm_file=i386/seq-sysv3.h
772 tmake_file=i386/t-crtstuff
773 fixincludes=fixinc.ptx
774 extra_parts="crtbegin.o crtend.o"
775 install_headers_dir=install-headers-cpio
46f18e7b 776 ;;
61536478
JL
777 i[[34567]]86-sequent-ptx2* | i[[34567]]86-sequent-sysv3*)
778 xm_defines="USG SVR3"
46f18e7b
RK
779 xmake_file=i386/x-sysv3
780 tm_file=i386/seq2-sysv3.h
781 tmake_file=i386/t-crtstuff
782 extra_parts="crtbegin.o crtend.o"
783 fixincludes=fixinc.ptx
784 install_headers_dir=install-headers-cpio
46f18e7b 785 ;;
61536478
JL
786 i[[34567]]86-sequent-ptx4* | i[[34567]]86-sequent-sysv4*)
787 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
788 xm_defines="USG POSIX SMALL_ARG_MAX"
46f18e7b
RK
789 xmake_file=x-svr4
790 tm_file=i386/ptx4-i.h
791 tmake_file=t-svr4
792 extra_parts="crtbegin.o crtend.o"
793 fixincludes=fixinc.ptx
794 install_headers_dir=install-headers-cpio
46f18e7b
RK
795 ;;
796 i386-sun-sunos*) # Sun i386 roadrunner
61536478 797 xm_defines=USG
46f18e7b
RK
798 tm_file=i386/sun.h
799 use_collect2=yes
800 ;;
62db76ee 801 i[[34567]]86-wrs-vxworks*)
9e89df50
MS
802 tm_file=i386/vxi386.h
803 tmake_file=i386/t-i386bare
804 ;;
61536478 805 i[[34567]]86-*-aout*)
46f18e7b
RK
806 tm_file=i386/i386-aout.h
807 tmake_file=i386/t-i386bare
808 ;;
61536478 809 i[[34567]]86-*-bsdi* | i[[34567]]86-*-bsd386*)
46f18e7b 810 tm_file=i386/bsd386.h
46f18e7b
RK
811# tmake_file=t-libc-ok
812 ;;
61536478 813 i[[34567]]86-*-bsd*)
46f18e7b 814 tm_file=i386/386bsd.h
46f18e7b
RK
815# tmake_file=t-libc-ok
816# Next line turned off because both 386BSD and BSD/386 use GNU ld.
817# use_collect2=yes
818 ;;
61536478 819 i[[34567]]86-*-freebsdelf*)
46f18e7b 820 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
be1ed94f 821 # On FreeBSD, the headers are already ok, except for math.h.
32f65aa0 822 fixincludes=fixinc.wrap
46f18e7b
RK
823 tmake_file=i386/t-freebsd
824 gas=yes
825 gnu_ld=yes
826 stabs=yes
827 ;;
61536478 828 i[[34567]]86-*-freebsd*)
46f18e7b 829 tm_file=i386/freebsd.h
be1ed94f 830 # On FreeBSD, the headers are already ok, except for math.h.
32f65aa0 831 fixincludes=fixinc.wrap
46f18e7b
RK
832 tmake_file=i386/t-freebsd
833 ;;
61536478 834 i[[34567]]86-*-netbsd*)
46f18e7b 835 tm_file=i386/netbsd.h
be1ed94f 836 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 837 fixincludes=fixinc.wrap
e47f44f4 838 tmake_file=t-netbsd
46f18e7b 839 ;;
61536478 840 i[[34567]]86-*-coff*)
46f18e7b
RK
841 tm_file=i386/i386-coff.h
842 tmake_file=i386/t-i386bare
843 ;;
61536478
JL
844 i[[34567]]86-*-isc*) # 80386 running ISC system
845 xm_file="${xm_file} i386/xm-isc.h"
846 xm_defines="USG SVR3"
46f18e7b 847 case $machine in
61536478 848 i[[34567]]86-*-isc[[34]]*)
46f18e7b
RK
849 xmake_file=i386/x-isc3
850 ;;
851 *)
852 xmake_file=i386/x-isc
853 ;;
854 esac
855 if [[ x$gas = xyes -a x$stabs = xyes ]]
856 then
857 tm_file=i386/iscdbx.h
858 tmake_file=i386/t-svr3dbx
859 extra_parts="svr3.ifile svr3z.ifile"
860 else
861 tm_file=i386/isccoff.h
862 tmake_file=i386/t-crtstuff
863 extra_parts="crtbegin.o crtend.o"
864 fi
865 install_headers_dir=install-headers-cpio
46f18e7b 866 ;;
61536478
JL
867 i[[34567]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
868 # with a.out format using
869 # pre BFD linkers
46f18e7b
RK
870 xmake_file=x-linux-aout
871 tmake_file="t-linux-aout i386/t-crtstuff"
872 tm_file=i386/linux-oldld.h
873 fixincludes=Makefile.in #On Linux, the headers are ok already.
46f18e7b 874 gnu_ld=yes
46f18e7b 875 ;;
61536478
JL
876 i[[34567]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
877 # with a.out format
46f18e7b
RK
878 xmake_file=x-linux-aout
879 tmake_file="t-linux-aout i386/t-crtstuff"
880 tm_file=i386/linux-aout.h
881 fixincludes=Makefile.in #On Linux, the headers are ok already.
46f18e7b 882 gnu_ld=yes
46f18e7b 883 ;;
61536478
JL
884 i[[34567]]86-*-linux-gnulibc1) # Intel 80386's running GNU/Linux
885 # with ELF format using the
886 # GNU/Linux C library 5
887 xmake_file=x-linux
888 tm_file=i386/linux.h
78b9f8df
RK
889 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
890 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
891 fixincludes=Makefile.in #On Linux, the headers are ok already.
78b9f8df 892 gnu_ld=yes
434332b5 893 if [[ x$enable_threads = xyes ]]; then
78b9f8df
RK
894 thread_file='single'
895 fi
896 ;;
61536478
JL
897 i[[34567]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
898 # with ELF format using glibc 2
899 # aka GNU/Linux C library 6
900 xmake_file=x-linux
46f18e7b
RK
901 tm_file=i386/linux.h
902 tmake_file="t-linux i386/t-crtstuff"
903 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
904 fixincludes=Makefile.in #On Linux, the headers are ok already.
46f18e7b 905 gnu_ld=yes
434332b5 906 if [[ x$enable_threads = xyes ]]; then
78b9f8df
RK
907 thread_file='posix'
908 fi
46f18e7b 909 ;;
61536478
JL
910 i[[34567]]86-*-gnu*)
911 ;;
912 i[[34567]]86-go32-msdos | i[[34567]]86-*-go32*)
913 xm_file=i386/xm-go32.h
914 tm_file=i386/go32.h
915 tmake_file=i386/t-go32
46f18e7b 916 ;;
61536478 917 i[[34567]]86-pc-msdosdjgpp*)
46f18e7b
RK
918 xm_file=i386/xm-go32.h
919 tm_file=i386/go32.h
920 tmake_file=i386/t-go32
61536478
JL
921 gnu_ld=yes
922 gas=yes
46f18e7b 923 ;;
61536478 924 i[[34567]]86-moss-msdos* | i[[34567]]86-*-moss*)
46f18e7b
RK
925 tm_file=i386/moss.h
926 tmake_file=t-libc-ok
927 fixincludes=Makefile.in
928 gnu_ld=yes
929 gas=yes
930 ;;
61536478 931 i[[34567]]86-*-lynxos*)
46f18e7b
RK
932 if [[ x$gas = xyes ]]
933 then
934 tm_file=i386/lynx.h
935 else
936 tm_file=i386/lynx-ng.h
937 fi
938 xm_file=i386/xm-lynx.h
939 tmake_file=i386/t-i386bare
940 xmake_file=x-lynx
941 ;;
61536478 942 i[[34567]]86-*-mach*)
46f18e7b
RK
943 tm_file=i386/mach.h
944# tmake_file=t-libc-ok
945 use_collect2=yes
946 ;;
61536478 947 i[[34567]]86-*-osfrose*) # 386 using OSF/rose
46f18e7b
RK
948 if [[ x$elf = xyes ]]
949 then
950 tm_file=i386/osfelf.h
951 use_collect2=
952 else
953 tm_file=i386/osfrose.h
954 use_collect2=yes
955 fi
61536478 956 xm_file="i386/xm-osf.h ${xm_file}"
46f18e7b
RK
957 xmake_file=i386/x-osfrose
958 tmake_file=i386/t-osf
959 extra_objs=halfpic.o
960 ;;
61536478 961 i[[34567]]86-go32-rtems*)
46f18e7b
RK
962 cpu_type=i386
963 xm_file=i386/xm-go32.h
964 tm_file=i386/go32-rtems.h
965 tmake_file="i386/t-go32 t-rtems"
966 ;;
f5963e61
JL
967 i[[34567]]86-*-rtemself*)
968 cpu_type=i386
969 tm_file=i386/rtemself.h
970 tmake_file="i386/t-i386bare t-rtems"
971 ;;
61536478 972 i[[34567]]86-*-rtems*)
46f18e7b
RK
973 cpu_type=i386
974 tm_file=i386/rtems.h
975 tmake_file="i386/t-i386bare t-rtems"
976 ;;
61536478
JL
977 i[[34567]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
978 xm_file="xm-siglist.h xm-alloca.h ${xm_file} i386/xm-sco5.h"
979 xm_defines="USG SVR3"
46f18e7b
RK
980 xmake_file=i386/x-sco5
981 fixincludes=fixinc.sco
f6857708 982 install_headers_dir=install-headers-cpio
46f18e7b
RK
983 tm_file=i386/sco5.h
984 tmake_file=i386/t-sco5
985 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
986 ;;
61536478
JL
987 i[[34567]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
988 xm_file="${xm_file} i386/xm-sco.h"
989 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX NO_SYS_SIGLIST"
46f18e7b
RK
990 xmake_file=i386/x-sco4
991 fixincludes=fixinc.sco
46f18e7b
RK
992 install_headers_dir=install-headers-cpio
993 if [[ x$stabs = xyes ]]
994 then
995 tm_file=i386/sco4dbx.h
996 tmake_file=i386/t-svr3dbx
997 extra_parts="svr3.ifile svr3z.rfile"
998 else
999 tm_file=i386/sco4.h
1000 tmake_file=i386/t-crtstuff
1001 extra_parts="crtbegin.o crtend.o"
1002 fi
1003 truncate_target=yes
1004 ;;
61536478 1005 i[[34567]]86-*-sco*) # 80386 running SCO system
46f18e7b
RK
1006 xm_file=i386/xm-sco.h
1007 xmake_file=i386/x-sco
46f18e7b
RK
1008 install_headers_dir=install-headers-cpio
1009 if [[ x$stabs = xyes ]]
1010 then
1011 tm_file=i386/scodbx.h
1012 tmake_file=i386/t-svr3dbx
1013 extra_parts="svr3.ifile svr3z.rfile"
1014 else
1015 tm_file=i386/sco.h
1016 extra_parts="crtbegin.o crtend.o"
1017 tmake_file=i386/t-crtstuff
1018 fi
1019 truncate_target=yes
1020 ;;
61536478
JL
1021 i[[34567]]86-*-solaris2*)
1022 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
1023 xm_defines="USG POSIX SMALL_ARG_MAX"
46f18e7b
RK
1024 if [[ x$stabs = xyes ]]
1025 then
dec3e070 1026 tm_file=i386/sol2dbg.h
46f18e7b
RK
1027 else
1028 tm_file=i386/sol2.h
1029 fi
1030 tmake_file=i386/t-sol2
61536478 1031 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
46f18e7b 1032 xmake_file=x-svr4
61536478
JL
1033 case $machine in
1034 *-*-solaris2.[[0-4]])
1035 fixincludes=fixinc.svr4;;
1036 *)
32f65aa0 1037 fixincludes=fixinc.wrap;;
61536478 1038 esac
434332b5 1039 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
1040 thread_file='solaris'
1041 fi
46f18e7b 1042 ;;
61536478 1043 i[[34567]]86-*-sysv5*) # Intel x86 on System V Release 5
a4cbe801
RL
1044 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
1045 xm_defines="USG POSIX"
fe07d4c1
RL
1046 tm_file=i386/sysv4.h
1047 if [[ x$stabs = xyes ]]
1048 then
1049 tm_file="${tm_file} dbx.h"
1050 fi
1051 tmake_file=i386/t-crtpic
1052 xmake_file=x-svr4
1053 extra_parts="crtbegin.o crtend.o"
1054 fixincludes=Makefile.in # The headers are just fine, thank you.
1055 ;;
61536478
JL
1056 i[[34567]]86-*-sysv4*) # Intel 80386's running system V.4
1057 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
1058 xm_defines="USG POSIX SMALL_ARG_MAX"
46f18e7b
RK
1059 tm_file=i386/sysv4.h
1060 if [[ x$stabs = xyes ]]
1061 then
1062 tm_file="${tm_file} dbx.h"
1063 fi
1064 tmake_file=i386/t-crtpic
1065 xmake_file=x-svr4
1066 extra_parts="crtbegin.o crtend.o"
1067 ;;
f5963e61
JL
1068 i[[34567]]86-*-osf1*) # Intel 80386's running OSF/1 1.3+
1069 cpu_type=i386
1070 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
1071 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
1072 fixincludes=Makefile.in #Don't do it on OSF/1
1073 if [[ x$stabs = xyes ]]
1074 then
1075 tm_file=i386/osf1elfgdb.h
1076 else
1077 tm_file=i386/osf1elf.h
1078 fi
1079 tmake_file=i386/t-osf1elf
1080 xmake_file=i386/x-osf1elf
1081 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1082 ;;
61536478
JL
1083 i[[34567]]86-*-sysv*) # Intel 80386's running system V
1084 xm_defines="USG SVR3"
46f18e7b
RK
1085 xmake_file=i386/x-sysv3
1086 if [[ x$gas = xyes ]]
1087 then
1088 if [[ x$stabs = xyes ]]
1089 then
1090 tm_file=i386/svr3dbx.h
1091 tmake_file=i386/t-svr3dbx
1092 extra_parts="svr3.ifile svr3z.rfile"
1093 else
1094 tm_file=i386/svr3gas.h
1095 extra_parts="crtbegin.o crtend.o"
1096 tmake_file=i386/t-crtstuff
1097 fi
1098 else
1099 tm_file=i386/sysv3.h
1100 extra_parts="crtbegin.o crtend.o"
1101 tmake_file=i386/t-crtstuff
1102 fi
1103 ;;
1104 i386-*-vsta) # Intel 80386's running VSTa kernel
f5963e61 1105 xm_file="${xm_file} i386/xm-vsta.h"
46f18e7b
RK
1106 tm_file=i386/vsta.h
1107 tmake_file=i386/t-vsta
1108 xmake_file=i386/x-vsta
1109 ;;
61536478 1110 i[[34567]]86-*-pe | i[[34567]]86-*-cygwin32)
46f18e7b
RK
1111 xm_file="${xm_file} i386/xm-cygwin32.h"
1112 tmake_file=i386/t-cygwin32
1113 tm_file=i386/cygwin32.h
1114 xmake_file=i386/x-cygwin32
1115 extra_objs=winnt.o
1116 fixincludes=Makefile.in
434332b5 1117 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
1118 thread_file='win32'
1119 fi
46f18e7b
RK
1120 exeext=.exe
1121 ;;
61536478 1122 i[[34567]]86-*-mingw32*)
5dfe8508
RK
1123 tm_file=i386/mingw32.h
1124 xm_file="${xm_file} i386/xm-mingw32.h"
1a4bf22f 1125 tmake_file="i386/t-cygwin32 i386/t-mingw32"
5dfe8508
RK
1126 extra_objs=winnt.o
1127 xmake_file=i386/x-cygwin32
1128 fixincludes=Makefile.in
434332b5 1129 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
1130 thread_file='win32'
1131 fi
5dfe8508 1132 exeext=.exe
61536478
JL
1133 case $machine in
1134 *mingw32msv*)
1135 ;;
1136 *minwg32crt* | *mingw32*)
1137 tm_file="${tm_file} i386/crtdll.h"
1138 ;;
1139 esac
5dfe8508 1140 ;;
61536478 1141 i[[34567]]86-*-winnt3*)
46f18e7b
RK
1142 tm_file=i386/win-nt.h
1143 out_file=i386/i386.c
61536478 1144 xm_file="xm-winnt.h ${xm_file}"
46f18e7b
RK
1145 xmake_file=winnt/x-winnt
1146 tmake_file=i386/t-winnt
1147 extra_host_objs="winnt.o oldnames.o"
1148 extra_gcc_objs="spawnv.o oldnames.o"
1149 fixincludes=fixinc.winnt
1150 if [[ x$gnu_ld != xyes ]]
1151 then
1152 extra_programs=ld.exe
1153 fi
434332b5 1154 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
1155 thread_file='win32'
1156 fi
46f18e7b 1157 ;;
61536478
JL
1158 i[[34567]]86-dg-dgux*)
1159 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
1160 xm_defines="USG POSIX"
46f18e7b
RK
1161 out_file=i386/dgux.c
1162 tm_file=i386/dgux.h
1163 tmake_file=i386/t-dgux
1164 xmake_file=i386/x-dgux
9590eb1b 1165 fixincludes=fixinc.dgux
46f18e7b
RK
1166 install_headers_dir=install-headers-cpio
1167 ;;
1168 i860-alliant-*) # Alliant FX/2800
1169 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
956d6950 1170 xm_file="${xm_file}"
46f18e7b
RK
1171 xmake_file=i860/x-fx2800
1172 tmake_file=i860/t-fx2800
1173 extra_parts="crtbegin.o crtend.o"
1174 ;;
1175 i860-*-bsd*)
1176 tm_file="${tm_file} i860/bsd.h"
1177 if [[ x$gas = xyes ]]
1178 then
1179 tm_file="${tm_file} i860/bsd-gas.h"
1180 fi
1181 use_collect2=yes
1182 ;;
1183 i860-*-mach*)
1184 tm_file="${tm_file} i860/mach.h"
1185 tmake_file=t-libc-ok
1186 ;;
1187 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1188 tm_file="${tm_file} svr3.h i860/paragon.h"
61536478 1189 xm_defines="USG SVR3"
46f18e7b 1190 tmake_file=t-osf
46f18e7b
RK
1191 ;;
1192 i860-*-sysv3*)
1193 tm_file="${tm_file} svr3.h i860/sysv3.h"
61536478 1194 xm_defines="USG SVR3"
46f18e7b
RK
1195 xmake_file=i860/x-sysv3
1196 extra_parts="crtbegin.o crtend.o"
1197 ;;
1198 i860-*-sysv4*)
1199 tm_file="${tm_file} svr4.h i860/sysv4.h"
61536478 1200 xm_defines="USG SVR3"
46f18e7b
RK
1201 xmake_file=i860/x-sysv4
1202 tmake_file=t-svr4
1203 extra_parts="crtbegin.o crtend.o"
1204 ;;
1205 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1206 tm_file="${tm_file} i960/vx960.h"
1207 tmake_file=i960/t-vxworks960
1208 use_collect2=yes
7cc34889 1209 thread_file='vxworks'
46f18e7b 1210 ;;
a0372c94 1211 i960-wrs-vxworks5* | i960-wrs-vxworks)
46f18e7b
RK
1212 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1213 tmake_file=i960/t-vxworks960
1214 use_collect2=yes
7cc34889 1215 thread_file='vxworks'
46f18e7b
RK
1216 ;;
1217 i960-wrs-vxworks*)
1218 tm_file="${tm_file} i960/vx960.h"
1219 tmake_file=i960/t-vxworks960
1220 use_collect2=yes
7cc34889 1221 thread_file='vxworks'
46f18e7b
RK
1222 ;;
1223 i960-*-coff*)
1224 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1225 tmake_file=i960/t-960bare
1226 use_collect2=yes
1227 ;;
1228 i960-*-rtems)
1229 tmake_file="i960/t-960bare t-rtems"
1230 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1231 use_collect2=yes
1232 ;;
1233 i960-*-*) # Default i960 environment.
1234 use_collect2=yes
1235 ;;
dec3e070
JW
1236 m32r-*-elf*)
1237 extra_parts="crtinit.o crtfini.o"
1238 ;;
46f18e7b
RK
1239 m68000-convergent-sysv*)
1240 tm_file=m68k/ctix.h
61536478
JL
1241 xm_file="m68k/xm-3b1.h ${xm_file}"
1242 xm_defines=USG
46f18e7b
RK
1243 use_collect2=yes
1244 extra_headers=math-68881.h
1245 ;;
1246 m68000-hp-bsd*) # HP 9000/200 running BSD
1247 tm_file=m68k/hp2bsd.h
1248 xmake_file=m68k/x-hp2bsd
1249 use_collect2=yes
1250 extra_headers=math-68881.h
1251 ;;
1252 m68000-hp-hpux*) # HP 9000 series 300
61536478
JL
1253 xm_file="xm_alloca.h ${xm_file}"
1254 xm_defines="USG NO_SYS_SIGLIST"
46f18e7b
RK
1255 if [[ x$gas = xyes ]]
1256 then
1257 xmake_file=m68k/x-hp320g
1258 tm_file=m68k/hp310g.h
1259 else
1260 xmake_file=m68k/x-hp320
1261 tm_file=m68k/hp310.h
1262 fi
46f18e7b
RK
1263 install_headers_dir=install-headers-cpio
1264 use_collect2=yes
1265 extra_headers=math-68881.h
1266 ;;
1267 m68000-sun-sunos3*)
1268 tm_file=m68k/sun2.h
1269 use_collect2=yes
1270 extra_headers=math-68881.h
1271 ;;
1272 m68000-sun-sunos4*)
1273 tm_file=m68k/sun2o4.h
1274 use_collect2=yes
1275 extra_headers=math-68881.h
1276 ;;
1277 m68000-att-sysv*)
61536478
JL
1278 xm_file="m68k/xm-3b1.h ${xm_file}"
1279 xm_defines=USG
46f18e7b
RK
1280 if [[ x$gas = xyes ]]
1281 then
1282 tm_file=m68k/3b1g.h
1283 else
1284 tm_file=m68k/3b1.h
1285 fi
1286 use_collect2=yes
1287 extra_headers=math-68881.h
1288 ;;
1289 m68k-apple-aux*) # Apple Macintosh running A/UX
61536478 1290 xm_defines="USG AUX"
46f18e7b 1291 tmake_file=m68k/t-aux
46f18e7b
RK
1292 install_headers_dir=install-headers-cpio
1293 extra_headers=math-68881.h
1294 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1295 tm_file=
1296 if [[ "$gnu_ld" = yes ]]
1297 then
1298 tm_file="${tm_file} m68k/auxgld.h"
1299 else
1300 tm_file="${tm_file} m68k/auxld.h"
1301 fi
1302 if [[ "$gas" = yes ]]
1303 then
1304 tm_file="${tm_file} m68k/auxgas.h"
1305 else
1306 tm_file="${tm_file} m68k/auxas.h"
1307 fi
1308 tm_file="${tm_file} m68k/a-ux.h"
c8db55b0 1309 float_format=m68k
46f18e7b
RK
1310 ;;
1311 m68k-apollo-*)
1312 tm_file=m68k/apollo68.h
1313 xmake_file=m68k/x-apollo68
1314 use_collect2=yes
1315 extra_headers=math-68881.h
c8db55b0 1316 float_format=m68k
46f18e7b
RK
1317 ;;
1318 m68k-altos-sysv*) # Altos 3068
1319 if [[ x$gas = xyes ]]
1320 then
1321 tm_file=m68k/altos3068.h
61536478 1322 xm_defines=USG
46f18e7b
RK
1323 else
1324 echo "The Altos is supported only with the GNU assembler" 1>&2
1325 exit 1
1326 fi
1327 extra_headers=math-68881.h
1328 ;;
1329 m68k-bull-sysv*) # Bull DPX/2
1330 if [[ x$gas = xyes ]]
1331 then
1332 if [[ x$stabs = xyes ]]
1333 then
1334 tm_file=m68k/dpx2cdbx.h
1335 else
1336 tm_file=m68k/dpx2g.h
1337 fi
1338 else
1339 tm_file=m68k/dpx2.h
1340 fi
61536478
JL
1341 xm_file="xm-alloca.h ${xm_file}"
1342 xm_defines=USG
46f18e7b
RK
1343 xmake_file=m68k/x-dpx2
1344 use_collect2=yes
1345 extra_headers=math-68881.h
1346 ;;
1347 m68k-atari-sysv4*) # Atari variant of V.4.
1348 tm_file=m68k/atari.h
61536478
JL
1349 xm_file="xm-alloca.h ${xm_file}"
1350 xm_defines="USG FULL_PROTOTYPES"
46f18e7b
RK
1351 tmake_file=t-svr4
1352 extra_parts="crtbegin.o crtend.o"
1353 extra_headers=math-68881.h
c8db55b0 1354 float_format=m68k
46f18e7b
RK
1355 ;;
1356 m68k-motorola-sysv*)
1357 tm_file=m68k/mot3300.h
61536478
JL
1358 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
1359 xm_defines=NO_SYS_SIGLIST
46f18e7b
RK
1360 if [[ x$gas = xyes ]]
1361 then
1362 xmake_file=m68k/x-mot3300-gas
1363 if [[ x$gnu_ld = xyes ]]
1364 then
1365 tmake_file=m68k/t-mot3300-gald
1366 else
1367 tmake_file=m68k/t-mot3300-gas
1368 use_collect2=yes
1369 fi
1370 else
1371 xmake_file=m68k/x-mot3300
1372 if [[ x$gnu_ld = xyes ]]
1373 then
1374 tmake_file=m68k/t-mot3300-gld
1375 else
1376 tmake_file=m68k/t-mot3300
1377 use_collect2=yes
1378 fi
1379 fi
1380 gdb_needs_out_file_path=yes
1381 extra_parts="crt0.o mcrt0.o"
1382 extra_headers=math-68881.h
c8db55b0 1383 float_format=m68k
46f18e7b
RK
1384 ;;
1385 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1386 tm_file=m68k/tower-as.h
61536478 1387 xm_defines="USG SVR3"
46f18e7b
RK
1388 xmake_file=m68k/x-tower
1389 extra_parts="crtbegin.o crtend.o"
1390 extra_headers=math-68881.h
1391 ;;
1392 m68k-plexus-sysv*)
1393 tm_file=m68k/plexus.h
61536478
JL
1394 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
1395 xm_defines=USG
46f18e7b
RK
1396 use_collect2=yes
1397 extra_headers=math-68881.h
1398 ;;
1399 m68k-tti-*)
1400 tm_file=m68k/pbb.h
61536478
JL
1401 xm_file="xm-alloca.h ${xm_file}"
1402 xm_defines=USG
46f18e7b
RK
1403 extra_headers=math-68881.h
1404 ;;
1405 m68k-crds-unos*)
61536478
JL
1406 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
1407 xm_defines="USG unos"
46f18e7b
RK
1408 xmake_file=m68k/x-crds
1409 tm_file=m68k/crds.h
46f18e7b
RK
1410 use_collect2=yes
1411 extra_headers=math-68881.h
1412 ;;
1413 m68k-cbm-sysv4*) # Commodore variant of V.4.
1414 tm_file=m68k/amix.h
61536478
JL
1415 xm_file="xm-alloca.h ${xm_file}"
1416 xm_defines="USG FULL_PROTOTYPES"
46f18e7b
RK
1417 xmake_file=m68k/x-amix
1418 tmake_file=t-svr4
1419 extra_parts="crtbegin.o crtend.o"
1420 extra_headers=math-68881.h
c8db55b0 1421 float_format=m68k
46f18e7b
RK
1422 ;;
1423 m68k-ccur-rtu)
1424 tm_file=m68k/ccur-GAS.h
1425 xmake_file=m68k/x-ccur
1426 extra_headers=math-68881.h
1427 use_collect2=yes
c8db55b0 1428 float_format=m68k
46f18e7b
RK
1429 ;;
1430 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1431 tm_file=m68k/hp3bsd44.h
1432 xmake_file=m68k/x-hp3bsd44
1433 use_collect2=yes
1434 extra_headers=math-68881.h
c8db55b0 1435 float_format=m68k
46f18e7b
RK
1436 ;;
1437 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1438 tm_file=m68k/hp3bsd.h
1439 use_collect2=yes
1440 extra_headers=math-68881.h
c8db55b0 1441 float_format=m68k
46f18e7b
RK
1442 ;;
1443 m68k-isi-bsd*)
1444 if [[ x$with_fp = xno ]]
1445 then
1446 tm_file=m68k/isi-nfp.h
1447 else
1448 tm_file=m68k/isi.h
c8db55b0 1449 float_format=m68k
46f18e7b
RK
1450 fi
1451 use_collect2=yes
1452 extra_headers=math-68881.h
1453 ;;
1454 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
61536478
JL
1455 xm_file="xm_alloca.h ${xm_file}"
1456 xm_defines="USG NO_SYS_SIGLIST"
46f18e7b
RK
1457 if [[ x$gas = xyes ]]
1458 then
1459 xmake_file=m68k/x-hp320g
1460 tm_file=m68k/hp320g.h
1461 else
1462 xmake_file=m68k/x-hp320
1463 tm_file=m68k/hpux7.h
1464 fi
46f18e7b
RK
1465 install_headers_dir=install-headers-cpio
1466 use_collect2=yes
1467 extra_headers=math-68881.h
c8db55b0 1468 float_format=m68k
46f18e7b
RK
1469 ;;
1470 m68k-hp-hpux*) # HP 9000 series 300
61536478
JL
1471 xm_file="xm_alloca.h ${xm_file}"
1472 xm_defines="USG NO_SYS_SIGLIST"
46f18e7b
RK
1473 if [[ x$gas = xyes ]]
1474 then
1475 xmake_file=m68k/x-hp320g
1476 tm_file=m68k/hp320g.h
1477 else
1478 xmake_file=m68k/x-hp320
1479 tm_file=m68k/hp320.h
1480 fi
46f18e7b
RK
1481 install_headers_dir=install-headers-cpio
1482 use_collect2=yes
1483 extra_headers=math-68881.h
c8db55b0 1484 float_format=m68k
46f18e7b
RK
1485 ;;
1486 m68k-sun-mach*)
1487 tm_file=m68k/sun3mach.h
1488 use_collect2=yes
1489 extra_headers=math-68881.h
c8db55b0 1490 float_format=m68k
46f18e7b
RK
1491 ;;
1492 m68k-sony-newsos3*)
1493 if [[ x$gas = xyes ]]
1494 then
1495 tm_file=m68k/news3gas.h
1496 else
1497 tm_file=m68k/news3.h
1498 fi
1499 use_collect2=yes
1500 extra_headers=math-68881.h
c8db55b0 1501 float_format=m68k
46f18e7b
RK
1502 ;;
1503 m68k-sony-bsd* | m68k-sony-newsos*)
1504 if [[ x$gas = xyes ]]
1505 then
1506 tm_file=m68k/newsgas.h
1507 else
1508 tm_file=m68k/news.h
1509 fi
1510 use_collect2=yes
1511 extra_headers=math-68881.h
c8db55b0 1512 float_format=m68k
46f18e7b
RK
1513 ;;
1514 m68k-next-nextstep2*)
1515 tm_file=m68k/next21.h
61536478 1516 xm_file="m68k/xm-next.h ${xm_file}"
46f18e7b
RK
1517 tmake_file=m68k/t-next
1518 xmake_file=m68k/x-next
1519 extra_objs=nextstep.o
1520 extra_headers=math-68881.h
1521 use_collect2=yes
c8db55b0 1522 float_format=m68k
46f18e7b
RK
1523 ;;
1524 m68k-next-nextstep3*)
1525 tm_file=m68k/next.h
61536478 1526 xm_file="m68k/xm-next.h ${xm_file}"
46f18e7b
RK
1527 tmake_file=m68k/t-next
1528 xmake_file=m68k/x-next
1529 extra_objs=nextstep.o
1530 extra_headers=math-68881.h
c8db55b0 1531 float_format=m68k
434332b5 1532 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
1533 thread_file='mach'
1534 fi
46f18e7b
RK
1535 ;;
1536 m68k-sun-sunos3*)
1537 if [[ x$with_fp = xno ]]
1538 then
1539 tm_file=m68k/sun3n3.h
1540 else
1541 tm_file=m68k/sun3o3.h
c8db55b0 1542 float_format=m68k
46f18e7b
RK
1543 fi
1544 use_collect2=yes
1545 extra_headers=math-68881.h
1546 ;;
1547 m68k-sun-sunos*) # For SunOS 4 (the default).
1548 if [[ x$with_fp = xno ]]
1549 then
1550 tm_file=m68k/sun3n.h
1551 else
1552 tm_file=m68k/sun3.h
c8db55b0 1553 float_format=m68k
46f18e7b 1554 fi
46f18e7b
RK
1555 use_collect2=yes
1556 extra_headers=math-68881.h
1557 ;;
1558 m68k-wrs-vxworks*)
1559 tm_file=m68k/vxm68k.h
1560 tmake_file=m68k/t-vxworks68
1561 extra_headers=math-68881.h
7cc34889 1562 thread_file='vxworks'
c8db55b0 1563 float_format=m68k
46f18e7b
RK
1564 ;;
1565 m68k-*-aout*)
1566 tmake_file=m68k/t-m68kbare
1567 tm_file="m68k/m68k-aout.h libgloss.h"
1568 extra_headers=math-68881.h
c8db55b0 1569 float_format=m68k
46f18e7b
RK
1570 ;;
1571 m68k-*-coff*)
1572 tmake_file=m68k/t-m68kbare
1573 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1574 extra_headers=math-68881.h
c8db55b0 1575 float_format=m68k
46f18e7b
RK
1576 ;;
1577 m68k-*-lynxos*)
1578 if [[ x$gas = xyes ]]
1579 then
1580 tm_file=m68k/lynx.h
1581 else
1582 tm_file=m68k/lynx-ng.h
1583 fi
1584 xm_file=m68k/xm-lynx.h
1585 xmake_file=x-lynx
1586 tmake_file=m68k/t-lynx
1587 extra_headers=math-68881.h
c8db55b0 1588 float_format=m68k
46f18e7b
RK
1589 ;;
1590 m68k-*-netbsd*)
1591 tm_file=m68k/netbsd.h
be1ed94f 1592 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 1593 fixincludes=fixinc.wrap
e47f44f4 1594 tmake_file=t-netbsd
c8db55b0 1595 float_format=m68k
46f18e7b
RK
1596 ;;
1597 m68k-*-sysv3*) # Motorola m68k's running system V.3
61536478
JL
1598 xm_file="xm-alloca.h ${xm_file}"
1599 xm_defines=USG
46f18e7b
RK
1600 xmake_file=m68k/x-m68kv
1601 extra_parts="crtbegin.o crtend.o"
1602 extra_headers=math-68881.h
c8db55b0 1603 float_format=m68k
46f18e7b
RK
1604 ;;
1605 m68k-*-sysv4*) # Motorola m68k's running system V.4
1606 tm_file=m68k/m68kv4.h
61536478
JL
1607 xm_file="xm-alloca.h ${xm_file}"
1608 xm_defines=USG
46f18e7b
RK
1609 tmake_file=t-svr4
1610 extra_parts="crtbegin.o crtend.o"
1611 extra_headers=math-68881.h
c8db55b0 1612 float_format=m68k
46f18e7b 1613 ;;
956d6950 1614 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
61536478 1615 # with a.out format
46f18e7b
RK
1616 xmake_file=x-linux
1617 tm_file=m68k/linux-aout.h
1618 tmake_file="t-linux-aout m68k/t-linux-aout"
956d6950 1619 fixincludes=Makefile.in # The headers are ok already.
46f18e7b 1620 extra_headers=math-68881.h
c8db55b0 1621 float_format=m68k
46f18e7b 1622 gnu_ld=yes
46f18e7b 1623 ;;
956d6950 1624 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
61536478
JL
1625 # with ELF format using the
1626 # GNU/Linux C library 5
1627 xmake_file=x-linux
95fd3981
RK
1628 tm_file=m68k/linux.h
1629 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1630 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
956d6950 1631 fixincludes=Makefile.in # The headers are ok already.
95fd3981 1632 extra_headers=math-68881.h
c8db55b0 1633 float_format=m68k
95fd3981
RK
1634 gnu_ld=yes
1635 ;;
956d6950 1636 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
61536478
JL
1637 # with ELF format using glibc 2
1638 # aka the GNU/Linux C library 6.
1639 xmake_file=x-linux
46f18e7b
RK
1640 tm_file=m68k/linux.h
1641 tmake_file="t-linux m68k/t-linux"
1642 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
956d6950 1643 fixincludes=Makefile.in # The headers are ok already.
46f18e7b 1644 extra_headers=math-68881.h
c8db55b0 1645 float_format=m68k
46f18e7b 1646 gnu_ld=yes
d1054723 1647 if [[ x$enable_threads = xyes ]]; then
95fd3981
RK
1648 thread_file='posix'
1649 fi
46f18e7b
RK
1650 ;;
1651 m68k-*-psos*)
1652 tmake_file=m68k/t-m68kbare
1653 tm_file=m68k/m68k-psos.h
1654 extra_headers=math-68881.h
c8db55b0 1655 float_format=m68k
46f18e7b
RK
1656 ;;
1657 m68k-*-rtems*)
1658 tmake_file="m68k/t-m68kbare t-rtems"
1659 tm_file=m68k/rtems.h
1660 extra_headers=math-68881.h
c8db55b0 1661 float_format=m68k
46f18e7b
RK
1662 ;;
1663
1664 m88k-dg-dgux*)
1665 case $machine in
1666 m88k-dg-dguxbcs*)
1667 tm_file=m88k/dguxbcs.h
1668 tmake_file=m88k/t-dguxbcs
1669 ;;
1670 *)
1671 tm_file=m88k/dgux.h
1672 tmake_file=m88k/t-dgux
1673 ;;
1674 esac
1675 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
46f18e7b
RK
1676 xmake_file=m88k/x-dgux
1677 if [[ x$gas = xyes ]]
1678 then
1679 tmake_file=m88k/t-dgux-gas
1680 fi
1681 fixincludes=fixinc.dgux
1682 ;;
1683 m88k-dolphin-sysv3*)
1684 tm_file=m88k/dolph.h
1685 extra_parts="crtbegin.o crtend.o"
61536478 1686 xm_file="m88k/xm-sysv3.h ${xm_file}"
46f18e7b
RK
1687 xmake_file=m88k/x-dolph
1688 if [[ x$gas = xyes ]]
1689 then
1690 tmake_file=m88k/t-m88k-gas
1691 fi
1692 ;;
1693 m88k-tektronix-sysv3)
1694 tm_file=m88k/tekXD88.h
1695 extra_parts="crtbegin.o crtend.o"
61536478 1696 xm_file="m88k/xm-sysv3.h ${xm_file}"
46f18e7b
RK
1697 xmake_file=m88k/x-tekXD88
1698 if [[ x$gas = xyes ]]
1699 then
1700 tmake_file=m88k/t-m88k-gas
1701 fi
1702 ;;
1703 m88k-*-aout*)
1704 tm_file=m88k/m88k-aout.h
1705 ;;
1706 m88k-*-coff*)
1707 tm_file=m88k/m88k-coff.h
1708 tmake_file=m88k/t-bug
1709 ;;
1710 m88k-*-luna*)
1711 tm_file=m88k/luna.h
1712 extra_parts="crtbegin.o crtend.o"
1713 if [[ x$gas = xyes ]]
1714 then
1715 tmake_file=m88k/t-luna-gas
1716 else
1717 tmake_file=m88k/t-luna
1718 fi
1719 ;;
1720 m88k-*-sysv3*)
1721 tm_file=m88k/sysv3.h
1722 extra_parts="crtbegin.o crtend.o"
61536478 1723 xm_file="m88k/xm-sysv3.h ${xm_file}"
46f18e7b
RK
1724 xmake_file=m88k/x-sysv3
1725 if [[ x$gas = xyes ]]
1726 then
1727 tmake_file=m88k/t-m88k-gas
1728 fi
1729 ;;
1730 m88k-*-sysv4*)
1731 tm_file=m88k/sysv4.h
1732 extra_parts="crtbegin.o crtend.o"
1733 xmake_file=m88k/x-sysv4
1734 tmake_file=m88k/t-sysv4
1735 ;;
1736 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1737 tm_file=mips/iris6.h
1738 xm_file=mips/xm-iris6.h
46f18e7b
RK
1739 fixincludes=fixinc.irix
1740 xmake_file=mips/x-iris6
1741 tmake_file=mips/t-iris6
434332b5 1742 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
1743 thread_file='irix'
1744 fi
46f18e7b 1745 ;;
98bd9f0f
DB
1746 mips-wrs-vxworks)
1747 tm_file="mips/elf.h libgloss.h"
1748 tmake_file=mips/t-ecoff
1749 gas=yes
1750 gnu_ld=yes
1751 extra_parts="crtbegin.o crtend.o"
1752# thread_file='vxworks'
1753 ;;
46f18e7b 1754 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
61536478
JL
1755 tm_file="mips/iris6.h mips/cross64.h"
1756 xm_defines="USG HAVE_INTTYPES_H"
46f18e7b
RK
1757 fixincludes=Makefile.in
1758 xmake_file=mips/x-iris
1759 tmake_file=mips/t-cross64
1760 # See comment in mips/iris[56].h files.
1761 use_collect2=yes
434332b5 1762 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
1763 thread_file='irix'
1764 fi
46f18e7b
RK
1765 ;;
1766 mips-sni-sysv4)
1767 if [[ x$gas = xyes ]]
1768 then
1769 if [[ x$stabs = xyes ]]
1770 then
1771 tm_file=mips/iris5gdb.h
1772 else
61536478 1773 tm_file="mips/sni-svr4.h mips/sni-gas.h"
46f18e7b
RK
1774 fi
1775 else
1776 tm_file=mips/sni-svr4.h
1777 fi
61536478 1778 xm_defines=USG
46f18e7b
RK
1779 xmake_file=mips/x-sni-svr4
1780 tmake_file=mips/t-mips-gas
1781 if [[ x$gnu_ld != xyes ]]
1782 then
1783 use_collect2=yes
1784 fi
46f18e7b
RK
1785 ;;
1786 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1787 if [[ x$gas = xyes ]]
1788 then
61536478 1789 tm_file="mips/iris5.h mips/iris5gas.h"
46f18e7b
RK
1790 if [[ x$stabs = xyes ]]
1791 then
1792 tm_file="${tm_file} dbx.h"
1793 fi
1794 else
1795 tm_file=mips/iris5.h
1796 fi
61536478 1797 xm_defines="USG HAVE_INTTYPES_H"
46f18e7b
RK
1798 fixincludes=fixinc.irix
1799 xmake_file=mips/x-iris
1800 # mips-tfile doesn't work yet
1801 tmake_file=mips/t-mips-gas
1802 # See comment in mips/iris5.h file.
1803 use_collect2=yes
434332b5 1804 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
1805 thread_file='irix'
1806 fi
46f18e7b
RK
1807 ;;
1808 mips-sgi-irix4loser*) # Mostly like a MIPS.
61536478 1809 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
46f18e7b
RK
1810 if [[ x$stabs = xyes ]]; then
1811 tm_file="${tm_file} dbx.h"
1812 fi
61536478 1813 xm_defines=USG
46f18e7b
RK
1814 xmake_file=mips/x-iris
1815 if [[ x$gas = xyes ]]
1816 then
1817 tmake_file=mips/t-mips-gas
1818 else
1819 extra_passes="mips-tfile mips-tdump"
1820 fi
1821 if [[ x$gnu_ld != xyes ]]
1822 then
1823 use_collect2=yes
1824 fi
434332b5 1825 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
1826 thread_file='irix'
1827 fi
46f18e7b
RK
1828 ;;
1829 mips-sgi-irix4*) # Mostly like a MIPS.
61536478 1830 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
46f18e7b
RK
1831 if [[ x$stabs = xyes ]]; then
1832 tm_file="${tm_file} dbx.h"
1833 fi
61536478 1834 xm_defines=USG
46f18e7b
RK
1835 xmake_file=mips/x-iris
1836 if [[ x$gas = xyes ]]
1837 then
1838 tmake_file=mips/t-mips-gas
1839 else
1840 extra_passes="mips-tfile mips-tdump"
1841 fi
1842 if [[ x$gnu_ld != xyes ]]
1843 then
1844 use_collect2=yes
1845 fi
434332b5 1846 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
1847 thread_file='irix'
1848 fi
46f18e7b
RK
1849 ;;
1850 mips-sgi-*) # Mostly like a MIPS.
61536478 1851 tm_file="mips/iris3.h ${tm_file}"
46f18e7b
RK
1852 if [[ x$stabs = xyes ]]; then
1853 tm_file="${tm_file} dbx.h"
1854 fi
61536478 1855 xm_defines=USG
46f18e7b
RK
1856 xmake_file=mips/x-iris3
1857 if [[ x$gas = xyes ]]
1858 then
1859 tmake_file=mips/t-mips-gas
1860 else
1861 extra_passes="mips-tfile mips-tdump"
1862 fi
1863 if [[ x$gnu_ld != xyes ]]
1864 then
1865 use_collect2=yes
1866 fi
1867 ;;
1868 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
61536478 1869 tm_file="mips/osfrose.h ${tm_file}"
46f18e7b
RK
1870 xmake_file=mips/x-osfrose
1871 tmake_file=mips/t-osfrose
1872 extra_objs=halfpic.o
1873 use_collect2=yes
1874 ;;
1875 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1876 tm_file=mips/dec-osf1.h
1877 if [[ x$stabs = xyes ]]; then
1878 tm_file="${tm_file} dbx.h"
1879 fi
1880 xmake_file=mips/x-dec-osf1
1881 if [[ x$gas = xyes ]]
1882 then
1883 tmake_file=mips/t-mips-gas
1884 else
1885 tmake_file=mips/t-ultrix
1886 extra_passes="mips-tfile mips-tdump"
1887 fi
1888 if [[ x$gnu_ld != xyes ]]
1889 then
1890 use_collect2=yes
1891 fi
1892 ;;
1893 mips-dec-bsd*) # Decstation running 4.4 BSD
1894 tm_file=mips/dec-bsd.h
1895 fixincludes=
1896 if [[ x$gas = xyes ]]
1897 then
1898 tmake_file=mips/t-mips-gas
1899 else
1900 tmake_file=mips/t-ultrix
1901 extra_passes="mips-tfile mips-tdump"
1902 fi
1903 if [[ x$gnu_ld != xyes ]]
1904 then
1905 use_collect2=yes
1906 fi
1907 ;;
1908 mips-dec-netbsd*) # Decstation running NetBSD
1909 tm_file=mips/netbsd.h
be1ed94f 1910 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 1911 fixincludes=fixinc.wrap
e47f44f4 1912 tmake_file=t-netbsd
46f18e7b
RK
1913 ;;
1914 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
61536478 1915 tm_file="mips/news4.h ${tm_file}"
46f18e7b
RK
1916 if [[ x$stabs = xyes ]]; then
1917 tm_file="${tm_file} dbx.h"
1918 fi
1919 if [[ x$gas = xyes ]]
1920 then
1921 tmake_file=mips/t-mips-gas
1922 else
1923 extra_passes="mips-tfile mips-tdump"
1924 fi
1925 if [[ x$gnu_ld != xyes ]]
1926 then
1927 use_collect2=yes
1928 fi
1929 xmake_file=mips/x-sony
1930 ;;
1931 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1932 # That is based on svr4.
1933 # t-svr4 is not right because this system doesn't use ELF.
61536478 1934 tm_file="mips/news5.h ${tm_file}"
46f18e7b
RK
1935 if [[ x$stabs = xyes ]]; then
1936 tm_file="${tm_file} dbx.h"
1937 fi
61536478
JL
1938 xm_file="xm-siglist.h ${xm_file}"
1939 xm_defines=USG
46f18e7b
RK
1940 if [[ x$gas = xyes ]]
1941 then
1942 tmake_file=mips/t-mips-gas
1943 else
1944 extra_passes="mips-tfile mips-tdump"
1945 fi
1946 if [[ x$gnu_ld != xyes ]]
1947 then
1948 use_collect2=yes
1949 fi
1950 ;;
1951 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
61536478 1952 tm_file="mips/svr4-5.h mips/svr4-t.h"
46f18e7b
RK
1953 if [[ x$stabs = xyes ]]; then
1954 tm_file="${tm_file} dbx.h"
1955 fi
61536478
JL
1956 xm_file="xm-siglist.h ${xm_file}"
1957 xm_defines=USG
46f18e7b
RK
1958 xmake_file=mips/x-sysv
1959 if [[ x$gas = xyes ]]
1960 then
1961 tmake_file=mips/t-mips-gas
1962 extra_parts="crtbegin.o crtend.o"
1963 else
1964 tmake_file=mips/t-mips
1965 extra_passes="mips-tfile mips-tdump"
1966 fi
1967 if [[ x$gnu_ld != xyes ]]
1968 then
1969 use_collect2=yes
1970 fi
46f18e7b
RK
1971 ;;
1972 mips-*-ultrix* | mips-dec-mach3) # Decstation.
61536478 1973 tm_file="mips/ultrix.h ${tm_file}"
46f18e7b
RK
1974 if [[ x$stabs = xyes ]]; then
1975 tm_file="${tm_file} dbx.h"
1976 fi
1977 xmake_file=mips/x-ultrix
1978 if [[ x$gas = xyes ]]
1979 then
1980 tmake_file=mips/t-mips-gas
1981 else
1982 tmake_file=mips/t-ultrix
1983 extra_passes="mips-tfile mips-tdump"
1984 fi
1985 if [[ x$gnu_ld != xyes ]]
1986 then
1987 use_collect2=yes
1988 fi
1989 ;;
1990 mips-*-riscos[[56789]]bsd*)
1991 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1992 if [[ x$stabs = xyes ]]; then
1993 tm_file="${tm_file} dbx.h"
1994 fi
1995 if [[ x$gas = xyes ]]
1996 then
1997 tmake_file=mips/t-bsd-gas
1998 else
1999 tmake_file=mips/t-bsd
2000 extra_passes="mips-tfile mips-tdump"
2001 fi
2002 if [[ x$gnu_ld != xyes ]]
2003 then
2004 use_collect2=yes
2005 fi
46f18e7b
RK
2006 ;;
2007 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
61536478 2008 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
46f18e7b
RK
2009 if [[ x$stabs = xyes ]]; then
2010 tm_file="${tm_file} dbx.h"
2011 fi
2012 if [[ x$gas = xyes ]]
2013 then
2014 tmake_file=mips/t-bsd-gas
2015 else
2016 tmake_file=mips/t-bsd
2017 extra_passes="mips-tfile mips-tdump"
2018 fi
2019 if [[ x$gnu_ld != xyes ]]
2020 then
2021 use_collect2=yes
2022 fi
46f18e7b
RK
2023 ;;
2024 mips-*-riscos[[56789]]sysv4*)
2025 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
2026 if [[ x$stabs = xyes ]]; then
2027 tm_file="${tm_file} dbx.h"
2028 fi
61536478 2029 xm_file="xm-siglist.h ${xm_file}"
46f18e7b
RK
2030 xmake_file=mips/x-sysv
2031 if [[ x$gas = xyes ]]
2032 then
2033 tmake_file=mips/t-svr4-gas
2034 else
2035 tmake_file=mips/t-svr4
2036 extra_passes="mips-tfile mips-tdump"
2037 fi
2038 if [[ x$gnu_ld != xyes ]]
2039 then
2040 use_collect2=yes
2041 fi
46f18e7b
RK
2042 ;;
2043 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
61536478 2044 tm_file="mips/svr4-4.h ${tm_file}"
46f18e7b
RK
2045 if [[ x$stabs = xyes ]]; then
2046 tm_file="${tm_file} dbx.h"
2047 fi
61536478 2048 xm_defines=USG
46f18e7b
RK
2049 xmake_file=mips/x-sysv
2050 if [[ x$gas = xyes ]]
2051 then
2052 tmake_file=mips/t-svr4-gas
2053 else
2054 tmake_file=mips/t-svr4
2055 extra_passes="mips-tfile mips-tdump"
2056 fi
2057 if [[ x$gnu_ld != xyes ]]
2058 then
2059 use_collect2=yes
2060 fi
46f18e7b
RK
2061 ;;
2062 mips-*-riscos[[56789]]sysv*)
2063 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
2064 if [[ x$stabs = xyes ]]; then
2065 tm_file="${tm_file} dbx.h"
2066 fi
61536478 2067 xm_defines=USG
46f18e7b
RK
2068 xmake_file=mips/x-sysv
2069 if [[ x$gas = xyes ]]
2070 then
2071 tmake_file=mips/t-svr3-gas
2072 else
2073 tmake_file=mips/t-svr3
2074 extra_passes="mips-tfile mips-tdump"
2075 fi
2076 if [[ x$gnu_ld != xyes ]]
2077 then
2078 use_collect2=yes
2079 fi
46f18e7b
RK
2080 ;;
2081 mips-*-sysv* | mips-*-riscos*sysv*)
61536478 2082 tm_file="mips/svr3-4.h ${tm_file}"
46f18e7b
RK
2083 if [[ x$stabs = xyes ]]; then
2084 tm_file="${tm_file} dbx.h"
2085 fi
61536478 2086 xm_defines=USG
46f18e7b
RK
2087 xmake_file=mips/x-sysv
2088 if [[ x$gas = xyes ]]
2089 then
2090 tmake_file=mips/t-svr3-gas
2091 else
2092 tmake_file=mips/t-svr3
2093 extra_passes="mips-tfile mips-tdump"
2094 fi
2095 if [[ x$gnu_ld != xyes ]]
2096 then
2097 use_collect2=yes
2098 fi
46f18e7b
RK
2099 ;;
2100 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
2101 tm_file=mips/mips-5.h
2102 if [[ x$stabs = xyes ]]; then
2103 tm_file="${tm_file} dbx.h"
2104 fi
2105 if [[ x$gas = xyes ]]
2106 then
2107 tmake_file=mips/t-mips-gas
2108 else
2109 extra_passes="mips-tfile mips-tdump"
2110 fi
2111 if [[ x$gnu_ld != xyes ]]
2112 then
2113 use_collect2=yes
2114 fi
46f18e7b
RK
2115 ;;
2116 mips-*-gnu*)
2117 ;;
2118 mipsel-*-ecoff*)
2119 tm_file=mips/ecoffl.h
2120 if [[ x$stabs = xyes ]]; then
2121 tm_file="${tm_file} dbx.h"
2122 fi
2123 tmake_file=mips/t-ecoff
2124 ;;
2125 mips-*-ecoff*)
1be12a4a 2126 tm_file="gofast.h mips/ecoff.h"
46f18e7b
RK
2127 if [[ x$stabs = xyes ]]; then
2128 tm_file="${tm_file} dbx.h"
2129 fi
2130 tmake_file=mips/t-ecoff
46f18e7b
RK
2131 ;;
2132 mipsel-*-elf*)
2133 tm_file="mips/elfl.h libgloss.h"
2134 tmake_file=mips/t-ecoff
2135 ;;
2136 mips-*-elf*)
2137 tm_file="mips/elf.h libgloss.h"
2138 tmake_file=mips/t-ecoff
2139 ;;
2140 mips64el-*-elf*)
2141 tm_file="mips/elfl64.h libgloss.h"
2142 tmake_file=mips/t-ecoff
2143 ;;
2144 mips64orionel-*-elf*)
61536478 2145 tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
46f18e7b
RK
2146 tmake_file=mips/t-ecoff
2147 ;;
2148 mips64-*-elf*)
2149 tm_file="mips/elf64.h libgloss.h"
2150 tmake_file=mips/t-ecoff
2151 ;;
2152 mips64orion-*-elf*)
61536478 2153 tm_file="mips/elforion.h mips/elf64.h libgloss.h"
46f18e7b
RK
2154 tmake_file=mips/t-ecoff
2155 ;;
2156 mips64orion-*-rtems*)
61536478 2157 tm_file="mips/elforion.h mips/elfl64.h mips/rtems64.h"
46f18e7b
RK
2158 tmake_file="mips/t-ecoff t-rtems"
2159 ;;
e9a25f70
JL
2160 mipstx39el-*-elf*)
2161 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
09e4daf5 2162 tmake_file=mips/t-r3900
e9a25f70
JL
2163 ;;
2164 mipstx39-*-elf*)
2165 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
09e4daf5 2166 tmake_file=mips/t-r3900
e9a25f70 2167 ;;
46f18e7b
RK
2168 mips-*-*) # Default MIPS RISC-OS 4.0.
2169 if [[ x$stabs = xyes ]]; then
2170 tm_file="${tm_file} dbx.h"
2171 fi
2172 if [[ x$gas = xyes ]]
2173 then
2174 tmake_file=mips/t-mips-gas
2175 else
2176 extra_passes="mips-tfile mips-tdump"
2177 fi
2178 if [[ x$gnu_ld != xyes ]]
2179 then
2180 use_collect2=yes
2181 fi
2182 ;;
cef64ec4
RK
2183 mn10200-*-*)
2184 cpu_type=mn10200
2185 tm_file="mn10200/mn10200.h"
2186 if [[ x$stabs = xyes ]]
2187 then
2188 tm_file="${tm_file} dbx.h"
2189 fi
2190 use_collect2=no
2191 ;;
46f18e7b
RK
2192 mn10300-*-*)
2193 cpu_type=mn10300
2194 tm_file="mn10300/mn10300.h"
2195 if [[ x$stabs = xyes ]]
2196 then
2197 tm_file="${tm_file} dbx.h"
2198 fi
2199 use_collect2=no
2200 ;;
2201 ns32k-encore-bsd*)
2202 tm_file=ns32k/encore.h
2203 use_collect2=yes
2204 ;;
2205 ns32k-sequent-bsd*)
2206 tm_file=ns32k/sequent.h
2207 use_collect2=yes
2208 ;;
2209 ns32k-tek6100-bsd*)
2210 tm_file=ns32k/tek6100.h
46f18e7b
RK
2211 use_collect2=yes
2212 ;;
2213 ns32k-tek6200-bsd*)
2214 tm_file=ns32k/tek6200.h
46f18e7b
RK
2215 use_collect2=yes
2216 ;;
2217# This has not been updated to GCC 2.
2218# ns32k-ns-genix*)
61536478 2219# xm_defines=USG
46f18e7b
RK
2220# xmake_file=ns32k/x-genix
2221# tm_file=ns32k/genix.h
46f18e7b
RK
2222# use_collect2=yes
2223# ;;
2224 ns32k-merlin-*)
2225 tm_file=ns32k/merlin.h
2226 use_collect2=yes
2227 ;;
2228 ns32k-pc532-mach*)
2229 tm_file=ns32k/pc532-mach.h
2230 use_collect2=yes
2231 ;;
2232 ns32k-pc532-minix*)
2233 tm_file=ns32k/pc532-min.h
61536478
JL
2234 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
2235 xm_defines=USG
46f18e7b
RK
2236 use_collect2=yes
2237 ;;
2238 ns32k-pc532-netbsd*)
2239 tm_file=ns32k/netbsd.h
be1ed94f 2240 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 2241 fixincludes=fixinc.wrap
e47f44f4 2242 tmake_file=t-netbsd
46f18e7b
RK
2243 ;;
2244 pdp11-*-bsd)
2245 tm_file="${tm_file} pdp11/2bsd.h"
2246 ;;
2247 pdp11-*-*)
2248 ;;
2249 pyramid-*-*)
2250 cpu_type=pyr
2251 xmake_file=pyr/x-pyr
2252 use_collect2=yes
2253 ;;
2254 romp-*-aos*)
2255 use_collect2=yes
2256 ;;
2257 romp-*-mach*)
2258 xmake_file=romp/x-mach
2259 use_collect2=yes
2260 ;;
c55dcc7d
FF
2261 powerpc-*-beos*)
2262 cpu_type=rs6000
2263 tm_file=rs6000/beos.h
2264 xm_file=rs6000/xm-beos.h
2265 tmake_file=rs6000/t-beos
2266 xmake_file=rs6000/x-beos
2267 ;;
46f18e7b
RK
2268 powerpc-*-sysv* | powerpc-*-elf*)
2269 tm_file=rs6000/sysv4.h
61536478
JL
2270 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2271 xm_defines="USG POSIX"
46f18e7b
RK
2272 extra_headers=ppc-asm.h
2273 if [[ x$gas = xyes ]]
2274 then
2275 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2276 else
2277 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2278 fi
2279 xmake_file=rs6000/x-sysv4
2280 ;;
2281 powerpc-*-eabiaix*)
2282 tm_file=rs6000/eabiaix.h
2283 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2284 fixincludes=Makefile.in
2285 extra_headers=ppc-asm.h
2286 ;;
2287 powerpc-*-eabisim*)
2288 tm_file=rs6000/eabisim.h
2289 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2290 fixincludes=Makefile.in
2291 extra_headers=ppc-asm.h
2292 ;;
2293 powerpc-*-eabi*)
2294 tm_file=rs6000/eabi.h
2295 if [[ x$gas = xyes ]]
2296 then
2297 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2298 else
2299 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2300 fi
2301 fixincludes=Makefile.in
2302 extra_headers=ppc-asm.h
2303 ;;
dec3e070
JW
2304 powerpc-*-rtems*)
2305 tm_file=rs6000/rtems.h
46f18e7b
RK
2306 if [[ x$gas = xyes ]]
2307 then
dec3e070 2308 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
46f18e7b 2309 else
dec3e070 2310 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
46f18e7b 2311 fi
46f18e7b 2312 fixincludes=Makefile.in
46f18e7b
RK
2313 extra_headers=ppc-asm.h
2314 ;;
ce514f57
FS
2315 powerpc-*-linux-gnulibc1)
2316 tm_file=rs6000/linux.h
2317 xm_file=rs6000/xm-sysv4.h
2318 out_file=rs6000/rs6000.c
2319 if [[ x$gas = xyes ]]
2320 then
2321 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2322 else
2323 tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2324 fi
2325 xmake_file=x-linux
2326 fixincludes=Makefile.in
2327 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2328 extra_headers=ppc-asm.h
2329 if [[ x$enable_threads = xyes ]]; then
2330 thread_file='posix'
2331 fi
2332 ;;
844dadc7 2333 powerpc-*-linux-gnu*)
dec3e070 2334 tm_file=rs6000/linux.h
61536478
JL
2335 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2336 xm_defines="USG ${xm_defines}"
dec3e070 2337 out_file=rs6000/rs6000.c
46f18e7b
RK
2338 if [[ x$gas = xyes ]]
2339 then
dec3e070 2340 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
46f18e7b 2341 else
dec3e070 2342 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
46f18e7b 2343 fi
d7308c0c 2344 xmake_file=x-linux
dec3e070 2345 fixincludes=Makefile.in
d7308c0c 2346 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
46f18e7b 2347 extra_headers=ppc-asm.h
d1054723 2348 if [[ x$enable_threads = xyes ]]; then
d7308c0c
RK
2349 thread_file='posix'
2350 fi
46f18e7b 2351 ;;
7cc34889 2352 powerpc-wrs-vxworks*)
46f18e7b 2353 cpu_type=rs6000
61536478
JL
2354 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2355 xm_defines="USG POSIX"
46f18e7b
RK
2356 tm_file=rs6000/vxppc.h
2357 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2358 extra_headers=ppc-asm.h
7cc34889 2359 thread_file='vxworks'
46f18e7b
RK
2360 ;;
2361 powerpcle-*-sysv* | powerpcle-*-elf*)
2362 tm_file=rs6000/sysv4le.h
61536478
JL
2363 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2364 xm_defines="USG POSIX"
46f18e7b
RK
2365 if [[ x$gas = xyes ]]
2366 then
2367 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2368 else
2369 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2370 fi
2371 xmake_file=rs6000/x-sysv4
2372 extra_headers=ppc-asm.h
2373 ;;
2374 powerpcle-*-eabisim*)
2375 tm_file=rs6000/eabilesim.h
2376 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2377 fixincludes=Makefile.in
2378 extra_headers=ppc-asm.h
2379 ;;
2380 powerpcle-*-eabi*)
2381 tm_file=rs6000/eabile.h
2382 if [[ x$gas = xyes ]]
2383 then
2384 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2385 else
2386 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2387 fi
2388 fixincludes=Makefile.in
2389 extra_headers=ppc-asm.h
2390 ;;
2391 powerpcle-*-winnt* )
2392 tm_file=rs6000/win-nt.h
2393 tmake_file=rs6000/t-winnt
2394# extra_objs=pe.o
2395 fixincludes=Makefile.in
434332b5 2396 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
2397 thread_file='win32'
2398 fi
46f18e7b
RK
2399 extra_headers=ppc-asm.h
2400 ;;
2401 powerpcle-*-pe | powerpcle-*-cygwin32)
2402 tm_file=rs6000/cygwin32.h
61536478 2403 xm_file="rs6000/xm-cygwin32.h ${xm_file}"
46f18e7b
RK
2404 tmake_file=rs6000/t-winnt
2405 xmake_file=rs6000/x-cygwin32
2406# extra_objs=pe.o
2407 fixincludes=Makefile.in
434332b5 2408 if [[ x$enable_threads = xyes ]]; then
0bbb1697
RK
2409 thread_file='win32'
2410 fi
46f18e7b
RK
2411 exeext=.exe
2412 extra_headers=ppc-asm.h
2413 ;;
2414 powerpcle-*-solaris2*)
2415 tm_file=rs6000/sol2.h
61536478
JL
2416 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2417 xm_defines="USG POSIX"
46f18e7b
RK
2418 if [[ x$gas = xyes ]]
2419 then
2420 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2421 else
2422 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2423 fi
2424 xmake_file=rs6000/x-sysv4
61536478
JL
2425 case $machine in
2426 *-*-solaris2.[[0-4]])
2427 fixincludes=fixinc.svr4;;
2428 *)
32f65aa0 2429 fixincludes=fixinc.wrap;;
61536478 2430 esac
46f18e7b
RK
2431 extra_headers=ppc-asm.h
2432 ;;
2433 rs6000-ibm-aix3.[[01]]*)
2434 tm_file=rs6000/aix31.h
2435 xmake_file=rs6000/x-aix31
2436 use_collect2=yes
2437 ;;
2438 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2439 tm_file=rs6000/aix3newas.h
2440 if [[ x$host != x$target ]]
2441 then
2442 tmake_file=rs6000/t-xnewas
2443 else
2444 tmake_file=rs6000/t-newas
2445 fi
2446 use_collect2=yes
2447 ;;
a260abc9 2448 rs6000-ibm-aix4.[[12]].* | powerpc-ibm-aix4.[[12]].*)
46f18e7b
RK
2449 tm_file=rs6000/aix41.h
2450 if [[ x$host != x$target ]]
2451 then
2452 tmake_file=rs6000/t-xnewas
2453 else
2454 tmake_file=rs6000/t-newas
2455 fi
a260abc9
DE
2456 xmake_file=rs6000/x-aix41
2457 use_collect2=yes
2458 ;;
2459 rs6000-ibm-aix4.[[3456789]].* | powerpc-ibm-aix4.[[3456789]].*)
2460 tm_file=rs6000/aix43.h
2461 if [[ x$host != x$target ]]
2462 then
2463 tmake_file=rs6000/t-xaix43
2464 else
2465 tmake_file=rs6000/t-aix43
2466 fi
2467 xmake_file=rs6000/x-aix43
2468 use_collect2=yes
2469 ;;
2470 rs6000-ibm-aix[[56789]].* | powerpc-ibm-aix[[56789]].*)
2471 tm_file=rs6000/aix43.h
2472 if [[ x$host != x$target ]]
2473 then
2474 tmake_file=rs6000/t-xaix43
2475 else
2476 tmake_file=rs6000/t-aix43
2477 fi
2478 xmake_file=rs6000/x-aix43
46f18e7b
RK
2479 use_collect2=yes
2480 ;;
2481 rs6000-ibm-aix*)
2482 use_collect2=yes
2483 ;;
2484 rs6000-bull-bosx)
2485 use_collect2=yes
2486 ;;
2487 rs6000-*-mach*)
2488 tm_file=rs6000/mach.h
61536478 2489 xm_file="${xm_file} rs6000/xm-mach.h"
46f18e7b
RK
2490 xmake_file=rs6000/x-mach
2491 use_collect2=yes
2492 ;;
2493 rs6000-*-lynxos*)
2494 tm_file=rs6000/lynx.h
2495 xm_file=rs6000/xm-lynx.h
2496 tmake_file=rs6000/t-rs6000
2497 xmake_file=rs6000/x-lynx
2498 use_collect2=yes
2499 ;;
2500 sh-*-elf*)
2501 tm_file=sh/elf.h
2502 float_format=sh
2503 ;;
5d84b57e
JS
2504 sh-*-rtems*)
2505 tmake_file="sh/t-sh t-rtems"
2506 tm_file=sh/rtems.h
2507 float_format=sh
2508 ;;
46f18e7b
RK
2509 sh-*-*)
2510 float_format=sh
2511 ;;
2512 sparc-tti-*)
2513 tm_file=sparc/pbd.h
61536478
JL
2514 xm_file="xm-alloca.h ${xm_file}"
2515 xm_defines=USG
46f18e7b
RK
2516 ;;
2517 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2518 tm_file=sparc/vxsparc.h
2519 tmake_file=sparc/t-vxsparc
2520 use_collect2=yes
7cc34889 2521 thread_file='vxworks'
46f18e7b
RK
2522 ;;
2523 sparc-*-aout*)
2524 tmake_file=sparc/t-sparcbare
2525 tm_file="sparc/aout.h libgloss.h"
2526 ;;
2527 sparc-*-netbsd*)
2528 tm_file=sparc/netbsd.h
be1ed94f 2529 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 2530 fixincludes=fixinc.wrap
e47f44f4 2531 tmake_file=t-netbsd
46f18e7b
RK
2532 ;;
2533 sparc-*-bsd*)
2534 tm_file=sparc/bsd.h
2535 ;;
ac52b80b
DE
2536 sparc-*-elf*)
2537 tm_file=sparc/elf.h
2538 tmake_file=sparc/t-elf
2539 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2540 #float_format=i128
2541 float_format=i64
2542 ;;
956d6950 2543 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
61536478 2544 xm_file="${xm_file} sparc/xm-linux.h"
46f18e7b
RK
2545 tm_file=sparc/linux-aout.h
2546 xmake_file=x-linux
2547 fixincludes=Makefile.in #On Linux, the headers are ok already.
46f18e7b 2548 gnu_ld=yes
46f18e7b 2549 ;;
956d6950 2550 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
61536478 2551 xm_file="${xm_file} sparc/xm-linux.h"
2334126e 2552 xmake_file=x-linux
46f18e7b 2553 tm_file=sparc/linux.h
9d1ebd25 2554 tmake_file="t-linux t-linux-gnulibc1"
9ad03bc1
RK
2555 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2556 fixincludes=Makefile.in #On Linux, the headers are ok already.
9ad03bc1
RK
2557 gnu_ld=yes
2558 ;;
956d6950 2559 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
61536478 2560 xm_file="${xm_file} sparc/xm-linux.h"
2334126e 2561 xmake_file=x-linux
9ad03bc1 2562 tm_file=sparc/linux.h
9d1ebd25 2563 tmake_file="t-linux"
9ad03bc1 2564 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
46f18e7b 2565 fixincludes=Makefile.in #On Linux, the headers are ok already.
46f18e7b 2566 gnu_ld=yes
d1054723 2567 if [[ x$enable_threads = xyes ]]; then
9ad03bc1
RK
2568 thread_file='posix'
2569 fi
46f18e7b
RK
2570 ;;
2571 sparc-*-lynxos*)
2572 if [[ x$gas = xyes ]]
2573 then
2574 tm_file=sparc/lynx.h
2575 else
2576 tm_file=sparc/lynx-ng.h
2577 fi
2578 xm_file=sparc/xm-lynx.h
2579 tmake_file=sparc/t-sunos41
2580 xmake_file=x-lynx
2581 ;;
2582 sparc-*-rtems*)
2583 tmake_file="sparc/t-sparcbare t-rtems"
2584 tm_file=sparc/rtems.h
2585 ;;
2586 sparc-*-solaris2*)
0a9bdce3
PE
2587 if [[ x$gnu_ld = xyes ]]
2588 then
2589 tm_file=sparc/sol2.h
2590 else
2591 tm_file=sparc/sol2-sld.h
2592 fi
22ec3928
RE
2593 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
2594 xm_defines="USG POSIX"
46f18e7b
RK
2595 tmake_file=sparc/t-sol2
2596 xmake_file=sparc/x-sysv4
2597 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
61536478
JL
2598 case $machine in
2599 *-*-solaris2.[[0-4]])
2600 fixincludes=fixinc.svr4;;
2601 *)
32f65aa0 2602 fixincludes=fixinc.wrap;;
61536478 2603 esac
e9a25f70 2604 float_format=i128
f24af81b
TT
2605 if [[ x${enable_threads} = x ]]; then
2606 enable_threads=$have_pthread_h
2607 if [[ x${enable_threads} = x ]]; then
2608 enable_threads=$have_thread_h
2609 fi
2610 fi
2611 if [[ x${enable_threads} = xyes ]]; then
2612 if [[ x${have_pthread_h} = xyes ]]; then
2613 thread_file='posix'
2614 else
0bbb1697 2615 thread_file='solaris'
f24af81b 2616 fi
0bbb1697 2617 fi
46f18e7b
RK
2618 ;;
2619 sparc-*-sunos4.0*)
2620 tm_file=sparc/sunos4.h
2621 tmake_file=sparc/t-sunos40
2622 use_collect2=yes
2623 ;;
2624 sparc-*-sunos4*)
2625 tm_file=sparc/sunos4.h
2626 tmake_file=sparc/t-sunos41
2627 use_collect2=yes
ca55abae
JM
2628 if [[ x$gas = xyes ]]; then
2629 tm_file="${tm_file} sparc/sun4gas.h"
2630 fi
46f18e7b
RK
2631 ;;
2632 sparc-*-sunos3*)
2633 tm_file=sparc/sun4o3.h
2634 use_collect2=yes
2635 ;;
2636 sparc-*-sysv4*)
2637 tm_file=sparc/sysv4.h
61536478
JL
2638 xm_file="xm-siglist.h sparc/xm-sysv4.h"
2639 xm_defines="USG POSIX"
46f18e7b
RK
2640 tmake_file=t-svr4
2641 xmake_file=sparc/x-sysv4
2642 extra_parts="crtbegin.o crtend.o"
2643 ;;
2644 sparc-*-vxsim*)
f5963e61
JL
2645 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
2646 xm_defines="USG POSIX"
46f18e7b
RK
2647 tm_file=sparc/vxsim.h
2648 tmake_file=sparc/t-vxsparc
2649 xmake_file=sparc/x-sysv4
2650 ;;
2651 sparclet-*-aout*)
2652 tm_file="sparc/splet.h libgloss.h"
2653 tmake_file=sparc/t-splet
2654 ;;
2655 sparclite-*-coff*)
2656 tm_file="sparc/litecoff.h libgloss.h"
2657 tmake_file=sparc/t-sparclite
2658 ;;
2659 sparclite-*-aout*)
2660 tm_file="sparc/lite.h aoutos.h libgloss.h"
2661 tmake_file=sparc/t-sparclite
2662 ;;
2663 sparc64-*-aout*)
2664 tmake_file=sparc/t-sp64
2665 tm_file=sparc/sp64-aout.h
2666 ;;
2667 sparc64-*-elf*)
2668 tmake_file=sparc/t-sp64
2669 tm_file=sparc/sp64-elf.h
2670 extra_parts="crtbegin.o crtend.o"
2671 ;;
956d6950 2672 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
2334126e
DE
2673 tmake_file=sparc/t-sp64
2674 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2675 tm_file=sparc/linux64.h
2676 xmake_file=x-linux
956d6950 2677 fixincludes=Makefile.in # The headers are ok already.
2334126e
DE
2678 gnu_ld=yes
2679 ;;
46f18e7b
RK
2680# This hasn't been upgraded to GCC 2.
2681# tahoe-harris-*) # Harris tahoe, using COFF.
2682# tm_file=tahoe/harris.h
2683# ;;
2684# tahoe-*-bsd*) # tahoe running BSD
2685# ;;
e98e406f
NC
2686 thumb-*-coff* | thumbel-*-coff*)
2687 tm_file=arm/tcoff.h
2688 out_file=arm/thumb.c
2689 xm_file=arm/xm-thumb.h
2690 md_file=arm/thumb.md
2691 tmake_file=arm/t-thumb
2692 ;;
46f18e7b
RK
2693# This hasn't been upgraded to GCC 2.
2694# tron-*-*)
2695# cpu_type=gmicro
2696# use_collect2=yes
2697# ;;
f84271d9
JL
2698 v850-*-*)
2699 cpu_type=v850
2700 tm_file="v850/v850.h"
2701 xm_file="v850/xm-v850.h"
62db76ee 2702 tmake_file=v850/t-v850
f84271d9
JL
2703 if [[ x$stabs = xyes ]]
2704 then
2705 tm_file="${tm_file} dbx.h"
2706 fi
2707 use_collect2=no
2708 ;;
46f18e7b
RK
2709 vax-*-bsd*) # vaxen running BSD
2710 use_collect2=yes
2711 float_format=vax
2712 ;;
2713 vax-*-sysv*) # vaxen running system V
2714 tm_file="${tm_file} vax/vaxv.h"
61536478 2715 xm_defines=USG
46f18e7b
RK
2716 float_format=vax
2717 ;;
2718 vax-*-netbsd*)
2719 tm_file="${tm_file} netbsd.h vax/netbsd.h"
be1ed94f 2720 # On NetBSD, the headers are already okay, except for math.h.
32f65aa0 2721 fixincludes=fixinc.wrap
e47f44f4 2722 tmake_file=t-netbsd
46f18e7b
RK
2723 float_format=vax
2724 ;;
2725 vax-*-ultrix*) # vaxen running ultrix
2726 tm_file="${tm_file} vax/ultrix.h"
2727 use_collect2=yes
2728 float_format=vax
2729 ;;
2730 vax-*-vms*) # vaxen running VMS
2731 xm_file=vax/xm-vms.h
2732 tm_file=vax/vms.h
2733 float_format=vax
2734 ;;
2735 vax-*-*) # vax default entry
2736 float_format=vax
2737 ;;
2738 we32k-att-sysv*)
2739 xm_file="${xm_file} xm-svr3"
2740 use_collect2=yes
2741 ;;
2742 *)
2743 echo "Configuration $machine not supported" 1>&2
2744 exit 1
2745 ;;
2746 esac
2747
2748 case $machine in
2749 *-*-linux-gnu*)
61536478 2750 ;; # Existing GNU/Linux systems do not use the GNU setup.
46f18e7b
RK
2751 *-*-gnu*)
2752 # On the GNU system, the setup is just about the same on
2753 # each different CPU. The specific machines that GNU
2754 # supports are matched above and just set $cpu_type.
61536478 2755 xm_file="xm-gnu.h ${xm_file}"
46f18e7b 2756 tm_file=${cpu_type}/gnu.h
6b403743 2757 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
46f18e7b
RK
2758 # GNU always uses ELF.
2759 elf=yes
2760 # GNU tools are the only tools.
2761 gnu_ld=yes
2762 gas=yes
2763 # On GNU, the headers are already okay.
2764 fixincludes=Makefile.in
2765 xmake_file=x-linux # These details are the same as Linux.
2766 tmake_file=t-gnu # These are not.
2767 ;;
2768 *-*-sysv4*)
2769 fixincludes=fixinc.svr4
2770 xmake_try_sysv=x-sysv
46f18e7b
RK
2771 install_headers_dir=install-headers-cpio
2772 ;;
2773 *-*-sysv*)
46f18e7b
RK
2774 install_headers_dir=install-headers-cpio
2775 ;;
2776 esac
2777
61536478 2778 # Distinguish i[34567]86
46f18e7b
RK
2779 # Also, do not run mips-tfile on MIPS if using gas.
2780 # Process --with-cpu= for PowerPC/rs6000
2781 target_cpu_default2=
2782 case $machine in
2783 i486-*-*)
2784 target_cpu_default2=1
2785 ;;
2786 i586-*-*)
2787 target_cpu_default2=2
2788 ;;
61536478 2789 i686-*-* | i786-*-*)
46f18e7b
RK
2790 target_cpu_default2=3
2791 ;;
08fc0184
RK
2792 alpha*-*-*)
2793 case $machine in
e9a25f70
JL
2794 alphaev6*)
2795 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2796 ;;
2797 alphapca56*)
fbb5ed67 2798 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
e9a25f70 2799 ;;
08fc0184 2800 alphaev56*)
e9a25f70 2801 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
08fc0184
RK
2802 ;;
2803 alphaev5*)
2804 target_cpu_default2="MASK_CPU_EV5"
2805 ;;
2806 esac
2807
46f18e7b
RK
2808 if [[ x$gas = xyes ]]
2809 then
c43143f6 2810 if [[ "$target_cpu_default2" = "" ]]
08fc0184 2811 then
e71c3bb0 2812 target_cpu_default2="MASK_GAS"
08fc0184 2813 else
e71c3bb0 2814 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
08fc0184 2815 fi
46f18e7b
RK
2816 fi
2817 ;;
956d6950
JL
2818 arm*-*-*)
2819 case "x$with_cpu" in
2820 x)
2821 # The most generic
2822 target_cpu_default2="TARGET_CPU_generic"
2823 ;;
2824
2825 # Distinguish cores, and major variants
2826 # arm7m doesn't exist, but D & I don't affect code
2827 xarm[23678] | xarm250 | xarm[67][01]0 \
2828 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
2829 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2830 | xstrongarm | xstrongarm110)
2831 target_cpu_default2="TARGET_CPU_$with_cpu"
2832 ;;
2833
2834 xyes | xno)
2835 echo "--with-cpu must be passed a value" 1>&2
2836 exit 1
2837 ;;
2838
2839 *)
2840 if [[ x$pass2done = xyes ]]
2841 then
2842 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2843 exit 1
2844 fi
2845 ;;
2846 esac
2847 ;;
2848
46f18e7b
RK
2849 mips*-*-ecoff* | mips*-*-elf*)
2850 if [[ x$gas = xyes ]]
2851 then
2852 if [[ x$gnu_ld = xyes ]]
2853 then
2854 target_cpu_default2=20
2855 else
2856 target_cpu_default2=16
2857 fi
2858 fi
2859 ;;
2860 mips*-*-*)
2861 if [[ x$gas = xyes ]]
2862 then
2863 target_cpu_default2=16
2864 fi
2865 ;;
2866 powerpc*-*-* | rs6000-*-*)
2867 case "x$with_cpu" in
2868 x)
2869 ;;
2870
2871 xcommon | xpower | xpower2 | xpowerpc | xrios \
52cddadb
MM
2872 | xrios1 | xrios2 | xrsc | xrsc1 \
2873 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2874 | x403 | x505 | x801 | x821 | x823 | x860)
f24b370a 2875 target_cpu_default2="\"$with_cpu\""
46f18e7b
RK
2876 ;;
2877
2878 xyes | xno)
2879 echo "--with-cpu must be passed a value" 1>&2
2880 exit 1
2881 ;;
2882
2883 *)
956d6950
JL
2884 if [[ x$pass2done = xyes ]]
2885 then
2886 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2887 exit 1
2888 fi
46f18e7b
RK
2889 ;;
2890 esac
2891 ;;
2892 sparc*-*-*)
2893 case ".$with_cpu" in
2894 .)
2895 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2896 ;;
ac52b80b 2897 .supersparc | .ultrasparc | .v7 | .v8 | .v9)
46f18e7b
RK
2898 target_cpu_default2="TARGET_CPU_$with_cpu"
2899 ;;
2900 *)
956d6950
JL
2901 if [[ x$pass2done = xyes ]]
2902 then
2903 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2904 exit 1
2905 fi
46f18e7b
RK
2906 ;;
2907 esac
2908 ;;
2909 esac
2910
c43143f6 2911 if [[ "$target_cpu_default2" != "" ]]
46f18e7b 2912 then
c43143f6 2913 if [[ "$target_cpu_default" != "" ]]
46f18e7b
RK
2914 then
2915 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2916 else
2917 target_cpu_default=$target_cpu_default2
2918 fi
2919 fi
2920
2921 # No need for collect2 if we have the GNU linker.
d460fb3c
JM
2922 # Actually, there is now; GNU ld doesn't handle the EH info or
2923 # collecting for shared libraries.
ca8c3b37
JM
2924 #case x$gnu_ld in
2925 #xyes)
2926 # use_collect2=
2927 # ;;
2928 #esac
46f18e7b
RK
2929
2930# Save data on machine being used to compile GCC in build_xm_file.
2931# Save data on host machine in vars host_xm_file and host_xmake_file.
2932 if [[ x$pass1done = x ]]
2933 then
2934 if [[ x"$xm_file" = x ]]
2935 then build_xm_file=$cpu_type/xm-$cpu_type.h
2936 else build_xm_file=$xm_file
2937 fi
61536478 2938 build_xm_defines=$xm_defines
46f18e7b
RK
2939 build_install_headers_dir=$install_headers_dir
2940 build_exeext=$exeext
2941 pass1done=yes
2942 else
2943 if [[ x$pass2done = x ]]
2944 then
2945 if [[ x"$xm_file" = x ]]
2946 then host_xm_file=$cpu_type/xm-$cpu_type.h
2947 else host_xm_file=$xm_file
2948 fi
61536478 2949 host_xm_defines=$xm_defines
46f18e7b
RK
2950 if [[ x"$xmake_file" = x ]]
2951 then xmake_file=$cpu_type/x-$cpu_type
2952 fi
2953 host_xmake_file="$xmake_file"
2954 host_truncate_target=$truncate_target
2955 host_extra_gcc_objs=$extra_gcc_objs
2956 host_extra_objs=$extra_host_objs
6e26218f 2957 host_exeext=$exeext
46f18e7b
RK
2958 pass2done=yes
2959 fi
2960 fi
2961done
2962
2963extra_objs="${host_extra_objs} ${extra_objs}"
2964
2965# Default the target-machine variables that were not explicitly set.
2966if [[ x"$tm_file" = x ]]
2967then tm_file=$cpu_type/$cpu_type.h; fi
2968
2969if [[ x$extra_headers = x ]]
2970then extra_headers=; fi
2971
2972if [[ x"$xm_file" = x ]]
2973then xm_file=$cpu_type/xm-$cpu_type.h; fi
2974
e98e406f
NC
2975if [[ x$md_file = x ]]
2976then md_file=$cpu_type/$cpu_type.md; fi
46f18e7b
RK
2977
2978if [[ x$out_file = x ]]
2979then out_file=$cpu_type/$cpu_type.c; fi
2980
2981if [[ x"$tmake_file" = x ]]
2982then tmake_file=$cpu_type/t-$cpu_type
2983fi
2984
2985if [[ x$float_format = x ]]
2986then float_format=i64
2987fi
2988
128f7968
RH
2989if [[ x$enable_haifa = x ]]
2990then
2991 case $target in
2b7972b0 2992 alpha*-* | hppa1.?-* | powerpc*-* | rs6000-* | *sparc-* | m32r*-*)
128f7968
RH
2993 enable_haifa=yes;;
2994 esac
2995fi
2996
46f18e7b
RK
2997# Say what files are being used for the output code and MD file.
2998echo "Using \`$srcdir/config/$out_file' to output insns."
2999echo "Using \`$srcdir/config/$md_file' as machine description file."
3000
3001count=a
3002for f in $tm_file; do
3003 count=${count}x
3004done
3005if [[ $count = ax ]]; then
3006 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
3007else
3008 echo "Using the following target machine macro files:"
3009 for f in $tm_file; do
3010 echo " $srcdir/config/$f"
3011 done
3012fi
3013
3014count=a
3015for f in $host_xm_file; do
3016 count=${count}x
3017done
3018if [[ $count = ax ]]; then
3019 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
3020else
3021 echo "Using the following host machine macro files:"
3022 for f in $host_xm_file; do
3023 echo " $srcdir/config/$f"
3024 done
3025fi
3026
3027if [[ "$host_xm_file" != "$build_xm_file" ]]; then
3028 count=a
3029 for f in $build_xm_file; do
3030 count=${count}x
3031 done
3032 if [[ $count = ax ]]; then
3033 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
3034 else
3035 echo "Using the following build machine macro files:"
3036 for f in $build_xm_file; do
3037 echo " $srcdir/config/$f"
3038 done
3039 fi
3040fi
3041
a851212a
JW
3042if [[ x$thread_file = x ]]; then
3043 if [[ x$target_thread_file != x ]]; then
3044 thread_file=$target_thread_file
3045 else
3046 thread_file='single'
3047 fi
46f18e7b 3048fi
46f18e7b
RK
3049
3050# Set up the header files.
3051# $links is the list of header files to create.
3052# $vars is the list of shell variables with file names to include.
b7cb92ad 3053# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 3054# the first file included by config.h.
61536478 3055null_defines=
b7cb92ad 3056host_xm_file="auto-host.h ${host_xm_file}"
db81d74a 3057
b7cb92ad 3058# If host=build, it is correct to have hconfig include auto-host.h
db81d74a
RH
3059# as well. If host!=build, we are in error and need to do more
3060# work to find out the build config parameters.
3061if [[ x$host = x$build ]]
3062then
b7cb92ad
JL
3063 build_xm_file="auto-host.h ${build_xm_file}"
3064else
3065 # We create a subdir, then run autoconf in the subdir.
3066 # To prevent recursion we set host and build for the new
3067 # invocation of configure to the build for this invocation
3068 # of configure.
3069 tempdir=build.$$
3070 rm -rf $tempdir
3071 mkdir $tempdir
3072 cd $tempdir
3073 case ${srcdir} in
3074 /*) realsrcdir=${srcdir};;
3075 *) realsrcdir=../${srcdir};;
3076 esac
fe81dd69 3077 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
b7cb92ad
JL
3078 --target=$target --host=$build --build=$build
3079
3080 # We just finished tests for the build machine, so rename
3081 # the file auto-build.h in the gcc directory.
3082 mv auto-host.h ../auto-build.h
3083 cd ..
3084 rm -rf $tempdir
3085 build_xm_file="auto-build.h ${build_xm_file}"
db81d74a
RH
3086fi
3087
46f18e7b 3088vars="host_xm_file tm_file xm_file build_xm_file"
e9a25f70 3089links="config.h tm.h tconfig.h hconfig.h"
61536478 3090defines="host_xm_defines null_defines xm_defines build_xm_defines"
46f18e7b
RK
3091
3092rm -f config.bak
3093if [[ -f config.status ]]; then mv -f config.status config.bak; fi
3094
3095# Make the links.
3096while [[ -n "$vars" ]]
3097do
46f18e7b
RK
3098 set $vars; var=$1; shift; vars=$*
3099 set $links; link=$1; shift; links=$*
61536478 3100 set $defines; define=$1; shift; defines=$*
46f18e7b
RK
3101
3102 rm -f $link
3103
3104 # Define TARGET_CPU_DEFAULT if the system wants one.
3105 # This substitutes for lots of *.h files.
c43143f6 3106 if [[ "$target_cpu_default" != "" -a $link = tm.h ]]
46f18e7b 3107 then
8fbf199e 3108 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
46f18e7b
RK
3109 fi
3110
3111 for file in `eval echo '$'$var`; do
3112 echo "#include \"$file\"" >>$link
3113 done
61536478
JL
3114
3115 for def in `eval echo '$'$define`; do
3116 echo "#ifndef $def" >>$link
3117 echo "#define $def" >>$link
3118 echo "#endif" >>$link
3119 done
46f18e7b
RK
3120done
3121
3122# Truncate the target if necessary
3123if [[ x$host_truncate_target != x ]]; then
3124 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3125fi
3126
3127# Get the version number from the toplevel
3128version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
3129
7fa10b25
RK
3130# Get an absolute path to the GCC top-level source directory
3131holddir=`pwd`
3132cd $srcdir
3133topdir=`pwd`
3134cd $holddir
3135
af5e4ada 3136# Conditionalize the makefile for this host machine.
94f42018
DE
3137# Make-host contains the concatenation of all host makefile fragments
3138# [there can be more than one]. This file is built by configure.frag.
3139host_overrides=Make-host
af5e4ada 3140dep_host_xmake_file=
94f42018
DE
3141for f in .. ${host_xmake_file}
3142do
3143 if [[ -f ${srcdir}/config/$f ]]
3144 then
3145 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
3146 fi
3147done
46f18e7b 3148
af5e4ada 3149# Conditionalize the makefile for this target machine.
94f42018
DE
3150# Make-target contains the concatenation of all host makefile fragments
3151# [there can be more than one]. This file is built by configure.frag.
3152target_overrides=Make-target
af5e4ada 3153dep_tmake_file=
94f42018
DE
3154for f in .. ${tmake_file}
3155do
3156 if [[ -f ${srcdir}/config/$f ]]
3157 then
3158 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
3159 fi
3160done
5891b37d 3161
af5e4ada
DE
3162# If the host doesn't support symlinks, modify CC in
3163# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
3164# Otherwise, we can use "CC=$(CC)".
3165rm -f symtest.tem
61536478 3166if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
af5e4ada
DE
3167then
3168 cc_set_by_configure="\$(CC)"
3169 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
3170else
61536478
JL
3171 rm -f symtest.tem
3172 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
3173 then
3174 symbolic_link="cp -p"
3175 else
3176 symbolic_link="cp"
3177 fi
af5e4ada
DE
3178 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
3179 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
3180fi
3181rm -f symtest.tem
5891b37d 3182
af5e4ada 3183out_object_file=`basename $out_file .c`.o
5891b37d 3184
af5e4ada
DE
3185tm_file_list=
3186for f in $tm_file; do
3187 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
3188done
46f18e7b 3189
af5e4ada
DE
3190host_xm_file_list=
3191for f in $host_xm_file; do
b7cb92ad 3192 if test $f != "auto-host.h"; then
db81d74a
RH
3193 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
3194 else
b7cb92ad 3195 host_xm_file_list="${host_xm_file_list} auto-host.h"
db81d74a 3196 fi
af5e4ada
DE
3197done
3198
3199build_xm_file_list=
3200for f in $build_xm_file; do
b7cb92ad
JL
3201 if test $f != "auto-build.h"; then
3202 if test $f != "auto-host.h"; then
3203 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
3204 else
3205 build_xm_file_list="${build_xm_file_list} auto-host.h"
3206 fi
db81d74a 3207 else
b7cb92ad 3208 build_xm_file_list="${build_xm_file_list} auto-build.h"
db81d74a 3209 fi
af5e4ada 3210done
46f18e7b 3211
af5e4ada
DE
3212# Define macro CROSS_COMPILE in compilation
3213# if this is a cross-compiler.
3214# Also use all.cross instead of all.internal
3215# and add cross-make to Makefile.
571a8de5 3216cross_overrides="/dev/null"
af5e4ada
DE
3217if [[ x$host != x$target ]]
3218then
3219 cross_defines="CROSS=-DCROSS_COMPILE"
3220 cross_overrides="${topdir}/cross-make"
3221fi
46f18e7b 3222
af5e4ada
DE
3223# When building gcc with a cross-compiler, we need to fix a few things.
3224# This must come after cross-make as we want all.build to override
3225# all.cross.
571a8de5 3226build_overrides="/dev/null"
af5e4ada
DE
3227if [[ x$build != x$host ]]
3228then
3229 build_overrides="${topdir}/build-make"
3230fi
46f18e7b 3231
ae3a15bb
DE
3232# Expand extra_headers to include complete path.
3233# This substitutes for lots of t-* files.
3234extra_headers_list=
3235if [[ "x$extra_headers" = x ]]
3236then true
3237else
3238 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
3239 for file in $extra_headers;
3240 do
3241 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
3242 done
3243fi
3244
af5e4ada
DE
3245# Add a definition of USE_COLLECT2 if system wants one.
3246# Also tell toplev.c what to do.
3247# This substitutes for lots of t-* files.
3248if [[ x$use_collect2 = x ]]
3249then
3250 will_use_collect2=
3251 maybe_use_collect2=
3252else
10da1131 3253 will_use_collect2="collect2"
af5e4ada
DE
3254 maybe_use_collect2="-DUSE_COLLECT2"
3255fi
3256
3257# NEED TO CONVERT
3258# Set MD_DEPS if the real md file is in md.pre-cpp.
3259# Set MD_CPP to the cpp to pass the md file through. Md files use ';'
3260# for line oriented comments, so we must always use a GNU cpp. If
3261# building gcc with a cross compiler, use the cross compiler just
3262# built. Otherwise, we can use the cpp just built.
3263md_file_sub=
3264if [[ "x$md_cppflags" = x ]]
3265then
3266 md_file_sub=$srcdir/config/$md_file
3267else
3268 md_file=md
3269fi
3270
3271# If we have gas in the build tree, make a link to it.
3272if [[ -f ../gas/Makefile ]]; then
6e26218f 3273 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
af5e4ada
DE
3274fi
3275
4b95eb49
JL
3276# If we have nm in the build tree, make a link to it.
3277if [[ -f ../binutils/Makefile ]]; then
3278 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
3279fi
3280
af5e4ada
DE
3281# If we have ld in the build tree, make a link to it.
3282if [[ -f ../ld/Makefile ]]; then
aa32d841 3283# if [[ x$use_collect2 = x ]]; then
6e26218f 3284# rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
aa32d841 3285# else
6e26218f 3286 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
aa32d841 3287# fi
af5e4ada
DE
3288fi
3289
9e423e6d
JW
3290# Figure out what assembler alignment features are present.
3291AC_MSG_CHECKING(assembler alignment features)
3292gcc_cv_as=
3293gcc_cv_as_alignment_features=
3294if [[ -x as$host_exeext ]]; then
3295 # Build using assembler in the current directory.
3296 gcc_cv_as=./as$host_exeext
3297elif [[ -f $srcdir/../gas/configure.in ]]; then
3298 # Single tree build which includes gas.
3299 for f in $srcdir/../gas/configure.in $srcdir/../gas/Makefile.in
3300 do
3301 gcc_cv_gas_version=`grep '^VERSION=[[0-9]]*\.[[0-9]]*' $f`
3302 if [[ x$gcc_cv_gas_version != x ]]; then
3303 break
3304 fi
3305 done
3306 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([[0-9]]*\)"`
3307 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.\([[0-9]]*\)"`
3308 # Gas version 2.8 and later support specifying the maximum
3309 # bytes to skip when using .p2align.
3310 if [[ "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2 ]]; then
3311 gcc_cv_as_alignment_features=".p2align including maximum skip"
3312 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
3313 fi
3314elif [[ x$host = x$target ]]; then
3315 # Native build.
3316 gcc_cv_as=as$host_exeext
3317fi
3318if [[ x$gcc_cv_as != x ]]; then
3319 # Check if specifying the maximum bytes to skip when
3320 # using .p2align is supported.
3321 echo ".p2align 4,,7" > conftest.s
3322 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
3323 gcc_cv_as_alignment_features=".p2align including maximum skip"
3324 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
3325 fi
3326 rm -f conftest.s conftest.o
3327fi
3328AC_MSG_RESULT($gcc_cv_as_alignment_features)
3329
571a8de5
DE
3330# Figure out what language subdirectories are present.
3331subdirs=
3332for lang in ${srcdir}/*/config-lang.in ..
3333do
3334 case $lang in
3335 ..) ;;
3336 # The odd quoting in the next line works around
3337 # an apparent bug in bash 1.12 on linux.
3338 ${srcdir}/[[*]]/config-lang.in) ;;
3339 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
3340 esac
3341done
3342
f24af81b
TT
3343# Make gthr-default.h if we have a thread file.
3344gthread_flags=
3345if [[ $thread_file != single ]]; then
3346 rm -f gthr-default.h
db0d1ed9 3347 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
f24af81b
TT
3348 gthread_flags=-DHAVE_GTHR_DEFAULT
3349fi
3350AC_SUBST(gthread_flags)
3351
571a8de5
DE
3352# Make empty files to contain the specs and options for each language.
3353# Then add #include lines to for a compiler that has specs and/or options.
3354
3355lang_specs_files=
3356lang_options_files=
3357rm -f specs.h options.h
3358touch specs.h options.h
3359for subdir in . $subdirs
3360do
3361 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
3362 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3363 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3364 fi
3365 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
3366 echo "#include \"$subdir/lang-options.h\"" >>options.h
3367 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3368 fi
3369done
3370
3371# These (without "all_") are set in each config-lang.in.
3372# `language' must be a single word so is spelled singularly.
3373all_languages=
3374all_boot_languages=
3375all_compilers=
3376all_stagestuff=
3377all_diff_excludes=
0280cf84 3378all_outputs=Makefile
571a8de5
DE
3379# List of language makefile fragments.
3380all_lang_makefiles=
3381all_headers=
3382all_lib2funcs=
3383
3384# Add the language fragments.
3385# Languages are added via two mechanisms. Some information must be
3386# recorded in makefile variables, these are defined in config-lang.in.
3387# We accumulate them and plug them into the main Makefile.
3388# The other mechanism is a set of hooks for each of the main targets
3389# like `clean', `install', etc.
3390
3391language_fragments="Make-lang"
3392language_hooks="Make-hooks"
0280cf84 3393oldstyle_subdirs=
571a8de5
DE
3394
3395for s in .. $subdirs
3396do
3397 if [[ $s != ".." ]]
3398 then
3399 language=
3400 boot_language=
3401 compilers=
3402 stagestuff=
3403 diff_excludes=
3404 headers=
0280cf84 3405 outputs=
571a8de5
DE
3406 lib2funcs=
3407 . ${srcdir}/$s/config-lang.in
3408 if [[ "x$language" = x ]]
3409 then
3410 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3411 exit 1
3412 fi
3413 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3414 all_languages="$all_languages $language"
3415 if [[ "x$boot_language" = xyes ]]
3416 then
3417 all_boot_languages="$all_boot_languages $language"
3418 fi
3419 all_compilers="$all_compilers $compilers"
3420 all_stagestuff="$all_stagestuff $stagestuff"
3421 all_diff_excludes="$all_diff_excludes $diff_excludes"
3422 all_headers="$all_headers $headers"
0280cf84
PB
3423 all_outputs="$all_outputs $outputs"
3424 if [[ x$outputs = x ]]
3425 then
3426 oldstyle_subdirs="$oldstyle_subdirs $s"
3427 fi
571a8de5
DE
3428 all_lib2funcs="$all_lib2funcs $lib2funcs"
3429 fi
3430done
3431
3432# Since we can't use `::' targets, we link each language in
3433# with a set of hooks, reached indirectly via lang.${target}.
3434
3435rm -f Make-hooks
3436touch Make-hooks
3437target_list="all.build all.cross start.encap rest.encap \
3438 info dvi \
3439 install-normal install-common install-info install-man \
3440 uninstall distdir \
3441 mostlyclean clean distclean extraclean maintainer-clean \
3442 stage1 stage2 stage3 stage4"
3443for t in $target_list
3444do
3445 x=
3446 for l in .. $all_languages
3447 do
3448 if [[ $l != ".." ]]; then
3449 x="$x $l.$t"
3450 fi
3451 done
3452 echo "lang.$t: $x" >> Make-hooks
3453done
3454
296e46bd
DE
3455# If we're not building in srcdir, create .gdbinit.
3456
3457if [[ ! -f Makefile.in ]]; then
3458 echo "dir ." > .gdbinit
3459 echo "dir ${srcdir}" >> .gdbinit
3460 if [[ x$gdb_needs_out_file_path = xyes ]]
3461 then
3462 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3463 fi
3464 if [[ "x$subdirs" != x ]]; then
3465 for s in $subdirs
3466 do
3467 echo "dir ${srcdir}/$s" >> .gdbinit
3468 done
3469 fi
3470 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3471fi
3472
88111b26
JL
3473# Define variables host_canonical and build_canonical
3474# because some Cygnus local changes in the Makefile depend on them.
3475build_canonical=${build}
3476host_canonical=${host}
3477target_subdir=
3478if [[ "${host}" != "${target}" ]] ; then
3479 target_subdir=${target}/
3480fi
3481AC_SUBST(build_canonical)
3482AC_SUBST(host_canonical)
3483AC_SUBST(target_subdir)
3484
dec88383
DE
3485# If this is using newlib, then define inhibit_libc in
3486# LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
3487# libgcc.a, but that's OK because newib should have its own version of
3488# assert.h.
3489inhibit_libc=
3490if [[ x$with_newlib = xyes ]]; then
3491 inhibit_libc=-Dinhibit_libc
3492fi
3493AC_SUBST(inhibit_libc)
3494
8c660648
JL
3495# Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3496sched_prefix=
3497sched_cflags=
3498if [[ x$enable_haifa = xyes ]]; then
3499 echo "Using the Haifa scheduler."
3500 sched_prefix=haifa-
3501 sched_cflags=-DHAIFA
3502fi
3503AC_SUBST(sched_prefix)
3504AC_SUBST(sched_cflags)
3505if [[ x$enable_haifa != x ]]; then
3506 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3507 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
992d1248 3508 if [[ -f $x ]]; then
8c660648
JL
3509 echo "Removing $x"
3510 rm -f $x
3511 fi
3512 done
3513fi
3514
7e717196
JL
3515# Nothing to do for FLOAT_H, float_format already handled.
3516objdir=`pwd`
3517AC_SUBST(objdir)
3518
94f42018
DE
3519# Process the language and host/target makefile fragments.
3520${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
47866ac0 3521
46f18e7b
RK
3522# Substitute configuration variables
3523AC_SUBST(subdirs)
3524AC_SUBST(all_languages)
3525AC_SUBST(all_boot_languages)
3526AC_SUBST(all_compilers)
3527AC_SUBST(all_lang_makefiles)
3528AC_SUBST(all_stagestuff)
3529AC_SUBST(all_diff_excludes)
3530AC_SUBST(all_lib2funcs)
3531AC_SUBST(all_headers)
e061d1ce 3532AC_SUBST(cpp_main)
46f18e7b
RK
3533AC_SUBST(extra_passes)
3534AC_SUBST(extra_programs)
3535AC_SUBST(extra_parts)
b4294351 3536AC_SUBST(extra_c_objs)
c8724862 3537AC_SUBST(extra_cxx_objs)
b4294351 3538AC_SUBST(extra_c_flags)
46f18e7b
RK
3539AC_SUBST(extra_objs)
3540AC_SUBST(host_extra_gcc_objs)
3541AC_SUBST(extra_headers_list)
3542AC_SUBST(dep_host_xmake_file)
3543AC_SUBST(dep_tmake_file)
3544AC_SUBST(out_file)
3545AC_SUBST(out_object_file)
3546AC_SUBST(md_file)
3547AC_SUBST(tm_file_list)
3548AC_SUBST(build_xm_file_list)
3549AC_SUBST(host_xm_file_list)
3550AC_SUBST(lang_specs_files)
3551AC_SUBST(lang_options_files)
0bbb1697 3552AC_SUBST(thread_file)
46f18e7b
RK
3553AC_SUBST(version)
3554AC_SUBST(local_prefix)
9514f0d1 3555AC_SUBST(gxx_include_dir)
46f18e7b
RK
3556AC_SUBST(fixincludes)
3557AC_SUBST(build_install_headers_dir)
a204adc6 3558AC_SUBST(build_exeext)
6e26218f 3559AC_SUBST(host_exeext)
46f18e7b
RK
3560AC_SUBST(float_format)
3561AC_SUBST(will_use_collect2)
3562AC_SUBST(maybe_use_collect2)
3563AC_SUBST(cc_set_by_configure)
3564AC_SUBST(stage_prefix_set_by_configure)
9b16d2c4 3565AC_SUBST(install)
e9a25f70 3566AC_SUBST(symbolic_link)
46f18e7b
RK
3567
3568AC_SUBST_FILE(target_overrides)
3569AC_SUBST_FILE(host_overrides)
3570AC_SUBST(cross_defines)
3571AC_SUBST_FILE(cross_overrides)
3572AC_SUBST_FILE(build_overrides)
3573AC_SUBST_FILE(language_fragments)
3574AC_SUBST_FILE(language_hooks)
3575
3576# Echo that links are built
3577if [[ x$host = x$target ]]
3578then
3579 str1="native "
3580else
3581 str1="cross-"
3582 str2=" from $host"
3583fi
3584
3585if [[ x$host != x$build ]]
3586then
3587 str3=" on a $build system"
3588fi
3589
3590if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3591then
3592 str4=
3593fi
3594
3595echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3596
3597if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3598then
3599 echo " ${str2}${str3}." 1>&2
3600fi
3601
61536478
JL
3602# Truncate the target if necessary
3603if [[ x$host_truncate_target != x ]]; then
3604 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3605fi
3606
46f18e7b
RK
3607# Configure the subdirectories
3608# AC_CONFIG_SUBDIRS($subdirs)
3609
3610# Create the Makefile
5891b37d 3611# and configure language subdirectories
0280cf84 3612AC_OUTPUT($all_outputs,
cdcc6a01
DE
3613[
3614. $srcdir/configure.lang
3615case x$CONFIG_HEADERS in
b7cb92ad 3616xauto-host.h:config.in)
818b66cc 3617echo > cstamp-h ;;
cdcc6a01 3618esac
93cf819d
BK
3619# If the host supports symlinks, point stage[1234] at ../stage[1234] so
3620# bootstrapping and the installation procedure can still use
3621# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
3622# FLAGS_TO_PASS has been modified to solve the problem there.
3623# This is virtually a duplicate of what happens in configure.lang; we do
3624# an extra check to make sure this only happens if ln -s can be used.
3625if [[ "$symbolic_link" = "ln -s" ]]; then
3626 for d in .. ${subdirs} ; do
3627 if [[ $d != .. ]]; then
4e8a434e
BK
3628 STARTDIR=`pwd`
3629 cd $d
3630 for t in stage1 stage2 stage3 stage4 include
3631 do
3632 rm -f $t
3633 $symbolic_link ../$t $t 2>/dev/null
3634 done
3635 cd $STARTDIR
93cf819d
BK
3636 fi
3637 done
3638else true ; fi
cdcc6a01
DE
3639],
3640[
5891b37d
RK
3641host='${host}'
3642build='${build}'
3643target='${target}'
52060267 3644target_alias='${target_alias}'
5891b37d
RK
3645srcdir='${srcdir}'
3646subdirs='${subdirs}'
296e46bd 3647oldstyle_subdirs='${oldstyle_subdirs}'
5891b37d
RK
3648symbolic_link='${symbolic_link}'
3649program_transform_set='${program_transform_set}'
3650program_transform_name='${program_transform_name}'
5891b37d
RK
3651dep_host_xmake_file='${dep_host_xmake_file}'
3652host_xmake_file='${host_xmake_file}'
3653dep_tmake_file='${dep_tmake_file}'
3654tmake_file='${tmake_file}'
0bbb1697 3655thread_file='${thread_file}'
5891b37d
RK
3656version='${version}'
3657local_prefix='${local_prefix}'
5891b37d 3658build_install_headers_dir='${build_install_headers_dir}'
a204adc6 3659build_exeext='${build_exeext}'
6e26218f 3660host_exeext='${host_exeext}'
7ed46111 3661out_file='${out_file}'
5891b37d
RK
3662gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3663SET_MAKE='${SET_MAKE}'
5891b37d 3664target_list='${target_list}'
5891b37d
RK
3665target_overrides='${target_overrides}'
3666host_overrides='${host_overrides}'
3667cross_defines='${cross_defines}'
3668cross_overrides='${cross_overrides}'
3669build_overrides='${build_overrides}'
cdcc6a01 3670])