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