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