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