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