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