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