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