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