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