]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/configure.in
syshdr.c: New test.
[thirdparty/gcc.git] / gcc / configure.in
1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
3
4 # Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
5
6 #This file is part of GNU CC.
7
8 #GNU CC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
11 #any later version.
12
13 #GNU CC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
17
18 #You should have received a copy of the GNU General Public License
19 #along with GNU CC; see the file COPYING. If not, write to
20 #the Free Software Foundation, 59 Temple Place - Suite 330,
21 #Boston, MA 02111-1307, USA.
22
23 # Initialization and defaults
24 AC_PREREQ(2.13)
25 AC_INIT(tree.c)
26 AC_CONFIG_HEADER(auto-host.h:config.in)
27
28 remove=rm
29 hard_link=ln
30 symbolic_link='ln -s'
31 copy=cp
32
33 # Check for bogus environment variables.
34 # Test if LIBRARY_PATH contains the notation for the current directory
35 # since this would lead to problems installing/building glibc.
36 # LIBRARY_PATH contains the current directory if one of the following
37 # is true:
38 # - one of the terminals (":" and ";") is the first or last sign
39 # - two terminals occur directly after each other
40 # - the path contains an element with a dot in it
41 AC_MSG_CHECKING(LIBRARY_PATH variable)
42 changequote(,)dnl
43 case ${LIBRARY_PATH} in
44 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
45 library_path_setting="contains current directory"
46 ;;
47 *)
48 library_path_setting="ok"
49 ;;
50 esac
51 changequote([,])dnl
52 AC_MSG_RESULT($library_path_setting)
53 if test "$library_path_setting" != "ok"; then
54 AC_MSG_ERROR([
55 *** LIBRARY_PATH shouldn't contain the current directory when
56 *** building gcc. Please change the environment variable
57 *** and run configure again.])
58 fi
59
60 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
61 # since this would lead to problems installing/building glibc.
62 # GCC_EXEC_PREFIX contains the current directory if one of the following
63 # is true:
64 # - one of the terminals (":" and ";") is the first or last sign
65 # - two terminals occur directly after each other
66 # - the path contains an element with a dot in it
67 AC_MSG_CHECKING(GCC_EXEC_PREFIX variable)
68 changequote(,)dnl
69 case ${GCC_EXEC_PREFIX} in
70 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
71 gcc_exec_prefix_setting="contains current directory"
72 ;;
73 *)
74 gcc_exec_prefix_setting="ok"
75 ;;
76 esac
77 changequote([,])dnl
78 AC_MSG_RESULT($gcc_exec_prefix_setting)
79 if test "$gcc_exec_prefix_setting" != "ok"; then
80 AC_MSG_ERROR([
81 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
82 *** building gcc. Please change the environment variable
83 *** and run configure again.])
84 fi
85
86 # Check for additional parameters
87
88 # With GNU ld
89 AC_ARG_WITH(gnu-ld,
90 [ --with-gnu-ld arrange to work with GNU ld.],
91 gnu_ld_flag="$with_gnu_ld",
92 gnu_ld_flag=no)
93
94 # With pre-defined ld
95 AC_ARG_WITH(ld,
96 [ --with-ld arrange to use the specified ld (full pathname).],
97 DEFAULT_LINKER="$with_ld")
98 if test x"${DEFAULT_LINKER+set}" = x"set"; then
99 if test ! -x "$DEFAULT_LINKER"; then
100 AC_MSG_WARN([cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER])
101 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
102 gnu_ld_flag=yes
103 fi
104 AC_DEFINE_UNQUOTED(DEFAULT_LINKER,"$DEFAULT_LINKER",
105 [Define to enable the use of a default linker.])
106 fi
107
108 # With GNU as
109 AC_ARG_WITH(gnu-as,
110 [ --with-gnu-as arrange to work with GNU as.],
111 gas_flag="$with_gnu_as",
112 gas_flag=no)
113
114 AC_ARG_WITH(as,
115 [ --with-as arrange to use the specified as (full pathname).],
116 DEFAULT_ASSEMBLER="$with_as")
117 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
118 if test ! -x "$DEFAULT_ASSEMBLER"; then
119 AC_MSG_WARN([cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER])
120 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
121 gas_flag=yes
122 fi
123 AC_DEFINE_UNQUOTED(DEFAULT_ASSEMBLER,"$DEFAULT_ASSEMBLER",
124 [Define to enable the use of a default assembler.])
125 fi
126
127 # With stabs
128 AC_ARG_WITH(stabs,
129 [ --with-stabs arrange to use stabs instead of host debug format.],
130 stabs="$with_stabs",
131 stabs=no)
132
133 # With ELF
134 AC_ARG_WITH(elf,
135 [ --with-elf arrange to use ELF instead of host debug format.],
136 elf="$with_elf",
137 elf=no)
138
139 # Specify the local prefix
140 local_prefix=
141 AC_ARG_WITH(local-prefix,
142 [ --with-local-prefix=DIR specifies directory to put local include.],
143 [case "${withval}" in
144 yes) AC_MSG_ERROR(bad value ${withval} given for local include directory prefix) ;;
145 no) ;;
146 *) local_prefix=$with_local_prefix ;;
147 esac])
148
149 # Default local prefix if it is empty
150 if test x$local_prefix = x; then
151 local_prefix=/usr/local
152 fi
153
154 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
155 # passed in by the toplevel make and thus we'd get different behavior
156 # depending on where we built the sources.
157 gcc_gxx_include_dir=
158 # Specify the g++ header file directory
159 AC_ARG_WITH(gxx-include-dir,
160 [ --with-gxx-include-dir=DIR
161 specifies directory to put g++ header files.],
162 [case "${withval}" in
163 yes) AC_MSG_ERROR(bad value ${withval} given for g++ include directory) ;;
164 no) ;;
165 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
166 esac])
167
168 if test x${gcc_gxx_include_dir} = x; then
169 if test x${enable_version_specific_runtime_libs} = xyes; then
170 gcc_gxx_include_dir='${libsubdir}/include/g++'
171 else
172 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
173 changequote(<<, >>)dnl
174 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
175 changequote([, ])dnl
176 fi
177 fi
178
179 # Enable expensive internal checks
180 AC_ARG_ENABLE(checking,
181 [ --enable-checking[=LIST]
182 enable expensive run-time checks. With LIST,
183 enable only specific categories of checks.
184 Categories are: misc,tree,rtl,gc,gcac; default
185 is misc,tree,gc],
186 [ac_checking=
187 ac_tree_checking=
188 ac_rtl_checking=
189 ac_gc_checking=
190 ac_gc_always_collect=
191 case "${enableval}" in
192 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;;
193 no) ;;
194 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
195 set fnord $enableval; shift
196 IFS="$ac_save_IFS"
197 for check
198 do
199 case $check in
200 misc) ac_checking=1 ;;
201 tree) ac_tree_checking=1 ;;
202 rtl) ac_rtl_checking=1 ;;
203 gc) ac_gc_checking=1 ;;
204 gcac) ac_gc_always_collect=1 ;;
205 *) AC_MSG_ERROR(unknown check category $check) ;;
206 esac
207 done
208 ;;
209 esac
210 ],
211 # Enable some checks by default for development versions of GCC
212 [ac_checking=1; ac_tree_checking=1; ac_gc_checking=1;])
213 if test x$ac_checking != x ; then
214 AC_DEFINE(ENABLE_CHECKING, 1,
215 [Define if you want more run-time sanity checks. This one gets a grab
216 bag of miscellaneous but relatively cheap checks.])
217 fi
218 if test x$ac_tree_checking != x ; then
219 AC_DEFINE(ENABLE_TREE_CHECKING, 1,
220 [Define if you want all operations on trees (the basic data
221 structure of the front ends) to be checked for dynamic type safety
222 at runtime. This is moderately expensive.])
223 fi
224 if test x$ac_rtl_checking != x ; then
225 AC_DEFINE(ENABLE_RTL_CHECKING, 1,
226 [Define if you want all operations on RTL (the basic data structure
227 of the optimizer and back end) to be checked for dynamic type safety
228 at runtime. This is quite expensive.])
229 fi
230 if test x$ac_gc_checking != x ; then
231 AC_DEFINE(ENABLE_GC_CHECKING, 1,
232 [Define if you want the garbage collector to do object poisoning and
233 other memory allocation checks. This is quite expensive.])
234 fi
235 if test x$ac_gc_always_collect != x ; then
236 AC_DEFINE(ENABLE_GC_ALWAYS_COLLECT, 1,
237 [Define if you want the garbage collector to operate in maximally
238 paranoid mode, validating the entire heap and collecting garbage at
239 every opportunity. This is extremely expensive.])
240 fi
241
242
243 AC_ARG_ENABLE(cpp,
244 [ --disable-cpp don't provide a user-visible C preprocessor.],
245 [], [enable_cpp=yes])
246
247 AC_ARG_WITH(cpp_install_dir,
248 [ --with-cpp-install-dir=DIR
249 install the user visible C preprocessor in DIR
250 (relative to PREFIX) as well as PREFIX/bin.],
251 [if test x$withval = xyes; then
252 AC_MSG_ERROR([option --with-cpp-install-dir requires an argument])
253 elif test x$withval != xno; then
254 cpp_install_dir=$withval
255 fi])
256
257 dnl Disable this for the moment; the library interface is changing.
258 dnl # Link cpplib into the compiler proper, for C/C++/ObjC.
259 dnl AC_ARG_ENABLE(c-cpplib,
260 dnl [ --enable-c-cpplib link cpplib directly into C and C++ compilers
261 dnl (EXPERIMENTAL) (implies --enable-cpplib).],
262 dnl if test x$enable_c_cpplib != xno; then
263 dnl extra_c_objs="${extra_c_objs} libcpp.a"
264 dnl extra_cxx_objs="${extra_cxx_objs} ../libcpp.a"
265 dnl extra_c_flags="${extra_c_flags} -DUSE_CPPLIB=1"
266 dnl fi)
267
268 # Enable Multibyte Characters for C/C++
269 AC_ARG_ENABLE(c-mbchar,
270 [ --enable-c-mbchar Enable multibyte characters for C and C++.],
271 if test x$enable_c_mbchar != xno; then
272 extra_c_flags="${extra_c_flags} -DMULTIBYTE_CHARS=1"
273 fi)
274
275 # Enable threads
276 # Pass with no value to take the default
277 # Pass with a value to specify a thread package
278 AC_ARG_ENABLE(threads,
279 [ --enable-threads enable thread usage for target GCC.
280 --enable-threads=LIB use LIB thread package for target GCC.],
281 if test x$enable_threads = xno; then
282 enable_threads=''
283 fi,
284 enable_threads='')
285
286 enable_threads_flag=$enable_threads
287 # Check if a valid thread package
288 case x${enable_threads_flag} in
289 x | xno)
290 # No threads
291 target_thread_file='single'
292 ;;
293 xyes)
294 # default
295 target_thread_file=''
296 ;;
297 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
298 xsolaris | xwin32 | xdce | xvxworks)
299 target_thread_file=$enable_threads_flag
300 ;;
301 *)
302 echo "$enable_threads is an unknown thread package" 1>&2
303 exit 1
304 ;;
305 esac
306
307 AC_ARG_ENABLE(objc-gc,
308 [ --enable-objc-gc enable the use of Boehm's garbage collector with
309 the GNU Objective-C runtime.],
310 if test x$enable_objc_gc = xno; then
311 objc_boehm_gc=''
312 else
313 objc_boehm_gc=1
314 fi,
315 objc_boehm_gc='')
316
317 AC_ARG_WITH(dwarf2,
318 [ --with-dwarf2 force the default debug format to be DWARF2.],
319 dwarf2="$with_dwarf2",
320 dwarf2=no)
321
322 # Determine the host, build, and target systems
323 AC_CANONICAL_SYSTEM
324
325 # Find the native compiler
326 AC_PROG_CC
327 AC_PROG_CC_C_O
328 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
329 NO_MINUS_C_MINUS_O=yes
330 fi
331 AC_SUBST(NO_MINUS_C_MINUS_O)
332
333 gcc_AC_C_LONG_DOUBLE
334
335 AC_MSG_CHECKING(whether ${CC-cc} accepts -Wno-long-long)
336 echo 'void f(){}' > conftest.c
337 if test -z "`${CC-cc} -Wno-long-long -c conftest.c 2>&1`"; then
338 ac_cv_prog_cc_no_long_long=yes
339 else
340 ac_cv_prog_cc_no_long_long=no
341 fi
342 rm -f conftest*
343 echo "$ac_t"$ac_cv_prog_cc_no_long_long 1>&6
344
345 # If the native compiler is GCC, we can enable warnings even in stage1.
346 # That's useful for people building cross-compilers, or just running a
347 # quick `make'.
348 stage1_warn_cflags=" -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
349 stage2_warn_cflags="$stage1_warn_cflags -pedantic -Wno-long-long"
350 if test "x$GCC" = "xyes"; then
351 if test $ac_cv_prog_cc_no_long_long = yes; then
352 stage1_warn_cflags="$stage1_warn_cflags -pedantic -Wno-long-long"
353 fi
354 else
355 stage1_warn_cflags=""
356 fi
357 AC_SUBST(stage1_warn_cflags)
358 AC_SUBST(stage2_warn_cflags)
359
360 AC_PROG_MAKE_SET
361
362 AC_MSG_CHECKING([whether a default assembler was specified])
363 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
364 if test x"$gas_flag" = x"no"; then
365 AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER)])
366 else
367 AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER - GNU as)])
368 fi
369 else
370 AC_MSG_RESULT(no)
371 fi
372
373 AC_MSG_CHECKING([whether a default linker was specified])
374 if test x"${DEFAULT_LINKER+set}" = x"set"; then
375 if test x"$gnu_ld_flag" = x"no"; then
376 AC_MSG_RESULT([yes ($DEFAULT_LINKER)])
377 else
378 AC_MSG_RESULT([yes ($DEFAULT_LINKER - GNU ld)])
379 fi
380 else
381 AC_MSG_RESULT(no)
382 fi
383
384 AC_C_INLINE
385
386 # Find some useful tools
387 AC_PROG_AWK
388 AC_PROG_LEX
389 gcc_AC_PROG_LN
390 gcc_AC_PROG_LN_S
391 gcc_AC_C_VOLATILE
392 AC_PROG_RANLIB
393 AC_PROG_YACC
394 gcc_AC_PROG_INSTALL
395
396 AC_HEADER_STDC
397 AC_HEADER_TIME
398 gcc_AC_HEADER_STRING
399 AC_HEADER_SYS_WAIT
400 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \
401 fcntl.h unistd.h stab.h sys/file.h sys/time.h \
402 sys/resource.h sys/param.h sys/times.h sys/stat.h \
403 direct.h malloc.h)
404
405 # Check for thread headers.
406 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
407 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
408
409 # See if GNAT has been installed
410 AC_CHECK_PROG(gnat, gnatbind, yes, no)
411
412 # Do we have a single-tree copy of texinfo?
413 if test -f $srcdir/../texinfo/Makefile.in; then
414 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
415 gcc_cv_prog_makeinfo_modern=yes
416 AC_MSG_RESULT([Using makeinfo from the unified source tree.])
417 else
418 # See if makeinfo has been installed and is modern enough
419 # that we can use it.
420 gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
421 [GNU texinfo.* \([0-9][0-9.]*\)],
422 [3.1[2-9] | 3.[2-9][0-9] | 4.* | 1.6[89] | 1.7[0-9]])
423 fi
424
425 if test $gcc_cv_prog_makeinfo_modern = no; then
426 AC_MSG_WARN([
427 *** Makeinfo is missing or too old.
428 *** Info documentation will not be built or installed.])
429 BUILD_INFO=
430 INSTALL_INFO=
431 else
432 BUILD_INFO=info AC_SUBST(BUILD_INFO)
433 INSTALL_INFO=install-info AC_SUBST(INSTALL_INFO)
434 fi
435
436 # See if the stage1 system preprocessor understands the ANSI C
437 # preprocessor stringification operator.
438 AC_C_STRINGIZE
439
440 # Use <inttypes.h> only if it exists,
441 # doesn't clash with <sys/types.h>, and declares intmax_t.
442 AC_MSG_CHECKING(for inttypes.h)
443 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
444 [AC_TRY_COMPILE(
445 [#include <sys/types.h>
446 #include <inttypes.h>],
447 [intmax_t i = -1;],
448 [gcc_cv_header_inttypes_h=yes],
449 gcc_cv_header_inttypes_h=no)])
450 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
451 if test $gcc_cv_header_inttypes_h = yes; then
452 AC_DEFINE(HAVE_INTTYPES_H, 1,
453 [Define if you have a working <inttypes.h> header file.])
454 fi
455
456 #
457 # Determine if enumerated bitfields are unsigned. ISO C says they can
458 # be either signed or unsigned.
459 #
460 AC_CACHE_CHECK(for unsigned enumerated bitfields, gcc_cv_enum_bf_unsigned,
461 [AC_TRY_RUN(#include <stdlib.h>
462 enum t { BLAH = 128 } ;
463 struct s_t { enum t member : 8; } s ;
464 int main(void)
465 {
466 s.member = BLAH;
467 if (s.member < 0) exit(1);
468 exit(0);
469
470 }, gcc_cv_enum_bf_unsigned=yes, gcc_cv_enum_bf_unsigned=no, gcc_cv_enum_bf_unsigned=yes)])
471 if test $gcc_cv_enum_bf_unsigned = yes; then
472 AC_DEFINE(ENUM_BITFIELDS_ARE_UNSIGNED, 1,
473 [Define if enumerated bitfields are treated as unsigned values.])
474 fi
475
476 AC_CHECK_FUNCS(strtoul bsearch putenv popen bcopy bzero bcmp \
477 index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
478 sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
479 fputs_unlocked getrusage valloc)
480
481 AC_CHECK_TYPE(ssize_t, int)
482
483 # Try to determine the array type of the second argument of getgroups
484 # for the target system (int or gid_t).
485 AC_TYPE_GETGROUPS
486 if test "${target}" = "${build}"; then
487 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
488 else
489 case "${target}" in
490 # This condition may need some tweaking. It should include all
491 # targets where the array type of the second argument of getgroups
492 # is int and the type of gid_t is not equivalent to int.
493 *-*-sunos* | *-*-ultrix*)
494 TARGET_GETGROUPS_T=int
495 ;;
496 *)
497 TARGET_GETGROUPS_T=gid_t
498 ;;
499 esac
500 fi
501 AC_SUBST(TARGET_GETGROUPS_T)
502
503 gcc_AC_FUNC_VFPRINTF_DOPRNT
504 gcc_AC_FUNC_PRINTF_PTR
505
506 case "${host}" in
507 *-*-uwin*)
508 # Under some versions of uwin, vfork is notoriously buggy and the test
509 # can hang configure; on other versions, vfork exists just as a stub.
510 # FIXME: This should be removed once vfork in uwin's runtime is fixed.
511 ac_cv_func_vfork_works=no
512 ;;
513 esac
514 AC_FUNC_VFORK
515 AC_FUNC_MMAP_ANYWHERE
516 AC_FUNC_MMAP_FILE
517
518 # We will need to find libiberty.h and ansidecl.h
519 saved_CFLAGS="$CFLAGS"
520 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
521 gcc_AC_CHECK_DECLS(bcopy bzero bcmp \
522 index rindex getenv atol sbrk abort atof getcwd getwd \
523 strsignal putc_unlocked fputs_unlocked strstr environ \
524 malloc realloc calloc free basename getopt, , ,[
525 #include "gansidecl.h"
526 #include "system.h"])
527
528 gcc_AC_CHECK_DECLS(getrlimit setrlimit getrusage, , ,[
529 #include "gansidecl.h"
530 #include "system.h"
531 #ifdef HAVE_SYS_RESOURCE_H
532 #include <sys/resource.h>
533 #endif
534 ])
535
536 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
537 CFLAGS="$saved_CFLAGS"
538
539 # mkdir takes a single argument on some systems.
540 gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG
541
542 # File extensions
543 manext='.1'
544 objext='.o'
545 AC_SUBST(manext)
546 AC_SUBST(objext)
547
548 build_xm_file=
549 build_xm_defines=
550 build_install_headers_dir=install-headers-tar
551 build_exeext=
552 host_xm_file=
553 host_xm_defines=
554 host_xmake_file=
555 host_truncate_target=
556 host_exeext=
557
558 # Decode the host machine, then the target machine.
559 # For the host machine, we save the xm_file variable as host_xm_file;
560 # then we decode the target machine and forget everything else
561 # that came from the host machine.
562 for machine in $build $host $target; do
563
564 out_file=
565 xmake_file=
566 tmake_file=
567 extra_headers=
568 extra_passes=
569 extra_parts=
570 extra_programs=
571 extra_objs=
572 extra_host_objs=
573 extra_gcc_objs=
574 xm_defines=
575 float_format=
576 # Set this to force installation and use of collect2.
577 use_collect2=
578 # Set this to override the default target model.
579 target_cpu_default=
580 # Set this to control how the header file directory is installed.
581 install_headers_dir=install-headers-tar
582 # Set this to a non-empty list of args to pass to cpp if the target
583 # wants its .md file passed through cpp.
584 md_cppflags=
585 # Set this if directory names should be truncated to 14 characters.
586 truncate_target=
587 # Set this if gdb needs a dir command with `dirname $out_file`
588 gdb_needs_out_file_path=
589 # Set this if the build machine requires executables to have a
590 # file name suffix.
591 exeext=
592 # Set this to control which thread package will be used.
593 thread_file=
594 # Reinitialize these from the flag values every loop pass, since some
595 # configure entries modify them.
596 gas="$gas_flag"
597 gnu_ld="$gnu_ld_flag"
598 enable_threads=$enable_threads_flag
599
600 # Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
601 # updated in each machine entry.
602 tm_p_file=
603 cpu_type=`echo $machine | sed 's/-.*$//'`
604 case $machine in
605 alpha*-*-*)
606 cpu_type=alpha
607 ;;
608 strongarm*-*-*)
609 cpu_type=arm
610 ;;
611 arm*-*-*)
612 cpu_type=arm
613 ;;
614 c*-convex-*)
615 cpu_type=convex
616 ;;
617 changequote(,)dnl
618 i[34567]86-*-*)
619 changequote([,])dnl
620 cpu_type=i386
621 ;;
622 hppa*-*-*)
623 cpu_type=pa
624 ;;
625 m68000-*-*)
626 cpu_type=m68k
627 ;;
628 mips*-*-*)
629 cpu_type=mips
630 ;;
631 pj*-*-*)
632 cpu_type=pj
633 ;;
634 powerpc*-*-*)
635 cpu_type=rs6000
636 ;;
637 pyramid-*-*)
638 cpu_type=pyr
639 ;;
640 sparc*-*-*)
641 cpu_type=sparc
642 ;;
643 esac
644
645 tm_file=${cpu_type}/${cpu_type}.h
646 xm_file=${cpu_type}/xm-${cpu_type}.h
647 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h;
648 then
649 tm_p_file=${cpu_type}/${cpu_type}-protos.h;
650 fi
651 # On a.out targets, we need to use collect2.
652 case $machine in
653 *-*-*aout*)
654 use_collect2=yes
655 ;;
656 esac
657
658 # Common parts for linux-gnu and openbsd systems
659 case $machine in
660 *-*-linux-gnu*)
661 xm_defines="HAVE_ATEXIT POSIX BSTRING"
662 ;;
663 *-*-openbsd*)
664 tm_file=${cpu_type}/openbsd.h
665 tmake_file="t-libc-ok t-openbsd"
666 # avoid surprises, always provide an xm-openbsd file
667 xm_file=${cpu_type}/xm-openbsd.h
668 # don't depend on processor x-fragments as well
669 xmake_file=none
670 if test x$enable_threads = xyes; then
671 thread_file='posix'
672 tmake_file="${tmake_file} t-openbsd-thread"
673 fi
674 ;;
675 esac
676
677 case $machine in
678 # Support site-specific machine types.
679 *local*)
680 cpu_type=`echo $machine | sed -e 's/-.*//'`
681 rest=`echo $machine | sed -e "s/$cpu_type-//"`
682 xm_file=${cpu_type}/xm-$rest.h
683 tm_file=${cpu_type}/$rest.h
684 if test -f $srcdir/config/${cpu_type}/x-$rest; \
685 then xmake_file=${cpu_type}/x-$rest; \
686 else true; \
687 fi
688 if test -f $srcdir/config/${cpu_type}/t-$rest; \
689 then tmake_file=${cpu_type}/t-$rest; \
690 else true; \
691 fi
692 ;;
693 1750a-*-*)
694 ;;
695 a29k-*-bsd* | a29k-*-sym1*)
696 tm_file="${tm_file} a29k/unix.h"
697 xm_defines=USG
698 xmake_file=a29k/x-unix
699 use_collect2=yes
700 ;;
701 a29k-*-udi | a29k-*-coff)
702 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
703 tmake_file=a29k/t-a29kbare
704 ;;
705 a29k-wrs-vxworks*)
706 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
707 tmake_file=a29k/t-vx29k
708 extra_parts="crtbegin.o crtend.o"
709 thread_file='vxworks'
710 ;;
711 a29k-*-*) # Default a29k environment.
712 use_collect2=yes
713 ;;
714 alpha-*-interix)
715 tm_file="${tm_file} alpha/alpha32.h interix.h alpha/alpha-interix.h"
716
717 # GAS + IEEE_CONFORMANT+IEEE (no inexact);
718 #target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT|MASK_IEEE"
719
720 # GAS + IEEE_CONFORMANT
721 target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT"
722
723 xm_file="alpha/xm-alpha-interix.h xm-interix.h"
724 xmake_file="x-interix alpha/t-pe"
725 tmake_file="alpha/t-alpha alpha/t-interix alpha/t-ieee"
726 if test x$enable_threads = xyes ; then
727 thread_file='posix'
728 fi
729 if test x$stabs = xyes ; then
730 tm_file="${tm_file} dbxcoff.h"
731 fi
732 #prefix='$$INTERIX_ROOT'/usr/contrib
733 #local_prefix='$$INTERIX_ROOT'/usr/contrib
734 ;;
735 alpha*-*-linux-gnuecoff*)
736 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
737 target_cpu_default="MASK_GAS"
738 tmake_file="alpha/t-alpha alpha/t-ieee"
739 gas=no
740 xmake_file=none
741 gas=yes gnu_ld=yes
742 ;;
743 alpha*-*-linux-gnulibc1*)
744 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
745 target_cpu_default="MASK_GAS"
746 tmake_file="t-linux t-linux-gnulibc1 alpha/t-alpha alpha/t-crtbe alpha/t-ieee"
747 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
748 xmake_file=none
749 gas=yes gnu_ld=yes
750 if test x$enable_threads = xyes; then
751 thread_file='posix'
752 fi
753 ;;
754 alpha*-*-linux-gnu*)
755 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
756 target_cpu_default="MASK_GAS"
757 tmake_file="t-linux alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
758 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
759 xmake_file=none
760 gas=yes gnu_ld=yes
761 if test x$enable_threads = xyes; then
762 thread_file='posix'
763 fi
764 ;;
765 alpha*-*-netbsd*)
766 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
767 target_cpu_default="MASK_GAS"
768 tmake_file="alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
769 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
770 xmake_file=none
771 gas=yes gnu_ld=yes
772 ;;
773
774 alpha*-*-openbsd*)
775 # default x-alpha is only appropriate for dec-osf.
776 target_cpu_default="MASK_GAS"
777 tmake_file="alpha/t-alpha alpha/t-ieee"
778 ;;
779
780 alpha*-dec-osf*)
781 if test x$stabs = xyes
782 then
783 tm_file="${tm_file} dbx.h"
784 fi
785 if test x$gas != xyes
786 then
787 extra_passes="mips-tfile mips-tdump"
788 fi
789 use_collect2=yes
790 tmake_file="alpha/t-alpha alpha/t-ieee"
791 case $machine in
792 *-*-osf1*)
793 tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
794 ;;
795 changequote(,)dnl
796 *-*-osf[23]*)
797 changequote([,])dnl
798 tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
799 ;;
800 *-*-osf4*)
801 tm_file="${tm_file} alpha/osf.h"
802 # Some versions of OSF4 (specifically X4.0-9 296.7) have
803 # a broken tar, so we use cpio instead.
804 install_headers_dir=install-headers-cpio
805 ;;
806 *-*-osf5*)
807 tm_file="${tm_file} alpha/osf.h alpha/osf5.h"
808 ;;
809 esac
810 case $machine in
811 changequote(,)dnl
812 *-*-osf4.0[b-z] | *-*-osf4.[1-9]* | *-*-osf5*)
813 changequote([,])dnl
814 target_cpu_default=MASK_SUPPORT_ARCH
815 ;;
816 esac
817 ;;
818 alpha*-*-vxworks*)
819 tm_file="${tm_file} dbx.h alpha/vxworks.h"
820 tmake_file="alpha/t-alpha alpha/t-ieee"
821 if [ x$gas != xyes ]
822 then
823 extra_passes="mips-tfile mips-tdump"
824 fi
825 use_collect2=yes
826 thread_file='vxworks'
827 ;;
828 alpha*-*-winnt*)
829 tm_file="${tm_file} alpha/alpha32.h alpha/win-nt.h winnt/win-nt.h"
830 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
831 tmake_file="t-libc-ok alpha/t-alpha alpha/t-ieee"
832 xmake_file=winnt/x-winnt
833 extra_host_objs=oldnames.o
834 extra_gcc_objs="spawnv.o oldnames.o"
835 if test x$gnu_ld != xyes
836 then
837 extra_programs=ld.exe
838 fi
839 if test x$enable_threads = xyes; then
840 thread_file='win32'
841 fi
842 ;;
843 alpha*-dec-vms*)
844 tm_file=alpha/vms.h
845 xm_file="${xm_file} alpha/xm-vms.h"
846 tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
847 ;;
848 arc-*-elf*)
849 extra_parts="crtinit.o crtfini.o"
850 ;;
851 arm-*-coff* | armel-*-coff*)
852 tm_file=arm/coff.h
853 tmake_file=arm/t-arm-coff
854 ;;
855 arm-*-vxworks*)
856 tm_file=arm/vxarm.h
857 tmake_file=arm/t-arm-coff
858 thread_file='vxworks'
859 ;;
860 changequote(,)dnl
861 arm-*-riscix1.[01]*) # Acorn RISC machine (early versions)
862 changequote([,])dnl
863 tm_file=arm/riscix1-1.h
864 use_collect2=yes
865 ;;
866 arm-*-riscix*) # Acorn RISC machine
867 if test x$gas = xyes
868 then
869 tm_file=arm/rix-gas.h
870 else
871 tm_file=arm/riscix.h
872 fi
873 xmake_file=arm/x-riscix
874 tmake_file=arm/t-riscix
875 use_collect2=yes
876 ;;
877 arm-semi-aout | armel-semi-aout)
878 tm_file=arm/semi.h
879 tmake_file=arm/t-semi
880 ;;
881 arm-semi-aof | armel-semi-aof)
882 tm_file=arm/semiaof.h
883 tmake_file=arm/t-semiaof
884 ;;
885 arm*-*-netbsd*)
886 tm_file=arm/netbsd.h
887 tmake_file="t-netbsd arm/t-netbsd"
888 use_collect2=yes
889 ;;
890 arm*-*-linux-gnuaout*) # ARM GNU/Linux with a.out
891 cpu_type=arm
892 xmake_file=x-linux
893 tm_file=arm/linux-aout.h
894 tmake_file=arm/t-linux
895 gnu_ld=yes
896 ;;
897 arm*-*-linux-gnuoldld*) # ARM GNU/Linux with old ELF linker
898 xm_file=arm/xm-linux.h
899 xmake_file=x-linux
900 tm_file="arm/linux-oldld.h arm/linux-elf.h"
901 case $machine in
902 armv2*-*-*)
903 tm_file="arm/linux-elf26.h $tm_file"
904 ;;
905 esac
906 tmake_file="t-linux arm/t-linux"
907 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
908 gnu_ld=yes
909 case x${enable_threads} in
910 x | xyes | xpthreads | xposix)
911 thread_file='posix'
912 ;;
913 esac
914 ;;
915 arm*-*-linux-gnu*) # ARM GNU/Linux with ELF
916 xm_file=arm/xm-linux.h
917 xmake_file=x-linux
918 tm_file="arm/linux-elf.h"
919 case $machine in
920 armv2*-*-*)
921 tm_file="arm/linux-elf26.h $tm_file"
922 ;;
923 esac
924 tmake_file="t-linux arm/t-linux"
925 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
926 gnu_ld=yes
927 case x${enable_threads} in
928 x | xyes | xpthreads | xposix)
929 thread_file='posix'
930 ;;
931 esac
932 ;;
933 arm*-*-uclinux*) # ARM ucLinux
934 tm_file=arm/uclinux-elf.h
935 tmake_file=arm/t-arm-elf
936 ;;
937 arm*-*-aout)
938 tm_file=arm/aout.h
939 tmake_file=arm/t-arm-aout
940 ;;
941 arm*-*-ecos-elf)
942 tm_file=arm/ecos-elf.h
943 tmake_file=arm/t-arm-elf
944 ;;
945 arm*-*-elf)
946 tm_file=arm/unknown-elf.h
947 tmake_file=arm/t-arm-elf
948 ;;
949 arm*-*-conix*)
950 tm_file=arm/conix-elf.h
951 tmake_file=arm/t-arm-elf
952 ;;
953 arm*-*-oabi)
954 tm_file=arm/unknown-elf-oabi.h
955 tmake_file=arm/t-arm-elf
956 ;;
957 arm-*-pe*)
958 tm_file=arm/pe.h
959 tmake_file=arm/t-pe
960 extra_objs="pe.o"
961 ;;
962 avr-*-*)
963 ;;
964 c1-convex-*) # Convex C1
965 target_cpu_default=1
966 use_collect2=yes
967 ;;
968 c2-convex-*) # Convex C2
969 target_cpu_default=2
970 use_collect2=yes
971 ;;
972 c32-convex-*)
973 target_cpu_default=4
974 use_collect2=yes
975 ;;
976 c34-convex-*)
977 target_cpu_default=8
978 use_collect2=yes
979 ;;
980 c38-convex-*)
981 target_cpu_default=16
982 use_collect2=yes
983 ;;
984 c4x-*)
985 cpu_type=c4x
986 tmake_file=c4x/t-c4x
987 ;;
988 clipper-intergraph-clix*)
989 tm_file="${tm_file} svr3.h clipper/clix.h"
990 xm_file=clipper/xm-clix.h
991 xmake_file=clipper/x-clix
992 extra_headers=va-clipper.h
993 extra_parts="crtbegin.o crtend.o"
994 install_headers_dir=install-headers-cpio
995 ;;
996 d30v-*)
997 float_format=i64
998 ;;
999 dsp16xx-*)
1000 ;;
1001 elxsi-elxsi-*)
1002 use_collect2=yes
1003 ;;
1004 fr30-*-elf)
1005 tm_file="fr30/fr30.h"
1006 tmake_file=fr30/t-fr30
1007 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1008 ;;
1009 # This hasn't been upgraded to GCC 2.
1010 # fx80-alliant-*) # Alliant FX/80
1011 # ;;
1012 h8300-*-*)
1013 float_format=i32
1014 ;;
1015 hppa*-*-linux*)
1016 target_cpu_default="(MASK_PA_11 | MASK_GAS | MASK_JUMP_IN_DELAY)"
1017 tm_file="${tm_file} pa/elf.h linux.h pa/pa-linux.h"
1018 tmake_file="t-linux pa/t-linux"
1019 extra_parts="crtbegin.o crtend.o"
1020 xmake_file=none
1021 gas=yes gnu_ld=yes
1022 if test x$enable_threads = xyes; then
1023 thread_file='posix'
1024 fi
1025 ;;
1026 hppa*-*-openbsd*)
1027 target_cpu_default="MASK_PA_11"
1028 tmake_file=pa/t-openbsd
1029 ;;
1030 hppa1.1-*-pro*)
1031 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
1032 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h"
1033 xm_file=pa/xm-papro.h
1034 tmake_file=pa/t-pro
1035 ;;
1036 hppa1.1-*-osf*)
1037 target_cpu_default="MASK_PA_11"
1038 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
1039 use_collect2=yes
1040 ;;
1041 hppa1.1-*-rtems*)
1042 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
1043 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h"
1044 xm_file=pa/xm-papro.h
1045 tmake_file=pa/t-pro
1046 ;;
1047 hppa1.0-*-osf*)
1048 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
1049 use_collect2=yes
1050 ;;
1051 hppa1.1-*-bsd*)
1052 tm_file="${tm_file} pa/pa32-regs.h pa/som.h"
1053 target_cpu_default="MASK_PA_11"
1054 use_collect2=yes
1055 ;;
1056 hppa1.0-*-bsd*)
1057 tm_file="${tm_file} pa/pa32-regs.h pa/som.h"
1058 use_collect2=yes
1059 ;;
1060 hppa1.0-*-hpux7*)
1061 tm_file="pa/pa-oldas.h ${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux7.h"
1062 xm_file=pa/xm-pahpux.h
1063 xmake_file=pa/x-pa-hpux
1064 if test x$gas = xyes
1065 then
1066 tm_file="${tm_file} pa/gas.h"
1067 fi
1068 install_headers_dir=install-headers-cpio
1069 use_collect2=yes
1070 ;;
1071 changequote(,)dnl
1072 hppa1.0-*-hpux8.0[0-2]*)
1073 changequote([,])dnl
1074 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
1075 xm_file=pa/xm-pahpux.h
1076 xmake_file=pa/x-pa-hpux
1077 if test x$gas = xyes
1078 then
1079 tm_file="${tm_file} pa/pa-gas.h"
1080 else
1081 tm_file="pa/pa-oldas.h ${tm_file}"
1082 fi
1083 install_headers_dir=install-headers-cpio
1084 use_collect2=yes
1085 ;;
1086 changequote(,)dnl
1087 hppa1.1-*-hpux8.0[0-2]*)
1088 changequote([,])dnl
1089 target_cpu_default="MASK_PA_11"
1090 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
1091 xm_file=pa/xm-pahpux.h
1092 xmake_file=pa/x-pa-hpux
1093 if test x$gas = xyes
1094 then
1095 tm_file="${tm_file} pa/pa-gas.h"
1096 else
1097 tm_file="pa/pa-oldas.h ${tm_file}"
1098 fi
1099 install_headers_dir=install-headers-cpio
1100 use_collect2=yes
1101 ;;
1102 hppa1.1-*-hpux8*)
1103 target_cpu_default="MASK_PA_11"
1104 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
1105 xm_file=pa/xm-pahpux.h
1106 xmake_file=pa/x-pa-hpux
1107 if test x$gas = xyes
1108 then
1109 tm_file="${tm_file} pa/pa-gas.h"
1110 fi
1111 install_headers_dir=install-headers-cpio
1112 use_collect2=yes
1113 ;;
1114 hppa1.0-*-hpux8*)
1115 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
1116 xm_file=pa/xm-pahpux.h
1117 xmake_file=pa/x-pa-hpux
1118 if test x$gas = xyes
1119 then
1120 tm_file="${tm_file} pa/pa-gas.h"
1121 fi
1122 install_headers_dir=install-headers-cpio
1123 use_collect2=yes
1124 ;;
1125 hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
1126 target_cpu_default="MASK_PA_11"
1127 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
1128 float_format=i128
1129 xm_file=pa/xm-pahpux.h
1130 xmake_file=pa/x-pa-hpux
1131 tmake_file=pa/t-pa
1132 if test x$gas = xyes
1133 then
1134 tm_file="${tm_file} pa/pa-gas.h"
1135 fi
1136 if test x$enable_threads = x; then
1137 enable_threads=$have_pthread_h
1138 fi
1139 if test x$enable_threads = xyes; then
1140 thread_file='dce'
1141 tmake_file="${tmake_file} pa/t-dce-thr"
1142 fi
1143 install_headers_dir=install-headers-cpio
1144 use_collect2=yes
1145 ;;
1146 hppa1.0-*-hpux10*)
1147 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
1148 float_format=i128
1149 xm_file=pa/xm-pahpux.h
1150 xmake_file=pa/x-pa-hpux
1151 tmake_file=pa/t-pa
1152 if test x$gas = xyes
1153 then
1154 tm_file="${tm_file} pa/pa-gas.h"
1155 fi
1156 if test x$enable_threads = x; then
1157 enable_threads=$have_pthread_h
1158 fi
1159 if test x$enable_threads = xyes; then
1160 thread_file='dce'
1161 tmake_file="${tmake_file} pa/t-dce-thr"
1162 fi
1163 install_headers_dir=install-headers-cpio
1164 use_collect2=yes
1165 ;;
1166 hppa*64*-*-hpux11*)
1167 target_cpu_default="MASK_PA_11"
1168 xm_file=pa/xm-pa64hpux.h
1169 xmake_file=pa/x-pa-hpux
1170 tmake_file=pa/t-pa
1171 tm_file="pa/pa64-start.h ${tm_file} pa/pa64-regs.h pa/long_double.h pa/elf.h pa/pa-hpux.h pa/pa-hpux11.h pa/pa-64.h"
1172 float_format=i128
1173 tmake_file=pa/t-pa64
1174 target_cpu_default="(MASK_PA_11|MASK_PA_20)"
1175
1176 if [[ x$gas = xyes ]]
1177 then
1178 tm_file="${tm_file} pa/pa-gas.h"
1179 fi
1180 # if [[ x$enable_threads = x ]]; then
1181 # enable_threads=$have_pthread_h
1182 # fi
1183 # if [[ x$enable_threads = xyes ]]; then
1184 # thread_file='dce'
1185 # tmake_file="${tmake_file} pa/t-dce-thr"
1186 # fi
1187 install_headers_dir=install-headers-cpio
1188 use_collect2=yes
1189 ;;
1190 hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
1191 target_cpu_default="MASK_PA_11"
1192 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
1193 float_format=i128
1194 xm_file=pa/xm-pahpux.h
1195 xmake_file=pa/x-pa-hpux
1196 tmake_file=pa/t-pa
1197 if test x$gas = xyes
1198 then
1199 tm_file="${tm_file} pa/pa-gas.h"
1200 fi
1201 # if test x$enable_threads = x; then
1202 # enable_threads=$have_pthread_h
1203 # fi
1204 # if test x$enable_threads = xyes; then
1205 # thread_file='dce'
1206 # tmake_file="${tmake_file} pa/t-dce-thr"
1207 # fi
1208 install_headers_dir=install-headers-cpio
1209 use_collect2=yes
1210 ;;
1211 hppa1.0-*-hpux11*)
1212 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
1213 float_format=i128
1214 xm_file=pa/xm-pahpux.h
1215 xmake_file=pa/x-pa-hpux
1216 if test x$gas = xyes
1217 then
1218 tm_file="${tm_file} pa/pa-gas.h"
1219 fi
1220 # if test x$enable_threads = x; then
1221 # enable_threads=$have_pthread_h
1222 # fi
1223 # if test x$enable_threads = xyes; then
1224 # thread_file='dce'
1225 # tmake_file="${tmake_file} pa/t-dce-thr"
1226 # fi
1227 install_headers_dir=install-headers-cpio
1228 use_collect2=yes
1229 ;;
1230 hppa1.1-*-hpux* | hppa2*-*-hpux*)
1231 target_cpu_default="MASK_PA_11"
1232 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
1233 xm_file=pa/xm-pahpux.h
1234 xmake_file=pa/x-pa-hpux
1235 if test x$gas = xyes
1236 then
1237 tm_file="${tm_file} pa/pa-gas.h"
1238 fi
1239 install_headers_dir=install-headers-cpio
1240 use_collect2=yes
1241 ;;
1242 hppa1.0-*-hpux*)
1243 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
1244 xm_file=pa/xm-pahpux.h
1245 xmake_file=pa/x-pa-hpux
1246 if test x$gas = xyes
1247 then
1248 tm_file="${tm_file} pa/pa-gas.h"
1249 fi
1250 install_headers_dir=install-headers-cpio
1251 use_collect2=yes
1252 ;;
1253 hppa1.1-*-hiux* | hppa2*-*-hiux*)
1254 target_cpu_default="MASK_PA_11"
1255 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
1256 xm_file=pa/xm-pahpux.h
1257 xmake_file=pa/x-pa-hpux
1258 if test x$gas = xyes
1259 then
1260 tm_file="${tm_file} pa/pa-gas.h"
1261 fi
1262 install_headers_dir=install-headers-cpio
1263 use_collect2=yes
1264 ;;
1265 hppa1.0-*-hiux*)
1266 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
1267 xm_file=pa/xm-pahpux.h
1268 xmake_file=pa/x-pa-hpux
1269 if test x$gas = xyes
1270 then
1271 tm_file="${tm_file} pa/pa-gas.h"
1272 fi
1273 install_headers_dir=install-headers-cpio
1274 use_collect2=yes
1275 ;;
1276 hppa*-*-lites*)
1277 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h"
1278 target_cpu_default="MASK_PA_11"
1279 use_collect2=yes
1280 ;;
1281 hppa*-*-mpeix*)
1282 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-mpeix.h"
1283 xm_file=pa/xm-pampeix.h
1284 xmake_file=pa/x-pa-mpeix
1285 echo "You must use gas. Assuming it is already installed."
1286 install_headers_dir=install-headers-tar
1287 use_collect2=yes
1288 ;;
1289 i370-*-opened*) # IBM 360/370/390 Architecture
1290 xm_file=i370/xm-oe.h
1291 tm_file=i370/oe.h
1292 xmake_file=i370/x-oe
1293 tmake_file=i370/t-oe
1294 ;;
1295 i370-*-mvs*)
1296 xm_file=i370/xm-mvs.h
1297 tm_file=i370/mvs.h
1298 tmake_file=i370/t-mvs
1299 ;;
1300 i370-*-linux*)
1301 xm_file="xm-linux.h i370/xm-linux.h"
1302 xmake_file=x-linux
1303 tm_file="i370/linux.h ${tm_file}"
1304 tmake_file="t-linux i370/t-linux"
1305 # broken_install=yes
1306 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1307 # extra_parts="crtbegin.o crtend.o"
1308 gnu_ld=yes
1309 gas=yes
1310 elf=yes
1311 if test x$enable_threads = xyes; then
1312 thread_file='posix'
1313 fi
1314 ;;
1315 changequote(,)dnl
1316 i[34567]86-*-elf*)
1317 changequote([,])dnl
1318 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h"
1319 tm_file=i386/i386elf.h
1320 tmake_file=i386/t-i386elf
1321 xmake_file=x-svr4
1322 ;;
1323 changequote(,)dnl
1324 i[34567]86-ibm-aix*) # IBM PS/2 running AIX
1325 changequote([,])dnl
1326 if test x$gas = xyes
1327 then
1328 tm_file=i386/aix386.h
1329 extra_parts="crtbegin.o crtend.o"
1330 tmake_file=i386/t-crtstuff
1331 else
1332 tm_file=i386/aix386ng.h
1333 use_collect2=yes
1334 fi
1335 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
1336 xm_defines=USG
1337 xmake_file=i386/x-aix
1338 ;;
1339 changequote(,)dnl
1340 i[34567]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
1341 changequote([,])dnl
1342 xm_file="xm-alloca.h ${xm_file}"
1343 xm_defines="USG POSIX SMALL_ARG_MAX"
1344 xmake_file=i386/x-ncr3000
1345 if test x$stabs = xyes -a x$gas = xyes
1346 then
1347 tm_file=i386/sysv4gdb.h
1348 else
1349 tm_file=i386/sysv4.h
1350 fi
1351 extra_parts="crtbegin.o crtend.o"
1352 tmake_file=i386/t-crtpic
1353 ;;
1354 changequote(,)dnl
1355 i[34567]86-next-*)
1356 changequote([,])dnl
1357 tm_file=i386/next.h
1358 xm_file=i386/xm-next.h
1359 tmake_file=i386/t-next
1360 xmake_file=i386/x-next
1361 extra_objs=nextstep.o
1362 extra_parts="crtbegin.o crtend.o"
1363 if test x$enable_threads = xyes; then
1364 thread_file='mach'
1365 fi
1366 ;;
1367 changequote(,)dnl
1368 i[34567]86-sequent-bsd*) # 80386 from Sequent
1369 changequote([,])dnl
1370 use_collect2=yes
1371 if test x$gas = xyes
1372 then
1373 tm_file=i386/seq-gas.h
1374 else
1375 tm_file=i386/sequent.h
1376 fi
1377 ;;
1378 changequote(,)dnl
1379 i[34567]86-sequent-ptx1*)
1380 changequote([,])dnl
1381 xm_defines="USG SVR3"
1382 xmake_file=i386/x-sysv3
1383 tm_file=i386/seq-sysv3.h
1384 tmake_file=i386/t-crtstuff
1385 extra_parts="crtbegin.o crtend.o"
1386 install_headers_dir=install-headers-cpio
1387 ;;
1388 changequote(,)dnl
1389 i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
1390 changequote([,])dnl
1391 xm_defines="USG SVR3"
1392 xmake_file=i386/x-sysv3
1393 tm_file=i386/seq2-sysv3.h
1394 tmake_file=i386/t-crtstuff
1395 extra_parts="crtbegin.o crtend.o"
1396 install_headers_dir=install-headers-cpio
1397 ;;
1398 changequote(,)dnl
1399 i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
1400 changequote([,])dnl
1401 xm_file="xm-alloca.h ${xm_file}"
1402 xm_defines="USG POSIX SMALL_ARG_MAX"
1403 xmake_file=x-svr4
1404 tm_file=i386/ptx4-i.h
1405 tmake_file=t-svr4
1406 extra_parts="crtbegin.o crtend.o"
1407 install_headers_dir=install-headers-cpio
1408 ;;
1409 i386-sun-sunos*) # Sun i386 roadrunner
1410 xm_defines=USG
1411 tm_file=i386/sun.h
1412 use_collect2=yes
1413 ;;
1414 changequote(,)dnl
1415 i[34567]86-wrs-vxworks*)
1416 changequote([,])dnl
1417 tm_file=i386/vxi386.h
1418 tmake_file=i386/t-i386bare
1419 thread_file='vxworks'
1420 ;;
1421 changequote(,)dnl
1422 i[34567]86-*-aout*)
1423 changequote([,])dnl
1424 tm_file=i386/i386-aout.h
1425 tmake_file=i386/t-i386bare
1426 ;;
1427 changequote(,)dnl
1428 i[34567]86-*-beospe*)
1429 changequote([,])dnl
1430 xm_file=i386/xm-beos.h
1431 xm_defines="USE_C_ALLOCA"
1432 tmake_file=i386/t-beos
1433 tm_file=i386/beos-pe.h
1434 xmake_file=i386/x-beos
1435 extra_objs=winnt.o
1436 ;;
1437 changequote(,)dnl
1438 i[34567]86-*-beoself* | i[34567]86-*-beos*)
1439 changequote([,])dnl
1440 xm_file=i386/xm-beos.h
1441 tmake_file='i386/t-beos i386/t-crtpic'
1442 tm_file=i386/beos-elf.h
1443 xmake_file=i386/x-beos
1444 extra_objs=winnt.o
1445 extra_parts='crtbegin.o crtend.o'
1446 ;;
1447 changequote(,)dnl
1448 i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
1449 changequote([,])dnl
1450 tm_file=i386/bsd386.h
1451 # tmake_file=t-libc-ok
1452 ;;
1453 changequote(,)dnl
1454 i[34567]86-*-bsd*)
1455 changequote([,])dnl
1456 tm_file=i386/386bsd.h
1457 # tmake_file=t-libc-ok
1458 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
1459 # use_collect2=yes
1460 ;;
1461 changequote(,)dnl
1462 i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12].* | i[34567]86-*-freebsd*aout*)
1463 changequote([,])dnl
1464 tm_file="i386/freebsd.h i386/perform.h"
1465 tmake_file=t-freebsd
1466 ;;
1467 changequote(,)dnl
1468 i[34567]86-*-freebsd*)
1469 changequote([,])dnl
1470 tm_file="i386/i386.h i386/att.h svr4.h freebsd.h i386/freebsd-elf.h i386/perform.h"
1471 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1472 tmake_file=t-freebsd
1473 gas=yes
1474 gnu_ld=yes
1475 stabs=yes
1476 case x${enable_threads} in
1477 xyes | xpthreads | xposix)
1478 thread_file='posix'
1479 tmake_file="${tmake_file} t-freebsd-thread"
1480 ;;
1481 esac
1482 ;;
1483 changequote(,)dnl
1484 i[34567]86-*-netbsd*)
1485 changequote([,])dnl
1486 tm_file=i386/netbsd.h
1487 tmake_file=t-netbsd
1488 use_collect2=yes
1489 ;;
1490 changequote(,)dnl
1491 i[34567]86-*-openbsd*)
1492 changequote([,])dnl
1493 # we need collect2 until our bug is fixed...
1494 use_collect2=yes
1495 ;;
1496 changequote(,)dnl
1497 i[34567]86-*-coff*)
1498 changequote([,])dnl
1499 tm_file=i386/i386-coff.h
1500 tmake_file=i386/t-i386bare
1501 ;;
1502 changequote(,)dnl
1503 i[34567]86-*-isc*) # 80386 running ISC system
1504 changequote([,])dnl
1505 xm_file="${xm_file} i386/xm-isc.h"
1506 xm_defines="USG SVR3"
1507 case $machine in
1508 changequote(,)dnl
1509 i[34567]86-*-isc[34]*)
1510 changequote([,])dnl
1511 xmake_file=i386/x-isc3
1512 ;;
1513 *)
1514 xmake_file=i386/x-isc
1515 ;;
1516 esac
1517 if test x$gas = xyes -a x$stabs = xyes
1518 then
1519 tm_file=i386/iscdbx.h
1520 tmake_file=i386/t-svr3dbx
1521 extra_parts="svr3.ifile svr3z.ifile"
1522 else
1523 tm_file=i386/isccoff.h
1524 tmake_file=i386/t-crtstuff
1525 extra_parts="crtbegin.o crtend.o"
1526 fi
1527 tmake_file="$tmake_file i386/t-i386bare"
1528 install_headers_dir=install-headers-cpio
1529 ;;
1530 changequote(,)dnl
1531 i[34567]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
1532 changequote([,])dnl # with a.out format using
1533 # pre BFD linkers
1534 xmake_file=x-linux-aout
1535 tmake_file="t-linux-aout i386/t-crtstuff"
1536 tm_file=i386/linux-oldld.h
1537 gnu_ld=yes
1538 float_format=i386
1539 ;;
1540 changequote(,)dnl
1541 i[34567]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
1542 changequote([,])dnl # with a.out format
1543 xmake_file=x-linux-aout
1544 tmake_file="t-linux-aout i386/t-crtstuff"
1545 tm_file=i386/linux-aout.h
1546 gnu_ld=yes
1547 float_format=i386
1548 ;;
1549 changequote(,)dnl
1550 i[34567]86-*-linux-gnulibc1) # Intel 80386's running GNU/Linux
1551 changequote([,])dnl # with ELF format using the
1552 # GNU/Linux C library 5
1553 xmake_file=x-linux
1554 tm_file=i386/linux.h
1555 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
1556 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1557 gnu_ld=yes
1558 float_format=i386
1559 if test x$enable_threads = xyes; then
1560 thread_file='single'
1561 fi
1562 ;;
1563 changequote(,)dnl
1564 i[34567]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
1565 changequote([,])dnl # with ELF format using glibc 2
1566 # aka GNU/Linux C library 6
1567 xmake_file=x-linux
1568 tm_file=i386/linux.h
1569 tmake_file="t-linux i386/t-crtstuff"
1570 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1571 gnu_ld=yes
1572 float_format=i386
1573 if test x$enable_threads = xyes; then
1574 thread_file='posix'
1575 fi
1576 ;;
1577 changequote(,)dnl
1578 i[34567]86-*-gnu*)
1579 float_format=i386
1580 changequote([,])dnl
1581 ;;
1582 changequote(,)dnl
1583 i[34567]86-go32-msdos | i[34567]86-*-go32*)
1584 changequote([,])dnl
1585 echo "GO32/DJGPP V1.X is no longer supported. Use *-pc-msdosdjgpp for DJGPP V2.X instead."
1586 exit 1
1587 ;;
1588 changequote(,)dnl
1589 i[34567]86-pc-msdosdjgpp*)
1590 changequote([,])dnl
1591 xm_file=i386/xm-djgpp.h
1592 tm_file=i386/djgpp.h
1593 tmake_file=i386/t-djgpp
1594 xmake_file=i386/x-djgpp
1595 gnu_ld=yes
1596 gas=yes
1597 exeext=.exe
1598 float_format=none
1599 case $host in *pc-msdosdjgpp*)
1600 target_alias=djgpp
1601 ;;
1602 esac
1603 ;;
1604 changequote(,)dnl
1605 i[34567]86-moss-msdos* | i[34567]86-*-moss*)
1606 changequote([,])dnl
1607 tm_file=i386/moss.h
1608 tmake_file=t-libc-ok
1609 gnu_ld=yes
1610 gas=yes
1611 ;;
1612 changequote(,)dnl
1613 i[34567]86-*-lynxos*)
1614 changequote([,])dnl
1615 if test x$gas = xyes
1616 then
1617 tm_file=i386/lynx.h
1618 else
1619 tm_file=i386/lynx-ng.h
1620 fi
1621 xm_file=i386/xm-lynx.h
1622 tmake_file=i386/t-i386bare
1623 xmake_file=x-lynx
1624 ;;
1625 changequote(,)dnl
1626 i[34567]86-*-mach*)
1627 changequote([,])dnl
1628 tm_file=i386/mach.h
1629 # tmake_file=t-libc-ok
1630 use_collect2=yes
1631 ;;
1632 changequote(,)dnl
1633 i[34567]86-*-osfrose*) # 386 using OSF/rose
1634 changequote([,])dnl
1635 if test x$elf = xyes
1636 then
1637 tm_file=i386/osfelf.h
1638 use_collect2=
1639 else
1640 tm_file=i386/osfrose.h
1641 use_collect2=yes
1642 fi
1643 xm_file="i386/xm-osf.h ${xm_file}"
1644 xmake_file=i386/x-osfrose
1645 tmake_file=i386/t-osf
1646 extra_objs=halfpic.o
1647 ;;
1648 changequote(,)dnl
1649 i[34567]86-go32-rtems*)
1650 changequote([,])dnl
1651 cpu_type=i386
1652 xm_file=i386/xm-go32.h
1653 tm_file=i386/go32-rtems.h
1654 tmake_file="i386/t-go32 t-rtems"
1655 ;;
1656 changequote(,)dnl
1657 i[34567]86-*-rtemscoff*)
1658 changequote([,])dnl
1659 cpu_type=i386
1660 tm_file=i386/rtems.h
1661 tmake_file="i386/t-i386bare t-rtems"
1662 ;;
1663 changequote(,)dnl
1664 i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
1665 changequote([,])dnl
1666 cpu_type=i386
1667 tm_file=i386/rtemself.h
1668 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
1669 tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
1670 ;;
1671 changequote(,)dnl
1672 i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
1673 changequote([,])dnl
1674 xm_file="xm-alloca.h ${xm_file} i386/xm-sco5.h"
1675 xm_defines="USG SVR3"
1676 xmake_file=i386/x-sco5
1677 install_headers_dir=install-headers-cpio
1678 tm_file=i386/sco5.h
1679 if test x$gas = xyes
1680 then
1681 tm_file="i386/sco5gas.h ${tm_file}"
1682 tmake_file=i386/t-sco5gas
1683 else
1684 tmake_file=i386/t-sco5
1685 fi
1686 tmake_file="$tmake_file i386/t-i386bare"
1687 extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
1688 ;;
1689 changequote(,)dnl
1690 i[34567]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
1691 changequote([,])dnl
1692 xm_file="${xm_file} i386/xm-sco.h"
1693 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX"
1694 xmake_file=i386/x-sco4
1695 install_headers_dir=install-headers-cpio
1696 if test x$stabs = xyes
1697 then
1698 tm_file=i386/sco4dbx.h
1699 tmake_file=i386/t-svr3dbx
1700 extra_parts="svr3.ifile svr3z.rfile"
1701 else
1702 tm_file=i386/sco4.h
1703 tmake_file=i386/t-crtstuff
1704 extra_parts="crtbegin.o crtend.o"
1705 fi
1706 tmake_file="$tmake_file i386/t-i386bare"
1707 # The default EAFS filesystem supports long file names.
1708 # Truncating the target makes $host != $target which
1709 # makes gcc think it is doing a cross-compile.
1710 # truncate_target=yes
1711 ;;
1712 changequote(,)dnl
1713 i[34567]86-*-sco*) # 80386 running SCO system
1714 changequote([,])dnl
1715 xm_file=i386/xm-sco.h
1716 xmake_file=i386/x-sco
1717 install_headers_dir=install-headers-cpio
1718 if test x$stabs = xyes
1719 then
1720 tm_file=i386/scodbx.h
1721 tmake_file=i386/t-svr3dbx
1722 extra_parts="svr3.ifile svr3z.rfile"
1723 else
1724 tm_file=i386/sco.h
1725 extra_parts="crtbegin.o crtend.o"
1726 tmake_file=i386/t-crtstuff
1727 fi
1728 tmake_file="$tmake_file i386/t-i386bare"
1729 truncate_target=yes
1730 ;;
1731 changequote(,)dnl
1732 i[34567]86-*-solaris2*)
1733 changequote([,])dnl
1734 xm_file="xm-alloca.h ${xm_file}"
1735 xm_defines="USG POSIX SMALL_ARG_MAX"
1736 tm_file=i386/sol2.h
1737 if test x$gas = xyes; then
1738 # Only needed if gas does not support -s
1739 tm_file="i386/sol2gas.h ${tm_file}"
1740 fi
1741 tmake_file="i386/t-i386bare i386/t-sol2"
1742 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1743 xmake_file=x-svr4
1744 if test x${enable_threads} = x; then
1745 enable_threads=$have_pthread_h
1746 if test x${enable_threads} = x; then
1747 enable_threads=$have_thread_h
1748 fi
1749 fi
1750 if test x${enable_threads} = xyes; then
1751 if test x${have_pthread_h} = xyes; then
1752 thread_file='posix'
1753 else
1754 thread_file='solaris'
1755 fi
1756 fi
1757 ;;
1758 changequote(,)dnl
1759 i[34567]86-*-sysv5*) # Intel x86 on System V Release 5
1760 changequote([,])dnl
1761 xm_file="xm-alloca.h ${xm_file}"
1762 xm_defines="USG POSIX"
1763 tm_file=i386/sysv5.h
1764 if test x$stabs = xyes
1765 then
1766 tm_file="${tm_file} dbx.h"
1767 fi
1768 tmake_file="i386/t-i386bare i386/t-crtpic"
1769 xmake_file=x-svr4
1770 extra_parts="crtbegin.o crtend.o"
1771 if test x$enable_threads = xyes; then
1772 thread_file='posix'
1773 fi
1774 ;;
1775 changequote(,)dnl
1776 i[34567]86-*-sysv4*) # Intel 80386's running system V.4
1777 changequote([,])dnl
1778 xm_file="xm-alloca.h ${xm_file}"
1779 xm_defines="USG POSIX SMALL_ARG_MAX"
1780 tm_file=i386/sysv4.h
1781 if test x$stabs = xyes
1782 then
1783 tm_file="${tm_file} dbx.h"
1784 fi
1785 tmake_file="i386/t-i386bare i386/t-crtpic"
1786 xmake_file=x-svr4
1787 extra_parts="crtbegin.o crtend.o"
1788 ;;
1789 changequote(,)dnl
1790 i[34567]86-*-udk*) # Intel x86 on SCO UW/OSR5 Dev Kit
1791 changequote([,])dnl
1792 xm_file="xm-alloca.h ${xm_file}"
1793 xm_defines="USG POSIX"
1794 tm_file=i386/udk.h
1795 tmake_file="i386/t-i386bare i386/t-crtpic i386/t-udk"
1796 xmake_file=x-svr4
1797 extra_parts="crtbegin.o crtend.o"
1798 install_headers_dir=install-headers-cpio
1799 ;;
1800 changequote(,)dnl
1801 i[34567]86-*-osf1*) # Intel 80386's running OSF/1 1.3+
1802 changequote([,])dnl
1803 cpu_type=i386
1804 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
1805 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
1806 if test x$stabs = xyes
1807 then
1808 tm_file=i386/osf1elfgdb.h
1809 else
1810 tm_file=i386/osf1elf.h
1811 fi
1812 tmake_file=i386/t-osf1elf
1813 xmake_file=i386/x-osf1elf
1814 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1815 ;;
1816 changequote(,)dnl
1817 i[34567]86-*-sysv*) # Intel 80386's running system V
1818 changequote([,])dnl
1819 xm_defines="USG SVR3"
1820 xmake_file=i386/x-sysv3
1821 if test x$gas = xyes
1822 then
1823 if test x$stabs = xyes
1824 then
1825 tm_file=i386/svr3dbx.h
1826 tmake_file=i386/t-svr3dbx
1827 extra_parts="svr3.ifile svr3z.rfile"
1828 else
1829 tm_file=i386/svr3gas.h
1830 extra_parts="crtbegin.o crtend.o"
1831 tmake_file=i386/t-crtstuff
1832 fi
1833 else
1834 tm_file=i386/sysv3.h
1835 extra_parts="crtbegin.o crtend.o"
1836 tmake_file=i386/t-crtstuff
1837 fi
1838 tmake_file="$tmake_file i386/t-crtpic"
1839 ;;
1840 i386-*-vsta) # Intel 80386's running VSTa kernel
1841 xm_file="${xm_file} i386/xm-vsta.h"
1842 tm_file=i386/vsta.h
1843 tmake_file=i386/t-vsta
1844 xmake_file=i386/x-vsta
1845 ;;
1846 changequote(,)dnl
1847 i[34567]86-*-win32)
1848 changequote([,])dnl
1849 xm_file="${xm_file} i386/xm-cygwin.h"
1850 tmake_file=i386/t-cygwin
1851 tm_file=i386/win32.h
1852 xmake_file=i386/x-cygwin
1853 extra_objs=winnt.o
1854 if test x$enable_threads = xyes; then
1855 thread_file='win32'
1856 fi
1857 exeext=.exe
1858 ;;
1859 changequote(,)dnl
1860 i[34567]86-*-pe | i[34567]86-*-cygwin*)
1861 changequote([,])dnl
1862 xm_file="${xm_file} i386/xm-cygwin.h"
1863 tmake_file=i386/t-cygwin
1864 tm_file=i386/cygwin.h
1865 xmake_file=i386/x-cygwin
1866 extra_objs=winnt.o
1867 if test x$enable_threads = xyes; then
1868 thread_file='win32'
1869 fi
1870 exeext=.exe
1871 ;;
1872 changequote(,)dnl
1873 i[34567]86-*-mingw32*)
1874 changequote([,])dnl
1875 tm_file=i386/mingw32.h
1876 xm_file="${xm_file} i386/xm-mingw32.h"
1877 tmake_file="i386/t-cygwin i386/t-mingw32"
1878 extra_objs=winnt.o
1879 xmake_file=i386/x-cygwin
1880 if test x$enable_threads = xyes; then
1881 thread_file='win32'
1882 fi
1883 exeext=.exe
1884 case $machine in
1885 *mingw32msv*)
1886 ;;
1887 *minwg32crt* | *mingw32*)
1888 tm_file="${tm_file} i386/crtdll.h"
1889 ;;
1890 esac
1891 ;;
1892 changequote(,)dnl
1893 i[34567]86-*-uwin*)
1894 changequote([,])dnl
1895 tm_file=i386/uwin.h
1896 xm_file="${xm_file} i386/xm-uwin.h"
1897 xm_defines="USG NO_STAB_H"
1898 tmake_file="i386/t-cygwin i386/t-uwin"
1899 extra_objs=winnt.o
1900 xmake_file=i386/x-cygwin
1901 if test x$enable_threads = xyes; then
1902 thread_file='win32'
1903 fi
1904 exeext=.exe
1905 ;;
1906 changequote(,)dnl
1907 i[34567]86-*-interix*)
1908 changequote([,])dnl
1909 tm_file="i386/i386-interix.h interix.h"
1910 xm_file="i386/xm-i386-interix.h xm-interix.h"
1911 xm_defines="USG"
1912 tmake_file="i386/t-interix"
1913 extra_objs=interix.o
1914 xmake_file=x-interix
1915 if test x$enable_threads = xyes ; then
1916 thread_file='posix'
1917 fi
1918 if test x$stabs = xyes ; then
1919 tm_file="${tm_file} dbxcoff.h"
1920 fi
1921 ;;
1922 changequote(,)dnl
1923 i[34567]86-*-winnt3*)
1924 changequote([,])dnl
1925 tm_file=i386/win-nt.h
1926 out_file=i386/i386.c
1927 xm_file="xm-winnt.h ${xm_file}"
1928 xmake_file=winnt/x-winnt
1929 tmake_file=i386/t-winnt
1930 extra_host_objs="winnt.o oldnames.o"
1931 extra_gcc_objs="spawnv.o oldnames.o"
1932 if test x$gnu_ld != xyes
1933 then
1934 extra_programs=ld.exe
1935 fi
1936 if test x$enable_threads = xyes; then
1937 thread_file='win32'
1938 fi
1939 ;;
1940 changequote(,)dnl
1941 i[34567]86-dg-dgux*)
1942 changequote([,])dnl
1943 xm_file="xm-alloca.h ${xm_file}"
1944 xm_defines="USG POSIX"
1945 out_file=i386/dgux.c
1946 tm_file=i386/dgux.h
1947 tmake_file=i386/t-dgux
1948 xmake_file=i386/x-dgux
1949 install_headers_dir=install-headers-cpio
1950 ;;
1951 i860-alliant-*) # Alliant FX/2800
1952 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1953 xm_file="${xm_file}"
1954 xmake_file=i860/x-fx2800
1955 tmake_file=i860/t-fx2800
1956 extra_parts="crtbegin.o crtend.o"
1957 ;;
1958 i860-*-bsd*)
1959 tm_file="${tm_file} i860/bsd.h"
1960 if test x$gas = xyes
1961 then
1962 tm_file="${tm_file} i860/bsd-gas.h"
1963 fi
1964 use_collect2=yes
1965 ;;
1966 i860-*-mach*)
1967 tm_file="${tm_file} i860/mach.h"
1968 tmake_file=t-libc-ok
1969 ;;
1970 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1971 tm_file="${tm_file} svr3.h i860/paragon.h"
1972 xm_defines="USG SVR3"
1973 tmake_file=t-osf
1974 ;;
1975 i860-*-sysv3*)
1976 tm_file="${tm_file} svr3.h i860/sysv3.h"
1977 xm_defines="USG SVR3"
1978 xmake_file=i860/x-sysv3
1979 extra_parts="crtbegin.o crtend.o"
1980 ;;
1981 i860-*-sysv4*)
1982 tm_file="${tm_file} svr4.h i860/sysv4.h"
1983 xm_defines="USG SVR3"
1984 xmake_file=i860/x-sysv4
1985 tmake_file=t-svr4
1986 extra_parts="crtbegin.o crtend.o"
1987 ;;
1988 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1989 tm_file="${tm_file} i960/vx960.h"
1990 tmake_file=i960/t-vxworks960
1991 use_collect2=yes
1992 thread_file='vxworks'
1993 ;;
1994 i960-wrs-vxworks5* | i960-wrs-vxworks)
1995 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1996 tmake_file=i960/t-vxworks960
1997 use_collect2=yes
1998 thread_file='vxworks'
1999 ;;
2000 i960-wrs-vxworks*)
2001 tm_file="${tm_file} i960/vx960.h"
2002 tmake_file=i960/t-vxworks960
2003 use_collect2=yes
2004 thread_file='vxworks'
2005 ;;
2006 i960-*-coff*)
2007 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
2008 tmake_file=i960/t-960bare
2009 use_collect2=yes
2010 ;;
2011 i960-*-rtems)
2012 tmake_file="i960/t-960bare t-rtems"
2013 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
2014 use_collect2=yes
2015 ;;
2016 i960-*-*) # Default i960 environment.
2017 use_collect2=yes
2018 ;;
2019 ia64*-*-elf*)
2020 tm_file=ia64/elf.h
2021 tmake_file="ia64/t-ia64"
2022 target_cpu_default="0"
2023 if test x$gas = xyes
2024 then
2025 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
2026 fi
2027 if test x$gnu_ld = xyes
2028 then
2029 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
2030 fi
2031 ;;
2032 ia64*-*-linux*)
2033 tm_file=ia64/linux.h
2034 tmake_file="t-linux ia64/t-ia64"
2035 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
2036 if test x$enable_threads = xyes; then
2037 thread_file='posix'
2038 fi
2039 ;;
2040 m32r-*-elf*)
2041 extra_parts="crtinit.o crtfini.o"
2042 ;;
2043 m68000-convergent-sysv*)
2044 tm_file=m68k/ctix.h
2045 xm_file="m68k/xm-3b1.h ${xm_file}"
2046 xm_defines=USG
2047 use_collect2=yes
2048 extra_headers=math-68881.h
2049 ;;
2050 m68000-hp-bsd*) # HP 9000/200 running BSD
2051 tm_file=m68k/hp2bsd.h
2052 xmake_file=m68k/x-hp2bsd
2053 use_collect2=yes
2054 extra_headers=math-68881.h
2055 ;;
2056 m68000-hp-hpux*) # HP 9000 series 300
2057 xm_file="xm-alloca.h ${xm_file}"
2058 xm_defines="USG"
2059 if test x$gas = xyes
2060 then
2061 xmake_file=m68k/x-hp320g
2062 tm_file=m68k/hp310g.h
2063 else
2064 xmake_file=m68k/x-hp320
2065 tm_file=m68k/hp310.h
2066 fi
2067 install_headers_dir=install-headers-cpio
2068 use_collect2=yes
2069 extra_headers=math-68881.h
2070 ;;
2071 m68000-sun-sunos3*)
2072 tm_file=m68k/sun2.h
2073 use_collect2=yes
2074 extra_headers=math-68881.h
2075 ;;
2076 m68000-sun-sunos4*)
2077 tm_file=m68k/sun2o4.h
2078 use_collect2=yes
2079 extra_headers=math-68881.h
2080 ;;
2081 m68000-att-sysv*)
2082 xm_file="m68k/xm-3b1.h ${xm_file}"
2083 xm_defines=USG
2084 if test x$gas = xyes
2085 then
2086 tm_file=m68k/3b1g.h
2087 else
2088 tm_file=m68k/3b1.h
2089 fi
2090 use_collect2=yes
2091 extra_headers=math-68881.h
2092 ;;
2093 m68k-apple-aux*) # Apple Macintosh running A/UX
2094 xm_defines="USG AUX"
2095 tmake_file=m68k/t-aux
2096 install_headers_dir=install-headers-cpio
2097 extra_headers=math-68881.h
2098 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
2099 tm_file=
2100 if test "$gnu_ld" = yes
2101 then
2102 tm_file="${tm_file} m68k/auxgld.h"
2103 else
2104 tm_file="${tm_file} m68k/auxld.h"
2105 fi
2106 if test "$gas" = yes
2107 then
2108 tm_file="${tm_file} m68k/auxgas.h"
2109 else
2110 tm_file="${tm_file} m68k/auxas.h"
2111 fi
2112 tm_file="${tm_file} m68k/a-ux.h"
2113 float_format=m68k
2114 ;;
2115 m68k-apollo-*)
2116 tm_file=m68k/apollo68.h
2117 xmake_file=m68k/x-apollo68
2118 use_collect2=yes
2119 extra_headers=math-68881.h
2120 float_format=m68k
2121 ;;
2122 m68k-altos-sysv*) # Altos 3068
2123 if test x$gas = xyes
2124 then
2125 tm_file=m68k/altos3068.h
2126 xm_defines=USG
2127 else
2128 echo "The Altos is supported only with the GNU assembler" 1>&2
2129 exit 1
2130 fi
2131 extra_headers=math-68881.h
2132 ;;
2133 m68k-bull-sysv*) # Bull DPX/2
2134 if test x$gas = xyes
2135 then
2136 if test x$stabs = xyes
2137 then
2138 tm_file=m68k/dpx2cdbx.h
2139 else
2140 tm_file=m68k/dpx2g.h
2141 fi
2142 else
2143 tm_file=m68k/dpx2.h
2144 fi
2145 xm_file="xm-alloca.h ${xm_file}"
2146 xm_defines=USG
2147 xmake_file=m68k/x-dpx2
2148 use_collect2=yes
2149 extra_headers=math-68881.h
2150 ;;
2151 m68k-atari-sysv4*) # Atari variant of V.4.
2152 tm_file=m68k/atari.h
2153 xm_file="xm-alloca.h ${xm_file}"
2154 xm_defines="USG FULL_PROTOTYPES"
2155 tmake_file=t-svr4
2156 extra_parts="crtbegin.o crtend.o"
2157 extra_headers=math-68881.h
2158 float_format=m68k
2159 ;;
2160 m68k-motorola-sysv*)
2161 tm_file=m68k/mot3300.h
2162 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
2163 if test x$gas = xyes
2164 then
2165 xmake_file=m68k/x-mot3300-gas
2166 if test x$gnu_ld = xyes
2167 then
2168 tmake_file=m68k/t-mot3300-gald
2169 else
2170 tmake_file=m68k/t-mot3300-gas
2171 use_collect2=yes
2172 fi
2173 else
2174 xmake_file=m68k/x-mot3300
2175 if test x$gnu_ld = xyes
2176 then
2177 tmake_file=m68k/t-mot3300-gld
2178 else
2179 tmake_file=m68k/t-mot3300
2180 use_collect2=yes
2181 fi
2182 fi
2183 gdb_needs_out_file_path=yes
2184 extra_parts="crt0.o mcrt0.o"
2185 extra_headers=math-68881.h
2186 float_format=m68k
2187 ;;
2188 m68k-ncr-sysv*) # NCR Tower 32 SVR3
2189 tm_file=m68k/tower-as.h
2190 xm_defines="USG SVR3"
2191 xmake_file=m68k/x-tower
2192 extra_parts="crtbegin.o crtend.o"
2193 extra_headers=math-68881.h
2194 ;;
2195 m68k-plexus-sysv*)
2196 tm_file=m68k/plexus.h
2197 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
2198 xm_defines=USG
2199 use_collect2=yes
2200 extra_headers=math-68881.h
2201 ;;
2202 m68k-tti-*)
2203 tm_file=m68k/pbb.h
2204 xm_file="xm-alloca.h ${xm_file}"
2205 xm_defines=USG
2206 extra_headers=math-68881.h
2207 ;;
2208 m68k-crds-unos*)
2209 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
2210 xm_defines="USG unos"
2211 xmake_file=m68k/x-crds
2212 tm_file=m68k/crds.h
2213 use_collect2=yes
2214 extra_headers=math-68881.h
2215 ;;
2216 m68k-cbm-sysv4*) # Commodore variant of V.4.
2217 tm_file=m68k/amix.h
2218 xm_file="xm-alloca.h ${xm_file}"
2219 xm_defines="USG FULL_PROTOTYPES"
2220 xmake_file=m68k/x-amix
2221 tmake_file=t-svr4
2222 extra_parts="crtbegin.o crtend.o"
2223 extra_headers=math-68881.h
2224 float_format=m68k
2225 ;;
2226 m68k-ccur-rtu)
2227 tm_file=m68k/ccur-GAS.h
2228 xmake_file=m68k/x-ccur
2229 extra_headers=math-68881.h
2230 use_collect2=yes
2231 float_format=m68k
2232 ;;
2233 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
2234 tm_file=m68k/hp3bsd44.h
2235 xmake_file=m68k/x-hp3bsd44
2236 use_collect2=yes
2237 extra_headers=math-68881.h
2238 float_format=m68k
2239 ;;
2240 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
2241 tm_file=m68k/hp3bsd.h
2242 use_collect2=yes
2243 extra_headers=math-68881.h
2244 float_format=m68k
2245 ;;
2246 m68k-isi-bsd*)
2247 if test x$with_fp = xno
2248 then
2249 tm_file=m68k/isi-nfp.h
2250 else
2251 tm_file=m68k/isi.h
2252 float_format=m68k
2253 fi
2254 use_collect2=yes
2255 extra_headers=math-68881.h
2256 ;;
2257 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
2258 xm_file="xm-alloca.h ${xm_file}"
2259 xm_defines="USG"
2260 if test x$gas = xyes
2261 then
2262 xmake_file=m68k/x-hp320g
2263 tm_file=m68k/hp320g.h
2264 else
2265 xmake_file=m68k/x-hp320
2266 tm_file=m68k/hpux7.h
2267 fi
2268 install_headers_dir=install-headers-cpio
2269 use_collect2=yes
2270 extra_headers=math-68881.h
2271 float_format=m68k
2272 ;;
2273 m68k-hp-hpux*) # HP 9000 series 300
2274 xm_file="xm-alloca.h ${xm_file}"
2275 xm_defines="USG"
2276 if test x$gas = xyes
2277 then
2278 xmake_file=m68k/x-hp320g
2279 tm_file=m68k/hp320g.h
2280 else
2281 xmake_file=m68k/x-hp320
2282 tm_file=m68k/hp320.h
2283 fi
2284 install_headers_dir=install-headers-cpio
2285 use_collect2=yes
2286 extra_headers=math-68881.h
2287 float_format=m68k
2288 ;;
2289 m68k-sun-mach*)
2290 tm_file=m68k/sun3mach.h
2291 use_collect2=yes
2292 extra_headers=math-68881.h
2293 float_format=m68k
2294 ;;
2295 m68k-sony-newsos3*)
2296 if test x$gas = xyes
2297 then
2298 tm_file=m68k/news3gas.h
2299 else
2300 tm_file=m68k/news3.h
2301 fi
2302 use_collect2=yes
2303 extra_headers=math-68881.h
2304 float_format=m68k
2305 ;;
2306 m68k-sony-bsd* | m68k-sony-newsos*)
2307 if test x$gas = xyes
2308 then
2309 tm_file=m68k/newsgas.h
2310 else
2311 tm_file=m68k/news.h
2312 fi
2313 use_collect2=yes
2314 extra_headers=math-68881.h
2315 float_format=m68k
2316 ;;
2317 m68k-next-nextstep2*)
2318 tm_file=m68k/next21.h
2319 xm_file="m68k/xm-next.h ${xm_file}"
2320 tmake_file=m68k/t-next
2321 xmake_file=m68k/x-next
2322 extra_objs=nextstep.o
2323 extra_headers=math-68881.h
2324 use_collect2=yes
2325 float_format=m68k
2326 ;;
2327 changequote(,)dnl
2328 m68k-next-nextstep[34]*)
2329 changequote([,])dnl
2330 tm_file=m68k/next.h
2331 xm_file="m68k/xm-next.h ${xm_file}"
2332 tmake_file=m68k/t-next
2333 xmake_file=m68k/x-next
2334 extra_objs=nextstep.o
2335 extra_parts="crtbegin.o crtend.o"
2336 extra_headers=math-68881.h
2337 float_format=m68k
2338 if test x$enable_threads = xyes; then
2339 thread_file='mach'
2340 fi
2341 ;;
2342 m68k-sun-sunos3*)
2343 if test x$with_fp = xno
2344 then
2345 tm_file=m68k/sun3n3.h
2346 else
2347 tm_file=m68k/sun3o3.h
2348 float_format=m68k
2349 fi
2350 use_collect2=yes
2351 extra_headers=math-68881.h
2352 ;;
2353 m68k-sun-sunos*) # For SunOS 4 (the default).
2354 if test x$with_fp = xno
2355 then
2356 tm_file=m68k/sun3n.h
2357 else
2358 tm_file=m68k/sun3.h
2359 float_format=m68k
2360 fi
2361 use_collect2=yes
2362 extra_headers=math-68881.h
2363 ;;
2364 m68k-wrs-vxworks*)
2365 tm_file=m68k/vxm68k.h
2366 tmake_file=m68k/t-vxworks68
2367 extra_headers=math-68881.h
2368 thread_file='vxworks'
2369 float_format=m68k
2370 ;;
2371 m68k-*-aout*)
2372 tmake_file=m68k/t-m68kbare
2373 tm_file="m68k/m68k-aout.h libgloss.h"
2374 extra_headers=math-68881.h
2375 float_format=m68k
2376 ;;
2377 m68k-*-coff*)
2378 tmake_file=m68k/t-m68kbare
2379 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
2380 extra_headers=math-68881.h
2381 float_format=m68k
2382 ;;
2383 m68020-*-elf* | m68k-*-elf*)
2384 tm_file="m68k/m68020-elf.h"
2385 xm_file=m68k/xm-m68kv.h
2386 tmake_file=m68k/t-m68kelf
2387 header_files=math-68881.h
2388 ;;
2389 m68k-*-lynxos*)
2390 if test x$gas = xyes
2391 then
2392 tm_file=m68k/lynx.h
2393 else
2394 tm_file=m68k/lynx-ng.h
2395 fi
2396 xm_file=m68k/xm-lynx.h
2397 xmake_file=x-lynx
2398 tmake_file=m68k/t-lynx
2399 extra_headers=math-68881.h
2400 float_format=m68k
2401 ;;
2402 m68k*-*-netbsd*)
2403 tm_file=m68k/netbsd.h
2404 tmake_file=t-netbsd
2405 float_format=m68k
2406 use_collect2=yes
2407 ;;
2408 m68k*-*-openbsd*)
2409 float_format=m68k
2410 # we need collect2 until our bug is fixed...
2411 use_collect2=yes
2412 ;;
2413 m68k-*-sysv3*) # Motorola m68k's running system V.3
2414 xm_file="xm-alloca.h ${xm_file}"
2415 xm_defines=USG
2416 xmake_file=m68k/x-m68kv
2417 extra_parts="crtbegin.o crtend.o"
2418 extra_headers=math-68881.h
2419 float_format=m68k
2420 ;;
2421 m68k-*-sysv4*) # Motorola m68k's running system V.4
2422 tm_file=m68k/m68kv4.h
2423 xm_file="xm-alloca.h ${xm_file}"
2424 xm_defines=USG
2425 tmake_file=t-svr4
2426 extra_parts="crtbegin.o crtend.o"
2427 extra_headers=math-68881.h
2428 float_format=m68k
2429 ;;
2430 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
2431 # with a.out format
2432 xmake_file=x-linux
2433 tm_file=m68k/linux-aout.h
2434 tmake_file="t-linux-aout m68k/t-linux-aout"
2435 extra_headers=math-68881.h
2436 float_format=m68k
2437 gnu_ld=yes
2438 ;;
2439 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
2440 # with ELF format using the
2441 # GNU/Linux C library 5
2442 xmake_file=x-linux
2443 tm_file=m68k/linux.h
2444 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
2445 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2446 extra_headers=math-68881.h
2447 float_format=m68k
2448 gnu_ld=yes
2449 ;;
2450 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
2451 # with ELF format using glibc 2
2452 # aka the GNU/Linux C library 6.
2453 xmake_file=x-linux
2454 tm_file=m68k/linux.h
2455 tmake_file="t-linux m68k/t-linux"
2456 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2457 extra_headers=math-68881.h
2458 float_format=m68k
2459 gnu_ld=yes
2460 if test x$enable_threads = xyes; then
2461 thread_file='posix'
2462 fi
2463 ;;
2464 m68k-*-psos*)
2465 tmake_file=m68k/t-m68kbare
2466 tm_file=m68k/m68k-psos.h
2467 extra_headers=math-68881.h
2468 float_format=m68k
2469 ;;
2470 m68k-*-rtemscoff*)
2471 tmake_file="m68k/t-m68kbare t-rtems"
2472 tm_file=m68k/rtems.h
2473 extra_headers=math-68881.h
2474 float_format=m68k
2475 ;;
2476 m68k-*-rtemself*|m68k-*-rtems*)
2477 tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
2478 tm_file=m68k/rtemself.h
2479 extra_headers=math-68881.h
2480 float_format=m68k
2481 ;;
2482 m88k-dg-dgux*)
2483 case $machine in
2484 m88k-dg-dguxbcs*)
2485 tm_file=m88k/dguxbcs.h
2486 tmake_file=m88k/t-dguxbcs
2487 ;;
2488 *)
2489 tm_file=m88k/dgux.h
2490 tmake_file=m88k/t-dgux
2491 ;;
2492 esac
2493 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
2494 xmake_file=m88k/x-dgux
2495 if test x$gas = xyes
2496 then
2497 tmake_file=m88k/t-dgux-gas
2498 fi
2499 ;;
2500 m88k-dolphin-sysv3*)
2501 tm_file=m88k/dolph.h
2502 extra_parts="crtbegin.o crtend.o"
2503 xm_file="m88k/xm-sysv3.h ${xm_file}"
2504 xmake_file=m88k/x-dolph
2505 if test x$gas = xyes
2506 then
2507 tmake_file=m88k/t-m88k-gas
2508 fi
2509 ;;
2510 m88k-tektronix-sysv3)
2511 tm_file=m88k/tekXD88.h
2512 extra_parts="crtbegin.o crtend.o"
2513 xm_file="m88k/xm-sysv3.h ${xm_file}"
2514 xmake_file=m88k/x-tekXD88
2515 if test x$gas = xyes
2516 then
2517 tmake_file=m88k/t-m88k-gas
2518 fi
2519 ;;
2520 m88k-*-aout*)
2521 tm_file=m88k/m88k-aout.h
2522 ;;
2523 m88k-*-coff*)
2524 tm_file=m88k/m88k-coff.h
2525 tmake_file=m88k/t-bug
2526 ;;
2527 m88k-*-luna*)
2528 tm_file=m88k/luna.h
2529 extra_parts="crtbegin.o crtend.o"
2530 if test x$gas = xyes
2531 then
2532 tmake_file=m88k/t-luna-gas
2533 else
2534 tmake_file=m88k/t-luna
2535 fi
2536 ;;
2537 m88k-*-openbsd*)
2538 tmake_file="${tmake_file} m88k/t-luna-gas"
2539 tm_file="m88k/aout-dbx.h aoutos.h m88k/m88k.h openbsd.h ${tm_file}"
2540 xm_file="xm-openbsd.h m88k/xm-m88k.h ${xm_file}"
2541 ;;
2542 m88k-*-sysv3*)
2543 tm_file=m88k/sysv3.h
2544 extra_parts="crtbegin.o crtend.o"
2545 xm_file="m88k/xm-sysv3.h ${xm_file}"
2546 xmake_file=m88k/x-sysv3
2547 if test x$gas = xyes
2548 then
2549 tmake_file=m88k/t-m88k-gas
2550 fi
2551 ;;
2552 m88k-*-sysv4*)
2553 tm_file=m88k/sysv4.h
2554 extra_parts="crtbegin.o crtend.o"
2555 xmake_file=m88k/x-sysv4
2556 tmake_file=m88k/t-sysv4
2557 ;;
2558 mcore-*-elf)
2559 tm_file=mcore/mcore-elf.h
2560 tmake_file=mcore/t-mcore
2561 ;;
2562 mcore-*-pe*)
2563 tm_file=mcore/mcore-pe.h
2564 tmake_file=mcore/t-mcore-pe
2565 ;;
2566 mips-sgi-irix6*) # SGI System V.4., IRIX 6
2567 if test "x$gnu_ld" = xyes
2568 then
2569 tm_file="mips/iris6.h mips/iris6gld.h"
2570 else
2571 tm_file=mips/iris6.h
2572 fi
2573 tmake_file=mips/t-iris6
2574 xm_file=mips/xm-iris6.h
2575 xmake_file=mips/x-iris6
2576 # if test x$enable_threads = xyes; then
2577 # thread_file='irix'
2578 # fi
2579 ;;
2580 mips-wrs-vxworks)
2581 tm_file="mips/elf.h mips/vxworks.h"
2582 tmake_file=mips/t-ecoff
2583 gas=yes
2584 gnu_ld=yes
2585 extra_parts="crtbegin.o crtend.o"
2586 thread_file='vxworks'
2587 ;;
2588 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
2589 tm_file="mips/iris6.h mips/cross64.h"
2590 xm_defines=USG
2591 xm_file="mips/xm-iris5.h"
2592 xmake_file=mips/x-iris
2593 tmake_file=mips/t-cross64
2594 # See comment in mips/iris[56].h files.
2595 use_collect2=yes
2596 # if test x$enable_threads = xyes; then
2597 # thread_file='irix'
2598 # fi
2599 ;;
2600 mips-sni-sysv4)
2601 if test x$gas = xyes
2602 then
2603 if test x$stabs = xyes
2604 then
2605 tm_file=mips/iris5gdb.h
2606 else
2607 tm_file="mips/sni-svr4.h mips/sni-gas.h"
2608 fi
2609 else
2610 tm_file=mips/sni-svr4.h
2611 fi
2612 xm_defines=USG
2613 xmake_file=mips/x-sni-svr4
2614 tmake_file=mips/t-mips-gas
2615 if test x$gnu_ld != xyes
2616 then
2617 use_collect2=yes
2618 fi
2619 ;;
2620 mips-sgi-irix5*) # SGI System V.4., IRIX 5
2621 if test x$gas = xyes
2622 then
2623 tm_file="mips/iris5.h mips/iris5gas.h"
2624 if test x$stabs = xyes
2625 then
2626 tm_file="${tm_file} dbx.h"
2627 fi
2628 else
2629 tm_file=mips/iris5.h
2630 fi
2631 xm_defines=USG
2632 xm_file="mips/xm-iris5.h"
2633 xmake_file=mips/x-iris
2634 # mips-tfile doesn't work yet
2635 tmake_file=mips/t-mips-gas
2636 # See comment in mips/iris5.h file.
2637 use_collect2=yes
2638 # if test x$enable_threads = xyes; then
2639 # thread_file='irix'
2640 # fi
2641 ;;
2642 mips-sgi-irix4loser*) # Mostly like a MIPS.
2643 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
2644 if test x$stabs = xyes; then
2645 tm_file="${tm_file} dbx.h"
2646 fi
2647 xm_defines=USG
2648 xmake_file=mips/x-iris
2649 if test x$gas = xyes
2650 then
2651 tmake_file=mips/t-mips-gas
2652 else
2653 extra_passes="mips-tfile mips-tdump"
2654 fi
2655 if test x$gnu_ld != xyes
2656 then
2657 use_collect2=yes
2658 fi
2659 # if test x$enable_threads = xyes; then
2660 # thread_file='irix'
2661 # fi
2662 ;;
2663 mips-sgi-irix4*) # Mostly like a MIPS.
2664 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
2665 if test x$stabs = xyes; then
2666 tm_file="${tm_file} dbx.h"
2667 fi
2668 xm_defines=USG
2669 xmake_file=mips/x-iris
2670 if test x$gas = xyes
2671 then
2672 tmake_file=mips/t-mips-gas
2673 else
2674 extra_passes="mips-tfile mips-tdump"
2675 fi
2676 if test x$gnu_ld != xyes
2677 then
2678 use_collect2=yes
2679 fi
2680 # if test x$enable_threads = xyes; then
2681 # thread_file='irix'
2682 # fi
2683 ;;
2684 mips-sgi-*) # Mostly like a MIPS.
2685 tm_file="mips/iris3.h ${tm_file}"
2686 if test x$stabs = xyes; then
2687 tm_file="${tm_file} dbx.h"
2688 fi
2689 xm_defines=USG
2690 xmake_file=mips/x-iris3
2691 if test x$gas = xyes
2692 then
2693 tmake_file=mips/t-mips-gas
2694 else
2695 extra_passes="mips-tfile mips-tdump"
2696 fi
2697 if test x$gnu_ld != xyes
2698 then
2699 use_collect2=yes
2700 fi
2701 ;;
2702 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
2703 tm_file="mips/osfrose.h ${tm_file}"
2704 xmake_file=mips/x-osfrose
2705 tmake_file=mips/t-osfrose
2706 extra_objs=halfpic.o
2707 use_collect2=yes
2708 ;;
2709 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
2710 tm_file=mips/dec-osf1.h
2711 if test x$stabs = xyes; then
2712 tm_file="${tm_file} dbx.h"
2713 fi
2714 xmake_file=mips/x-dec-osf1
2715 if test x$gas = xyes
2716 then
2717 tmake_file=mips/t-mips-gas
2718 else
2719 tmake_file=mips/t-ultrix
2720 extra_passes="mips-tfile mips-tdump"
2721 fi
2722 if test x$gnu_ld != xyes
2723 then
2724 use_collect2=yes
2725 fi
2726 ;;
2727 mips-dec-bsd*) # Decstation running 4.4 BSD
2728 tm_file=mips/dec-bsd.h
2729 if test x$gas = xyes
2730 then
2731 tmake_file=mips/t-mips-gas
2732 else
2733 tmake_file=mips/t-ultrix
2734 extra_passes="mips-tfile mips-tdump"
2735 fi
2736 if test x$gnu_ld != xyes
2737 then
2738 use_collect2=yes
2739 fi
2740 ;;
2741 mipsel-*-netbsd* | mips-dec-netbsd*) # Decstation running NetBSD
2742 tm_file=mips/netbsd.h
2743 # On NetBSD, the headers are already okay, except for math.h.
2744 tmake_file=t-netbsd
2745 ;;
2746 mips*-*-linux*) # Linux MIPS, either endian.
2747 xmake_file=x-linux
2748 case $machine in
2749 mipsel-*) tm_file="mips/elfl.h mips/linux.h" ;;
2750 *) tm_file="mips/elf.h mips/linux.h" ;;
2751 esac
2752 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2753 gnu_ld=yes
2754 gas=yes
2755 if test x$enable_threads = xyes; then
2756 thread_file='posix'
2757 fi
2758 ;;
2759 mips*el-*-openbsd*) # mips little endian
2760 target_cpu_default="MASK_GAS|MASK_ABICALLS"
2761 ;;
2762 mips*-*-openbsd*) # mips big endian
2763 target_cpu_default="MASK_GAS|MASK_ABICALLS"
2764 tm_file="mips/openbsd-be.h ${tm_file}"
2765 ;;
2766 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
2767 tm_file="mips/news4.h ${tm_file}"
2768 if test x$stabs = xyes; then
2769 tm_file="${tm_file} dbx.h"
2770 fi
2771 if test x$gas = xyes
2772 then
2773 tmake_file=mips/t-mips-gas
2774 else
2775 extra_passes="mips-tfile mips-tdump"
2776 fi
2777 if test x$gnu_ld != xyes
2778 then
2779 use_collect2=yes
2780 fi
2781 xmake_file=mips/x-sony
2782 ;;
2783 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
2784 # That is based on svr4.
2785 # t-svr4 is not right because this system doesn't use ELF.
2786 tm_file="mips/news5.h ${tm_file}"
2787 if test x$stabs = xyes; then
2788 tm_file="${tm_file} dbx.h"
2789 fi
2790 xm_defines=USG
2791 if test x$gas = xyes
2792 then
2793 tmake_file=mips/t-mips-gas
2794 else
2795 extra_passes="mips-tfile mips-tdump"
2796 fi
2797 if test x$gnu_ld != xyes
2798 then
2799 use_collect2=yes
2800 fi
2801 ;;
2802 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
2803 tm_file="mips/svr4-5.h mips/svr4-t.h"
2804 if test x$stabs = xyes; then
2805 tm_file="${tm_file} dbx.h"
2806 fi
2807 xm_defines=USG
2808 xmake_file=mips/x-sysv
2809 if test x$gas = xyes
2810 then
2811 tmake_file=mips/t-mips-gas
2812 extra_parts="crtbegin.o crtend.o"
2813 else
2814 tmake_file=mips/t-mips
2815 extra_passes="mips-tfile mips-tdump"
2816 fi
2817 if test x$gnu_ld != xyes
2818 then
2819 use_collect2=yes
2820 fi
2821 ;;
2822 mips-*-ultrix* | mips-dec-mach3) # Decstation.
2823 tm_file="mips/ultrix.h ${tm_file}"
2824 if test x$stabs = xyes; then
2825 tm_file="${tm_file} dbx.h"
2826 fi
2827 xmake_file=mips/x-ultrix
2828 if test x$gas = xyes
2829 then
2830 tmake_file=mips/t-mips-gas
2831 else
2832 tmake_file=mips/t-ultrix
2833 extra_passes="mips-tfile mips-tdump"
2834 fi
2835 if test x$gnu_ld != xyes
2836 then
2837 use_collect2=yes
2838 fi
2839 ;;
2840 changequote(,)dnl
2841 mips-*-riscos[56789]bsd*)
2842 changequote([,])dnl
2843 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
2844 if test x$stabs = xyes; then
2845 tm_file="${tm_file} dbx.h"
2846 fi
2847 if test x$gas = xyes
2848 then
2849 tmake_file=mips/t-bsd-gas
2850 else
2851 tmake_file=mips/t-bsd
2852 extra_passes="mips-tfile mips-tdump"
2853 fi
2854 if test x$gnu_ld != xyes
2855 then
2856 use_collect2=yes
2857 fi
2858 ;;
2859 changequote(,)dnl
2860 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
2861 changequote([,])dnl
2862 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
2863 if test x$stabs = xyes; then
2864 tm_file="${tm_file} dbx.h"
2865 fi
2866 if test x$gas = xyes
2867 then
2868 tmake_file=mips/t-bsd-gas
2869 else
2870 tmake_file=mips/t-bsd
2871 extra_passes="mips-tfile mips-tdump"
2872 fi
2873 if test x$gnu_ld != xyes
2874 then
2875 use_collect2=yes
2876 fi
2877 ;;
2878 changequote(,)dnl
2879 mips-*-riscos[56789]sysv4*)
2880 changequote([,])dnl
2881 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
2882 if test x$stabs = xyes; then
2883 tm_file="${tm_file} dbx.h"
2884 fi
2885 xmake_file=mips/x-sysv
2886 if test x$gas = xyes
2887 then
2888 tmake_file=mips/t-svr4-gas
2889 else
2890 tmake_file=mips/t-svr4
2891 extra_passes="mips-tfile mips-tdump"
2892 fi
2893 if test x$gnu_ld != xyes
2894 then
2895 use_collect2=yes
2896 fi
2897 ;;
2898 changequote(,)dnl
2899 mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
2900 changequote([,])dnl
2901 tm_file="mips/svr4-4.h ${tm_file}"
2902 if test x$stabs = xyes; then
2903 tm_file="${tm_file} dbx.h"
2904 fi
2905 xm_defines=USG
2906 xmake_file=mips/x-sysv
2907 if test x$gas = xyes
2908 then
2909 tmake_file=mips/t-svr4-gas
2910 else
2911 tmake_file=mips/t-svr4
2912 extra_passes="mips-tfile mips-tdump"
2913 fi
2914 if test x$gnu_ld != xyes
2915 then
2916 use_collect2=yes
2917 fi
2918 ;;
2919 changequote(,)dnl
2920 mips-*-riscos[56789]sysv*)
2921 changequote([,])dnl
2922 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
2923 if test x$stabs = xyes; then
2924 tm_file="${tm_file} dbx.h"
2925 fi
2926 xm_defines=USG
2927 xmake_file=mips/x-sysv
2928 if test x$gas = xyes
2929 then
2930 tmake_file=mips/t-svr3-gas
2931 else
2932 tmake_file=mips/t-svr3
2933 extra_passes="mips-tfile mips-tdump"
2934 fi
2935 if test x$gnu_ld != xyes
2936 then
2937 use_collect2=yes
2938 fi
2939 ;;
2940 mips-*-sysv* | mips-*-riscos*sysv*)
2941 tm_file="mips/svr3-4.h ${tm_file}"
2942 if test x$stabs = xyes; then
2943 tm_file="${tm_file} dbx.h"
2944 fi
2945 xm_defines=USG
2946 xmake_file=mips/x-sysv
2947 if test x$gas = xyes
2948 then
2949 tmake_file=mips/t-svr3-gas
2950 else
2951 tmake_file=mips/t-svr3
2952 extra_passes="mips-tfile mips-tdump"
2953 fi
2954 if test x$gnu_ld != xyes
2955 then
2956 use_collect2=yes
2957 fi
2958 ;;
2959 changequote(,)dnl
2960 mips-*-riscos[56789]*) # Default MIPS RISC-OS 5.0.
2961 changequote([,])dnl
2962 tm_file=mips/mips-5.h
2963 if test x$stabs = xyes; then
2964 tm_file="${tm_file} dbx.h"
2965 fi
2966 if test x$gas = xyes
2967 then
2968 tmake_file=mips/t-mips-gas
2969 else
2970 extra_passes="mips-tfile mips-tdump"
2971 fi
2972 if test x$gnu_ld != xyes
2973 then
2974 use_collect2=yes
2975 fi
2976 ;;
2977 mips-*-gnu*)
2978 ;;
2979 mipsel-*-ecoff*)
2980 tm_file=mips/ecoffl.h
2981 if test x$stabs = xyes; then
2982 tm_file="${tm_file} dbx.h"
2983 fi
2984 tmake_file=mips/t-ecoff
2985 ;;
2986 mips-*-ecoff*)
2987 tm_file="gofast.h mips/ecoff.h"
2988 if test x$stabs = xyes; then
2989 tm_file="${tm_file} dbx.h"
2990 fi
2991 tmake_file=mips/t-ecoff
2992 ;;
2993 mipsel-*-elf*)
2994 tm_file="mips/elfl.h"
2995 tmake_file=mips/t-elf
2996 ;;
2997 mips-*-elf*)
2998 tm_file="mips/elf.h"
2999 tmake_file=mips/t-elf
3000 ;;
3001 mips64el-*-elf*)
3002 tm_file="mips/elfl64.h"
3003 tmake_file=mips/t-elf
3004 ;;
3005 mips64orionel-*-elf*)
3006 tm_file="mips/elforion.h mips/elfl64.h"
3007 tmake_file=mips/t-elf
3008 ;;
3009 mips64-*-elf*)
3010 tm_file="mips/elf64.h"
3011 tmake_file=mips/t-elf
3012 ;;
3013 mips64orion-*-elf*)
3014 tm_file="mips/elforion.h mips/elf64.h"
3015 tmake_file=mips/t-elf
3016 ;;
3017 mips64orion-*-rtems*)
3018 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
3019 tmake_file="mips/t-elf t-rtems"
3020 ;;
3021 mipstx39el-*-elf*)
3022 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
3023 tmake_file=mips/t-r3900
3024 ;;
3025 mipstx39-*-elf*)
3026 tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
3027 tmake_file=mips/t-r3900
3028 ;;
3029 mips-*-*) # Default MIPS RISC-OS 4.0.
3030 if test x$stabs = xyes; then
3031 tm_file="${tm_file} dbx.h"
3032 fi
3033 if test x$gas = xyes
3034 then
3035 tmake_file=mips/t-mips-gas
3036 else
3037 extra_passes="mips-tfile mips-tdump"
3038 fi
3039 if test x$gnu_ld != xyes
3040 then
3041 use_collect2=yes
3042 fi
3043 ;;
3044 mn10200-*-*)
3045 float_format=i32
3046 cpu_type=mn10200
3047 tm_file="mn10200/mn10200.h"
3048 if test x$stabs = xyes
3049 then
3050 tm_file="${tm_file} dbx.h"
3051 fi
3052 use_collect2=no
3053 ;;
3054 mn10300-*-*)
3055 cpu_type=mn10300
3056 tm_file="mn10300/mn10300.h"
3057 if test x$stabs = xyes
3058 then
3059 tm_file="${tm_file} dbx.h"
3060 fi
3061 use_collect2=no
3062 ;;
3063 ns32k-encore-bsd*)
3064 tm_file=ns32k/encore.h
3065 use_collect2=yes
3066 ;;
3067 ns32k-sequent-bsd*)
3068 tm_file=ns32k/sequent.h
3069 use_collect2=yes
3070 ;;
3071 ns32k-tek6100-bsd*)
3072 tm_file=ns32k/tek6100.h
3073 use_collect2=yes
3074 ;;
3075 ns32k-tek6200-bsd*)
3076 tm_file=ns32k/tek6200.h
3077 use_collect2=yes
3078 ;;
3079 # This has not been updated to GCC 2.
3080 # ns32k-ns-genix*)
3081 # xm_defines=USG
3082 # xmake_file=ns32k/x-genix
3083 # tm_file=ns32k/genix.h
3084 # use_collect2=yes
3085 # ;;
3086 ns32k-merlin-*)
3087 tm_file=ns32k/merlin.h
3088 use_collect2=yes
3089 ;;
3090 ns32k-pc532-mach*)
3091 tm_file=ns32k/pc532-mach.h
3092 use_collect2=yes
3093 ;;
3094 ns32k-pc532-minix*)
3095 tm_file=ns32k/pc532-min.h
3096 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
3097 xm_defines=USG
3098 use_collect2=yes
3099 ;;
3100 ns32k-*-netbsd*)
3101 tm_file=ns32k/netbsd.h
3102 xm_file="ns32k/xm-netbsd.h ${xm_file}"
3103 # On NetBSD, the headers are already okay, except for math.h.
3104 tmake_file=t-netbsd
3105 use_collect2=yes
3106 ;;
3107 pdp11-*-bsd)
3108 tm_file="${tm_file} pdp11/2bsd.h"
3109 ;;
3110 pdp11-*-*)
3111 ;;
3112 avr-*-*)
3113 ;;
3114 ns32k-*-openbsd*)
3115 # Nothing special
3116 ;;
3117 # This has not been updated to GCC 2.
3118 # pyramid-*-*)
3119 # cpu_type=pyr
3120 # xmake_file=pyr/x-pyr
3121 # use_collect2=yes
3122 # ;;
3123
3124 pj*-linux*)
3125 tm_file="svr4.h pj/linux.h ${tm_file}"
3126 ;;
3127 pj-*)
3128 ;;
3129 pjl-*)
3130 tm_file="svr4.h pj/pjl.h ${tm_file}"
3131 ;;
3132
3133 romp-*-aos*)
3134 use_collect2=yes
3135 ;;
3136 romp-*-mach*)
3137 xmake_file=romp/x-mach
3138 use_collect2=yes
3139 ;;
3140 romp-*-openbsd*)
3141 # Nothing special
3142 ;;
3143 powerpc-*-openbsd*)
3144 tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
3145 ;;
3146 powerpc-*-beos*)
3147 cpu_type=rs6000
3148 tm_file=rs6000/beos.h
3149 xm_file=rs6000/xm-beos.h
3150 tmake_file=rs6000/t-beos
3151 xmake_file=rs6000/x-beos
3152 ;;
3153 powerpc-*-sysv*)
3154 tm_file=rs6000/sysv4.h
3155 xm_file="rs6000/xm-sysv4.h"
3156 xm_defines="USG POSIX"
3157 extra_headers=ppc-asm.h
3158 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3159 xmake_file=rs6000/x-sysv4
3160 ;;
3161 powerpc-*-eabiaix*)
3162 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
3163 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3164 extra_headers=ppc-asm.h
3165 ;;
3166 powerpc-*-eabisim*)
3167 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
3168 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3169 extra_headers=ppc-asm.h
3170 ;;
3171 powerpc-*-elf*)
3172 tm_file="rs6000/sysv4.h"
3173 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3174 extra_headers=ppc-asm.h
3175 ;;
3176 powerpc-*-eabi*)
3177 tm_file="rs6000/sysv4.h rs6000/eabi.h"
3178 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3179 extra_headers=ppc-asm.h
3180 ;;
3181 powerpc-*-rtems*)
3182 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h"
3183 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
3184 extra_headers=ppc-asm.h
3185 ;;
3186 powerpc-*-linux-gnulibc1)
3187 tm_file="rs6000/sysv4.h rs6000/linux.h"
3188 xm_file=rs6000/xm-sysv4.h
3189 out_file=rs6000/rs6000.c
3190 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
3191 xmake_file=x-linux
3192 extra_headers=ppc-asm.h
3193 if test x$enable_threads = xyes; then
3194 thread_file='posix'
3195 fi
3196 ;;
3197 powerpc-*-linux-gnu*)
3198 tm_file="rs6000/sysv4.h rs6000/linux.h"
3199 xm_file="rs6000/xm-sysv4.h"
3200 xm_defines="USG ${xm_defines}"
3201 out_file=rs6000/rs6000.c
3202 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
3203 xmake_file=x-linux
3204 extra_headers=ppc-asm.h
3205 if test x$enable_threads = xyes; then
3206 thread_file='posix'
3207 fi
3208 ;;
3209 powerpc-wrs-vxworks*)
3210 cpu_type=rs6000
3211 xm_file="rs6000/xm-sysv4.h"
3212 xm_defines="USG POSIX"
3213 tm_file="rs6000/sysv4.h rs6000/vxppc.h"
3214 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3215 extra_headers=ppc-asm.h
3216 thread_file='vxworks'
3217 ;;
3218 powerpcle-wrs-vxworks*)
3219 cpu_type=rs6000
3220 xm_file="rs6000/xm-sysv4.h"
3221 xm_defines="USG POSIX"
3222 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h"
3223 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3224 extra_headers=ppc-asm.h
3225 thread_file='vxworks'
3226 ;;
3227 powerpcle-*-sysv*)
3228 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
3229 xm_file="rs6000/xm-sysv4.h"
3230 xm_defines="USG POSIX"
3231 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3232 xmake_file=rs6000/x-sysv4
3233 extra_headers=ppc-asm.h
3234 ;;
3235 powerpcle-*-elf*)
3236 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
3237 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3238 extra_headers=ppc-asm.h
3239 ;;
3240 powerpcle-*-eabisim*)
3241 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
3242 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3243 extra_headers=ppc-asm.h
3244 ;;
3245 powerpcle-*-eabi*)
3246 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
3247 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3248 extra_headers=ppc-asm.h
3249 ;;
3250 powerpcle-*-solaris2*)
3251 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/sol2.h"
3252 xm_file="rs6000/xm-sysv4.h"
3253 xm_defines="USG POSIX"
3254 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3255 xmake_file=rs6000/x-sysv4
3256 extra_headers=ppc-asm.h
3257 ;;
3258 changequote(,)dnl
3259 rs6000-ibm-aix3.[01]*)
3260 changequote([,])dnl
3261 tm_file=rs6000/aix31.h
3262 xmake_file=rs6000/x-aix31
3263 float_format=none
3264 use_collect2=yes
3265 ;;
3266 changequote(,)dnl
3267 rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
3268 changequote([,])dnl
3269 tm_file=rs6000/aix3newas.h
3270 if test x$host != x$target
3271 then
3272 tmake_file=rs6000/t-xnewas
3273 else
3274 tmake_file=rs6000/t-newas
3275 fi
3276 float_format=none
3277 use_collect2=yes
3278 ;;
3279 changequote(,)dnl
3280 rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
3281 changequote([,])dnl
3282 tm_file=rs6000/aix41.h
3283 if test x$host != x$target
3284 then
3285 tmake_file=rs6000/t-xnewas
3286 else
3287 tmake_file=rs6000/t-newas
3288 fi
3289 if test "$gnu_ld" = yes
3290 then
3291 xmake_file=rs6000/x-aix41-gld
3292 else
3293 tmake_file="rs6000/t-newas rs6000/t-aix41"
3294 fi
3295 xmake_file=rs6000/x-aix41
3296 float_format=none
3297 use_collect2=yes
3298 ;;
3299 changequote(,)dnl
3300 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
3301 changequote([,])dnl
3302 tm_file=rs6000/aix43.h
3303 tmake_file=rs6000/t-aix43
3304 xmake_file=rs6000/x-aix41
3305 float_format=none
3306 use_collect2=yes
3307 ;;
3308 changequote(,)dnl
3309 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
3310 changequote([,])dnl
3311 tm_file=rs6000/aix43.h
3312 tmake_file=rs6000/t-aix43
3313 xmake_file=rs6000/x-aix41
3314 float_format=none
3315 use_collect2=yes
3316 ;;
3317 rs6000-ibm-aix*)
3318 float_format=none
3319 use_collect2=yes
3320 ;;
3321 rs6000-bull-bosx)
3322 float_format=none
3323 use_collect2=yes
3324 ;;
3325 rs6000-*-mach*)
3326 tm_file=rs6000/mach.h
3327 xm_file="${xm_file} rs6000/xm-mach.h"
3328 xmake_file=rs6000/x-mach
3329 use_collect2=yes
3330 ;;
3331 rs6000-*-lynxos*)
3332 tm_file=rs6000/lynx.h
3333 xm_file=rs6000/xm-lynx.h
3334 tmake_file=rs6000/t-rs6000
3335 xmake_file=rs6000/x-lynx
3336 use_collect2=yes
3337 ;;
3338 sh-*-elf*)
3339 tm_file=sh/elf.h
3340 float_format=sh
3341 ;;
3342 sh-*-rtemself*)
3343 tmake_file="sh/t-sh t-rtems"
3344 tm_file=sh/rtemself.h
3345 float_format=sh
3346 ;;
3347 sh-*-rtems*)
3348 tmake_file="sh/t-sh t-rtems"
3349 tm_file=sh/rtems.h
3350 float_format=sh
3351 ;;
3352 sh-*-*)
3353 float_format=sh
3354 ;;
3355 sparc-tti-*)
3356 tm_file=sparc/pbd.h
3357 xm_file="xm-alloca.h ${xm_file}"
3358 xm_defines=USG
3359 ;;
3360 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
3361 tm_file=sparc/vxsparc.h
3362 tmake_file=sparc/t-vxsparc
3363 use_collect2=yes
3364 thread_file='vxworks'
3365 ;;
3366 sparc-*-aout*)
3367 tmake_file=sparc/t-sparcbare
3368 tm_file="sparc/aout.h libgloss.h"
3369 ;;
3370 sparc-*-netbsd*)
3371 tm_file=sparc/netbsd.h
3372 tmake_file=t-netbsd
3373 use_collect2=yes
3374 ;;
3375 sparc-*-openbsd*)
3376 # we need collect2 until our bug is fixed...
3377 use_collect2=yes
3378 ;;
3379 sparc-*-bsd*)
3380 tm_file=sparc/bsd.h
3381 ;;
3382 sparc-*-elf*)
3383 tm_file=sparc/elf.h
3384 tmake_file=sparc/t-elf
3385 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3386 #float_format=i128
3387 float_format=i64
3388 ;;
3389 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
3390 xm_file="${xm_file} sparc/xm-linux.h"
3391 tm_file=sparc/linux-aout.h
3392 xmake_file=x-linux
3393 gnu_ld=yes
3394 ;;
3395 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
3396 xm_file="${xm_file} sparc/xm-linux.h"
3397 xmake_file=x-linux
3398 tm_file=sparc/linux.h
3399 tmake_file="t-linux t-linux-gnulibc1"
3400 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3401 gnu_ld=yes
3402 float_format=sparc
3403 ;;
3404 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
3405 xm_file="${xm_file} sparc/xm-linux.h"
3406 xmake_file=x-linux
3407 tm_file=sparc/linux.h
3408 tmake_file="t-linux"
3409 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3410 gnu_ld=yes
3411 if test x$enable_threads = xyes; then
3412 thread_file='posix'
3413 fi
3414 float_format=sparc
3415 ;;
3416 sparc-*-lynxos*)
3417 if test x$gas = xyes
3418 then
3419 tm_file=sparc/lynx.h
3420 else
3421 tm_file=sparc/lynx-ng.h
3422 fi
3423 xm_file=sparc/xm-lynx.h
3424 tmake_file=sparc/t-sunos41
3425 xmake_file=x-lynx
3426 ;;
3427 sparc-*-rtemsaout*)
3428 tmake_file="sparc/t-sparcbare t-rtems"
3429 tm_file=sparc/rtems.h
3430 ;;
3431 sparc-*-rtems*|sparc-*-rtemself*)
3432 tm_file="sparc/rtemself.h"
3433 tmake_file="sparc/t-elf t-rtems"
3434 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3435 #float_format=i128
3436 float_format=i64
3437 ;;
3438 sparcv9-*-solaris2*)
3439 if test x$gnu_ld = xyes
3440 then
3441 tm_file=sparc/sol2-64.h
3442 else
3443 tm_file=sparc/sol2-sld-64.h
3444 fi
3445 xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
3446 xm_defines="USG POSIX"
3447 tmake_file="sparc/t-sol2 sparc/t-sol2-64"
3448 xmake_file=sparc/x-sysv4
3449 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
3450 float_format=none
3451 if test x${enable_threads} = x ; then
3452 enable_threads=$have_pthread_h
3453 if test x${enable_threads} = x ; then
3454 enable_threads=$have_thread_h
3455 fi
3456 fi
3457 if test x${enable_threads} = xyes ; then
3458 if test x${have_pthread_h} = xyes ; then
3459 thread_file='posix'
3460 else
3461 thread_file='solaris'
3462 fi
3463 fi
3464 ;;
3465 sparc-hal-solaris2*)
3466 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
3467 xm_defines="USG POSIX"
3468 tm_file="sparc/sol2.h sparc/hal.h"
3469 tmake_file="sparc/t-halos sparc/t-sol2"
3470 xmake_file=sparc/x-sysv4
3471 extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
3472 case $machine in
3473 changequote(,)dnl
3474 *-*-solaris2.[0-4])
3475 changequote([,])dnl
3476 float_format=i128
3477 ;;
3478 *)
3479 float_format=none
3480 ;;
3481 esac
3482 thread_file='solaris'
3483 ;;
3484 sparc-*-solaris2*)
3485 if test x$gnu_ld = xyes
3486 then
3487 tm_file=sparc/sol2.h
3488 else
3489 tm_file=sparc/sol2-sld.h
3490 fi
3491 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
3492 xm_defines="USG POSIX"
3493 tmake_file=sparc/t-sol2
3494 xmake_file=sparc/x-sysv4
3495 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
3496 case $machine in
3497 changequote(,)dnl
3498 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
3499 changequote([,])dnl
3500 *-*-solaris2*)
3501 if test x$gnu_ld = xyes
3502 then
3503 tm_file=sparc/sol2-64.h
3504 else
3505 tm_file=sparc/sol2-sld-64.h
3506 fi
3507 tmake_file="$tmake_file sparc/t-sol2-64"
3508 ;;
3509 esac
3510 case $machine in
3511 changequote(,)dnl
3512 *-*-solaris2.[0-4])
3513 changequote([,])dnl
3514 float_format=i128
3515 ;;
3516 *)
3517 float_format=none
3518 ;;
3519 esac
3520 if test x${enable_threads} = x; then
3521 enable_threads=$have_pthread_h
3522 if test x${enable_threads} = x; then
3523 enable_threads=$have_thread_h
3524 fi
3525 fi
3526 if test x${enable_threads} = xyes; then
3527 if test x${have_pthread_h} = xyes; then
3528 thread_file='posix'
3529 else
3530 thread_file='solaris'
3531 fi
3532 fi
3533 ;;
3534 sparc-*-sunos4.0*)
3535 tm_file=sparc/sunos4.h
3536 tmake_file=sparc/t-sunos40
3537 use_collect2=yes
3538 ;;
3539 sparc-*-sunos4*)
3540 tm_file=sparc/sunos4.h
3541 tmake_file=sparc/t-sunos41
3542 use_collect2=yes
3543 if test x$gas = xyes; then
3544 tm_file="${tm_file} sparc/sun4gas.h"
3545 fi
3546 ;;
3547 sparc-*-sunos3*)
3548 tm_file=sparc/sun4o3.h
3549 use_collect2=yes
3550 ;;
3551 sparc-*-sysv4*)
3552 tm_file=sparc/sysv4.h
3553 xm_file="sparc/xm-sysv4.h"
3554 xm_defines="USG POSIX"
3555 tmake_file=t-svr4
3556 xmake_file=sparc/x-sysv4
3557 extra_parts="crtbegin.o crtend.o"
3558 ;;
3559 sparc-*-vxsim*)
3560 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
3561 xm_defines="USG POSIX"
3562 tm_file=sparc/vxsim.h
3563 tmake_file=sparc/t-vxsparc
3564 xmake_file=sparc/x-sysv4
3565 ;;
3566 sparclet-*-aout*)
3567 tm_file="sparc/splet.h libgloss.h"
3568 tmake_file=sparc/t-splet
3569 ;;
3570 sparclite-*-coff*)
3571 tm_file="sparc/litecoff.h libgloss.h"
3572 tmake_file=sparc/t-sparclite
3573 ;;
3574 sparclite-*-aout*)
3575 tm_file="sparc/lite.h aoutos.h libgloss.h"
3576 tmake_file=sparc/t-sparclite
3577 ;;
3578 sparclite-*-elf*)
3579 tm_file="sparc/liteelf.h"
3580 tmake_file=sparc/t-sparclite
3581 extra_parts="crtbegin.o crtend.o"
3582 ;;
3583 sparc86x-*-aout*)
3584 tm_file="sparc/sp86x-aout.h aoutos.h libgloss.h"
3585 tmake_file=sparc/t-sp86x
3586 ;;
3587 sparc86x-*-elf*)
3588 tm_file="sparc/sp86x-elf.h"
3589 tmake_file=sparc/t-sp86x
3590 extra_parts="crtbegin.o crtend.o"
3591 ;;
3592 sparc64-*-aout*)
3593 tmake_file=sparc/t-sp64
3594 tm_file=sparc/sp64-aout.h
3595 ;;
3596 sparc64-*-elf*)
3597 tmake_file=sparc/t-sp64
3598 tm_file=sparc/sp64-elf.h
3599 extra_parts="crtbegin.o crtend.o"
3600 ;;
3601 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
3602 tmake_file="t-linux sparc/t-linux64"
3603 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
3604 tm_file=sparc/linux64.h
3605 xmake_file=x-linux
3606 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3607 gnu_ld=yes
3608 if test x$enable_threads = xyes; then
3609 thread_file='posix'
3610 fi
3611 float_format=sparc
3612 ;;
3613 # This hasn't been upgraded to GCC 2.
3614 # tahoe-harris-*) # Harris tahoe, using COFF.
3615 # tm_file=tahoe/harris.h
3616 # ;;
3617 # tahoe-*-bsd*) # tahoe running BSD
3618 # ;;
3619
3620 thumb*-*-*)
3621 AC_MSG_ERROR([
3622 *** The Thumb targets have been depreciated. The equivalent
3623 *** ARM based toolchain can now generated Thumb instructions
3624 *** when the -mthumb switch is given to the compiler.])
3625 ;;
3626 # This hasn't been upgraded to GCC 2.
3627 # tron-*-*)
3628 # cpu_type=gmicro
3629 # use_collect2=yes
3630 # ;;
3631 v850-*-rtems*)
3632 cpu_type=v850
3633 tm_file="v850/rtems.h"
3634 xm_file="v850/xm-v850.h"
3635 tmake_file="v850/t-v850 t-rtems"
3636 if test x$stabs = xyes
3637 then
3638 tm_file="${tm_file} dbx.h"
3639 fi
3640 use_collect2=no
3641 ;;
3642 v850-*-*)
3643 target_cpu_default="TARGET_CPU_generic"
3644 cpu_type=v850
3645 tm_file="v850/v850.h"
3646 xm_file="v850/xm-v850.h"
3647 tmake_file=v850/t-v850
3648 if test x$stabs = xyes
3649 then
3650 tm_file="${tm_file} dbx.h"
3651 fi
3652 use_collect2=no
3653 ;;
3654 vax-*-bsd*) # vaxen running BSD
3655 use_collect2=yes
3656 float_format=vax
3657 ;;
3658 vax-*-sysv*) # vaxen running system V
3659 tm_file="${tm_file} vax/vaxv.h"
3660 xm_defines=USG
3661 float_format=vax
3662 ;;
3663 vax-*-netbsd*)
3664 tm_file="${tm_file} netbsd.h vax/netbsd.h"
3665 tmake_file=t-netbsd
3666 float_format=vax
3667 use_collect2=yes
3668 ;;
3669 vax-*-openbsd*)
3670 tmake_file="${tmake_file} vax/t-openbsd"
3671 tm_file="vax/vax.h vax/openbsd1.h openbsd.h ${tm_file}"
3672 xm_file="xm-openbsd.h vax/xm-vax.h"
3673 float_format=vax
3674 use_collect2=yes
3675 ;;
3676 vax-*-ultrix*) # vaxen running ultrix
3677 tm_file="${tm_file} vax/ultrix.h"
3678 use_collect2=yes
3679 float_format=vax
3680 ;;
3681 vax-*-vms*) # vaxen running VMS
3682 xm_file=vax/xm-vms.h
3683 tm_file=vax/vms.h
3684 float_format=vax
3685 ;;
3686 vax-*-*) # vax default entry
3687 float_format=vax
3688 ;;
3689 we32k-att-sysv*)
3690 xm_file="${xm_file} xm-svr3"
3691 use_collect2=yes
3692 ;;
3693 *)
3694 echo "Configuration $machine not supported" 1>&2
3695 exit 1
3696 ;;
3697 esac
3698
3699 case $machine in
3700 *-*-linux-gnu*)
3701 ;; # Existing GNU/Linux systems do not use the GNU setup.
3702 *-*-gnu*)
3703 # On the GNU system, the setup is just about the same on
3704 # each different CPU. The specific machines that GNU
3705 # supports are matched above and just set $cpu_type.
3706 xm_file="xm-gnu.h ${xm_file}"
3707 tm_file=${cpu_type}/gnu.h
3708 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
3709 # GNU always uses ELF.
3710 elf=yes
3711 # GNU tools are the only tools.
3712 gnu_ld=yes
3713 gas=yes
3714 xmake_file=x-linux # These details are the same as Linux.
3715 tmake_file=t-gnu # These are not.
3716 ;;
3717 *-*-sysv4*)
3718 xmake_try_sysv=x-sysv
3719 install_headers_dir=install-headers-cpio
3720 ;;
3721 *-*-sysv*)
3722 install_headers_dir=install-headers-cpio
3723 ;;
3724 esac
3725
3726 # Distinguish i[34567]86
3727 # Also, do not run mips-tfile on MIPS if using gas.
3728 # Process --with-cpu= for PowerPC/rs6000
3729 target_cpu_default2=
3730 case $machine in
3731 i486-*-*)
3732 target_cpu_default2=1
3733 ;;
3734 i586-*-*)
3735 case $target_alias in
3736 k6-*)
3737 target_cpu_default2=4
3738 ;;
3739 *)
3740 target_cpu_default2=2
3741 ;;
3742 esac
3743 ;;
3744 i686-*-* | i786-*-*)
3745 target_cpu_default2=3
3746 ;;
3747 alpha*-*-*)
3748 case $machine in
3749 changequote(,)dnl
3750 alphaev6[78]*)
3751 changequote([,])dnl
3752 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX"
3753 ;;
3754 alphaev6*)
3755 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX"
3756 ;;
3757 alphapca56*)
3758 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
3759 ;;
3760 alphaev56*)
3761 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
3762 ;;
3763 alphaev5*)
3764 target_cpu_default2="MASK_CPU_EV5"
3765 ;;
3766 esac
3767
3768 if test x$gas = xyes
3769 then
3770 if test "$target_cpu_default2" = ""
3771 then
3772 target_cpu_default2="MASK_GAS"
3773 else
3774 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
3775 fi
3776 fi
3777 ;;
3778 arm*-*-*)
3779 case "x$with_cpu" in
3780 x)
3781 # The most generic
3782 target_cpu_default2="TARGET_CPU_generic"
3783 ;;
3784
3785 # Distinguish cores, and major variants
3786 # arm7m doesn't exist, but D & I don't affect code
3787 changequote(,)dnl
3788 xarm[23678] | xarm250 | xarm[67][01]0 \
3789 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
3790 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
3791 | xstrongarm | xstrongarm110 | xstrongarm1100)
3792 changequote([,])dnl
3793 target_cpu_default2="TARGET_CPU_$with_cpu"
3794 ;;
3795
3796 xyes | xno)
3797 echo "--with-cpu must be passed a value" 1>&2
3798 exit 1
3799 ;;
3800
3801 *)
3802 if test x$pass2done = xyes
3803 then
3804 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3805 exit 1
3806 fi
3807 ;;
3808 esac
3809 ;;
3810
3811 mips*-*-ecoff* | mips*-*-elf*)
3812 if test x$gas = xyes
3813 then
3814 if test x$gnu_ld = xyes
3815 then
3816 target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR"
3817 else
3818 target_cpu_default2="MASK_GAS"
3819 fi
3820 fi
3821 ;;
3822 mips*-*-*)
3823 if test x$gas = xyes
3824 then
3825 target_cpu_default2="MASK_GAS"
3826 fi
3827 ;;
3828 powerpc*-*-* | rs6000-*-*)
3829 case "x$with_cpu" in
3830 x)
3831 ;;
3832
3833 xcommon | xpower | xpower2 | xpowerpc | xrios \
3834 | xrios1 | xrios2 | xrsc | xrsc1 \
3835 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
3836 | xec603e | x740 | x750 | x401 \
3837 | x403 | x505 | x801 | x821 | x823 | x860)
3838 target_cpu_default2="\"$with_cpu\""
3839 ;;
3840
3841 xyes | xno)
3842 echo "--with-cpu must be passed a value" 1>&2
3843 exit 1
3844 ;;
3845
3846 *)
3847 if test x$pass2done = xyes
3848 then
3849 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3850 exit 1
3851 fi
3852 ;;
3853 esac
3854 ;;
3855 sparc*-*-*)
3856 case ".$with_cpu" in
3857 .)
3858 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
3859 ;;
3860 .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9)
3861 target_cpu_default2="TARGET_CPU_$with_cpu"
3862 ;;
3863 *)
3864 if test x$pass2done = xyes
3865 then
3866 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3867 exit 1
3868 fi
3869 ;;
3870 esac
3871 ;;
3872 esac
3873
3874 if test "$target_cpu_default2" != ""
3875 then
3876 if test "$target_cpu_default" != ""
3877 then
3878 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3879 else
3880 target_cpu_default=$target_cpu_default2
3881 fi
3882 fi
3883
3884 # No need for collect2 if we have the GNU linker.
3885 # Actually, there is now; GNU ld doesn't handle the EH info or
3886 # collecting for shared libraries.
3887 #case x$gnu_ld in
3888 #xyes)
3889 # use_collect2=
3890 # ;;
3891 #esac
3892
3893 # Save data on machine being used to compile GCC in build_xm_file.
3894 # Save data on host machine in vars host_xm_file and host_xmake_file.
3895 if test x$pass1done = x
3896 then
3897 if test x"$xm_file" = x
3898 then build_xm_file=$cpu_type/xm-$cpu_type.h
3899 else build_xm_file=$xm_file
3900 fi
3901 build_xm_defines=$xm_defines
3902 build_install_headers_dir=$install_headers_dir
3903 build_exeext=$exeext
3904 pass1done=yes
3905 else
3906 if test x$pass2done = x
3907 then
3908 if test x"$xm_file" = x
3909 then host_xm_file=$cpu_type/xm-$cpu_type.h
3910 else host_xm_file=$xm_file
3911 fi
3912 host_xm_defines=$xm_defines
3913 if test x"$xmake_file" = x
3914 then xmake_file=$cpu_type/x-$cpu_type
3915 fi
3916 host_xmake_file="$xmake_file"
3917 host_truncate_target=$truncate_target
3918 host_extra_gcc_objs=$extra_gcc_objs
3919 host_extra_objs=$extra_host_objs
3920 host_exeext=$exeext
3921 pass2done=yes
3922 fi
3923 fi
3924 done
3925
3926 extra_objs="${host_extra_objs} ${extra_objs}"
3927
3928 # Default the target-machine variables that were not explicitly set.
3929 if test x"$tm_file" = x
3930 then tm_file=$cpu_type/$cpu_type.h; fi
3931
3932 if test x$extra_headers = x
3933 then extra_headers=; fi
3934
3935 if test x"$xm_file" = x
3936 then xm_file=$cpu_type/xm-$cpu_type.h; fi
3937
3938 if test x$md_file = x
3939 then md_file=$cpu_type/$cpu_type.md; fi
3940
3941 if test x$out_file = x
3942 then out_file=$cpu_type/$cpu_type.c; fi
3943
3944 if test x"$tmake_file" = x
3945 then tmake_file=$cpu_type/t-$cpu_type
3946 fi
3947
3948 if test x"$dwarf2" = xyes
3949 then tm_file="$tm_file tm-dwarf2.h"
3950 fi
3951
3952 if test x$float_format = x
3953 then float_format=i64
3954 fi
3955
3956 if test $float_format = none
3957 then float_h_file=Makefile.in
3958 else float_h_file=float-$float_format.h
3959 fi
3960
3961 # Handle cpp installation.
3962 if test x$enable_cpp != xno
3963 then
3964 tmake_file="$tmake_file t-install-cpp"
3965 fi
3966
3967 # Say what files are being used for the output code and MD file.
3968 echo "Using \`$srcdir/config/$out_file' to output insns."
3969 echo "Using \`$srcdir/config/$md_file' as machine description file."
3970
3971 count=a
3972 for f in $tm_file; do
3973 count=${count}x
3974 done
3975 if test $count = ax; then
3976 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
3977 else
3978 echo "Using the following target machine macro files:"
3979 for f in $tm_file; do
3980 echo " $srcdir/config/$f"
3981 done
3982 fi
3983
3984 count=a
3985 for f in $host_xm_file; do
3986 count=${count}x
3987 done
3988 if test $count = ax; then
3989 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
3990 else
3991 echo "Using the following host machine macro files:"
3992 for f in $host_xm_file; do
3993 echo " $srcdir/config/$f"
3994 done
3995 fi
3996
3997 if test "$host_xm_file" != "$build_xm_file"; then
3998 count=a
3999 for f in $build_xm_file; do
4000 count=${count}x
4001 done
4002 if test $count = ax; then
4003 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
4004 else
4005 echo "Using the following build machine macro files:"
4006 for f in $build_xm_file; do
4007 echo " $srcdir/config/$f"
4008 done
4009 fi
4010 fi
4011
4012 if test x$thread_file = x; then
4013 if test x$target_thread_file != x; then
4014 thread_file=$target_thread_file
4015 else
4016 thread_file='single'
4017 fi
4018 fi
4019
4020 # Set up the header files.
4021 # $links is the list of header files to create.
4022 # $vars is the list of shell variables with file names to include.
4023 # auto-host.h is the file containing items generated by autoconf and is
4024 # the first file included by config.h.
4025 null_defines=
4026 host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h"
4027
4028 # If host=build, it is correct to have hconfig include auto-host.h
4029 # as well. If host!=build, we are in error and need to do more
4030 # work to find out the build config parameters.
4031 if test x$host = x$build
4032 then
4033 build_xm_file="auto-host.h gansidecl.h ${build_xm_file} hwint.h"
4034 else
4035 # We create a subdir, then run autoconf in the subdir.
4036 # To prevent recursion we set host and build for the new
4037 # invocation of configure to the build for this invocation
4038 # of configure.
4039 tempdir=build.$$
4040 rm -rf $tempdir
4041 mkdir $tempdir
4042 cd $tempdir
4043 case ${srcdir} in
4044 /*) realsrcdir=${srcdir};;
4045 *) realsrcdir=../${srcdir};;
4046 esac
4047 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
4048 --target=$target --host=$build --build=$build
4049
4050 # We just finished tests for the build machine, so rename
4051 # the file auto-build.h in the gcc directory.
4052 mv auto-host.h ../auto-build.h
4053 cd ..
4054 rm -rf $tempdir
4055 build_xm_file="auto-build.h gansidecl.h ${build_xm_file} hwint.h"
4056 fi
4057
4058 xm_file="gansidecl.h ${xm_file}"
4059 tm_file="gansidecl.h ${tm_file}"
4060
4061 vars="host_xm_file tm_file tm_p_file xm_file build_xm_file"
4062 links="config.h tm.h tm_p.h tconfig.h hconfig.h"
4063 defines="host_xm_defines null_defines null_defines xm_defines build_xm_defines"
4064
4065 rm -f config.bak
4066 if test -f config.status; then mv -f config.status config.bak; fi
4067
4068 # Make the links.
4069 while test -n "$vars"
4070 do
4071 set $vars; var=$1; shift; vars=$*
4072 set $links; link=$1; shift; links=$*
4073 set $defines; define=$1; shift; defines=$*
4074
4075 rm -f $link
4076 # Make sure the file is created, even if it is empty.
4077 echo >$link
4078
4079 # Define TARGET_CPU_DEFAULT if the system wants one.
4080 # This substitutes for lots of *.h files.
4081 if test "$target_cpu_default" != "" -a $link = tm.h
4082 then
4083 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
4084 fi
4085
4086 for file in `eval echo '$'$var`; do
4087 case $file in
4088 auto-host.h | auto-build.h )
4089 ;;
4090 *)
4091 echo '#ifdef IN_GCC' >>$link
4092 ;;
4093 esac
4094 echo "#include \"$file\"" >>$link
4095 case $file in
4096 auto-host.h | auto-build.h )
4097 ;;
4098 *)
4099 echo '#endif' >>$link
4100 ;;
4101 esac
4102 done
4103
4104 for def in `eval echo '$'$define`; do
4105 echo "#ifndef $def" >>$link
4106 echo "#define $def" >>$link
4107 echo "#endif" >>$link
4108 done
4109 done
4110
4111 # Truncate the target if necessary
4112 if test x$host_truncate_target != x; then
4113 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4114 fi
4115
4116 # Get the version trigger filename from the toplevel
4117 if test "${with_gcc_version_trigger+set}" = set; then
4118 gcc_version_trigger=$with_gcc_version_trigger
4119 else
4120 gcc_version_trigger=${srcdir}/version.c
4121 fi
4122 changequote(,)dnl
4123 gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
4124 changequote([,])dnl
4125
4126 # Internationalization
4127 PACKAGE=gcc
4128 VERSION="$gcc_version"
4129 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",
4130 [Define to the name of the distribution.])
4131 AC_DEFINE_UNQUOTED(VERSION, "$VERSION",
4132 [Define to the version of the distribution.])
4133 AC_SUBST(PACKAGE)
4134 AC_SUBST(VERSION)
4135
4136 ALL_LINGUAS="en_GB"
4137
4138 # Enable NLS support by default
4139 AC_ARG_ENABLE(nls,
4140 [ --enable-nls use Native Language Support (default)],
4141 , enable_nls=yes)
4142
4143 # if cross compiling, disable NLS support.
4144 # It's not worth the trouble, at least for now.
4145
4146 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
4147 AC_MSG_WARN(Disabling NLS support for canadian cross compiler.)
4148 enable_nls=no
4149 fi
4150
4151 AM_GNU_GETTEXT
4152 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
4153
4154 # Windows32 Registry support for specifying GCC installation paths.
4155 AC_ARG_ENABLE(win32-registry,
4156 [ --disable-win32-registry
4157 Disable lookup of installation paths in the
4158 Registry on Windows hosts.
4159 --enable-win32-registry Enable registry lookup (default).
4160 --enable-win32-registry=KEY
4161 Use KEY instead of GCC version as the last portion
4162 of the registry key.],,)
4163
4164 AC_MSG_CHECKING(whether windows registry support is requested)
4165 if test x$enable_win32_registry != xno; then
4166 AC_DEFINE(ENABLE_WIN32_REGISTRY, 1,
4167 [Define to 1 if installation paths should be looked up in Windows32
4168 Registry. Ignored on non windows32 hosts.])
4169 AC_MSG_RESULT(yes)
4170 else
4171 AC_MSG_RESULT(no)
4172 fi
4173
4174 # Check if user specified a different registry key.
4175 case x${enable_win32_registry} in
4176 x | xyes)
4177 # default.
4178 gcc_cv_win32_registry_key="$VERSION"
4179 ;;
4180 xno)
4181 # no registry lookup.
4182 gcc_cv_win32_registry_key=''
4183 ;;
4184 *)
4185 # user-specified key.
4186 gcc_cv_win32_registry_key="$enable_win32_registry"
4187 ;;
4188 esac
4189
4190 if test x$enable_win32_registry != xno; then
4191 AC_MSG_CHECKING(registry key on windows hosts)
4192 AC_DEFINE_UNQUOTED(WIN32_REGISTRY_KEY, "$gcc_cv_win32_registry_key",
4193 [Define to be the last portion of registry key on windows hosts.])
4194 AC_MSG_RESULT($gcc_cv_win32_registry_key)
4195 fi
4196
4197 # Get an absolute path to the GCC top-level source directory
4198 holddir=`pwd`
4199 cd $srcdir
4200 topdir=`pwd`
4201 cd $holddir
4202
4203 # Conditionalize the makefile for this host machine.
4204 # Make-host contains the concatenation of all host makefile fragments
4205 # [there can be more than one]. This file is built by configure.frag.
4206 host_overrides=Make-host
4207 dep_host_xmake_file=
4208 for f in .. ${host_xmake_file}
4209 do
4210 if test -f ${srcdir}/config/$f
4211 then
4212 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
4213 fi
4214 done
4215
4216 # Conditionalize the makefile for this target machine.
4217 # Make-target contains the concatenation of all host makefile fragments
4218 # [there can be more than one]. This file is built by configure.frag.
4219 target_overrides=Make-target
4220 dep_tmake_file=
4221 for f in .. ${tmake_file}
4222 do
4223 if test -f ${srcdir}/config/$f
4224 then
4225 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
4226 fi
4227 done
4228
4229 # If the host doesn't support symlinks, modify CC in
4230 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
4231 # Otherwise, we can use "CC=$(CC)".
4232 rm -f symtest.tem
4233 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
4234 then
4235 cc_set_by_configure="\$(CC)"
4236 quoted_cc_set_by_configure="\$(CC)"
4237 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
4238 else
4239 rm -f symtest.tem
4240 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
4241 then
4242 symbolic_link="cp -p"
4243 else
4244 symbolic_link="cp"
4245 fi
4246 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
4247 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
4248 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
4249 fi
4250 rm -f symtest.tem
4251
4252 out_object_file=`basename $out_file .c`.o
4253
4254 tm_file_list=
4255 for f in $tm_file; do
4256 case $f in
4257 gansidecl.h )
4258 tm_file_list="${tm_file_list} $f" ;;
4259 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
4260 esac
4261 done
4262
4263 host_xm_file_list=
4264 for f in $host_xm_file; do
4265 case $f in
4266 auto-host.h | gansidecl.h | hwint.h )
4267 host_xm_file_list="${host_xm_file_list} $f" ;;
4268 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
4269 esac
4270 done
4271
4272 build_xm_file_list=
4273 for f in $build_xm_file; do
4274 case $f in
4275 auto-build.h | auto-host.h | gansidecl.h | hwint.h )
4276 build_xm_file_list="${build_xm_file_list} $f" ;;
4277 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
4278 esac
4279 done
4280
4281 # Define macro CROSS_COMPILE in compilation
4282 # if this is a cross-compiler.
4283 # Also use all.cross instead of all.internal
4284 # and add cross-make to Makefile.
4285 cross_overrides="/dev/null"
4286 if test x$host != x$target
4287 then
4288 cross_defines="CROSS=-DCROSS_COMPILE"
4289 cross_overrides="${topdir}/cross-make"
4290 fi
4291
4292 # If this is a cross-compiler that does not
4293 # have its own set of headers then define
4294 # inhibit_libc
4295
4296 # If this is using newlib, then define inhibit_libc in
4297 # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
4298 # libgcc.a, but that's OK because newlib should have its own version of
4299 # assert.h.
4300 inhibit_libc=
4301 if [test x$host != x$target] && [test x$with_headers = x]; then
4302 inhibit_libc=-Dinhibit_libc
4303 else
4304 if [test x$with_newlib = xyes]; then
4305 inhibit_libc=-Dinhibit_libc
4306 fi
4307 fi
4308 AC_SUBST(inhibit_libc)
4309
4310 # When building gcc with a cross-compiler, we need to fix a few things.
4311 # This must come after cross-make as we want all.build to override
4312 # all.cross.
4313 build_overrides="/dev/null"
4314 if test x$build != x$host
4315 then
4316 build_overrides="${topdir}/build-make"
4317 fi
4318
4319 # Expand extra_headers to include complete path.
4320 # This substitutes for lots of t-* files.
4321 extra_headers_list=
4322 if test "x$extra_headers" = x
4323 then true
4324 else
4325 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
4326 for file in $extra_headers;
4327 do
4328 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
4329 done
4330 fi
4331
4332 if test x$use_collect2 = xno; then
4333 use_collect2=
4334 fi
4335
4336 # Add a definition of USE_COLLECT2 if system wants one.
4337 # Also tell toplev.c what to do.
4338 # This substitutes for lots of t-* files.
4339 if test x$use_collect2 = x
4340 then
4341 will_use_collect2=
4342 maybe_use_collect2=
4343 else
4344 will_use_collect2="collect2"
4345 maybe_use_collect2="-DUSE_COLLECT2"
4346 fi
4347
4348 # NEED TO CONVERT
4349 # Set MD_DEPS if the real md file is in md.pre-cpp.
4350 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
4351 # for line oriented comments, so we must always use a GNU cpp. If
4352 # building gcc with a cross compiler, use the cross compiler just
4353 # built. Otherwise, we can use the cpp just built.
4354 md_file_sub=
4355 if test "x$md_cppflags" = x
4356 then
4357 md_file_sub=$srcdir/config/$md_file
4358 else
4359 md_file=md
4360 fi
4361
4362 # If we have gas in the build tree, make a link to it.
4363 if test -f ../gas/Makefile; then
4364 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
4365 fi
4366
4367 # If we have nm in the build tree, make a link to it.
4368 if test -f ../binutils/Makefile; then
4369 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
4370 fi
4371
4372 # If we have ld in the build tree, make a link to it.
4373 if test -f ../ld/Makefile; then
4374 # if test x$use_collect2 = x; then
4375 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
4376 # else
4377 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
4378 # fi
4379 fi
4380
4381 # Figure out what assembler alignment features are present.
4382 AC_MSG_CHECKING(assembler alignment features)
4383 gcc_cv_as=
4384 gcc_cv_as_alignment_features=
4385 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
4386 if test -x "$DEFAULT_ASSEMBLER"; then
4387 gcc_cv_as="$DEFAULT_ASSEMBLER"
4388 elif test -x "$AS"; then
4389 gcc_cv_as="$AS"
4390 elif test -x as$host_exeext; then
4391 # Build using assembler in the current directory.
4392 gcc_cv_as=./as$host_exeext
4393 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
4394 # Single tree build which includes gas.
4395 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
4396 do
4397 changequote(,)dnl
4398 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
4399 changequote([,])dnl
4400 if test x$gcc_cv_gas_version != x; then
4401 break
4402 fi
4403 done
4404 changequote(,)dnl
4405 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
4406 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
4407 changequote([,])dnl
4408 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
4409 # Gas version 2.6 and later support for .balign and .p2align.
4410 # bytes to skip when using .p2align.
4411 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 6 -o "$gcc_cv_gas_major_version" -gt 2; then
4412 gcc_cv_as_alignment_features=".balign and .p2align"
4413 AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
4414 fi
4415 # Gas version 2.8 and later support specifying the maximum
4416 # bytes to skip when using .p2align.
4417 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2; then
4418 gcc_cv_as_alignment_features=".p2align including maximum skip"
4419 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
4420 fi
4421 fi
4422 elif test x$host = x$target; then
4423 # Native build.
4424 # Search the same directories that the installed compiler will
4425 # search. Else we may find the wrong assembler and lose. If we
4426 # do not find a suitable assembler binary, then try the user's
4427 # path.
4428 #
4429 # Also note we have to check MD_EXEC_PREFIX before checking the
4430 # user's path. Unfortunately, there is no good way to get at the
4431 # value of MD_EXEC_PREFIX here. So we do a brute force search
4432 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
4433 # to be fixed as part of the make/configure rewrite too.
4434
4435 if test "x$exec_prefix" = xNONE; then
4436 if test "x$prefix" = xNONE; then
4437 test_prefix=/usr/local
4438 else
4439 test_prefix=$prefix
4440 fi
4441 else
4442 test_prefix=$exec_prefix
4443 fi
4444
4445 # If the loop below does not find an assembler, then use whatever
4446 # one we can find in the users's path.
4447 # user's path.
4448 as=as$host_exeext
4449
4450 test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
4451 $test_prefix/lib/gcc-lib/$target \
4452 /usr/lib/gcc/$target/$gcc_version \
4453 /usr/lib/gcc/$target \
4454 $test_prefix/$target/bin/$target/$gcc_version \
4455 $test_prefix/$target/bin \
4456 /usr/libexec \
4457 /usr/ccs/gcc \
4458 /usr/ccs/bin \
4459 /udk/usr/ccs/bin \
4460 /bsd43/usr/lib/cmplrs/cc \
4461 /usr/cross64/usr/bin \
4462 /usr/lib/cmplrs/cc \
4463 /sysv/usr/lib/cmplrs/cc \
4464 /svr4/usr/lib/cmplrs/cc \
4465 /usr/bin"
4466
4467 for dir in $test_dirs; do
4468 if test -f $dir/as$host_exeext; then
4469 gcc_cv_as=$dir/as$host_exeext
4470 break;
4471 fi
4472 done
4473 fi
4474 if test x$gcc_cv_as != x; then
4475 # Check if we have .balign and .p2align
4476 echo ".balign 4" > conftest.s
4477 echo ".p2align 2" >> conftest.s
4478 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4479 gcc_cv_as_alignment_features=".balign and .p2align"
4480 AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
4481 fi
4482 rm -f conftest.s conftest.o
4483 # Check if specifying the maximum bytes to skip when
4484 # using .p2align is supported.
4485 echo ".p2align 4,,7" > conftest.s
4486 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4487 gcc_cv_as_alignment_features=".p2align including maximum skip"
4488 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
4489 fi
4490 rm -f conftest.s conftest.o
4491 fi
4492 AC_MSG_RESULT($gcc_cv_as_alignment_features)
4493
4494 AC_MSG_CHECKING(assembler subsection support)
4495 gcc_cv_as_subsections=
4496 if test x$gcc_cv_as != x; then
4497 # Check if we have .subsection
4498 echo ".subsection 1" > conftest.s
4499 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4500 gcc_cv_as_subsections=".subsection"
4501 if test -x nm$host_exeext; then
4502 gcc_cv_nm=./nm$host_exeext
4503 elif test x$host = x$target; then
4504 # Native build.
4505 gcc_cv_nm=nm$host_exeext
4506 fi
4507 if test x$gcc_cv_nm != x; then
4508 cat > conftest.s <<EOF
4509 conftest_label1: .word 0
4510 .subsection -1
4511 conftest_label2: .word 0
4512 .previous
4513 EOF
4514 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4515 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
4516 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
4517 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
4518 :
4519 else
4520 gcc_cv_as_subsections="working .subsection -1"
4521 AC_DEFINE(HAVE_GAS_SUBSECTION_ORDERING, 1,
4522 [Define if your assembler supports .subsection and .subsection -1 starts
4523 emitting at the beginning of your section.])
4524 fi
4525 fi
4526 fi
4527 fi
4528 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4529 fi
4530 AC_MSG_RESULT($gcc_cv_as_subsections)
4531
4532 AC_MSG_CHECKING(assembler weak support)
4533 gcc_cv_as_weak=
4534 if test x$gcc_cv_as != x; then
4535 # Check if we have .weak
4536 echo " .weak foobar" > conftest.s
4537 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4538 AC_DEFINE(HAVE_GAS_WEAK, 1,
4539 [Define if your assembler supports .weak.])
4540 gcc_cv_as_weak="yes"
4541 fi
4542 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4543 fi
4544 AC_MSG_RESULT($gcc_cv_as_weak)
4545
4546 AC_MSG_CHECKING(assembler hidden support)
4547 gcc_cv_as_hidden=
4548 if test x$gcc_cv_as != x; then
4549 # Check if we have .hidden
4550 echo " .hidden foobar" > conftest.s
4551 echo "foobar:" >> conftest.s
4552 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4553 AC_DEFINE(HAVE_GAS_HIDDEN, 1,
4554 [Define if your assembler supports .hidden.])
4555 gcc_cv_as_hidden="yes"
4556 fi
4557 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4558 fi
4559 AC_MSG_RESULT($gcc_cv_as_hidden)
4560
4561 case "$target" in
4562 sparc*-*-*)
4563 AC_CACHE_CHECK([assembler .register pseudo-op support],
4564 gcc_cv_as_register_pseudo_op, [
4565 gcc_cv_as_register_pseudo_op=unknown
4566 if test x$gcc_cv_as != x; then
4567 # Check if we have .register
4568 echo ".register %g2, #scratch" > conftest.s
4569 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4570 gcc_cv_as_register_pseudo_op=yes
4571 else
4572 gcc_cv_as_register_pseudo_op=no
4573 fi
4574 rm -f conftest.s conftest.o
4575 fi
4576 ])
4577 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
4578 AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1,
4579 [Define if your assembler supports .register.])
4580 fi
4581
4582 AC_CACHE_CHECK([assembler supports -relax],
4583 gcc_cv_as_relax_opt, [
4584 gcc_cv_as_relax_opt=unknown
4585 if test x$gcc_cv_as != x; then
4586 # Check if gas supports -relax
4587 echo ".text" > conftest.s
4588 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
4589 gcc_cv_as_relax_opt=yes
4590 else
4591 gcc_cv_as_relax_opt=no
4592 fi
4593 rm -f conftest.s conftest.o
4594 fi
4595 ])
4596 if test "x$gcc_cv_as_relax_opt" = xyes; then
4597 AC_DEFINE(HAVE_AS_RELAX_OPTION, 1,
4598 [Define if your assembler supports -relax option.])
4599 fi
4600
4601 case "$tm_file" in
4602 *64*)
4603 AC_CACHE_CHECK([for 64 bit support in assembler ($gcc_cv_as)],
4604 gcc_cv_as_flags64, [
4605 if test -n "$gcc_cv_as"; then
4606 echo ".xword foo" > conftest.s
4607 gcc_cv_as_flags64=no
4608 for flag in "-xarch=v9" "-64 -Av9"; do
4609 if $gcc_cv_as $flag -o conftest.o conftest.s \
4610 > /dev/null 2>&1; then
4611 gcc_cv_as_flags64=$flag
4612 break
4613 fi
4614 done
4615 rm -f conftest.s conftest.o
4616 else
4617 if test "$gas" = yes; then
4618 gcc_cv_as_flags64="-64 -Av9"
4619 else
4620 gcc_cv_as_flags64="-xarch=v9"
4621 fi
4622 fi
4623 ])
4624 if test "x$gcc_cv_as_flags64" = xno; then
4625 changequote(, )
4626 tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
4627 dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
4628 changequote([, ])
4629 else
4630 AC_DEFINE_UNQUOTED(AS_SPARC64_FLAG, "$gcc_cv_as_flags64",
4631 [Define if the assembler supports 64bit sparc.])
4632 fi
4633 ;;
4634 *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
4635 ;;
4636 esac
4637
4638 if test "x$gcc_cv_as_flags64" != xno; then
4639 AC_CACHE_CHECK([for assembler offsetable %lo() support],
4640 gcc_cv_as_offsetable_lo10, [
4641 gcc_cv_as_offsetable_lo10=unknown
4642 if test "x$gcc_cv_as" != x; then
4643 # Check if assembler has offsetable %lo()
4644 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
4645 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
4646 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
4647 > /dev/null 2>&1 &&
4648 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
4649 > /dev/null 2>&1; then
4650 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
4651 gcc_cv_as_offsetable_lo10=no
4652 else
4653 gcc_cv_as_offsetable_lo10=yes
4654 fi
4655 else
4656 gcc_cv_as_offsetable_lo10=no
4657 fi
4658 rm -f conftest.s conftest.o conftest1.s conftest1.o
4659 fi
4660 ])
4661 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
4662 AC_DEFINE(HAVE_AS_OFFSETABLE_LO10, 1,
4663 [Define if your assembler supports offsetable %lo().])
4664 fi
4665 fi
4666 ;;
4667
4668 changequote(,)dnl
4669 i[34567]86-*-*)
4670 changequote([,])dnl
4671 AC_MSG_CHECKING(assembler instructions)
4672 gcc_cv_as_instructions=
4673 if test x$gcc_cv_as != x; then
4674 set "filds fists" "filds mem; fists mem"
4675 while test $# -gt 0
4676 do
4677 echo "$2" > conftest.s
4678 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4679 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
4680 AC_DEFINE_UNQUOTED(HAVE_GAS_`echo "$1" | tr '[a-z ]' '[A-Z_]'`)
4681 fi
4682 shift 2
4683 done
4684 rm -f conftest.s conftest.o
4685 fi
4686 AC_MSG_RESULT($gcc_cv_as_instructions)
4687 ;;
4688 esac
4689
4690 # Figure out what language subdirectories are present.
4691 # Look if the user specified --enable-languages="..."; if not, use
4692 # the environment variable $LANGUAGES if defined. $LANGUAGES might
4693 # go away some day.
4694 if test x"${enable_languages+set}" != xset; then
4695 if test x"${LANGUAGES+set}" = xset; then
4696 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
4697 else
4698 enable_languages=all
4699 fi
4700 else
4701 if test x"${enable_languages}" = x; then
4702 AC_MSG_ERROR([--enable-languages needs at least one argument])
4703 fi
4704 fi
4705 subdirs=
4706 for lang in ${srcdir}/*/config-lang.in ..
4707 do
4708 case $lang in
4709 ..) ;;
4710 # The odd quoting in the next line works around
4711 # an apparent bug in bash 1.12 on linux.
4712 changequote(,)dnl
4713 ${srcdir}/[*]/config-lang.in) ;;
4714 *)
4715 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
4716 if test "x$lang_alias" = x
4717 then
4718 echo "$lang doesn't set \$language." 1>&2
4719 exit 1
4720 fi
4721 if test x"${enable_languages}" = xall; then
4722 add_this_lang=yes
4723 else
4724 case "${enable_languages}" in
4725 ${lang_alias} | "${lang_alias},"* | *",${lang_alias},"* | *",${lang_alias}" )
4726 add_this_lang=yes
4727 ;;
4728 * )
4729 add_this_lang=no
4730 ;;
4731 esac
4732 fi
4733 if test x"${add_this_lang}" = xyes; then
4734 case $lang in
4735 ${srcdir}/ada/config-lang.in)
4736 if test x$gnat = xyes ; then
4737 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
4738 fi
4739 ;;
4740 *)
4741 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
4742 ;;
4743 esac
4744 fi
4745 ;;
4746 changequote([,])dnl
4747 esac
4748 done
4749
4750 # Make gthr-default.h if we have a thread file.
4751 gthread_flags=
4752 if test $thread_file != single; then
4753 rm -f gthr-default.h
4754 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
4755 gthread_flags=-DHAVE_GTHR_DEFAULT
4756 fi
4757 AC_SUBST(gthread_flags)
4758
4759 # Find out what GC implementation we want, or may, use.
4760 AC_ARG_WITH(gc,
4761 [ --with-gc={simple,page} Choose the garbage collection mechanism to use
4762 with the compiler.],
4763 [case "$withval" in
4764 simple | page)
4765 GGC=ggc-$withval
4766 ;;
4767 *)
4768 AC_MSG_ERROR([$withval is an invalid option to --with-gc])
4769 ;;
4770 esac],
4771 [if test $ac_cv_func_mmap_anywhere = yes \
4772 || test $ac_cv_func_valloc = yes; then
4773 GGC=ggc-page
4774 else
4775 GGC=ggc-simple
4776 fi])
4777 AC_SUBST(GGC)
4778 echo "Using $GGC for garbage collection."
4779
4780 # Build a new-abi (c++) system
4781 AC_ARG_ENABLE(new-gxx-abi,
4782 [ --enable-new-gxx-abi
4783 select the new abi for g++. You must select an ABI
4784 at configuration time, so that the correct runtime
4785 support is built. You cannot mix ABIs.],
4786 [AC_DEFINE(ENABLE_NEW_GXX_ABI, 1,
4787 [Define if you want to always select the new-abi for g++.])
4788 GXX_ABI_FLAG='-fnew-abi'
4789 echo "Building a new-abi g++ compiler."
4790 ])
4791 AC_SUBST(GXX_ABI_FLAG)
4792
4793 # Build a new-libstdc++ system (ie libstdc++-v3)
4794 AC_MSG_CHECKING([for libstdc++ to install])
4795 AC_ARG_ENABLE(libstdcxx-v3,
4796 [ --enable-libstdcxx-v3
4797 enable libstdc++-v3 for building and installation],
4798 [enable_libstdcxx_v3=yes], [enable_libstdcxx_v3=no])
4799
4800 if test x$enable_libstdcxx_v3 = xyes; then
4801 AC_MSG_RESULT(v3)
4802 ac_esn=1
4803 else
4804 AC_MSG_RESULT(v2)
4805 ac_esn=0
4806 fi
4807 AC_DEFINE_UNQUOTED(ENABLE_STD_NAMESPACE, $ac_esn,
4808 [Define to 1 if you want to enable namespaces (-fhonor-std) by default.])
4809
4810 dnl Very limited version of automake's enable-maintainer-mode
4811
4812 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
4813 dnl maintainer-mode is disabled by default
4814 AC_ARG_ENABLE(maintainer-mode,
4815 [ --enable-maintainer-mode enable make rules and dependencies not useful
4816 (and sometimes confusing) to the casual installer],
4817 maintainer_mode=$enableval,
4818 maintainer_mode=no)
4819
4820 AC_MSG_RESULT($maintainer_mode)
4821
4822 if test "$maintainer_mode" = "yes"; then
4823 MAINT=''
4824 else
4825 MAINT='#'
4826 fi
4827 AC_SUBST(MAINT)dnl
4828
4829 # Make empty files to contain the specs and options for each language.
4830 # Then add #include lines to for a compiler that has specs and/or options.
4831
4832 lang_specs_files=
4833 lang_options_files=
4834 lang_tree_files=
4835 rm -f specs.h options.h gencheck.h
4836 touch specs.h options.h gencheck.h
4837 for subdir in . $subdirs
4838 do
4839 if test -f $srcdir/$subdir/lang-specs.h; then
4840 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
4841 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
4842 fi
4843 if test -f $srcdir/$subdir/lang-options.h; then
4844 echo "#include \"$subdir/lang-options.h\"" >>options.h
4845 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
4846 fi
4847 if test -f $srcdir/$subdir/$subdir-tree.def; then
4848 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
4849 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
4850 fi
4851 done
4852
4853 # These (without "all_") are set in each config-lang.in.
4854 # `language' must be a single word so is spelled singularly.
4855 all_languages=
4856 all_boot_languages=
4857 all_compilers=
4858 all_stagestuff=
4859 all_diff_excludes=
4860 all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
4861 # List of language makefile fragments.
4862 all_lang_makefiles=
4863 all_headers=
4864 all_lib2funcs=
4865
4866 # Add the language fragments.
4867 # Languages are added via two mechanisms. Some information must be
4868 # recorded in makefile variables, these are defined in config-lang.in.
4869 # We accumulate them and plug them into the main Makefile.
4870 # The other mechanism is a set of hooks for each of the main targets
4871 # like `clean', `install', etc.
4872
4873 language_fragments="Make-lang"
4874 language_hooks="Make-hooks"
4875 oldstyle_subdirs=
4876
4877 for s in .. $subdirs
4878 do
4879 if test $s != ".."
4880 then
4881 language=
4882 boot_language=
4883 compilers=
4884 stagestuff=
4885 diff_excludes=
4886 headers=
4887 outputs=
4888 lib2funcs=
4889 . ${srcdir}/$s/config-lang.in
4890 if test "x$language" = x
4891 then
4892 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
4893 exit 1
4894 fi
4895 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
4896 all_languages="$all_languages $language"
4897 if test "x$boot_language" = xyes
4898 then
4899 all_boot_languages="$all_boot_languages $language"
4900 fi
4901 all_compilers="$all_compilers $compilers"
4902 all_stagestuff="$all_stagestuff $stagestuff"
4903 all_diff_excludes="$all_diff_excludes $diff_excludes"
4904 all_headers="$all_headers $headers"
4905 all_outputs="$all_outputs $outputs"
4906 if test x$outputs = x
4907 then
4908 oldstyle_subdirs="$oldstyle_subdirs $s"
4909 fi
4910 all_lib2funcs="$all_lib2funcs $lib2funcs"
4911 fi
4912 done
4913
4914 # Since we can't use `::' targets, we link each language in
4915 # with a set of hooks, reached indirectly via lang.${target}.
4916
4917 rm -f Make-hooks
4918 touch Make-hooks
4919 target_list="all.build all.cross start.encap rest.encap \
4920 info dvi \
4921 install-normal install-common install-info install-man \
4922 uninstall distdir \
4923 mostlyclean clean distclean extraclean maintainer-clean \
4924 stage1 stage2 stage3 stage4"
4925 for t in $target_list
4926 do
4927 x=
4928 for lang in .. $all_languages
4929 do
4930 if test $lang != ".."; then
4931 x="$x $lang.$t"
4932 fi
4933 done
4934 echo "lang.$t: $x" >> Make-hooks
4935 done
4936
4937 # If we're not building in srcdir, create .gdbinit.
4938
4939 if test ! -f Makefile.in; then
4940 echo "dir ." > .gdbinit
4941 echo "dir ${srcdir}" >> .gdbinit
4942 if test x$gdb_needs_out_file_path = xyes
4943 then
4944 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
4945 fi
4946 if test "x$subdirs" != x; then
4947 for s in $subdirs
4948 do
4949 echo "dir ${srcdir}/$s" >> .gdbinit
4950 done
4951 fi
4952 echo "source ${srcdir}/.gdbinit" >> .gdbinit
4953 fi
4954
4955 # Define variables host_canonical and build_canonical
4956 # because some Cygnus local changes in the Makefile depend on them.
4957 build_canonical=${build}
4958 host_canonical=${host}
4959 target_subdir=
4960 if test "${host}" != "${target}" ; then
4961 target_subdir=${target}/
4962 fi
4963 AC_SUBST(build_canonical)
4964 AC_SUBST(host_canonical)
4965 AC_SUBST(target_subdir)
4966
4967 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
4968 # absolute path for gcc_tooldir based on inserting the number of up-directory
4969 # movements required to get from $(exec_prefix) to $(prefix) into the basic
4970 # $(libsubdir)/@(unlibsubdir) based path.
4971 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
4972 # make and thus we'd get different behavior depending on where we built the
4973 # sources.
4974 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
4975 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
4976 else
4977 changequote(<<, >>)dnl
4978 # An explanation of the sed strings:
4979 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
4980 # -e 's|/$||' match a trailing forward slash and eliminates it
4981 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
4982 # -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
4983 #
4984 # (*) Note this pattern overwrites the first character of the string
4985 # with a forward slash if one is not already present. This is not a
4986 # problem because the exact names of the sub-directories concerned is
4987 # unimportant, just the number of them matters.
4988 #
4989 # The practical upshot of these patterns is like this:
4990 #
4991 # prefix exec_prefix result
4992 # ------ ----------- ------
4993 # /foo /foo/bar ../
4994 # /foo/ /foo/bar ../
4995 # /foo /foo/bar/ ../
4996 # /foo/ /foo/bar/ ../
4997 # /foo /foo/bar/ugg ../../
4998 #
4999 dollar='$$'
5000 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
5001 changequote([, ])dnl
5002 fi
5003 AC_SUBST(gcc_tooldir)
5004 AC_SUBST(dollar)
5005
5006 # Nothing to do for FLOAT_H, float_format already handled.
5007 objdir=`pwd`
5008 AC_SUBST(objdir)
5009
5010 # Process the language and host/target makefile fragments.
5011 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
5012
5013 # Substitute configuration variables
5014 AC_SUBST(subdirs)
5015 AC_SUBST(all_boot_languages)
5016 AC_SUBST(all_compilers)
5017 AC_SUBST(all_diff_excludes)
5018 AC_SUBST(all_headers)
5019 AC_SUBST(all_lang_makefiles)
5020 AC_SUBST(all_languages)
5021 AC_SUBST(all_lib2funcs)
5022 AC_SUBST(all_stagestuff)
5023 AC_SUBST(build_exeext)
5024 AC_SUBST(build_install_headers_dir)
5025 AC_SUBST(build_xm_file_list)
5026 AC_SUBST(cc_set_by_configure)
5027 AC_SUBST(quoted_cc_set_by_configure)
5028 AC_SUBST(cpp_install_dir)
5029 AC_SUBST(dep_host_xmake_file)
5030 AC_SUBST(dep_tmake_file)
5031 AC_SUBST(extra_c_flags)
5032 AC_SUBST(extra_c_objs)
5033 AC_SUBST(extra_cpp_objs)
5034 AC_SUBST(extra_cxx_objs)
5035 AC_SUBST(extra_headers_list)
5036 AC_SUBST(extra_objs)
5037 AC_SUBST(extra_parts)
5038 AC_SUBST(extra_passes)
5039 AC_SUBST(extra_programs)
5040 AC_SUBST(float_h_file)
5041 AC_SUBST(gcc_gxx_include_dir)
5042 AC_SUBST(gcc_version)
5043 AC_SUBST(gcc_version_trigger)
5044 AC_SUBST(host_exeext)
5045 AC_SUBST(host_extra_gcc_objs)
5046 AC_SUBST(host_xm_file_list)
5047 AC_SUBST(install)
5048 AC_SUBST(lang_options_files)
5049 AC_SUBST(lang_specs_files)
5050 AC_SUBST(lang_tree_files)
5051 AC_SUBST(local_prefix)
5052 AC_SUBST(maybe_use_collect2)
5053 AC_SUBST(md_file)
5054 AC_SUBST(objc_boehm_gc)
5055 AC_SUBST(out_file)
5056 AC_SUBST(out_object_file)
5057 AC_SUBST(stage_prefix_set_by_configure)
5058 AC_SUBST(symbolic_link)
5059 AC_SUBST(thread_file)
5060 AC_SUBST(tm_file_list)
5061 AC_SUBST(will_use_collect2)
5062
5063
5064 AC_SUBST_FILE(target_overrides)
5065 AC_SUBST_FILE(host_overrides)
5066 AC_SUBST(cross_defines)
5067 AC_SUBST_FILE(cross_overrides)
5068 AC_SUBST_FILE(build_overrides)
5069 AC_SUBST_FILE(language_fragments)
5070 AC_SUBST_FILE(language_hooks)
5071
5072 # Echo that links are built
5073 if test x$host = x$target
5074 then
5075 str1="native "
5076 else
5077 str1="cross-"
5078 str2=" from $host"
5079 fi
5080
5081 if test x$host != x$build
5082 then
5083 str3=" on a $build system"
5084 fi
5085
5086 if test "x$str2" != x || test "x$str3" != x
5087 then
5088 str4=
5089 fi
5090
5091 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
5092
5093 if test "x$str2" != x || test "x$str3" != x
5094 then
5095 echo " ${str2}${str3}." 1>&2
5096 fi
5097
5098 # Truncate the target if necessary
5099 if test x$host_truncate_target != x; then
5100 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5101 fi
5102
5103 # Configure the subdirectories
5104 # AC_CONFIG_SUBDIRS($subdirs)
5105
5106 # Create the Makefile
5107 # and configure language subdirectories
5108 AC_OUTPUT($all_outputs,
5109 [
5110 . $srcdir/configure.lang
5111 case x$CONFIG_HEADERS in
5112 xauto-host.h:config.in)
5113 echo > cstamp-h ;;
5114 esac
5115 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
5116 # bootstrapping and the installation procedure can still use
5117 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
5118 # FLAGS_TO_PASS has been modified to solve the problem there.
5119 # This is virtually a duplicate of what happens in configure.lang; we do
5120 # an extra check to make sure this only happens if ln -s can be used.
5121 if test "$symbolic_link" = "ln -s"; then
5122 for d in .. ${subdirs} ; do
5123 if test $d != ..; then
5124 STARTDIR=`pwd`
5125 cd $d
5126 for t in stage1 stage2 stage3 stage4 include
5127 do
5128 rm -f $t
5129 $symbolic_link ../$t $t 2>/dev/null
5130 done
5131 cd $STARTDIR
5132 fi
5133 done
5134 else true ; fi
5135 # Avoid having to add intl to our include paths.
5136 if test -f intl/libintl.h; then
5137 echo creating libintl.h
5138 echo '#include "intl/libintl.h"' >libintl.h
5139 fi
5140 ],
5141 [
5142 host='${host}'
5143 build='${build}'
5144 target='${target}'
5145 target_alias='${target_alias}'
5146 srcdir='${srcdir}'
5147 subdirs='${subdirs}'
5148 oldstyle_subdirs='${oldstyle_subdirs}'
5149 symbolic_link='${symbolic_link}'
5150 program_transform_set='${program_transform_set}'
5151 program_transform_name='${program_transform_name}'
5152 dep_host_xmake_file='${dep_host_xmake_file}'
5153 host_xmake_file='${host_xmake_file}'
5154 dep_tmake_file='${dep_tmake_file}'
5155 tmake_file='${tmake_file}'
5156 thread_file='${thread_file}'
5157 gcc_version='${gcc_version}'
5158 gcc_version_trigger='${gcc_version_trigger}'
5159 local_prefix='${local_prefix}'
5160 build_install_headers_dir='${build_install_headers_dir}'
5161 build_exeext='${build_exeext}'
5162 host_exeext='${host_exeext}'
5163 out_file='${out_file}'
5164 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
5165 SET_MAKE='${SET_MAKE}'
5166 target_list='${target_list}'
5167 target_overrides='${target_overrides}'
5168 host_overrides='${host_overrides}'
5169 cross_defines='${cross_defines}'
5170 cross_overrides='${cross_overrides}'
5171 build_overrides='${build_overrides}'
5172 cpp_install_dir='${cpp_install_dir}'
5173 ])