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