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