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