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