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