m68k-coff removed libgloss to fix a multiple definition of crt0
[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-*-netware) # Intel 80386's running netware
1402 changequote([,])dnl
1403 tm_file=i386/netware.h
1404 tmake_file=i386/t-netware
1405 ;;
1406 changequote(,)dnl
1407 i[34567]86-sequent-bsd*) # 80386 from Sequent
1408 changequote([,])dnl
1409 use_collect2=yes
1410 if test x$gas = xyes
1411 then
1412 tm_file=i386/seq-gas.h
1413 else
1414 tm_file=i386/sequent.h
1415 fi
1416 ;;
1417 changequote(,)dnl
1418 i[34567]86-sequent-ptx1*)
1419 changequote([,])dnl
1420 xm_defines="USG SVR3"
1421 xmake_file=i386/x-sysv3
1422 tm_file=i386/seq-sysv3.h
1423 tmake_file=i386/t-crtstuff
1424 extra_parts="crtbegin.o crtend.o"
1425 install_headers_dir=install-headers-cpio
1426 ;;
1427 changequote(,)dnl
1428 i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
1429 changequote([,])dnl
1430 xm_defines="USG SVR3"
1431 xmake_file=i386/x-sysv3
1432 tm_file=i386/seq2-sysv3.h
1433 tmake_file=i386/t-crtstuff
1434 extra_parts="crtbegin.o crtend.o"
1435 install_headers_dir=install-headers-cpio
1436 ;;
1437 changequote(,)dnl
1438 i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
1439 changequote([,])dnl
1440 xm_file="xm-alloca.h ${xm_file}"
1441 xm_defines="USG POSIX SMALL_ARG_MAX"
1442 xmake_file=x-svr4
1443 tm_file=i386/ptx4-i.h
1444 tmake_file=t-svr4
1445 extra_parts="crtbegin.o crtend.o"
1446 install_headers_dir=install-headers-cpio
1447 ;;
1448 i386-sun-sunos*) # Sun i386 roadrunner
1449 xm_defines=USG
1450 tm_file=i386/sun.h
1451 use_collect2=yes
1452 ;;
1453 changequote(,)dnl
1454 i[34567]86-wrs-vxworks*)
1455 changequote([,])dnl
1456 tm_file=i386/vxi386.h
1457 tmake_file=i386/t-i386bare
1458 thread_file='vxworks'
1459 ;;
1460 changequote(,)dnl
1461 i[34567]86-*-aout*)
1462 changequote([,])dnl
1463 tm_file=i386/i386-aout.h
1464 tmake_file=i386/t-i386bare
1465 ;;
1466 changequote(,)dnl
1467 i[34567]86-*-beoself* | i[34567]86-*-beos*)
1468 changequote([,])dnl
1469 xm_file=i386/xm-beos.h
1470 tmake_file='i386/t-beos i386/t-crtpic'
1471 tm_file=i386/beos-elf.h
1472 xmake_file=i386/x-beos
1473 extra_parts='crtbegin.o crtend.o'
1474 ;;
1475 changequote(,)dnl
1476 i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
1477 changequote([,])dnl
1478 tm_file=i386/bsd386.h
1479 # tmake_file=t-libc-ok
1480 ;;
1481 changequote(,)dnl
1482 i[34567]86-*-bsd*)
1483 changequote([,])dnl
1484 tm_file=i386/386bsd.h
1485 # tmake_file=t-libc-ok
1486 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
1487 # use_collect2=yes
1488 ;;
1489 changequote(,)dnl
1490 i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12].* | i[34567]86-*-freebsd*aout*)
1491 changequote([,])dnl
1492 tm_file="i386/freebsd-aout.h i386/perform.h"
1493 tmake_file=t-freebsd
1494 ;;
1495 changequote(,)dnl
1496 i[34567]86-*-freebsd*)
1497 changequote([,])dnl
1498 tm_file="i386/i386.h i386/att.h svr4.h freebsd.h i386/freebsd.h i386/perform.h"
1499 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1500 tmake_file=t-freebsd
1501 gas=yes
1502 gnu_ld=yes
1503 stabs=yes
1504 case x${enable_threads} in
1505 xyes | xpthreads | xposix)
1506 thread_file='posix'
1507 tmake_file="${tmake_file} t-freebsd-thread"
1508 ;;
1509 esac
1510 ;;
1511 changequote(,)dnl
1512 i[34567]86-*-netbsd*)
1513 changequote([,])dnl
1514 tm_file=i386/netbsd.h
1515 tmake_file=t-netbsd
1516 use_collect2=yes
1517 ;;
1518 changequote(,)dnl
1519 i[34567]86-*-openbsd*)
1520 changequote([,])dnl
1521 # we need collect2 until our bug is fixed...
1522 use_collect2=yes
1523 ;;
1524 changequote(,)dnl
1525 i[34567]86-*-coff*)
1526 changequote([,])dnl
1527 tm_file=i386/i386-coff.h
1528 tmake_file=i386/t-i386bare
1529 ;;
1530 changequote(,)dnl
1531 i[34567]86-*-isc*) # 80386 running ISC system
1532 changequote([,])dnl
1533 xm_file="${xm_file} i386/xm-isc.h"
1534 xm_defines="USG SVR3"
1535 case $machine in
1536 changequote(,)dnl
1537 i[34567]86-*-isc[34]*)
1538 changequote([,])dnl
1539 xmake_file=i386/x-isc3
1540 ;;
1541 *)
1542 xmake_file=i386/x-isc
1543 ;;
1544 esac
1545 if test x$gas = xyes -a x$stabs = xyes
1546 then
1547 tm_file=i386/iscdbx.h
1548 tmake_file=i386/t-svr3dbx
1549 extra_parts="svr3.ifile svr3z.ifile"
1550 else
1551 tm_file=i386/isccoff.h
1552 tmake_file=i386/t-crtstuff
1553 extra_parts="crtbegin.o crtend.o"
1554 fi
1555 tmake_file="$tmake_file i386/t-i386bare"
1556 install_headers_dir=install-headers-cpio
1557 ;;
1558 changequote(,)dnl
1559 i[34567]86-*-linux*oldld*) # Intel 80386's running GNU/Linux
1560 changequote([,])dnl # with a.out format using
1561 # pre BFD linkers
1562 xmake_file=x-linux-aout
1563 tmake_file="t-linux-aout i386/t-crtstuff"
1564 tm_file=i386/linux-oldld.h
1565 gnu_ld=yes
1566 float_format=i386
1567 ;;
1568 changequote(,)dnl
1569 i[34567]86-*-linux*aout*) # Intel 80386's running GNU/Linux
1570 changequote([,])dnl # with a.out format
1571 xmake_file=x-linux-aout
1572 tmake_file="t-linux-aout i386/t-crtstuff"
1573 tm_file=i386/linux-aout.h
1574 gnu_ld=yes
1575 float_format=i386
1576 ;;
1577 changequote(,)dnl
1578 i[34567]86-*-linux*libc1) # Intel 80386's running GNU/Linux
1579 changequote([,])dnl # with ELF format using the
1580 # GNU/Linux C library 5
1581 xmake_file=x-linux
1582 tm_file=i386/linux.h
1583 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
1584 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1585 gnu_ld=yes
1586 float_format=i386
1587 if test x$enable_threads = xyes; then
1588 thread_file='single'
1589 fi
1590 ;;
1591 changequote(,)dnl
1592 i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
1593 changequote([,])dnl # with ELF format using glibc 2
1594 # aka GNU/Linux C library 6
1595 xmake_file=x-linux
1596 tm_file=i386/linux.h
1597 tmake_file="t-linux i386/t-crtstuff"
1598 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1599 gnu_ld=yes
1600 float_format=i386
1601 if test x$enable_threads = xyes; then
1602 thread_file='posix'
1603 fi
1604 ;;
1605 changequote(,)dnl
1606 i[34567]86-*-gnu*)
1607 float_format=i386
1608 changequote([,])dnl
1609 ;;
1610 changequote(,)dnl
1611 i[34567]86-go32-msdos | i[34567]86-*-go32*)
1612 changequote([,])dnl
1613 echo "GO32/DJGPP V1.X is no longer supported. Use *-pc-msdosdjgpp for DJGPP V2.X instead."
1614 exit 1
1615 ;;
1616 changequote(,)dnl
1617 i[34567]86-pc-msdosdjgpp*)
1618 changequote([,])dnl
1619 xm_file=i386/xm-djgpp.h
1620 tm_file=i386/djgpp.h
1621 tmake_file=i386/t-djgpp
1622 xmake_file=i386/x-djgpp
1623 gnu_ld=yes
1624 gas=yes
1625 exeext=.exe
1626 float_format=none
1627 case $host in *pc-msdosdjgpp*)
1628 target_alias=djgpp
1629 ;;
1630 esac
1631 ;;
1632 changequote(,)dnl
1633 i[34567]86-moss-msdos* | i[34567]86-*-moss*)
1634 changequote([,])dnl
1635 tm_file=i386/moss.h
1636 tmake_file=t-libc-ok
1637 gnu_ld=yes
1638 gas=yes
1639 ;;
1640 changequote(,)dnl
1641 i[34567]86-*-lynxos*)
1642 changequote([,])dnl
1643 if test x$gas = xyes
1644 then
1645 tm_file=i386/lynx.h
1646 else
1647 tm_file=i386/lynx-ng.h
1648 fi
1649 xm_file=i386/xm-lynx.h
1650 tmake_file=i386/t-i386bare
1651 xmake_file=x-lynx
1652 ;;
1653 changequote(,)dnl
1654 i[34567]86-*-mach*)
1655 changequote([,])dnl
1656 tm_file=i386/mach.h
1657 # tmake_file=t-libc-ok
1658 use_collect2=yes
1659 ;;
1660 changequote(,)dnl
1661 i[34567]86-*-osfrose*) # 386 using OSF/rose
1662 changequote([,])dnl
1663 if test x$elf = xyes
1664 then
1665 tm_file=i386/osfelf.h
1666 use_collect2=
1667 else
1668 tm_file=i386/osfrose.h
1669 use_collect2=yes
1670 fi
1671 xm_file="i386/xm-osf.h ${xm_file}"
1672 xmake_file=i386/x-osfrose
1673 tmake_file=i386/t-osf
1674 extra_objs=halfpic.o
1675 ;;
1676 changequote(,)dnl
1677 i[34567]86-go32-rtems*)
1678 changequote([,])dnl
1679 cpu_type=i386
1680 xm_file=i386/xm-go32.h
1681 tm_file=i386/go32-rtems.h
1682 tmake_file="i386/t-go32 t-rtems"
1683 ;;
1684 changequote(,)dnl
1685 i[34567]86-*-rtemscoff*)
1686 changequote([,])dnl
1687 cpu_type=i386
1688 tm_file=i386/rtems.h
1689 tmake_file="i386/t-i386bare t-rtems"
1690 ;;
1691 changequote(,)dnl
1692 i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
1693 changequote([,])dnl
1694 cpu_type=i386
1695 tm_file=i386/rtemself.h
1696 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
1697 tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
1698 ;;
1699 changequote(,)dnl
1700 i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
1701 changequote([,])dnl
1702 xm_file="xm-alloca.h ${xm_file} i386/xm-sco5.h"
1703 xm_defines="USG SVR3"
1704 xmake_file=i386/x-sco5
1705 install_headers_dir=install-headers-cpio
1706 tm_file=i386/sco5.h
1707 if test x$gas = xyes
1708 then
1709 tm_file="i386/sco5gas.h ${tm_file}"
1710 tmake_file=i386/t-sco5gas
1711 else
1712 tmake_file=i386/t-sco5
1713 fi
1714 tmake_file="$tmake_file i386/t-i386bare"
1715 extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
1716 ;;
1717 changequote(,)dnl
1718 i[34567]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
1719 changequote([,])dnl
1720 xm_file="${xm_file} i386/xm-sco.h"
1721 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX"
1722 xmake_file=i386/x-sco4
1723 install_headers_dir=install-headers-cpio
1724 if test x$stabs = xyes
1725 then
1726 tm_file=i386/sco4dbx.h
1727 tmake_file=i386/t-svr3dbx
1728 extra_parts="svr3.ifile svr3z.rfile"
1729 else
1730 tm_file=i386/sco4.h
1731 tmake_file=i386/t-crtstuff
1732 extra_parts="crtbegin.o crtend.o"
1733 fi
1734 tmake_file="$tmake_file i386/t-i386bare"
1735 # The default EAFS filesystem supports long file names.
1736 # Truncating the target makes $host != $target which
1737 # makes gcc think it is doing a cross-compile.
1738 # truncate_target=yes
1739 ;;
1740 changequote(,)dnl
1741 i[34567]86-*-sco*) # 80386 running SCO system
1742 changequote([,])dnl
1743 xm_file=i386/xm-sco.h
1744 xmake_file=i386/x-sco
1745 install_headers_dir=install-headers-cpio
1746 if test x$stabs = xyes
1747 then
1748 tm_file=i386/scodbx.h
1749 tmake_file=i386/t-svr3dbx
1750 extra_parts="svr3.ifile svr3z.rfile"
1751 else
1752 tm_file=i386/sco.h
1753 extra_parts="crtbegin.o crtend.o"
1754 tmake_file=i386/t-crtstuff
1755 fi
1756 tmake_file="$tmake_file i386/t-i386bare"
1757 truncate_target=yes
1758 ;;
1759 changequote(,)dnl
1760 i[34567]86-*-solaris2*)
1761 changequote([,])dnl
1762 xm_file="xm-alloca.h ${xm_file}"
1763 xm_defines="USG POSIX SMALL_ARG_MAX"
1764 tm_file=i386/sol2.h
1765 if test x$gas = xyes; then
1766 # Only needed if gas does not support -s
1767 tm_file="i386/sol2gas.h ${tm_file}"
1768 fi
1769 tmake_file="i386/t-i386bare i386/t-sol2"
1770 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1771 xmake_file=x-svr4
1772 if test x${enable_threads} = x; then
1773 enable_threads=$have_pthread_h
1774 if test x${enable_threads} = x; then
1775 enable_threads=$have_thread_h
1776 fi
1777 fi
1778 if test x${enable_threads} = xyes; then
1779 if test x${have_pthread_h} = xyes; then
1780 thread_file='posix'
1781 else
1782 thread_file='solaris'
1783 fi
1784 fi
1785 ;;
1786 changequote(,)dnl
1787 i[34567]86-*-sysv5*) # Intel x86 on System V Release 5
1788 changequote([,])dnl
1789 xm_file="xm-alloca.h ${xm_file}"
1790 xm_defines="USG POSIX"
1791 tm_file=i386/sysv5.h
1792 if test x$stabs = xyes
1793 then
1794 tm_file="${tm_file} dbx.h"
1795 fi
1796 tmake_file="i386/t-i386bare i386/t-crtpic"
1797 xmake_file=x-svr4
1798 extra_parts="crtbegin.o crtend.o"
1799 if test x$enable_threads = xyes; then
1800 thread_file='posix'
1801 fi
1802 ;;
1803 changequote(,)dnl
1804 i[34567]86-*-sysv4*) # Intel 80386's running system V.4
1805 changequote([,])dnl
1806 xm_file="xm-alloca.h ${xm_file}"
1807 xm_defines="USG POSIX SMALL_ARG_MAX"
1808 tm_file=i386/sysv4.h
1809 if test x$stabs = xyes
1810 then
1811 tm_file="${tm_file} dbx.h"
1812 fi
1813 tmake_file="i386/t-i386bare i386/t-crtpic"
1814 xmake_file=x-svr4
1815 extra_parts="crtbegin.o crtend.o"
1816 ;;
1817 changequote(,)dnl
1818 i[34567]86-*-udk*) # Intel x86 on SCO UW/OSR5 Dev Kit
1819 changequote([,])dnl
1820 xm_file="xm-alloca.h ${xm_file}"
1821 xm_defines="USG POSIX"
1822 tm_file=i386/udk.h
1823 tmake_file="i386/t-i386bare i386/t-crtpic i386/t-udk"
1824 xmake_file=x-svr4
1825 extra_parts="crtbegin.o crtend.o"
1826 install_headers_dir=install-headers-cpio
1827 ;;
1828 changequote(,)dnl
1829 i[34567]86-*-osf1*) # Intel 80386's running OSF/1 1.3+
1830 changequote([,])dnl
1831 cpu_type=i386
1832 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
1833 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
1834 if test x$stabs = xyes
1835 then
1836 tm_file=i386/osf1elfgdb.h
1837 else
1838 tm_file=i386/osf1elf.h
1839 fi
1840 tmake_file=i386/t-osf1elf
1841 xmake_file=i386/x-osf1elf
1842 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1843 ;;
1844 changequote(,)dnl
1845 i[34567]86-*-sysv*) # Intel 80386's running system V
1846 changequote([,])dnl
1847 xm_defines="USG SVR3"
1848 xmake_file=i386/x-sysv3
1849 if test x$gas = xyes
1850 then
1851 if test x$stabs = xyes
1852 then
1853 tm_file=i386/svr3dbx.h
1854 tmake_file=i386/t-svr3dbx
1855 extra_parts="svr3.ifile svr3z.rfile"
1856 else
1857 tm_file=i386/svr3gas.h
1858 extra_parts="crtbegin.o crtend.o"
1859 tmake_file=i386/t-crtstuff
1860 fi
1861 else
1862 tm_file=i386/sysv3.h
1863 extra_parts="crtbegin.o crtend.o"
1864 tmake_file=i386/t-crtstuff
1865 fi
1866 tmake_file="$tmake_file i386/t-crtpic"
1867 ;;
1868 i386-*-vsta) # Intel 80386's running VSTa kernel
1869 xm_file="${xm_file} i386/xm-vsta.h"
1870 tm_file=i386/vsta.h
1871 tmake_file=i386/t-vsta
1872 xmake_file=i386/x-vsta
1873 ;;
1874 changequote(,)dnl
1875 i[34567]86-*-win32)
1876 changequote([,])dnl
1877 xm_file="${xm_file} i386/xm-cygwin.h"
1878 tmake_file=i386/t-cygwin
1879 tm_file=i386/win32.h
1880 xmake_file=i386/x-cygwin
1881 extra_objs=winnt.o
1882 if test x$enable_threads = xyes; then
1883 thread_file='win32'
1884 fi
1885 exeext=.exe
1886 ;;
1887 changequote(,)dnl
1888 i[34567]86-*-pe | i[34567]86-*-cygwin*)
1889 changequote([,])dnl
1890 xm_file="${xm_file} i386/xm-cygwin.h"
1891 tmake_file=i386/t-cygwin
1892 tm_file=i386/cygwin.h
1893 xmake_file=i386/x-cygwin
1894 extra_objs=winnt.o
1895 if test x$enable_threads = xyes; then
1896 thread_file='win32'
1897 fi
1898 exeext=.exe
1899 ;;
1900 changequote(,)dnl
1901 i[34567]86-*-mingw32*)
1902 changequote([,])dnl
1903 tm_file=i386/mingw32.h
1904 xm_file="${xm_file} i386/xm-mingw32.h"
1905 tmake_file="i386/t-cygwin i386/t-mingw32"
1906 extra_objs=winnt.o
1907 xmake_file=i386/x-cygwin
1908 if test x$enable_threads = xyes; then
1909 thread_file='win32'
1910 fi
1911 exeext=.exe
1912 case $machine in
1913 *mingw32msv*)
1914 ;;
1915 *minwg32crt* | *mingw32*)
1916 tm_file="${tm_file} i386/crtdll.h"
1917 ;;
1918 esac
1919 ;;
1920 changequote(,)dnl
1921 i[34567]86-*-uwin*)
1922 changequote([,])dnl
1923 tm_file=i386/uwin.h
1924 xm_file="${xm_file} i386/xm-uwin.h"
1925 xm_defines="USG NO_STAB_H"
1926 tmake_file="i386/t-cygwin i386/t-uwin"
1927 extra_objs=winnt.o
1928 xmake_file=i386/x-cygwin
1929 if test x$enable_threads = xyes; then
1930 thread_file='win32'
1931 fi
1932 exeext=.exe
1933 ;;
1934 changequote(,)dnl
1935 i[34567]86-*-interix*)
1936 changequote([,])dnl
1937 tm_file="i386/i386-interix.h interix.h"
1938 xm_file="i386/xm-i386-interix.h xm-interix.h"
1939 xm_defines="USG"
1940 tmake_file="i386/t-interix"
1941 extra_objs=interix.o
1942 xmake_file=x-interix
1943 if test x$enable_threads = xyes ; then
1944 thread_file='posix'
1945 fi
1946 if test x$stabs = xyes ; then
1947 tm_file="${tm_file} dbxcoff.h"
1948 fi
1949 ;;
1950 changequote(,)dnl
1951 i[34567]86-*-winnt3*)
1952 changequote([,])dnl
1953 tm_file=i386/win-nt.h
1954 out_file=i386/i386.c
1955 xm_file="xm-winnt.h ${xm_file}"
1956 xmake_file=winnt/x-winnt
1957 tmake_file=i386/t-winnt
1958 extra_host_objs="winnt.o oldnames.o"
1959 extra_gcc_objs="spawnv.o oldnames.o"
1960 if test x$gnu_ld != xyes
1961 then
1962 extra_programs=ld.exe
1963 fi
1964 if test x$enable_threads = xyes; then
1965 thread_file='win32'
1966 fi
1967 ;;
1968 changequote(,)dnl
1969 i[34567]86-dg-dgux*)
1970 changequote([,])dnl
1971 xm_file="xm-alloca.h ${xm_file}"
1972 xm_defines="USG POSIX"
1973 out_file=i386/dgux.c
1974 tm_file=i386/dgux.h
1975 tmake_file=i386/t-dgux
1976 xmake_file=i386/x-dgux
1977 install_headers_dir=install-headers-cpio
1978 ;;
1979 i860-alliant-*) # Alliant FX/2800
1980 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1981 xm_file="${xm_file}"
1982 xmake_file=i860/x-fx2800
1983 tmake_file=i860/t-fx2800
1984 extra_parts="crtbegin.o crtend.o"
1985 ;;
1986 i860-*-bsd*)
1987 tm_file="${tm_file} i860/bsd.h"
1988 if test x$gas = xyes
1989 then
1990 tm_file="${tm_file} i860/bsd-gas.h"
1991 fi
1992 use_collect2=yes
1993 ;;
1994 i860-*-mach*)
1995 tm_file="${tm_file} i860/mach.h"
1996 tmake_file=t-libc-ok
1997 ;;
1998 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1999 tm_file="${tm_file} svr3.h i860/paragon.h"
2000 xm_defines="USG SVR3"
2001 tmake_file=t-osf
2002 ;;
2003 i860-*-sysv3*)
2004 tm_file="${tm_file} svr3.h i860/sysv3.h"
2005 xm_defines="USG SVR3"
2006 xmake_file=i860/x-sysv3
2007 extra_parts="crtbegin.o crtend.o"
2008 ;;
2009 i860-*-sysv4*)
2010 tm_file="${tm_file} svr4.h i860/sysv4.h"
2011 xm_defines="USG SVR3"
2012 xmake_file=i860/x-sysv4
2013 tmake_file=t-svr4
2014 extra_parts="crtbegin.o crtend.o"
2015 ;;
2016 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
2017 tm_file="${tm_file} i960/vx960.h"
2018 tmake_file=i960/t-vxworks960
2019 use_collect2=yes
2020 thread_file='vxworks'
2021 ;;
2022 i960-wrs-vxworks5* | i960-wrs-vxworks)
2023 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
2024 tmake_file=i960/t-vxworks960
2025 use_collect2=yes
2026 thread_file='vxworks'
2027 ;;
2028 i960-wrs-vxworks*)
2029 tm_file="${tm_file} i960/vx960.h"
2030 tmake_file=i960/t-vxworks960
2031 use_collect2=yes
2032 thread_file='vxworks'
2033 ;;
2034 i960-*-coff*)
2035 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
2036 tmake_file=i960/t-960bare
2037 use_collect2=yes
2038 ;;
2039 i960-*-rtems)
2040 tmake_file="i960/t-960bare t-rtems"
2041 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
2042 use_collect2=yes
2043 ;;
2044 i960-*-*) # Default i960 environment.
2045 use_collect2=yes
2046 ;;
2047 ia64*-*-elf*)
2048 tm_file=ia64/elf.h
2049 tmake_file="ia64/t-ia64"
2050 target_cpu_default="0"
2051 if test x$gas = xyes
2052 then
2053 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
2054 fi
2055 if test x$gnu_ld = xyes
2056 then
2057 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
2058 fi
2059 float_format=i386
2060 ;;
2061 ia64*-*-linux*)
2062 tm_file=ia64/linux.h
2063 tmake_file="t-linux ia64/t-ia64 ia64/t-glibc"
2064 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
2065 if test x$enable_threads = xyes; then
2066 thread_file='posix'
2067 fi
2068 float_format=i386
2069 ;;
2070 m32r-*-elf*)
2071 extra_parts="crtinit.o crtfini.o"
2072 ;;
2073 # m68hc11 and m68hc12 share the same machine description.
2074 m68hc11-*-*|m6811-*-*)
2075 tm_file="m68hc11/m68hc11.h"
2076 xm_file="m68hc11/xm-m68hc11.h"
2077 tm_p_file="m68hc11/m68hc11-protos.h"
2078 md_file="m68hc11/m68hc11.md"
2079 out_file="m68hc11/m68hc11.c"
2080 tmake_file="m68hc11/t-m68hc11-gas"
2081 ;;
2082 m68hc12-*-*|m6812-*-*)
2083 tm_file="m68hc11/m68hc12.h"
2084 tm_p_file="m68hc11/m68hc11-protos.h"
2085 xm_file="m68hc11/xm-m68hc11.h"
2086 md_file="m68hc11/m68hc11.md"
2087 out_file="m68hc11/m68hc11.c"
2088 tmake_file="m68hc11/t-m68hc11-gas"
2089 ;;
2090 m68000-convergent-sysv*)
2091 tm_file=m68k/ctix.h
2092 xm_file="m68k/xm-3b1.h ${xm_file}"
2093 xm_defines=USG
2094 use_collect2=yes
2095 extra_headers=math-68881.h
2096 ;;
2097 m68000-hp-bsd*) # HP 9000/200 running BSD
2098 tm_file=m68k/hp2bsd.h
2099 xmake_file=m68k/x-hp2bsd
2100 use_collect2=yes
2101 extra_headers=math-68881.h
2102 ;;
2103 m68000-hp-hpux*) # HP 9000 series 300
2104 xm_file="xm-alloca.h ${xm_file}"
2105 xm_defines="USG"
2106 if test x$gas = xyes
2107 then
2108 xmake_file=m68k/x-hp320g
2109 tm_file=m68k/hp310g.h
2110 else
2111 xmake_file=m68k/x-hp320
2112 tm_file=m68k/hp310.h
2113 fi
2114 install_headers_dir=install-headers-cpio
2115 use_collect2=yes
2116 extra_headers=math-68881.h
2117 ;;
2118 m68000-sun-sunos3*)
2119 tm_file=m68k/sun2.h
2120 use_collect2=yes
2121 extra_headers=math-68881.h
2122 ;;
2123 m68000-sun-sunos4*)
2124 tm_file=m68k/sun2o4.h
2125 use_collect2=yes
2126 extra_headers=math-68881.h
2127 ;;
2128 m68000-att-sysv*)
2129 xm_file="m68k/xm-3b1.h ${xm_file}"
2130 xm_defines=USG
2131 if test x$gas = xyes
2132 then
2133 tm_file=m68k/3b1g.h
2134 else
2135 tm_file=m68k/3b1.h
2136 fi
2137 use_collect2=yes
2138 extra_headers=math-68881.h
2139 ;;
2140 m68k-apple-aux*) # Apple Macintosh running A/UX
2141 xm_defines="USG AUX"
2142 tmake_file=m68k/t-aux
2143 install_headers_dir=install-headers-cpio
2144 extra_headers=math-68881.h
2145 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
2146 tm_file=
2147 if test "$gnu_ld" = yes
2148 then
2149 tm_file="${tm_file} m68k/auxgld.h"
2150 else
2151 tm_file="${tm_file} m68k/auxld.h"
2152 fi
2153 if test "$gas" = yes
2154 then
2155 tm_file="${tm_file} m68k/auxgas.h"
2156 else
2157 tm_file="${tm_file} m68k/auxas.h"
2158 fi
2159 tm_file="${tm_file} m68k/a-ux.h"
2160 float_format=m68k
2161 ;;
2162 m68k-apollo-*)
2163 tm_file=m68k/apollo68.h
2164 xmake_file=m68k/x-apollo68
2165 use_collect2=yes
2166 extra_headers=math-68881.h
2167 float_format=m68k
2168 ;;
2169 m68k-altos-sysv*) # Altos 3068
2170 if test x$gas = xyes
2171 then
2172 tm_file=m68k/altos3068.h
2173 xm_defines=USG
2174 else
2175 echo "The Altos is supported only with the GNU assembler" 1>&2
2176 exit 1
2177 fi
2178 extra_headers=math-68881.h
2179 ;;
2180 m68k-bull-sysv*) # Bull DPX/2
2181 if test x$gas = xyes
2182 then
2183 if test x$stabs = xyes
2184 then
2185 tm_file=m68k/dpx2cdbx.h
2186 else
2187 tm_file=m68k/dpx2g.h
2188 fi
2189 else
2190 tm_file=m68k/dpx2.h
2191 fi
2192 xm_file="xm-alloca.h ${xm_file}"
2193 xm_defines=USG
2194 xmake_file=m68k/x-dpx2
2195 use_collect2=yes
2196 extra_headers=math-68881.h
2197 ;;
2198 m68k-atari-sysv4*) # Atari variant of V.4.
2199 tm_file=m68k/atari.h
2200 xm_file="xm-alloca.h ${xm_file}"
2201 xm_defines="USG FULL_PROTOTYPES"
2202 tmake_file=t-svr4
2203 extra_parts="crtbegin.o crtend.o"
2204 extra_headers=math-68881.h
2205 float_format=m68k
2206 ;;
2207 m68k-motorola-sysv*)
2208 tm_file=m68k/mot3300.h
2209 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
2210 if test x$gas = xyes
2211 then
2212 xmake_file=m68k/x-mot3300-gas
2213 if test x$gnu_ld = xyes
2214 then
2215 tmake_file=m68k/t-mot3300-gald
2216 else
2217 tmake_file=m68k/t-mot3300-gas
2218 use_collect2=yes
2219 fi
2220 else
2221 xmake_file=m68k/x-mot3300
2222 if test x$gnu_ld = xyes
2223 then
2224 tmake_file=m68k/t-mot3300-gld
2225 else
2226 tmake_file=m68k/t-mot3300
2227 use_collect2=yes
2228 fi
2229 fi
2230 gdb_needs_out_file_path=yes
2231 extra_parts="crt0.o mcrt0.o"
2232 extra_headers=math-68881.h
2233 float_format=m68k
2234 ;;
2235 m68k-ncr-sysv*) # NCR Tower 32 SVR3
2236 tm_file=m68k/tower-as.h
2237 xm_defines="USG SVR3"
2238 xmake_file=m68k/x-tower
2239 extra_parts="crtbegin.o crtend.o"
2240 extra_headers=math-68881.h
2241 ;;
2242 m68k-plexus-sysv*)
2243 tm_file=m68k/plexus.h
2244 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
2245 xm_defines=USG
2246 use_collect2=yes
2247 extra_headers=math-68881.h
2248 ;;
2249 m68k-tti-*)
2250 tm_file=m68k/pbb.h
2251 xm_file="xm-alloca.h ${xm_file}"
2252 xm_defines=USG
2253 extra_headers=math-68881.h
2254 ;;
2255 m68k-crds-unos*)
2256 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
2257 xm_defines="USG unos"
2258 xmake_file=m68k/x-crds
2259 tm_file=m68k/crds.h
2260 use_collect2=yes
2261 extra_headers=math-68881.h
2262 ;;
2263 m68k-cbm-sysv4*) # Commodore variant of V.4.
2264 tm_file=m68k/amix.h
2265 xm_file="xm-alloca.h ${xm_file}"
2266 xm_defines="USG FULL_PROTOTYPES"
2267 xmake_file=m68k/x-amix
2268 tmake_file=t-svr4
2269 extra_parts="crtbegin.o crtend.o"
2270 extra_headers=math-68881.h
2271 float_format=m68k
2272 ;;
2273 m68k-ccur-rtu)
2274 tm_file=m68k/ccur-GAS.h
2275 xmake_file=m68k/x-ccur
2276 extra_headers=math-68881.h
2277 use_collect2=yes
2278 float_format=m68k
2279 ;;
2280 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
2281 tm_file=m68k/hp3bsd44.h
2282 xmake_file=m68k/x-hp3bsd44
2283 use_collect2=yes
2284 extra_headers=math-68881.h
2285 float_format=m68k
2286 ;;
2287 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
2288 tm_file=m68k/hp3bsd.h
2289 use_collect2=yes
2290 extra_headers=math-68881.h
2291 float_format=m68k
2292 ;;
2293 m68k-isi-bsd*)
2294 if test x$with_fp = xno
2295 then
2296 tm_file=m68k/isi-nfp.h
2297 else
2298 tm_file=m68k/isi.h
2299 float_format=m68k
2300 fi
2301 use_collect2=yes
2302 extra_headers=math-68881.h
2303 ;;
2304 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
2305 xm_file="xm-alloca.h ${xm_file}"
2306 xm_defines="USG"
2307 if test x$gas = xyes
2308 then
2309 xmake_file=m68k/x-hp320g
2310 tm_file=m68k/hp320g.h
2311 else
2312 xmake_file=m68k/x-hp320
2313 tm_file=m68k/hpux7.h
2314 fi
2315 install_headers_dir=install-headers-cpio
2316 use_collect2=yes
2317 extra_headers=math-68881.h
2318 float_format=m68k
2319 ;;
2320 m68k-hp-hpux*) # HP 9000 series 300
2321 xm_file="xm-alloca.h ${xm_file}"
2322 xm_defines="USG"
2323 if test x$gas = xyes
2324 then
2325 xmake_file=m68k/x-hp320g
2326 tm_file=m68k/hp320g.h
2327 else
2328 xmake_file=m68k/x-hp320
2329 tm_file=m68k/hp320.h
2330 fi
2331 install_headers_dir=install-headers-cpio
2332 use_collect2=yes
2333 extra_headers=math-68881.h
2334 float_format=m68k
2335 ;;
2336 m68k-sun-mach*)
2337 tm_file=m68k/sun3mach.h
2338 use_collect2=yes
2339 extra_headers=math-68881.h
2340 float_format=m68k
2341 ;;
2342 m68k-sony-newsos3*)
2343 if test x$gas = xyes
2344 then
2345 tm_file=m68k/news3gas.h
2346 else
2347 tm_file=m68k/news3.h
2348 fi
2349 use_collect2=yes
2350 extra_headers=math-68881.h
2351 float_format=m68k
2352 ;;
2353 m68k-sony-bsd* | m68k-sony-newsos*)
2354 if test x$gas = xyes
2355 then
2356 tm_file=m68k/newsgas.h
2357 else
2358 tm_file=m68k/news.h
2359 fi
2360 use_collect2=yes
2361 extra_headers=math-68881.h
2362 float_format=m68k
2363 ;;
2364 m68k-next-nextstep2*)
2365 tm_file=m68k/next21.h
2366 xm_file="m68k/xm-next.h ${xm_file}"
2367 tmake_file=m68k/t-next
2368 xmake_file=m68k/x-next
2369 extra_objs=nextstep.o
2370 extra_headers=math-68881.h
2371 use_collect2=yes
2372 float_format=m68k
2373 ;;
2374 changequote(,)dnl
2375 m68k-next-nextstep[34]*)
2376 changequote([,])dnl
2377 tm_file=m68k/next.h
2378 xm_file="m68k/xm-next.h ${xm_file}"
2379 tmake_file=m68k/t-next
2380 xmake_file=m68k/x-next
2381 extra_objs=nextstep.o
2382 extra_parts="crtbegin.o crtend.o"
2383 extra_headers=math-68881.h
2384 float_format=m68k
2385 if test x$enable_threads = xyes; then
2386 thread_file='mach'
2387 fi
2388 ;;
2389 m68k-sun-sunos3*)
2390 if test x$with_fp = xno
2391 then
2392 tm_file=m68k/sun3n3.h
2393 else
2394 tm_file=m68k/sun3o3.h
2395 float_format=m68k
2396 fi
2397 use_collect2=yes
2398 extra_headers=math-68881.h
2399 ;;
2400 m68k-sun-sunos*) # For SunOS 4 (the default).
2401 if test x$with_fp = xno
2402 then
2403 tm_file=m68k/sun3n.h
2404 else
2405 tm_file=m68k/sun3.h
2406 float_format=m68k
2407 fi
2408 use_collect2=yes
2409 extra_headers=math-68881.h
2410 ;;
2411 m68k-wrs-vxworks*)
2412 tm_file=m68k/vxm68k.h
2413 tmake_file=m68k/t-vxworks68
2414 extra_headers=math-68881.h
2415 thread_file='vxworks'
2416 float_format=m68k
2417 ;;
2418 m68k-*-aout*)
2419 tmake_file=m68k/t-m68kbare
2420 tm_file="m68k/m68k-aout.h libgloss.h"
2421 extra_headers=math-68881.h
2422 float_format=m68k
2423 ;;
2424 m68k-*-coff*)
2425 tmake_file=m68k/t-m68kbare
2426 tm_file="m68k/m68k-coff.h dbx.h"
2427 extra_headers=math-68881.h
2428 float_format=m68k
2429 ;;
2430 m68020-*-elf* | m68k-*-elf*)
2431 tm_file="m68k/m68020-elf.h"
2432 xm_file=m68k/xm-m68kv.h
2433 tmake_file=m68k/t-m68kelf
2434 header_files=math-68881.h
2435 ;;
2436 m68k-*-lynxos*)
2437 if test x$gas = xyes
2438 then
2439 tm_file=m68k/lynx.h
2440 else
2441 tm_file=m68k/lynx-ng.h
2442 fi
2443 xm_file=m68k/xm-lynx.h
2444 xmake_file=x-lynx
2445 tmake_file=m68k/t-lynx
2446 extra_headers=math-68881.h
2447 float_format=m68k
2448 ;;
2449 m68k*-*-netbsd*)
2450 tm_file=m68k/netbsd.h
2451 tmake_file=t-netbsd
2452 float_format=m68k
2453 use_collect2=yes
2454 ;;
2455 m68k*-*-openbsd*)
2456 float_format=m68k
2457 # we need collect2 until our bug is fixed...
2458 use_collect2=yes
2459 ;;
2460 m68k-*-sysv3*) # Motorola m68k's running system V.3
2461 xm_file="xm-alloca.h ${xm_file}"
2462 xm_defines=USG
2463 xmake_file=m68k/x-m68kv
2464 extra_parts="crtbegin.o crtend.o"
2465 extra_headers=math-68881.h
2466 float_format=m68k
2467 ;;
2468 m68k-*-sysv4*) # Motorola m68k's running system V.4
2469 tm_file=m68k/m68kv4.h
2470 xm_file="xm-alloca.h ${xm_file}"
2471 xm_defines=USG
2472 tmake_file=t-svr4
2473 extra_parts="crtbegin.o crtend.o"
2474 extra_headers=math-68881.h
2475 float_format=m68k
2476 ;;
2477 m68k-*-linux*aout*) # Motorola m68k's running GNU/Linux
2478 # with a.out format
2479 xmake_file=x-linux
2480 tm_file=m68k/linux-aout.h
2481 tmake_file="t-linux-aout m68k/t-linux-aout"
2482 extra_headers=math-68881.h
2483 float_format=m68k
2484 gnu_ld=yes
2485 ;;
2486 m68k-*-linux*libc1) # Motorola m68k's running GNU/Linux
2487 # with ELF format using the
2488 # GNU/Linux C library 5
2489 xmake_file=x-linux
2490 tm_file=m68k/linux.h
2491 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
2492 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2493 extra_headers=math-68881.h
2494 float_format=m68k
2495 gnu_ld=yes
2496 ;;
2497 m68k-*-linux*) # Motorola m68k's running GNU/Linux
2498 # with ELF format using glibc 2
2499 # aka the GNU/Linux C library 6.
2500 xmake_file=x-linux
2501 tm_file=m68k/linux.h
2502 tmake_file="t-linux m68k/t-linux"
2503 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2504 extra_headers=math-68881.h
2505 float_format=m68k
2506 gnu_ld=yes
2507 if test x$enable_threads = xyes; then
2508 thread_file='posix'
2509 fi
2510 ;;
2511 m68k-*-psos*)
2512 tmake_file=m68k/t-m68kbare
2513 tm_file=m68k/m68k-psos.h
2514 extra_headers=math-68881.h
2515 float_format=m68k
2516 ;;
2517 m68k-*-rtemscoff*)
2518 tmake_file="m68k/t-m68kbare t-rtems"
2519 tm_file=m68k/rtems.h
2520 extra_headers=math-68881.h
2521 float_format=m68k
2522 ;;
2523 m68k-*-rtemself*|m68k-*-rtems*)
2524 tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
2525 tm_file=m68k/rtemself.h
2526 extra_headers=math-68881.h
2527 float_format=m68k
2528 ;;
2529 m88k-dg-dgux*)
2530 case $machine in
2531 m88k-dg-dguxbcs*)
2532 tm_file=m88k/dguxbcs.h
2533 tmake_file=m88k/t-dguxbcs
2534 ;;
2535 *)
2536 tm_file=m88k/dgux.h
2537 tmake_file=m88k/t-dgux
2538 ;;
2539 esac
2540 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
2541 xmake_file=m88k/x-dgux
2542 if test x$gas = xyes
2543 then
2544 tmake_file=m88k/t-dgux-gas
2545 fi
2546 ;;
2547 m88k-dolphin-sysv3*)
2548 tm_file=m88k/dolph.h
2549 extra_parts="crtbegin.o crtend.o"
2550 xm_file="m88k/xm-sysv3.h ${xm_file}"
2551 xmake_file=m88k/x-dolph
2552 if test x$gas = xyes
2553 then
2554 tmake_file=m88k/t-m88k-gas
2555 fi
2556 ;;
2557 m88k-tektronix-sysv3)
2558 tm_file=m88k/tekXD88.h
2559 extra_parts="crtbegin.o crtend.o"
2560 xm_file="m88k/xm-sysv3.h ${xm_file}"
2561 xmake_file=m88k/x-tekXD88
2562 if test x$gas = xyes
2563 then
2564 tmake_file=m88k/t-m88k-gas
2565 fi
2566 ;;
2567 m88k-*-aout*)
2568 tm_file=m88k/m88k-aout.h
2569 ;;
2570 m88k-*-coff*)
2571 tm_file=m88k/m88k-coff.h
2572 tmake_file=m88k/t-bug
2573 ;;
2574 m88k-*-luna*)
2575 tm_file=m88k/luna.h
2576 extra_parts="crtbegin.o crtend.o"
2577 if test x$gas = xyes
2578 then
2579 tmake_file=m88k/t-luna-gas
2580 else
2581 tmake_file=m88k/t-luna
2582 fi
2583 ;;
2584 m88k-*-openbsd*)
2585 tmake_file="${tmake_file} m88k/t-luna-gas"
2586 tm_file="m88k/aout-dbx.h aoutos.h m88k/m88k.h openbsd.h ${tm_file}"
2587 xm_file="xm-openbsd.h m88k/xm-m88k.h ${xm_file}"
2588 ;;
2589 m88k-*-sysv3*)
2590 tm_file=m88k/sysv3.h
2591 extra_parts="crtbegin.o crtend.o"
2592 xm_file="m88k/xm-sysv3.h ${xm_file}"
2593 xmake_file=m88k/x-sysv3
2594 if test x$gas = xyes
2595 then
2596 tmake_file=m88k/t-m88k-gas
2597 fi
2598 ;;
2599 m88k-*-sysv4*)
2600 tm_file=m88k/sysv4.h
2601 extra_parts="crtbegin.o crtend.o"
2602 xmake_file=m88k/x-sysv4
2603 tmake_file=m88k/t-sysv4
2604 ;;
2605 mcore-*-elf)
2606 tm_file=mcore/mcore-elf.h
2607 tmake_file=mcore/t-mcore
2608 ;;
2609 mcore-*-pe*)
2610 tm_file=mcore/mcore-pe.h
2611 tmake_file=mcore/t-mcore-pe
2612 ;;
2613 mips-sgi-irix6*) # SGI System V.4., IRIX 6
2614 if test "x$gnu_ld" = xyes
2615 then
2616 tm_file="mips/iris6.h mips/iris6gld.h"
2617 else
2618 tm_file=mips/iris6.h
2619 fi
2620 tmake_file=mips/t-iris6
2621 xm_file=mips/xm-iris6.h
2622 xmake_file=mips/x-iris6
2623 # if test x$enable_threads = xyes; then
2624 # thread_file='irix'
2625 # fi
2626 ;;
2627 mips-wrs-vxworks)
2628 tm_file="mips/elf.h mips/vxworks.h"
2629 tmake_file=mips/t-ecoff
2630 gas=yes
2631 gnu_ld=yes
2632 extra_parts="crtbegin.o crtend.o"
2633 thread_file='vxworks'
2634 ;;
2635 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
2636 tm_file="mips/iris6.h mips/cross64.h"
2637 xm_defines=USG
2638 xm_file="mips/xm-iris5.h"
2639 xmake_file=mips/x-iris
2640 tmake_file=mips/t-cross64
2641 # See comment in mips/iris[56].h files.
2642 use_collect2=yes
2643 # if test x$enable_threads = xyes; then
2644 # thread_file='irix'
2645 # fi
2646 ;;
2647 mips-sni-sysv4)
2648 if test x$gas = xyes
2649 then
2650 if test x$stabs = xyes
2651 then
2652 tm_file=mips/iris5gdb.h
2653 else
2654 tm_file="mips/sni-svr4.h mips/sni-gas.h"
2655 fi
2656 else
2657 tm_file=mips/sni-svr4.h
2658 fi
2659 xm_defines=USG
2660 xmake_file=mips/x-sni-svr4
2661 tmake_file=mips/t-mips-gas
2662 if test x$gnu_ld != xyes
2663 then
2664 use_collect2=yes
2665 fi
2666 ;;
2667 mips-sgi-irix5*) # SGI System V.4., IRIX 5
2668 if test x$gas = xyes
2669 then
2670 tm_file="mips/iris5.h mips/iris5gas.h"
2671 if test x$stabs = xyes
2672 then
2673 tm_file="${tm_file} dbx.h"
2674 fi
2675 else
2676 tm_file=mips/iris5.h
2677 fi
2678 xm_defines=USG
2679 xm_file="mips/xm-iris5.h"
2680 xmake_file=mips/x-iris
2681 # mips-tfile doesn't work yet
2682 tmake_file=mips/t-mips-gas
2683 # See comment in mips/iris5.h file.
2684 use_collect2=yes
2685 # if test x$enable_threads = xyes; then
2686 # thread_file='irix'
2687 # fi
2688 ;;
2689 mips-sgi-irix4loser*) # Mostly like a MIPS.
2690 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
2691 if test x$stabs = xyes; then
2692 tm_file="${tm_file} dbx.h"
2693 fi
2694 xm_defines=USG
2695 xmake_file=mips/x-iris
2696 if test x$gas = xyes
2697 then
2698 tmake_file=mips/t-mips-gas
2699 else
2700 extra_passes="mips-tfile mips-tdump"
2701 fi
2702 if test x$gnu_ld != xyes
2703 then
2704 use_collect2=yes
2705 fi
2706 # if test x$enable_threads = xyes; then
2707 # thread_file='irix'
2708 # fi
2709 ;;
2710 mips-sgi-irix4*) # Mostly like a MIPS.
2711 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
2712 if test x$stabs = xyes; then
2713 tm_file="${tm_file} dbx.h"
2714 fi
2715 xm_defines=USG
2716 xmake_file=mips/x-iris
2717 if test x$gas = xyes
2718 then
2719 tmake_file=mips/t-mips-gas
2720 else
2721 extra_passes="mips-tfile mips-tdump"
2722 fi
2723 if test x$gnu_ld != xyes
2724 then
2725 use_collect2=yes
2726 fi
2727 # if test x$enable_threads = xyes; then
2728 # thread_file='irix'
2729 # fi
2730 ;;
2731 mips-sgi-*) # Mostly like a MIPS.
2732 tm_file="mips/iris3.h ${tm_file}"
2733 if test x$stabs = xyes; then
2734 tm_file="${tm_file} dbx.h"
2735 fi
2736 xm_defines=USG
2737 xmake_file=mips/x-iris3
2738 if test x$gas = xyes
2739 then
2740 tmake_file=mips/t-mips-gas
2741 else
2742 extra_passes="mips-tfile mips-tdump"
2743 fi
2744 if test x$gnu_ld != xyes
2745 then
2746 use_collect2=yes
2747 fi
2748 ;;
2749 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
2750 tm_file="mips/osfrose.h ${tm_file}"
2751 xmake_file=mips/x-osfrose
2752 tmake_file=mips/t-osfrose
2753 extra_objs=halfpic.o
2754 use_collect2=yes
2755 ;;
2756 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
2757 tm_file=mips/dec-osf1.h
2758 if test x$stabs = xyes; then
2759 tm_file="${tm_file} dbx.h"
2760 fi
2761 xmake_file=mips/x-dec-osf1
2762 if test x$gas = xyes
2763 then
2764 tmake_file=mips/t-mips-gas
2765 else
2766 tmake_file=mips/t-ultrix
2767 extra_passes="mips-tfile mips-tdump"
2768 fi
2769 if test x$gnu_ld != xyes
2770 then
2771 use_collect2=yes
2772 fi
2773 ;;
2774 mips-dec-bsd*) # Decstation running 4.4 BSD
2775 tm_file=mips/dec-bsd.h
2776 if test x$gas = xyes
2777 then
2778 tmake_file=mips/t-mips-gas
2779 else
2780 tmake_file=mips/t-ultrix
2781 extra_passes="mips-tfile mips-tdump"
2782 fi
2783 if test x$gnu_ld != xyes
2784 then
2785 use_collect2=yes
2786 fi
2787 ;;
2788 mipsel-*-netbsd* | mips-dec-netbsd*) # Decstation running NetBSD
2789 tm_file=mips/netbsd.h
2790 # On NetBSD, the headers are already okay, except for math.h.
2791 tmake_file=t-netbsd
2792 ;;
2793 mips*-*-linux*) # Linux MIPS, either endian.
2794 xmake_file=x-linux
2795 case $machine in
2796 mips*el-*) tm_file="mips/elfl.h mips/linux.h" ;;
2797 *) tm_file="mips/elf.h mips/linux.h" ;;
2798 esac
2799 tmake_file=t-linux
2800 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2801 gnu_ld=yes
2802 gas=yes
2803 if test x$enable_threads = xyes; then
2804 thread_file='posix'
2805 fi
2806 ;;
2807 mips*el-*-openbsd*) # mips little endian
2808 target_cpu_default="MASK_GAS|MASK_ABICALLS"
2809 ;;
2810 mips*-*-openbsd*) # mips big endian
2811 target_cpu_default="MASK_GAS|MASK_ABICALLS"
2812 tm_file="mips/openbsd-be.h ${tm_file}"
2813 ;;
2814 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
2815 tm_file="mips/news4.h ${tm_file}"
2816 if test x$stabs = xyes; then
2817 tm_file="${tm_file} dbx.h"
2818 fi
2819 if test x$gas = xyes
2820 then
2821 tmake_file=mips/t-mips-gas
2822 else
2823 extra_passes="mips-tfile mips-tdump"
2824 fi
2825 if test x$gnu_ld != xyes
2826 then
2827 use_collect2=yes
2828 fi
2829 xmake_file=mips/x-sony
2830 ;;
2831 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
2832 # That is based on svr4.
2833 # t-svr4 is not right because this system doesn't use ELF.
2834 tm_file="mips/news5.h ${tm_file}"
2835 if test x$stabs = xyes; then
2836 tm_file="${tm_file} dbx.h"
2837 fi
2838 xm_defines=USG
2839 if test x$gas = xyes
2840 then
2841 tmake_file=mips/t-mips-gas
2842 else
2843 extra_passes="mips-tfile mips-tdump"
2844 fi
2845 if test x$gnu_ld != xyes
2846 then
2847 use_collect2=yes
2848 fi
2849 ;;
2850 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
2851 tm_file="mips/svr4-5.h mips/svr4-t.h"
2852 if test x$stabs = xyes; then
2853 tm_file="${tm_file} dbx.h"
2854 fi
2855 xm_defines=USG
2856 xmake_file=mips/x-sysv
2857 if test x$gas = xyes
2858 then
2859 tmake_file=mips/t-mips-gas
2860 extra_parts="crtbegin.o crtend.o"
2861 else
2862 tmake_file=mips/t-mips
2863 extra_passes="mips-tfile mips-tdump"
2864 fi
2865 if test x$gnu_ld != xyes
2866 then
2867 use_collect2=yes
2868 fi
2869 ;;
2870 mips-*-ultrix* | mips-dec-mach3) # Decstation.
2871 tm_file="mips/ultrix.h ${tm_file}"
2872 if test x$stabs = xyes; then
2873 tm_file="${tm_file} dbx.h"
2874 fi
2875 xmake_file=mips/x-ultrix
2876 if test x$gas = xyes
2877 then
2878 tmake_file=mips/t-mips-gas
2879 else
2880 tmake_file=mips/t-ultrix
2881 extra_passes="mips-tfile mips-tdump"
2882 fi
2883 if test x$gnu_ld != xyes
2884 then
2885 use_collect2=yes
2886 fi
2887 ;;
2888 changequote(,)dnl
2889 mips-*-riscos[56789]bsd*)
2890 changequote([,])dnl
2891 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
2892 if test x$stabs = xyes; then
2893 tm_file="${tm_file} dbx.h"
2894 fi
2895 if test x$gas = xyes
2896 then
2897 tmake_file=mips/t-bsd-gas
2898 else
2899 tmake_file=mips/t-bsd
2900 extra_passes="mips-tfile mips-tdump"
2901 fi
2902 if test x$gnu_ld != xyes
2903 then
2904 use_collect2=yes
2905 fi
2906 ;;
2907 changequote(,)dnl
2908 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
2909 changequote([,])dnl
2910 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
2911 if test x$stabs = xyes; then
2912 tm_file="${tm_file} dbx.h"
2913 fi
2914 if test x$gas = xyes
2915 then
2916 tmake_file=mips/t-bsd-gas
2917 else
2918 tmake_file=mips/t-bsd
2919 extra_passes="mips-tfile mips-tdump"
2920 fi
2921 if test x$gnu_ld != xyes
2922 then
2923 use_collect2=yes
2924 fi
2925 ;;
2926 changequote(,)dnl
2927 mips-*-riscos[56789]sysv4*)
2928 changequote([,])dnl
2929 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
2930 if test x$stabs = xyes; then
2931 tm_file="${tm_file} dbx.h"
2932 fi
2933 xmake_file=mips/x-sysv
2934 if test x$gas = xyes
2935 then
2936 tmake_file=mips/t-svr4-gas
2937 else
2938 tmake_file=mips/t-svr4
2939 extra_passes="mips-tfile mips-tdump"
2940 fi
2941 if test x$gnu_ld != xyes
2942 then
2943 use_collect2=yes
2944 fi
2945 ;;
2946 changequote(,)dnl
2947 mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
2948 changequote([,])dnl
2949 tm_file="mips/svr4-4.h ${tm_file}"
2950 if test x$stabs = xyes; then
2951 tm_file="${tm_file} dbx.h"
2952 fi
2953 xm_defines=USG
2954 xmake_file=mips/x-sysv
2955 if test x$gas = xyes
2956 then
2957 tmake_file=mips/t-svr4-gas
2958 else
2959 tmake_file=mips/t-svr4
2960 extra_passes="mips-tfile mips-tdump"
2961 fi
2962 if test x$gnu_ld != xyes
2963 then
2964 use_collect2=yes
2965 fi
2966 ;;
2967 changequote(,)dnl
2968 mips-*-riscos[56789]sysv*)
2969 changequote([,])dnl
2970 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
2971 if test x$stabs = xyes; then
2972 tm_file="${tm_file} dbx.h"
2973 fi
2974 xm_defines=USG
2975 xmake_file=mips/x-sysv
2976 if test x$gas = xyes
2977 then
2978 tmake_file=mips/t-svr3-gas
2979 else
2980 tmake_file=mips/t-svr3
2981 extra_passes="mips-tfile mips-tdump"
2982 fi
2983 if test x$gnu_ld != xyes
2984 then
2985 use_collect2=yes
2986 fi
2987 ;;
2988 mips-*-sysv* | mips-*-riscos*sysv*)
2989 tm_file="mips/svr3-4.h ${tm_file}"
2990 if test x$stabs = xyes; then
2991 tm_file="${tm_file} dbx.h"
2992 fi
2993 xm_defines=USG
2994 xmake_file=mips/x-sysv
2995 if test x$gas = xyes
2996 then
2997 tmake_file=mips/t-svr3-gas
2998 else
2999 tmake_file=mips/t-svr3
3000 extra_passes="mips-tfile mips-tdump"
3001 fi
3002 if test x$gnu_ld != xyes
3003 then
3004 use_collect2=yes
3005 fi
3006 ;;
3007 changequote(,)dnl
3008 mips-*-riscos[56789]*) # Default MIPS RISC-OS 5.0.
3009 changequote([,])dnl
3010 tm_file=mips/mips-5.h
3011 if test x$stabs = xyes; then
3012 tm_file="${tm_file} dbx.h"
3013 fi
3014 if test x$gas = xyes
3015 then
3016 tmake_file=mips/t-mips-gas
3017 else
3018 extra_passes="mips-tfile mips-tdump"
3019 fi
3020 if test x$gnu_ld != xyes
3021 then
3022 use_collect2=yes
3023 fi
3024 ;;
3025 mips-*-gnu*)
3026 ;;
3027 mipsel-*-ecoff*)
3028 tm_file=mips/ecoffl.h
3029 if test x$stabs = xyes; then
3030 tm_file="${tm_file} dbx.h"
3031 fi
3032 tmake_file=mips/t-ecoff
3033 ;;
3034 mips-*-ecoff*)
3035 tm_file="gofast.h mips/ecoff.h"
3036 if test x$stabs = xyes; then
3037 tm_file="${tm_file} dbx.h"
3038 fi
3039 tmake_file=mips/t-ecoff
3040 ;;
3041 mipsel-*-elf*)
3042 tm_file="mips/elfl.h"
3043 tmake_file=mips/t-elf
3044 ;;
3045 mips-*-elf*)
3046 tm_file="mips/elf.h"
3047 tmake_file=mips/t-elf
3048 ;;
3049 mips64el-*-elf*)
3050 tm_file="mips/elfl64.h"
3051 tmake_file=mips/t-elf
3052 ;;
3053 mips64orionel-*-elf*)
3054 tm_file="mips/elforion.h mips/elfl64.h"
3055 tmake_file=mips/t-elf
3056 ;;
3057 mips64-*-elf*)
3058 tm_file="mips/elf64.h"
3059 tmake_file=mips/t-elf
3060 ;;
3061 mips64orion-*-elf*)
3062 tm_file="mips/elforion.h mips/elf64.h"
3063 tmake_file=mips/t-elf
3064 ;;
3065 mips64orion-*-rtems*)
3066 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
3067 tmake_file="mips/t-elf t-rtems"
3068 ;;
3069 mipstx39el-*-elf*)
3070 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
3071 tmake_file=mips/t-r3900
3072 ;;
3073 mipstx39-*-elf*)
3074 tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
3075 tmake_file=mips/t-r3900
3076 ;;
3077 mips-*-*) # Default MIPS RISC-OS 4.0.
3078 if test x$stabs = xyes; then
3079 tm_file="${tm_file} dbx.h"
3080 fi
3081 if test x$gas = xyes
3082 then
3083 tmake_file=mips/t-mips-gas
3084 else
3085 extra_passes="mips-tfile mips-tdump"
3086 fi
3087 if test x$gnu_ld != xyes
3088 then
3089 use_collect2=yes
3090 fi
3091 ;;
3092 mn10200-*-*)
3093 float_format=i32
3094 cpu_type=mn10200
3095 tm_file="mn10200/mn10200.h"
3096 if test x$stabs = xyes
3097 then
3098 tm_file="${tm_file} dbx.h"
3099 fi
3100 use_collect2=no
3101 ;;
3102 mn10300-*-*)
3103 cpu_type=mn10300
3104 tm_file="mn10300/mn10300.h"
3105 if test x$stabs = xyes
3106 then
3107 tm_file="${tm_file} dbx.h"
3108 fi
3109 use_collect2=no
3110 ;;
3111 ns32k-encore-bsd*)
3112 tm_file=ns32k/encore.h
3113 use_collect2=yes
3114 ;;
3115 ns32k-sequent-bsd*)
3116 tm_file=ns32k/sequent.h
3117 use_collect2=yes
3118 ;;
3119 ns32k-tek6100-bsd*)
3120 tm_file=ns32k/tek6100.h
3121 use_collect2=yes
3122 ;;
3123 ns32k-tek6200-bsd*)
3124 tm_file=ns32k/tek6200.h
3125 use_collect2=yes
3126 ;;
3127 ns32k-merlin-*)
3128 tm_file=ns32k/merlin.h
3129 use_collect2=yes
3130 ;;
3131 ns32k-pc532-mach*)
3132 tm_file=ns32k/pc532-mach.h
3133 use_collect2=yes
3134 ;;
3135 ns32k-pc532-minix*)
3136 tm_file=ns32k/pc532-min.h
3137 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
3138 xm_defines=USG
3139 use_collect2=yes
3140 ;;
3141 ns32k-*-netbsd*)
3142 tm_file=ns32k/netbsd.h
3143 xm_file="ns32k/xm-netbsd.h ${xm_file}"
3144 # On NetBSD, the headers are already okay, except for math.h.
3145 tmake_file=t-netbsd
3146 use_collect2=yes
3147 ;;
3148 pdp11-*-bsd)
3149 tm_file="${tm_file} pdp11/2bsd.h"
3150 ;;
3151 pdp11-*-*)
3152 ;;
3153 avr-*-*)
3154 ;;
3155 ns32k-*-openbsd*)
3156 # Nothing special
3157 ;;
3158 pj*-linux*)
3159 tm_file="svr4.h pj/linux.h ${tm_file}"
3160 ;;
3161 pj-*)
3162 ;;
3163 pjl-*)
3164 tm_file="svr4.h pj/pjl.h ${tm_file}"
3165 ;;
3166
3167 romp-*-aos*)
3168 use_collect2=yes
3169 ;;
3170 romp-*-mach*)
3171 xmake_file=romp/x-mach
3172 use_collect2=yes
3173 ;;
3174 romp-*-openbsd*)
3175 # Nothing special
3176 ;;
3177 powerpc-*-openbsd*)
3178 tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
3179 ;;
3180 powerpc-*-beos*)
3181 cpu_type=rs6000
3182 tm_file=rs6000/beos.h
3183 xm_file=rs6000/xm-beos.h
3184 tmake_file=rs6000/t-beos
3185 xmake_file=rs6000/x-beos
3186 ;;
3187 powerpc-*-sysv*)
3188 tm_file=rs6000/sysv4.h
3189 xm_file="rs6000/xm-sysv4.h"
3190 xm_defines="USG POSIX"
3191 extra_headers=ppc-asm.h
3192 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3193 xmake_file=rs6000/x-sysv4
3194 ;;
3195 powerpc-*-eabiaix*)
3196 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
3197 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3198 extra_headers=ppc-asm.h
3199 ;;
3200 powerpc-*-eabisim*)
3201 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
3202 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3203 extra_headers=ppc-asm.h
3204 ;;
3205 powerpc-*-elf*)
3206 tm_file="rs6000/sysv4.h"
3207 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3208 extra_headers=ppc-asm.h
3209 ;;
3210 powerpc-*-eabi*)
3211 tm_file="rs6000/sysv4.h rs6000/eabi.h"
3212 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3213 extra_headers=ppc-asm.h
3214 ;;
3215 powerpc-*-rtems*)
3216 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h"
3217 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
3218 extra_headers=ppc-asm.h
3219 ;;
3220 powerpc-*-linux*libc1)
3221 tm_file="rs6000/sysv4.h rs6000/linux.h"
3222 xm_file=rs6000/xm-sysv4.h
3223 out_file=rs6000/rs6000.c
3224 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
3225 xmake_file=x-linux
3226 extra_headers=ppc-asm.h
3227 if test x$enable_threads = xyes; then
3228 thread_file='posix'
3229 fi
3230 ;;
3231 powerpc-*-linux*)
3232 tm_file="rs6000/sysv4.h rs6000/linux.h"
3233 xm_file="rs6000/xm-sysv4.h"
3234 xm_defines="USG ${xm_defines}"
3235 out_file=rs6000/rs6000.c
3236 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
3237 xmake_file=x-linux
3238 extra_headers=ppc-asm.h
3239 if test x$enable_threads = xyes; then
3240 thread_file='posix'
3241 fi
3242 ;;
3243 powerpc-wrs-vxworks*)
3244 cpu_type=rs6000
3245 xm_file="rs6000/xm-sysv4.h"
3246 xm_defines="USG POSIX"
3247 tm_file="rs6000/sysv4.h rs6000/vxppc.h"
3248 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3249 extra_headers=ppc-asm.h
3250 thread_file='vxworks'
3251 ;;
3252 powerpcle-wrs-vxworks*)
3253 cpu_type=rs6000
3254 xm_file="rs6000/xm-sysv4.h"
3255 xm_defines="USG POSIX"
3256 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h"
3257 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3258 extra_headers=ppc-asm.h
3259 thread_file='vxworks'
3260 ;;
3261 powerpcle-*-sysv*)
3262 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
3263 xm_file="rs6000/xm-sysv4.h"
3264 xm_defines="USG POSIX"
3265 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3266 xmake_file=rs6000/x-sysv4
3267 extra_headers=ppc-asm.h
3268 ;;
3269 powerpcle-*-elf*)
3270 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
3271 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3272 extra_headers=ppc-asm.h
3273 ;;
3274 powerpcle-*-eabisim*)
3275 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
3276 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3277 extra_headers=ppc-asm.h
3278 ;;
3279 powerpcle-*-eabi*)
3280 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
3281 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3282 extra_headers=ppc-asm.h
3283 ;;
3284 powerpcle-*-solaris2*)
3285 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/sol2.h"
3286 xm_file="rs6000/xm-sysv4.h"
3287 xm_defines="USG POSIX"
3288 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3289 xmake_file=rs6000/x-sysv4
3290 extra_headers=ppc-asm.h
3291 ;;
3292 changequote(,)dnl
3293 rs6000-ibm-aix3.[01]*)
3294 changequote([,])dnl
3295 tm_file=rs6000/aix31.h
3296 xmake_file=rs6000/x-aix31
3297 float_format=none
3298 use_collect2=yes
3299 ;;
3300 changequote(,)dnl
3301 rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
3302 changequote([,])dnl
3303 tm_file=rs6000/aix3newas.h
3304 if test x$host != x$target
3305 then
3306 tmake_file=rs6000/t-xnewas
3307 else
3308 tmake_file=rs6000/t-newas
3309 fi
3310 float_format=none
3311 use_collect2=yes
3312 ;;
3313 changequote(,)dnl
3314 rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
3315 changequote([,])dnl
3316 tm_file=rs6000/aix41.h
3317 if test x$host != x$target
3318 then
3319 tmake_file=rs6000/t-xnewas
3320 else
3321 tmake_file=rs6000/t-newas
3322 fi
3323 if test "$gnu_ld" = yes
3324 then
3325 xmake_file=rs6000/x-aix41-gld
3326 else
3327 tmake_file='rs6000/t-newas'
3328 fi
3329 xmake_file=rs6000/x-aix41
3330 float_format=none
3331 use_collect2=yes
3332 ;;
3333 changequote(,)dnl
3334 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
3335 changequote([,])dnl
3336 tm_file=rs6000/aix43.h
3337 tmake_file=rs6000/t-aix43
3338 xmake_file=rs6000/x-aix41
3339 float_format=none
3340 use_collect2=yes
3341 thread_file='aix'
3342 ;;
3343 changequote(,)dnl
3344 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
3345 changequote([,])dnl
3346 tm_file=rs6000/aix43.h
3347 tmake_file=rs6000/t-aix43
3348 xmake_file=rs6000/x-aix41
3349 float_format=none
3350 use_collect2=yes
3351 thread_file='aix'
3352 ;;
3353 rs6000-ibm-aix*)
3354 float_format=none
3355 use_collect2=yes
3356 ;;
3357 rs6000-bull-bosx)
3358 float_format=none
3359 use_collect2=yes
3360 ;;
3361 rs6000-*-mach*)
3362 tm_file=rs6000/mach.h
3363 xm_file="${xm_file} rs6000/xm-mach.h"
3364 xmake_file=rs6000/x-mach
3365 use_collect2=yes
3366 ;;
3367 rs6000-*-lynxos*)
3368 tm_file=rs6000/lynx.h
3369 xm_file=rs6000/xm-lynx.h
3370 tmake_file=rs6000/t-rs6000
3371 xmake_file=rs6000/x-lynx
3372 use_collect2=yes
3373 ;;
3374 sh-*-elf*)
3375 tmake_file="sh/t-sh sh/t-elf"
3376 tm_file="sh/sh.h sh/elf.h"
3377 float_format=sh
3378 ;;
3379 sh-*-rtemself*)
3380 tmake_file="sh/t-sh sh/t-elf t-rtems"
3381 tm_file="sh/sh.h sh/elf.h sh/rtemself.h"
3382 float_format=sh
3383 ;;
3384 sh-*-rtems*)
3385 tmake_file="sh/t-sh t-rtems"
3386 tm_file="sh/sh.h sh/rtems.h"
3387 float_format=sh
3388 ;;
3389 sh-*-linux*)
3390 tm_file="sh/sh.h sh/elf.h sh/linux.h"
3391 tmake_file="sh/t-sh sh/t-elf sh/t-linux"
3392 xmake_file=x-linux
3393 gas=yes gnu_ld=yes
3394 if test x$enable_threads = xyes; then
3395 thread_file='posix'
3396 fi
3397 float_format=sh
3398 ;;
3399 sh-*-*)
3400 float_format=sh
3401 ;;
3402 sparc-tti-*)
3403 tm_file=sparc/pbd.h
3404 xm_file="xm-alloca.h ${xm_file}"
3405 xm_defines=USG
3406 ;;
3407 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
3408 tm_file=sparc/vxsparc.h
3409 tmake_file=sparc/t-vxsparc
3410 use_collect2=yes
3411 thread_file='vxworks'
3412 ;;
3413 sparc-*-aout*)
3414 tmake_file=sparc/t-sparcbare
3415 tm_file="sparc/aout.h libgloss.h"
3416 ;;
3417 sparc-*-netbsd*)
3418 tm_file=sparc/netbsd.h
3419 tmake_file=t-netbsd
3420 use_collect2=yes
3421 ;;
3422 sparc-*-openbsd*)
3423 # we need collect2 until our bug is fixed...
3424 use_collect2=yes
3425 ;;
3426 sparc-*-bsd*)
3427 tm_file=sparc/bsd.h
3428 ;;
3429 sparc-*-elf*)
3430 tm_file=sparc/elf.h
3431 tmake_file=sparc/t-elf
3432 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3433 #float_format=i128
3434 float_format=i64
3435 ;;
3436 sparc-*-linux*aout*) # Sparc's running GNU/Linux, a.out
3437 xm_file="${xm_file} sparc/xm-linux.h"
3438 tm_file=sparc/linux-aout.h
3439 xmake_file=x-linux
3440 gnu_ld=yes
3441 ;;
3442 sparc-*-linux*libc1*) # Sparc's running GNU/Linux, libc5
3443 xm_file="${xm_file} sparc/xm-linux.h"
3444 xmake_file=x-linux
3445 tm_file=sparc/linux.h
3446 tmake_file="t-linux t-linux-gnulibc1"
3447 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3448 gnu_ld=yes
3449 float_format=sparc
3450 ;;
3451 sparc-*-linux*) # Sparc's running GNU/Linux, libc6
3452 xm_file="${xm_file} sparc/xm-linux.h"
3453 xmake_file=x-linux
3454 tm_file=sparc/linux.h
3455 tmake_file="t-linux"
3456 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3457 gnu_ld=yes
3458 if test x$enable_threads = xyes; then
3459 thread_file='posix'
3460 fi
3461 float_format=sparc
3462 ;;
3463 sparc-*-lynxos*)
3464 if test x$gas = xyes
3465 then
3466 tm_file=sparc/lynx.h
3467 else
3468 tm_file=sparc/lynx-ng.h
3469 fi
3470 xm_file=sparc/xm-lynx.h
3471 tmake_file=sparc/t-sunos41
3472 xmake_file=x-lynx
3473 ;;
3474 sparc-*-rtemsaout*)
3475 tmake_file="sparc/t-sparcbare t-rtems"
3476 tm_file=sparc/rtems.h
3477 ;;
3478 sparc-*-rtems*|sparc-*-rtemself*)
3479 tm_file="sparc/rtemself.h"
3480 tmake_file="sparc/t-elf t-rtems"
3481 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3482 #float_format=i128
3483 float_format=i64
3484 ;;
3485 sparcv9-*-solaris2*)
3486 if test x$gnu_ld = xyes
3487 then
3488 tm_file=sparc/sol2-64.h
3489 else
3490 tm_file=sparc/sol2-sld-64.h
3491 fi
3492 xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
3493 xm_defines="USG POSIX"
3494 tmake_file="sparc/t-sol2 sparc/t-sol2-64"
3495 if test x$gnu_ld = xyes; then
3496 tmake_file="$tmake_file sparc/t-slibgcc"
3497 else
3498 tmake_file="$tmake_file sparc/t-slibgcc-sld"
3499 fi
3500 xmake_file=sparc/x-sysv4
3501 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
3502 float_format=none
3503 if test x${enable_threads} = x ; then
3504 enable_threads=$have_pthread_h
3505 if test x${enable_threads} = x ; then
3506 enable_threads=$have_thread_h
3507 fi
3508 fi
3509 if test x${enable_threads} = xyes ; then
3510 if test x${have_pthread_h} = xyes ; then
3511 thread_file='posix'
3512 else
3513 thread_file='solaris'
3514 fi
3515 fi
3516 ;;
3517 sparc-hal-solaris2*)
3518 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
3519 xm_defines="USG POSIX"
3520 tm_file="sparc/sol2.h sparc/hal.h"
3521 tmake_file="sparc/t-halos sparc/t-sol2"
3522 if test x$gnu_ld = xyes; then
3523 tmake_file="$tmake_file sparc/t-slibgcc"
3524 else
3525 tmake_file="$tmake_file sparc/t-slibgcc-sld"
3526 fi
3527 xmake_file=sparc/x-sysv4
3528 extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
3529 case $machine in
3530 changequote(,)dnl
3531 *-*-solaris2.[0-4])
3532 changequote([,])dnl
3533 float_format=i128
3534 ;;
3535 *)
3536 float_format=none
3537 ;;
3538 esac
3539 thread_file='solaris'
3540 ;;
3541 sparc-*-solaris2*)
3542 if test x$gnu_ld = xyes
3543 then
3544 tm_file=sparc/sol2.h
3545 else
3546 tm_file=sparc/sol2-sld.h
3547 fi
3548 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
3549 xm_defines="USG POSIX"
3550 tmake_file=sparc/t-sol2
3551 if test x$gnu_ld = xyes; then
3552 tmake_file="$tmake_file sparc/t-slibgcc"
3553 else
3554 tmake_file="$tmake_file sparc/t-slibgcc-sld"
3555 fi
3556 xmake_file=sparc/x-sysv4
3557 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
3558 # At the moment, 32-to-64 cross compilation doesn't work.
3559 # case $machine in
3560 #changequote(,)dnl
3561 # *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
3562 #changequote([,])dnl
3563 # *-*-solaris2*)
3564 # if test x$gnu_ld = xyes
3565 # then
3566 # tm_file=sparc/sol2-64.h
3567 # else
3568 # tm_file=sparc/sol2-sld-64.h
3569 # fi
3570 # tmake_file="$tmake_file sparc/t-sol2-64"
3571 # ;;
3572 # esac
3573 case $machine in
3574 changequote(,)dnl
3575 *-*-solaris2.[0-4])
3576 changequote([,])dnl
3577 float_format=i128
3578 ;;
3579 *)
3580 float_format=none
3581 ;;
3582 esac
3583 if test x${enable_threads} = x; then
3584 enable_threads=$have_pthread_h
3585 if test x${enable_threads} = x; then
3586 enable_threads=$have_thread_h
3587 fi
3588 fi
3589 if test x${enable_threads} = xyes; then
3590 if test x${have_pthread_h} = xyes; then
3591 thread_file='posix'
3592 else
3593 thread_file='solaris'
3594 fi
3595 fi
3596 ;;
3597 sparc-*-sunos4.0*)
3598 tm_file=sparc/sunos4.h
3599 tmake_file=sparc/t-sunos40
3600 use_collect2=yes
3601 ;;
3602 sparc-*-sunos4*)
3603 tm_file=sparc/sunos4.h
3604 tmake_file=sparc/t-sunos41
3605 use_collect2=yes
3606 if test x$gas = xyes; then
3607 tm_file="${tm_file} sparc/sun4gas.h"
3608 fi
3609 ;;
3610 sparc-*-sunos3*)
3611 tm_file=sparc/sun4o3.h
3612 use_collect2=yes
3613 ;;
3614 sparc-*-sysv4*)
3615 tm_file=sparc/sysv4.h
3616 xm_file="sparc/xm-sysv4.h"
3617 xm_defines="USG POSIX"
3618 tmake_file=t-svr4
3619 xmake_file=sparc/x-sysv4
3620 extra_parts="crtbegin.o crtend.o"
3621 ;;
3622 sparc-*-vxsim*)
3623 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
3624 xm_defines="USG POSIX"
3625 tm_file=sparc/vxsim.h
3626 tmake_file=sparc/t-vxsparc
3627 xmake_file=sparc/x-sysv4
3628 ;;
3629 sparclet-*-aout*)
3630 tm_file="sparc/splet.h libgloss.h"
3631 tmake_file=sparc/t-splet
3632 ;;
3633 sparclite-*-coff*)
3634 tm_file="sparc/litecoff.h libgloss.h"
3635 tmake_file=sparc/t-sparclite
3636 ;;
3637 sparclite-*-aout*)
3638 tm_file="sparc/lite.h aoutos.h libgloss.h"
3639 tmake_file=sparc/t-sparclite
3640 ;;
3641 sparclite-*-elf*)
3642 tm_file="sparc/liteelf.h"
3643 tmake_file=sparc/t-sparclite
3644 extra_parts="crtbegin.o crtend.o"
3645 ;;
3646 sparc86x-*-aout*)
3647 tm_file="sparc/sp86x-aout.h aoutos.h libgloss.h"
3648 tmake_file=sparc/t-sp86x
3649 ;;
3650 sparc86x-*-elf*)
3651 tm_file="sparc/sp86x-elf.h"
3652 tmake_file=sparc/t-sp86x
3653 extra_parts="crtbegin.o crtend.o"
3654 ;;
3655 sparc64-*-aout*)
3656 tmake_file=sparc/t-sp64
3657 tm_file=sparc/sp64-aout.h
3658 ;;
3659 sparc64-*-elf*)
3660 tmake_file=sparc/t-sp64
3661 tm_file=sparc/sp64-elf.h
3662 extra_parts="crtbegin.o crtend.o"
3663 ;;
3664 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
3665 tmake_file="t-linux sparc/t-linux64"
3666 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
3667 tm_file=sparc/linux64.h
3668 xmake_file=x-linux
3669 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3670 gnu_ld=yes
3671 if test x$enable_threads = xyes; then
3672 thread_file='posix'
3673 fi
3674 float_format=sparc
3675 ;;
3676 thumb*-*-*)
3677 AC_MSG_ERROR([
3678 *** The Thumb targets have been depreciated. The equivalent
3679 *** ARM based toolchain can now generated Thumb instructions
3680 *** when the -mthumb switch is given to the compiler.])
3681 ;;
3682 v850-*-rtems*)
3683 cpu_type=v850
3684 tm_file="v850/rtems.h"
3685 xm_file="v850/xm-v850.h"
3686 tmake_file="v850/t-v850 t-rtems"
3687 if test x$stabs = xyes
3688 then
3689 tm_file="${tm_file} dbx.h"
3690 fi
3691 use_collect2=no
3692 ;;
3693 v850-*-*)
3694 target_cpu_default="TARGET_CPU_generic"
3695 cpu_type=v850
3696 tm_file="v850/v850.h"
3697 xm_file="v850/xm-v850.h"
3698 tmake_file=v850/t-v850
3699 if test x$stabs = xyes
3700 then
3701 tm_file="${tm_file} dbx.h"
3702 fi
3703 use_collect2=no
3704 ;;
3705 vax-*-bsd*) # vaxen running BSD
3706 use_collect2=yes
3707 float_format=vax
3708 ;;
3709 vax-*-sysv*) # vaxen running system V
3710 tm_file="${tm_file} vax/vaxv.h"
3711 xm_defines=USG
3712 float_format=vax
3713 ;;
3714 vax-*-netbsd*)
3715 tm_file="${tm_file} netbsd.h vax/netbsd.h"
3716 tmake_file=t-netbsd
3717 float_format=vax
3718 use_collect2=yes
3719 ;;
3720 vax-*-openbsd*)
3721 tmake_file="${tmake_file} vax/t-openbsd"
3722 tm_file="vax/vax.h vax/openbsd1.h openbsd.h ${tm_file}"
3723 xm_file="xm-openbsd.h vax/xm-vax.h"
3724 float_format=vax
3725 use_collect2=yes
3726 ;;
3727 vax-*-ultrix*) # vaxen running ultrix
3728 tm_file="${tm_file} vax/ultrix.h"
3729 float_format=vax
3730 ;;
3731 vax-*-vms*) # vaxen running VMS
3732 xm_file=vax/xm-vms.h
3733 tm_file=vax/vms.h
3734 float_format=vax
3735 ;;
3736 vax-*-*) # vax default entry
3737 float_format=vax
3738 ;;
3739 we32k-att-sysv*)
3740 xm_file="${xm_file} xm-svr3"
3741 use_collect2=yes
3742 ;;
3743 *)
3744 echo "Configuration $machine not supported" 1>&2
3745 exit 1
3746 ;;
3747 esac
3748
3749 case $machine in
3750 *-*-linux*)
3751 ;; # Existing GNU/Linux systems do not use the GNU setup.
3752 *-*-gnu*)
3753 # On the GNU system, the setup is just about the same on
3754 # each different CPU. The specific machines that GNU
3755 # supports are matched above and just set $cpu_type.
3756 xm_file="xm-gnu.h ${xm_file}"
3757 tm_file=${cpu_type}/gnu.h
3758 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
3759 # GNU always uses ELF.
3760 elf=yes
3761 # GNU tools are the only tools.
3762 gnu_ld=yes
3763 gas=yes
3764 xmake_file=x-linux # These details are the same as Linux.
3765 tmake_file=t-gnu # These are not.
3766 ;;
3767 *-*-sysv4*)
3768 xmake_try_sysv=x-sysv
3769 install_headers_dir=install-headers-cpio
3770 ;;
3771 *-*-sysv*)
3772 install_headers_dir=install-headers-cpio
3773 ;;
3774 esac
3775
3776 # Distinguish i[34567]86
3777 # Also, do not run mips-tfile on MIPS if using gas.
3778 # Process --with-cpu= for PowerPC/rs6000
3779 target_cpu_default2=
3780 case $machine in
3781 i486-*-*)
3782 target_cpu_default2=1
3783 ;;
3784 i586-*-*)
3785 case $target_alias in
3786 k6-*)
3787 target_cpu_default2=4
3788 ;;
3789 *)
3790 target_cpu_default2=2
3791 ;;
3792 esac
3793 ;;
3794 i686-*-* | i786-*-*)
3795 target_cpu_default2=3
3796 ;;
3797 alpha*-*-*)
3798 case $machine in
3799 changequote(,)dnl
3800 alphaev6[78]*)
3801 changequote([,])dnl
3802 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX"
3803 ;;
3804 alphaev6*)
3805 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX"
3806 ;;
3807 alphapca56*)
3808 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
3809 ;;
3810 alphaev56*)
3811 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
3812 ;;
3813 alphaev5*)
3814 target_cpu_default2="MASK_CPU_EV5"
3815 ;;
3816 esac
3817
3818 if test x$gas = xyes
3819 then
3820 if test "$target_cpu_default2" = ""
3821 then
3822 target_cpu_default2="MASK_GAS"
3823 else
3824 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
3825 fi
3826 fi
3827 ;;
3828 arm*-*-*)
3829 case "x$with_cpu" in
3830 x)
3831 # The most generic
3832 target_cpu_default2="TARGET_CPU_generic"
3833 ;;
3834
3835 # Distinguish cores, and major variants
3836 # arm7m doesn't exist, but D & I don't affect code
3837 changequote(,)dnl
3838 xarm[23678] | xarm250 | xarm[67][01]0 \
3839 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
3840 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
3841 | xstrongarm | xstrongarm110 | xstrongarm1100)
3842 changequote([,])dnl
3843 target_cpu_default2="TARGET_CPU_$with_cpu"
3844 ;;
3845
3846 xyes | xno)
3847 echo "--with-cpu must be passed a value" 1>&2
3848 exit 1
3849 ;;
3850
3851 *)
3852 if test x$pass2done = xyes
3853 then
3854 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3855 exit 1
3856 fi
3857 ;;
3858 esac
3859 ;;
3860
3861 mips*-*-ecoff* | mips*-*-elf*)
3862 if test x$gas = xyes
3863 then
3864 if test x$gnu_ld = xyes
3865 then
3866 target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR"
3867 else
3868 target_cpu_default2="MASK_GAS"
3869 fi
3870 fi
3871 ;;
3872 mips*-*-*)
3873 if test x$gas = xyes
3874 then
3875 target_cpu_default2="MASK_GAS"
3876 fi
3877 ;;
3878 powerpc*-*-* | rs6000-*-*)
3879 case "x$with_cpu" in
3880 x)
3881 ;;
3882
3883 xcommon | xpower | xpower2 | xpowerpc | xrios \
3884 | xrios1 | xrios2 | xrsc | xrsc1 \
3885 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
3886 | xec603e | x740 | x750 | x401 \
3887 | x403 | x505 | x801 | x821 | x823 | x860)
3888 target_cpu_default2="\"$with_cpu\""
3889 ;;
3890
3891 xyes | xno)
3892 echo "--with-cpu must be passed a value" 1>&2
3893 exit 1
3894 ;;
3895
3896 *)
3897 if test x$pass2done = xyes
3898 then
3899 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3900 exit 1
3901 fi
3902 ;;
3903 esac
3904 ;;
3905 sparc*-*-*)
3906 case ".$with_cpu" in
3907 .)
3908 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
3909 ;;
3910 .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9)
3911 target_cpu_default2="TARGET_CPU_$with_cpu"
3912 ;;
3913 *)
3914 if test x$pass2done = xyes
3915 then
3916 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3917 exit 1
3918 fi
3919 ;;
3920 esac
3921 ;;
3922 esac
3923
3924 if test "$target_cpu_default2" != ""
3925 then
3926 if test "$target_cpu_default" != ""
3927 then
3928 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3929 else
3930 target_cpu_default=$target_cpu_default2
3931 fi
3932 fi
3933
3934 # No need for collect2 if we have the GNU linker.
3935 # Actually, there is now; GNU ld doesn't handle the EH info or
3936 # collecting for shared libraries.
3937 #case x$gnu_ld in
3938 #xyes)
3939 # use_collect2=
3940 # ;;
3941 #esac
3942
3943 # Save data on machine being used to compile GCC in build_xm_file.
3944 # Save data on host machine in vars host_xm_file and host_xmake_file.
3945 if test x$pass1done = x
3946 then
3947 if test x"$xm_file" = x
3948 then build_xm_file=$cpu_type/xm-$cpu_type.h
3949 else build_xm_file=$xm_file
3950 fi
3951 build_xm_defines=$xm_defines
3952 build_install_headers_dir=$install_headers_dir
3953 build_exeext=$exeext
3954 pass1done=yes
3955 else
3956 if test x$pass2done = x
3957 then
3958 if test x"$xm_file" = x
3959 then host_xm_file=$cpu_type/xm-$cpu_type.h
3960 else host_xm_file=$xm_file
3961 fi
3962 host_xm_defines=$xm_defines
3963 if test x"$xmake_file" = x
3964 then xmake_file=$cpu_type/x-$cpu_type
3965 fi
3966 host_xmake_file="$xmake_file"
3967 host_truncate_target=$truncate_target
3968 host_extra_gcc_objs=$extra_gcc_objs
3969 host_extra_objs=$extra_host_objs
3970 host_exeext=$exeext
3971 pass2done=yes
3972 fi
3973 fi
3974 done
3975
3976 extra_objs="${host_extra_objs} ${extra_objs}"
3977
3978 # Default the target-machine variables that were not explicitly set.
3979 if test x"$tm_file" = x
3980 then tm_file=$cpu_type/$cpu_type.h; fi
3981
3982 if test x$extra_headers = x
3983 then extra_headers=; fi
3984
3985 if test x"$xm_file" = x
3986 then xm_file=$cpu_type/xm-$cpu_type.h; fi
3987
3988 if test x$md_file = x
3989 then md_file=$cpu_type/$cpu_type.md; fi
3990
3991 if test x$out_file = x
3992 then out_file=$cpu_type/$cpu_type.c; fi
3993
3994 if test x"$tmake_file" = x
3995 then tmake_file=$cpu_type/t-$cpu_type
3996 fi
3997
3998 if test x"$dwarf2" = xyes
3999 then tm_file="$tm_file tm-dwarf2.h"
4000 fi
4001
4002 if test x$float_format = x
4003 then float_format=i64
4004 fi
4005
4006 if test $float_format = none
4007 then float_h_file=Makefile.in
4008 else float_h_file=float-$float_format.h
4009 fi
4010
4011 # Handle cpp installation.
4012 if test x$enable_cpp != xno
4013 then
4014 tmake_file="$tmake_file t-install-cpp"
4015 fi
4016
4017 # Say what files are being used for the output code and MD file.
4018 echo "Using \`$srcdir/config/$out_file' to output insns."
4019 echo "Using \`$srcdir/config/$md_file' as machine description file."
4020
4021 count=a
4022 for f in $tm_file; do
4023 count=${count}x
4024 done
4025 if test $count = ax; then
4026 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
4027 else
4028 echo "Using the following target machine macro files:"
4029 for f in $tm_file; do
4030 echo " $srcdir/config/$f"
4031 done
4032 fi
4033
4034 count=a
4035 for f in $host_xm_file; do
4036 count=${count}x
4037 done
4038 if test $count = ax; then
4039 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
4040 else
4041 echo "Using the following host machine macro files:"
4042 for f in $host_xm_file; do
4043 echo " $srcdir/config/$f"
4044 done
4045 fi
4046
4047 if test "$host_xm_file" != "$build_xm_file"; then
4048 count=a
4049 for f in $build_xm_file; do
4050 count=${count}x
4051 done
4052 if test $count = ax; then
4053 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
4054 else
4055 echo "Using the following build machine macro files:"
4056 for f in $build_xm_file; do
4057 echo " $srcdir/config/$f"
4058 done
4059 fi
4060 fi
4061
4062 if test x$thread_file = x; then
4063 if test x$target_thread_file != x; then
4064 thread_file=$target_thread_file
4065 else
4066 thread_file='single'
4067 fi
4068 fi
4069
4070 # Set up the header files.
4071 # $links is the list of header files to create.
4072 # $vars is the list of shell variables with file names to include.
4073 # auto-host.h is the file containing items generated by autoconf and is
4074 # the first file included by config.h.
4075 null_defines=
4076 host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h"
4077
4078 # If host=build, it is correct to have hconfig include auto-host.h
4079 # as well. If host!=build, we are in error and need to do more
4080 # work to find out the build config parameters.
4081 if test x$host = x$build
4082 then
4083 build_xm_file="auto-host.h gansidecl.h ${build_xm_file} hwint.h"
4084 else
4085 # We create a subdir, then run autoconf in the subdir.
4086 # To prevent recursion we set host and build for the new
4087 # invocation of configure to the build for this invocation
4088 # of configure.
4089 tempdir=build.$$
4090 rm -rf $tempdir
4091 mkdir $tempdir
4092 cd $tempdir
4093 case ${srcdir} in
4094 /*) realsrcdir=${srcdir};;
4095 *) realsrcdir=../${srcdir};;
4096 esac
4097 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
4098 --target=$target --host=$build --build=$build
4099
4100 # We just finished tests for the build machine, so rename
4101 # the file auto-build.h in the gcc directory.
4102 mv auto-host.h ../auto-build.h
4103 cd ..
4104 rm -rf $tempdir
4105 build_xm_file="auto-build.h gansidecl.h ${build_xm_file} hwint.h"
4106 fi
4107
4108 xm_file="gansidecl.h ${xm_file}"
4109 tm_file="gansidecl.h ${tm_file}"
4110
4111 vars="host_xm_file tm_file tm_p_file xm_file build_xm_file"
4112 links="config.h tm.h tm_p.h tconfig.h hconfig.h"
4113 defines="host_xm_defines null_defines null_defines xm_defines build_xm_defines"
4114
4115 rm -f config.bak
4116 if test -f config.status; then mv -f config.status config.bak; fi
4117
4118 # Make the links.
4119 while test -n "$vars"
4120 do
4121 set $vars; var=$1; shift; vars=$*
4122 set $links; link=$1; shift; links=$*
4123 set $defines; define=$1; shift; defines=$*
4124
4125 rm -f $link
4126 # Make sure the file is created, even if it is empty.
4127 echo >$link
4128
4129 # Define TARGET_CPU_DEFAULT if the system wants one.
4130 # This substitutes for lots of *.h files.
4131 if test "$target_cpu_default" != "" -a $link = tm.h
4132 then
4133 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
4134 fi
4135
4136 for file in `eval echo '$'$var`; do
4137 case $file in
4138 auto-host.h | auto-build.h )
4139 ;;
4140 *)
4141 echo '#ifdef IN_GCC' >>$link
4142 ;;
4143 esac
4144 echo "#include \"$file\"" >>$link
4145 case $file in
4146 auto-host.h | auto-build.h )
4147 ;;
4148 *)
4149 echo '#endif' >>$link
4150 ;;
4151 esac
4152 done
4153
4154 for def in `eval echo '$'$define`; do
4155 echo "#ifndef $def" >>$link
4156 echo "#define $def" >>$link
4157 echo "#endif" >>$link
4158 done
4159 done
4160
4161 # Truncate the target if necessary
4162 if test x$host_truncate_target != x; then
4163 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4164 fi
4165
4166 # Get the version trigger filename from the toplevel
4167 if test "${with_gcc_version_trigger+set}" = set; then
4168 gcc_version_trigger=$with_gcc_version_trigger
4169 else
4170 gcc_version_trigger=${srcdir}/version.c
4171 fi
4172 changequote(,)dnl
4173 gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
4174 changequote([,])dnl
4175
4176 # Internationalization
4177 PACKAGE=gcc
4178 VERSION="$gcc_version"
4179 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",
4180 [Define to the name of the distribution.])
4181 AC_DEFINE_UNQUOTED(VERSION, "$VERSION",
4182 [Define to the version of the distribution.])
4183 AC_SUBST(PACKAGE)
4184 AC_SUBST(VERSION)
4185
4186 ALL_LINGUAS="en_GB"
4187
4188 # Enable NLS support by default
4189 AC_ARG_ENABLE(nls,
4190 [ --enable-nls use Native Language Support (default)],
4191 , enable_nls=yes)
4192
4193 # if cross compiling, disable NLS support.
4194 # It's not worth the trouble, at least for now.
4195
4196 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
4197 AC_MSG_WARN(Disabling NLS support for canadian cross compiler.)
4198 enable_nls=no
4199 fi
4200
4201 AM_GNU_GETTEXT
4202 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
4203
4204 # Windows32 Registry support for specifying GCC installation paths.
4205 AC_ARG_ENABLE(win32-registry,
4206 [ --disable-win32-registry
4207 Disable lookup of installation paths in the
4208 Registry on Windows hosts.
4209 --enable-win32-registry Enable registry lookup (default).
4210 --enable-win32-registry=KEY
4211 Use KEY instead of GCC version as the last portion
4212 of the registry key.],,)
4213
4214 AC_MSG_CHECKING(whether windows registry support is requested)
4215 if test x$enable_win32_registry != xno; then
4216 AC_DEFINE(ENABLE_WIN32_REGISTRY, 1,
4217 [Define to 1 if installation paths should be looked up in Windows32
4218 Registry. Ignored on non windows32 hosts.])
4219 AC_MSG_RESULT(yes)
4220 else
4221 AC_MSG_RESULT(no)
4222 fi
4223
4224 # Check if user specified a different registry key.
4225 case x${enable_win32_registry} in
4226 x | xyes)
4227 # default.
4228 gcc_cv_win32_registry_key="$VERSION"
4229 ;;
4230 xno)
4231 # no registry lookup.
4232 gcc_cv_win32_registry_key=''
4233 ;;
4234 *)
4235 # user-specified key.
4236 gcc_cv_win32_registry_key="$enable_win32_registry"
4237 ;;
4238 esac
4239
4240 if test x$enable_win32_registry != xno; then
4241 AC_MSG_CHECKING(registry key on windows hosts)
4242 AC_DEFINE_UNQUOTED(WIN32_REGISTRY_KEY, "$gcc_cv_win32_registry_key",
4243 [Define to be the last portion of registry key on windows hosts.])
4244 AC_MSG_RESULT($gcc_cv_win32_registry_key)
4245 fi
4246
4247 # Get an absolute path to the GCC top-level source directory
4248 holddir=`pwd`
4249 cd $srcdir
4250 topdir=`pwd`
4251 cd $holddir
4252
4253 # Conditionalize the makefile for this host machine.
4254 # Make-host contains the concatenation of all host makefile fragments
4255 # [there can be more than one]. This file is built by configure.frag.
4256 host_overrides=Make-host
4257 dep_host_xmake_file=
4258 for f in .. ${host_xmake_file}
4259 do
4260 if test -f ${srcdir}/config/$f
4261 then
4262 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
4263 fi
4264 done
4265
4266 # Conditionalize the makefile for this target machine.
4267 # Make-target contains the concatenation of all host makefile fragments
4268 # [there can be more than one]. This file is built by configure.frag.
4269 target_overrides=Make-target
4270 dep_tmake_file=
4271 for f in .. ${tmake_file}
4272 do
4273 if test -f ${srcdir}/config/$f
4274 then
4275 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
4276 fi
4277 done
4278
4279 # If the host doesn't support symlinks, modify CC in
4280 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
4281 # Otherwise, we can use "CC=$(CC)".
4282 rm -f symtest.tem
4283 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
4284 then
4285 cc_set_by_configure="\$(CC)"
4286 quoted_cc_set_by_configure="\$(CC)"
4287 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
4288 else
4289 rm -f symtest.tem
4290 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
4291 then
4292 symbolic_link="cp -p"
4293 else
4294 symbolic_link="cp"
4295 fi
4296 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
4297 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
4298 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
4299 fi
4300 rm -f symtest.tem
4301
4302 out_object_file=`basename $out_file .c`.o
4303
4304 tm_file_list=
4305 for f in $tm_file; do
4306 case $f in
4307 gansidecl.h )
4308 tm_file_list="${tm_file_list} $f" ;;
4309 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
4310 esac
4311 done
4312
4313 host_xm_file_list=
4314 for f in $host_xm_file; do
4315 case $f in
4316 auto-host.h | gansidecl.h | hwint.h )
4317 host_xm_file_list="${host_xm_file_list} $f" ;;
4318 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
4319 esac
4320 done
4321
4322 build_xm_file_list=
4323 for f in $build_xm_file; do
4324 case $f in
4325 auto-build.h | auto-host.h | gansidecl.h | hwint.h )
4326 build_xm_file_list="${build_xm_file_list} $f" ;;
4327 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
4328 esac
4329 done
4330
4331 # Define macro CROSS_COMPILE in compilation
4332 # if this is a cross-compiler.
4333 # Also use all.cross instead of all.internal
4334 # and add cross-make to Makefile.
4335 cross_overrides="/dev/null"
4336 if test x$host != x$target
4337 then
4338 cross_defines="CROSS=-DCROSS_COMPILE"
4339 cross_overrides="${topdir}/cross-make"
4340 fi
4341
4342 # If this is a cross-compiler that does not
4343 # have its own set of headers then define
4344 # inhibit_libc
4345
4346 # If this is using newlib, then define inhibit_libc in
4347 # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
4348 # libgcc.a, but that's OK because newlib should have its own version of
4349 # assert.h.
4350 inhibit_libc=
4351 if [test x$host != x$target] && [test x$with_headers = x]; then
4352 inhibit_libc=-Dinhibit_libc
4353 else
4354 if [test x$with_newlib = xyes]; then
4355 inhibit_libc=-Dinhibit_libc
4356 fi
4357 fi
4358 AC_SUBST(inhibit_libc)
4359
4360 # When building gcc with a cross-compiler, we need to fix a few things.
4361 # This must come after cross-make as we want all.build to override
4362 # all.cross.
4363 build_overrides="/dev/null"
4364 if test x$build != x$host
4365 then
4366 build_overrides="${topdir}/build-make"
4367 fi
4368
4369 # Expand extra_headers to include complete path.
4370 # This substitutes for lots of t-* files.
4371 extra_headers_list=
4372 if test "x$extra_headers" = x
4373 then true
4374 else
4375 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
4376 for file in $extra_headers;
4377 do
4378 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
4379 done
4380 fi
4381
4382 if test x$use_collect2 = xno; then
4383 use_collect2=
4384 fi
4385
4386 # Add a definition of USE_COLLECT2 if system wants one.
4387 # Also tell toplev.c what to do.
4388 # This substitutes for lots of t-* files.
4389 if test x$use_collect2 = x
4390 then
4391 will_use_collect2=
4392 maybe_use_collect2=
4393 else
4394 will_use_collect2="collect2"
4395 maybe_use_collect2="-DUSE_COLLECT2"
4396 fi
4397
4398 # NEED TO CONVERT
4399 # Set MD_DEPS if the real md file is in md.pre-cpp.
4400 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
4401 # for line oriented comments, so we must always use a GNU cpp. If
4402 # building gcc with a cross compiler, use the cross compiler just
4403 # built. Otherwise, we can use the cpp just built.
4404 md_file_sub=
4405 if test "x$md_cppflags" = x
4406 then
4407 md_file_sub=$srcdir/config/$md_file
4408 else
4409 md_file=md
4410 fi
4411
4412 # If we have gas in the build tree, make a link to it.
4413 if test -f ../gas/Makefile; then
4414 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
4415 fi
4416
4417 # If we have nm in the build tree, make a link to it.
4418 if test -f ../binutils/Makefile; then
4419 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
4420 fi
4421
4422 # If we have ld in the build tree, make a link to it.
4423 if test -f ../ld/Makefile; then
4424 # if test x$use_collect2 = x; then
4425 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
4426 # else
4427 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
4428 # fi
4429 fi
4430
4431 # Figure out what assembler we will be using.
4432 AC_MSG_CHECKING(what assembler to use)
4433 gcc_cv_as=
4434 gcc_cv_gas_major_version=
4435 gcc_cv_gas_minor_version=
4436 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
4437 if test -x "$DEFAULT_ASSEMBLER"; then
4438 gcc_cv_as="$DEFAULT_ASSEMBLER"
4439 elif test -x "$AS"; then
4440 gcc_cv_as="$AS"
4441 elif test -x as$host_exeext; then
4442 # Build using assembler in the current directory.
4443 gcc_cv_as=./as$host_exeext
4444 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
4445 # Single tree build which includes gas.
4446 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
4447 do
4448 changequote(,)dnl
4449 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
4450 changequote([,])dnl
4451 if test x$gcc_cv_gas_version != x; then
4452 break
4453 fi
4454 done
4455 changequote(,)dnl
4456 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
4457 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
4458 changequote([,])dnl
4459 fi
4460
4461 if test "x$gcc_cv_as" = x -a x$host = x$target; then
4462 # Native build.
4463 # Search the same directories that the installed compiler will
4464 # search. Else we may find the wrong assembler and lose. If we
4465 # do not find a suitable assembler binary, then try the user's
4466 # path.
4467 #
4468 # Also note we have to check MD_EXEC_PREFIX before checking the
4469 # user's path. Unfortunately, there is no good way to get at the
4470 # value of MD_EXEC_PREFIX here. So we do a brute force search
4471 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
4472 # to be fixed as part of the make/configure rewrite too.
4473
4474 if test "x$exec_prefix" = xNONE; then
4475 if test "x$prefix" = xNONE; then
4476 test_prefix=/usr/local
4477 else
4478 test_prefix=$prefix
4479 fi
4480 else
4481 test_prefix=$exec_prefix
4482 fi
4483
4484 # If the loop below does not find an assembler, then use whatever
4485 # one we can find in the users's path.
4486 # user's path.
4487 as=as$host_exeext
4488
4489 test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
4490 $test_prefix/lib/gcc-lib/$target \
4491 /usr/lib/gcc/$target/$gcc_version \
4492 /usr/lib/gcc/$target \
4493 $test_prefix/$target/bin/$target/$gcc_version \
4494 $test_prefix/$target/bin \
4495 /usr/libexec \
4496 /usr/ccs/gcc \
4497 /usr/ccs/bin \
4498 /udk/usr/ccs/bin \
4499 /bsd43/usr/lib/cmplrs/cc \
4500 /usr/cross64/usr/bin \
4501 /usr/lib/cmplrs/cc \
4502 /sysv/usr/lib/cmplrs/cc \
4503 /svr4/usr/lib/cmplrs/cc \
4504 /usr/bin"
4505
4506 for dir in $test_dirs; do
4507 if test -f $dir/as$host_exeext; then
4508 gcc_cv_as=$dir/as$host_exeext
4509 break;
4510 fi
4511 done
4512 fi
4513 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
4514 AC_MSG_RESULT("newly built gas")
4515 else
4516 AC_MSG_RESULT($gcc_cv_as)
4517 fi
4518
4519 # Figure out what nm we will be using.
4520 AC_MSG_CHECKING(what nm to use)
4521 if test -x nm$host_exeext; then
4522 gcc_cv_nm=./nm$host_exeext
4523 elif test x$host = x$target; then
4524 # Native build.
4525 gcc_cv_nm=nm$host_exeext
4526 fi
4527 AC_MSG_RESULT($gcc_cv_nm)
4528
4529 # Figure out what assembler alignment features are present.
4530 AC_MSG_CHECKING(assembler alignment features)
4531 gcc_cv_as_alignment_features=
4532 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
4533 # Gas version 2.6 and later support for .balign and .p2align.
4534 # bytes to skip when using .p2align.
4535 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
4536 gcc_cv_as_alignment_features=".balign and .p2align"
4537 AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
4538 fi
4539 # Gas version 2.8 and later support specifying the maximum
4540 # bytes to skip when using .p2align.
4541 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
4542 gcc_cv_as_alignment_features=".p2align including maximum skip"
4543 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
4544 fi
4545 elif test x$gcc_cv_as != x; then
4546 # Check if we have .balign and .p2align
4547 echo ".balign 4" > conftest.s
4548 echo ".p2align 2" >> conftest.s
4549 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4550 gcc_cv_as_alignment_features=".balign and .p2align"
4551 AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
4552 fi
4553 rm -f conftest.s conftest.o
4554 # Check if specifying the maximum bytes to skip when
4555 # using .p2align is supported.
4556 echo ".p2align 4,,7" > conftest.s
4557 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4558 gcc_cv_as_alignment_features=".p2align including maximum skip"
4559 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
4560 fi
4561 rm -f conftest.s conftest.o
4562 fi
4563 AC_MSG_RESULT($gcc_cv_as_alignment_features)
4564
4565 AC_MSG_CHECKING(assembler subsection support)
4566 gcc_cv_as_subsections=
4567 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
4568 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
4569 gcc_cv_as_subsections="working .subsection -1"
4570 fi
4571 elif test x$gcc_cv_as != x; then
4572 # Check if we have .subsection
4573 echo ".subsection 1" > conftest.s
4574 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4575 gcc_cv_as_subsections=".subsection"
4576 if test x$gcc_cv_nm != x; then
4577 cat > conftest.s <<EOF
4578 conftest_label1: .word 0
4579 .subsection -1
4580 conftest_label2: .word 0
4581 .previous
4582 EOF
4583 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4584 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
4585 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
4586 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
4587 :
4588 else
4589 gcc_cv_as_subsections="working .subsection -1"
4590 fi
4591 fi
4592 fi
4593 fi
4594 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4595 fi
4596 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
4597 AC_DEFINE(HAVE_GAS_SUBSECTION_ORDERING, 1,
4598 [Define if your assembler supports .subsection and .subsection -1 starts
4599 emitting at the beginning of your section.])
4600 fi
4601 AC_MSG_RESULT($gcc_cv_as_subsections)
4602
4603 AC_MSG_CHECKING(assembler weak support)
4604 gcc_cv_as_weak=
4605 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
4606 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
4607 gcc_cv_as_weak="yes"
4608 fi
4609 elif test x$gcc_cv_as != x; then
4610 # Check if we have .weak
4611 echo " .weak foobar" > conftest.s
4612 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4613 gcc_cv_as_weak="yes"
4614 fi
4615 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4616 fi
4617 if test x"$gcc_cv_as_weak" = xyes; then
4618 AC_DEFINE(HAVE_GAS_WEAK, 1, [Define if your assembler supports .weak.])
4619 fi
4620 AC_MSG_RESULT($gcc_cv_as_weak)
4621
4622 AC_MSG_CHECKING(assembler hidden support)
4623 gcc_cv_as_hidden=
4624 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
4625 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
4626 gcc_cv_as_hidden="yes"
4627 fi
4628 elif test x$gcc_cv_as != x; then
4629 # Check if we have .hidden
4630 echo " .hidden foobar" > conftest.s
4631 echo "foobar:" >> conftest.s
4632 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4633 gcc_cv_as_hidden="yes"
4634 fi
4635 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4636 fi
4637 if test x"$gcc_cv_as_hidden" = xyes; then
4638 AC_DEFINE(HAVE_GAS_HIDDEN, 1,
4639 [Define if your assembler supports .hidden.])
4640 fi
4641 AC_MSG_RESULT($gcc_cv_as_hidden)
4642
4643 case "$target" in
4644 sparc*-*-*)
4645 AC_CACHE_CHECK([assembler .register pseudo-op support],
4646 gcc_cv_as_register_pseudo_op, [
4647 gcc_cv_as_register_pseudo_op=unknown
4648 if test x$gcc_cv_as != x; then
4649 # Check if we have .register
4650 echo ".register %g2, #scratch" > conftest.s
4651 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4652 gcc_cv_as_register_pseudo_op=yes
4653 else
4654 gcc_cv_as_register_pseudo_op=no
4655 fi
4656 rm -f conftest.s conftest.o
4657 fi
4658 ])
4659 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
4660 AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1,
4661 [Define if your assembler supports .register.])
4662 fi
4663
4664 AC_CACHE_CHECK([assembler supports -relax],
4665 gcc_cv_as_relax_opt, [
4666 gcc_cv_as_relax_opt=unknown
4667 if test x$gcc_cv_as != x; then
4668 # Check if gas supports -relax
4669 echo ".text" > conftest.s
4670 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
4671 gcc_cv_as_relax_opt=yes
4672 else
4673 gcc_cv_as_relax_opt=no
4674 fi
4675 rm -f conftest.s conftest.o
4676 fi
4677 ])
4678 if test "x$gcc_cv_as_relax_opt" = xyes; then
4679 AC_DEFINE(HAVE_AS_RELAX_OPTION, 1,
4680 [Define if your assembler supports -relax option.])
4681 fi
4682
4683 case "$tm_file" in
4684 *64*)
4685 AC_CACHE_CHECK([for 64 bit support in assembler ($gcc_cv_as)],
4686 gcc_cv_as_flags64, [
4687 if test -n "$gcc_cv_as"; then
4688 echo ".xword foo" > conftest.s
4689 gcc_cv_as_flags64=no
4690 for flag in "-xarch=v9" "-64 -Av9"; do
4691 if $gcc_cv_as $flag -o conftest.o conftest.s \
4692 > /dev/null 2>&1; then
4693 gcc_cv_as_flags64=$flag
4694 break
4695 fi
4696 done
4697 rm -f conftest.s conftest.o
4698 else
4699 if test "$gas" = yes; then
4700 gcc_cv_as_flags64="-64 -Av9"
4701 else
4702 gcc_cv_as_flags64="-xarch=v9"
4703 fi
4704 fi
4705 ])
4706 if test "x$gcc_cv_as_flags64" = xno; then
4707 changequote(, )
4708 tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
4709 dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
4710 changequote([, ])
4711 else
4712 AC_DEFINE_UNQUOTED(AS_SPARC64_FLAG, "$gcc_cv_as_flags64",
4713 [Define if the assembler supports 64bit sparc.])
4714 fi
4715 ;;
4716 *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
4717 ;;
4718 esac
4719
4720 if test "x$gcc_cv_as_flags64" != xno; then
4721 AC_CACHE_CHECK([for assembler offsetable %lo() support],
4722 gcc_cv_as_offsetable_lo10, [
4723 gcc_cv_as_offsetable_lo10=unknown
4724 if test "x$gcc_cv_as" != x; then
4725 # Check if assembler has offsetable %lo()
4726 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
4727 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
4728 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
4729 > /dev/null 2>&1 &&
4730 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
4731 > /dev/null 2>&1; then
4732 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
4733 gcc_cv_as_offsetable_lo10=no
4734 else
4735 gcc_cv_as_offsetable_lo10=yes
4736 fi
4737 else
4738 gcc_cv_as_offsetable_lo10=no
4739 fi
4740 rm -f conftest.s conftest.o conftest1.s conftest1.o
4741 fi
4742 ])
4743 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
4744 AC_DEFINE(HAVE_AS_OFFSETABLE_LO10, 1,
4745 [Define if your assembler supports offsetable %lo().])
4746 fi
4747 fi
4748 ;;
4749
4750 changequote(,)dnl
4751 i[34567]86-*-*)
4752 changequote([,])dnl
4753 AC_MSG_CHECKING(assembler instructions)
4754 gcc_cv_as_instructions=
4755 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
4756 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
4757 gcc_cv_as_instructions="filds fists"
4758 fi
4759 elif test x$gcc_cv_as != x; then
4760 set "filds fists" "filds mem; fists mem"
4761 while test $# -gt 0
4762 do
4763 echo "$2" > conftest.s
4764 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4765 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
4766 fi
4767 shift 2
4768 done
4769 rm -f conftest.s conftest.o
4770 fi
4771 if test x"$gcc_cv_as_instructions" != x; then
4772 AC_DEFINE_UNQUOTED(HAVE_GAS_`echo "$gcc_cv_as_instructions" | tr '[a-z ]' '[A-Z_]'`)
4773 fi
4774 AC_MSG_RESULT($gcc_cv_as_instructions)
4775 ;;
4776 esac
4777
4778 # Figure out what language subdirectories are present.
4779 # Look if the user specified --enable-languages="..."; if not, use
4780 # the environment variable $LANGUAGES if defined. $LANGUAGES might
4781 # go away some day.
4782 if test x"${enable_languages+set}" != xset; then
4783 if test x"${LANGUAGES+set}" = xset; then
4784 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
4785 else
4786 enable_languages=all
4787 fi
4788 else
4789 if test x"${enable_languages}" = x; then
4790 AC_MSG_ERROR([--enable-languages needs at least one argument])
4791 fi
4792 fi
4793 subdirs=
4794 for lang in ${srcdir}/*/config-lang.in ..
4795 do
4796 case $lang in
4797 ..) ;;
4798 # The odd quoting in the next line works around
4799 # an apparent bug in bash 1.12 on linux.
4800 changequote(,)dnl
4801 ${srcdir}/[*]/config-lang.in) ;;
4802 *)
4803 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
4804 if test "x$lang_alias" = x
4805 then
4806 echo "$lang doesn't set \$language." 1>&2
4807 exit 1
4808 fi
4809 if test x"${enable_languages}" = xall && test x"${lang_alias}" != xCHILL; then
4810 add_this_lang=yes
4811 else
4812 case "${enable_languages}" in
4813 ${lang_alias} | "${lang_alias},"* | *",${lang_alias},"* | *",${lang_alias}" )
4814 add_this_lang=yes
4815 ;;
4816 * )
4817 add_this_lang=no
4818 ;;
4819 esac
4820 fi
4821 if test x"${add_this_lang}" = xyes; then
4822 case $lang in
4823 ${srcdir}/ada/config-lang.in)
4824 if test x$gnat = xyes ; then
4825 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
4826 fi
4827 ;;
4828 *)
4829 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
4830 ;;
4831 esac
4832 fi
4833 ;;
4834 changequote([,])dnl
4835 esac
4836 done
4837
4838 # Make gthr-default.h if we have a thread file.
4839 gthread_flags=
4840 if test $thread_file != single; then
4841 rm -f gthr-default.h
4842 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
4843 gthread_flags=-DHAVE_GTHR_DEFAULT
4844 fi
4845 AC_SUBST(gthread_flags)
4846
4847 # Find out what GC implementation we want, or may, use.
4848 AC_ARG_WITH(gc,
4849 [ --with-gc={simple,page} Choose the garbage collection mechanism to use
4850 with the compiler.],
4851 [case "$withval" in
4852 simple | page)
4853 GGC=ggc-$withval
4854 ;;
4855 *)
4856 AC_MSG_ERROR([$withval is an invalid option to --with-gc])
4857 ;;
4858 esac],
4859 [if test $ac_cv_func_mmap_anywhere = yes \
4860 || test $ac_cv_func_valloc = yes; then
4861 GGC=ggc-page
4862 else
4863 GGC=ggc-simple
4864 fi])
4865 AC_SUBST(GGC)
4866 echo "Using $GGC for garbage collection."
4867
4868 # Use the system's zlib library.
4869 zlibdir=-L../../zlib
4870 zlibinc="-I\$(srcdir)/../../zlib"
4871 AC_ARG_WITH(system-zlib,
4872 [ --with-system-zlib use installed libz],
4873 zlibdir=
4874 zlibinc=
4875 )
4876 AC_SUBST(zlibdir)
4877 AC_SUBST(zlibinc)
4878
4879 # Build a new-abi (c++) system
4880 AC_ARG_ENABLE(new-gxx-abi,
4881 [ --enable-new-gxx-abi
4882 select the new abi for g++. You must select an ABI
4883 at configuration time, so that the correct runtime
4884 support is built. You cannot mix ABIs.],
4885 [AC_DEFINE(ENABLE_NEW_GXX_ABI, 1,
4886 [Define if you want to always select the new-abi for g++.])
4887 GXX_ABI_FLAG='-fnew-abi'
4888 echo "Building a new-abi g++ compiler."
4889 ])
4890 AC_SUBST(GXX_ABI_FLAG)
4891
4892 # Build a new-libstdc++ system (ie libstdc++-v3)
4893 AC_MSG_CHECKING([for libstdc++ to install])
4894 AC_ARG_ENABLE(libstdcxx-v3,
4895 [ --enable-libstdcxx-v3
4896 enable libstdc++-v3 for building and installation],
4897 [enable_libstdcxx_v3="$enableval"], [enable_libstdcxx_v3=no])
4898
4899 if test x$enable_libstdcxx_v3 = xyes; then
4900 AC_MSG_RESULT(v3)
4901 ac_esn=1
4902 else
4903 AC_MSG_RESULT(v2)
4904 ac_esn=0
4905 fi
4906 AC_DEFINE_UNQUOTED(ENABLE_STD_NAMESPACE, $ac_esn,
4907 [Define to 1 if you want to enable namespaces (-fhonor-std) by default.])
4908
4909 dnl Very limited version of automake's enable-maintainer-mode
4910
4911 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
4912 dnl maintainer-mode is disabled by default
4913 AC_ARG_ENABLE(maintainer-mode,
4914 [ --enable-maintainer-mode enable make rules and dependencies not useful
4915 (and sometimes confusing) to the casual installer],
4916 maintainer_mode=$enableval,
4917 maintainer_mode=no)
4918
4919 AC_MSG_RESULT($maintainer_mode)
4920
4921 if test "$maintainer_mode" = "yes"; then
4922 MAINT=''
4923 else
4924 MAINT='#'
4925 fi
4926 AC_SUBST(MAINT)dnl
4927
4928 # Make empty files to contain the specs and options for each language.
4929 # Then add #include lines to for a compiler that has specs and/or options.
4930
4931 lang_specs_files=
4932 lang_options_files=
4933 lang_tree_files=
4934 rm -f specs.h options.h gencheck.h
4935 touch specs.h options.h gencheck.h
4936 for subdir in . $subdirs
4937 do
4938 if test -f $srcdir/$subdir/lang-specs.h; then
4939 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
4940 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
4941 fi
4942 if test -f $srcdir/$subdir/lang-options.h; then
4943 echo "#include \"$subdir/lang-options.h\"" >>options.h
4944 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
4945 fi
4946 if test -f $srcdir/$subdir/$subdir-tree.def; then
4947 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
4948 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
4949 fi
4950 done
4951
4952 # These (without "all_") are set in each config-lang.in.
4953 # `language' must be a single word so is spelled singularly.
4954 all_languages=
4955 all_boot_languages=
4956 all_compilers=
4957 all_stagestuff=
4958 all_diff_excludes=
4959 all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
4960 # List of language makefile fragments.
4961 all_lang_makefiles=
4962 all_headers=
4963 all_lib2funcs=
4964
4965 # Add the language fragments.
4966 # Languages are added via two mechanisms. Some information must be
4967 # recorded in makefile variables, these are defined in config-lang.in.
4968 # We accumulate them and plug them into the main Makefile.
4969 # The other mechanism is a set of hooks for each of the main targets
4970 # like `clean', `install', etc.
4971
4972 language_fragments="Make-lang"
4973 language_hooks="Make-hooks"
4974 oldstyle_subdirs=
4975
4976 for s in .. $subdirs
4977 do
4978 if test $s != ".."
4979 then
4980 language=
4981 boot_language=
4982 compilers=
4983 stagestuff=
4984 diff_excludes=
4985 headers=
4986 outputs=
4987 lib2funcs=
4988 . ${srcdir}/$s/config-lang.in
4989 if test "x$language" = x
4990 then
4991 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
4992 exit 1
4993 fi
4994 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
4995 all_languages="$all_languages $language"
4996 if test "x$boot_language" = xyes
4997 then
4998 all_boot_languages="$all_boot_languages $language"
4999 fi
5000 all_compilers="$all_compilers $compilers"
5001 all_stagestuff="$all_stagestuff $stagestuff"
5002 all_diff_excludes="$all_diff_excludes $diff_excludes"
5003 all_headers="$all_headers $headers"
5004 all_outputs="$all_outputs $outputs"
5005 if test x$outputs = x
5006 then
5007 oldstyle_subdirs="$oldstyle_subdirs $s"
5008 fi
5009 all_lib2funcs="$all_lib2funcs $lib2funcs"
5010 fi
5011 done
5012
5013 # Since we can't use `::' targets, we link each language in
5014 # with a set of hooks, reached indirectly via lang.${target}.
5015
5016 rm -f Make-hooks
5017 touch Make-hooks
5018 target_list="all.build all.cross start.encap rest.encap \
5019 info dvi \
5020 install-normal install-common install-info install-man \
5021 uninstall distdir \
5022 mostlyclean clean distclean extraclean maintainer-clean \
5023 stage1 stage2 stage3 stage4"
5024 for t in $target_list
5025 do
5026 x=
5027 for lang in .. $all_languages
5028 do
5029 if test $lang != ".."; then
5030 x="$x $lang.$t"
5031 fi
5032 done
5033 echo "lang.$t: $x" >> Make-hooks
5034 done
5035
5036 # If we're not building in srcdir, create .gdbinit.
5037
5038 if test ! -f Makefile.in; then
5039 echo "dir ." > .gdbinit
5040 echo "dir ${srcdir}" >> .gdbinit
5041 if test x$gdb_needs_out_file_path = xyes
5042 then
5043 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
5044 fi
5045 if test "x$subdirs" != x; then
5046 for s in $subdirs
5047 do
5048 echo "dir ${srcdir}/$s" >> .gdbinit
5049 done
5050 fi
5051 echo "source ${srcdir}/.gdbinit" >> .gdbinit
5052 fi
5053
5054 # Define variables host_canonical and build_canonical
5055 # because some Cygnus local changes in the Makefile depend on them.
5056 build_canonical=${build}
5057 host_canonical=${host}
5058 target_subdir=
5059 if test "${host}" != "${target}" ; then
5060 target_subdir=${target}/
5061 fi
5062 AC_SUBST(build_canonical)
5063 AC_SUBST(host_canonical)
5064 AC_SUBST(target_subdir)
5065
5066 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
5067 # absolute path for gcc_tooldir based on inserting the number of up-directory
5068 # movements required to get from $(exec_prefix) to $(prefix) into the basic
5069 # $(libsubdir)/@(unlibsubdir) based path.
5070 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
5071 # make and thus we'd get different behavior depending on where we built the
5072 # sources.
5073 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
5074 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
5075 else
5076 changequote(<<, >>)dnl
5077 # An explanation of the sed strings:
5078 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
5079 # -e 's|/$||' match a trailing forward slash and eliminates it
5080 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
5081 # -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
5082 #
5083 # (*) Note this pattern overwrites the first character of the string
5084 # with a forward slash if one is not already present. This is not a
5085 # problem because the exact names of the sub-directories concerned is
5086 # unimportant, just the number of them matters.
5087 #
5088 # The practical upshot of these patterns is like this:
5089 #
5090 # prefix exec_prefix result
5091 # ------ ----------- ------
5092 # /foo /foo/bar ../
5093 # /foo/ /foo/bar ../
5094 # /foo /foo/bar/ ../
5095 # /foo/ /foo/bar/ ../
5096 # /foo /foo/bar/ugg ../../
5097 #
5098 dollar='$$'
5099 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
5100 changequote([, ])dnl
5101 fi
5102 AC_SUBST(gcc_tooldir)
5103 AC_SUBST(dollar)
5104
5105 # Nothing to do for FLOAT_H, float_format already handled.
5106 objdir=`pwd`
5107 AC_SUBST(objdir)
5108
5109 # Process the language and host/target makefile fragments.
5110 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
5111
5112 # Substitute configuration variables
5113 AC_SUBST(subdirs)
5114 AC_SUBST(all_boot_languages)
5115 AC_SUBST(all_compilers)
5116 AC_SUBST(all_diff_excludes)
5117 AC_SUBST(all_headers)
5118 AC_SUBST(all_lang_makefiles)
5119 AC_SUBST(all_languages)
5120 AC_SUBST(all_lib2funcs)
5121 AC_SUBST(all_stagestuff)
5122 AC_SUBST(build_exeext)
5123 AC_SUBST(build_install_headers_dir)
5124 AC_SUBST(build_xm_file_list)
5125 AC_SUBST(cc_set_by_configure)
5126 AC_SUBST(quoted_cc_set_by_configure)
5127 AC_SUBST(cpp_install_dir)
5128 AC_SUBST(dep_host_xmake_file)
5129 AC_SUBST(dep_tmake_file)
5130 AC_SUBST(extra_c_flags)
5131 AC_SUBST(extra_c_objs)
5132 AC_SUBST(extra_cpp_objs)
5133 AC_SUBST(extra_cxx_objs)
5134 AC_SUBST(extra_headers_list)
5135 AC_SUBST(extra_objs)
5136 AC_SUBST(extra_parts)
5137 AC_SUBST(extra_passes)
5138 AC_SUBST(extra_programs)
5139 AC_SUBST(float_h_file)
5140 AC_SUBST(gcc_gxx_include_dir)
5141 AC_SUBST(gcc_version)
5142 AC_SUBST(gcc_version_trigger)
5143 AC_SUBST(host_exeext)
5144 AC_SUBST(host_extra_gcc_objs)
5145 AC_SUBST(host_xm_file_list)
5146 AC_SUBST(install)
5147 AC_SUBST(lang_options_files)
5148 AC_SUBST(lang_specs_files)
5149 AC_SUBST(lang_tree_files)
5150 AC_SUBST(local_prefix)
5151 AC_SUBST(maybe_use_collect2)
5152 AC_SUBST(md_file)
5153 AC_SUBST(objc_boehm_gc)
5154 AC_SUBST(out_file)
5155 AC_SUBST(out_object_file)
5156 AC_SUBST(stage_prefix_set_by_configure)
5157 AC_SUBST(symbolic_link)
5158 AC_SUBST(thread_file)
5159 AC_SUBST(tm_file_list)
5160 AC_SUBST(will_use_collect2)
5161
5162
5163 AC_SUBST_FILE(target_overrides)
5164 AC_SUBST_FILE(host_overrides)
5165 AC_SUBST(cross_defines)
5166 AC_SUBST_FILE(cross_overrides)
5167 AC_SUBST_FILE(build_overrides)
5168 AC_SUBST_FILE(language_fragments)
5169 AC_SUBST_FILE(language_hooks)
5170
5171 # Echo that links are built
5172 if test x$host = x$target
5173 then
5174 str1="native "
5175 else
5176 str1="cross-"
5177 str2=" from $host"
5178 fi
5179
5180 if test x$host != x$build
5181 then
5182 str3=" on a $build system"
5183 fi
5184
5185 if test "x$str2" != x || test "x$str3" != x
5186 then
5187 str4=
5188 fi
5189
5190 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
5191
5192 if test "x$str2" != x || test "x$str3" != x
5193 then
5194 echo " ${str2}${str3}." 1>&2
5195 fi
5196
5197 # Truncate the target if necessary
5198 if test x$host_truncate_target != x; then
5199 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5200 fi
5201
5202 # Configure the subdirectories
5203 # AC_CONFIG_SUBDIRS($subdirs)
5204
5205 # Create the Makefile
5206 # and configure language subdirectories
5207 AC_OUTPUT($all_outputs,
5208 [
5209 . $srcdir/configure.lang
5210 case x$CONFIG_HEADERS in
5211 xauto-host.h:config.in)
5212 echo > cstamp-h ;;
5213 esac
5214 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
5215 # bootstrapping and the installation procedure can still use
5216 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
5217 # FLAGS_TO_PASS has been modified to solve the problem there.
5218 # This is virtually a duplicate of what happens in configure.lang; we do
5219 # an extra check to make sure this only happens if ln -s can be used.
5220 if test "$symbolic_link" = "ln -s"; then
5221 for d in .. ${subdirs} ; do
5222 if test $d != ..; then
5223 STARTDIR=`pwd`
5224 cd $d
5225 for t in stage1 stage2 stage3 stage4 include
5226 do
5227 rm -f $t
5228 $symbolic_link ../$t $t 2>/dev/null
5229 done
5230 cd $STARTDIR
5231 fi
5232 done
5233 else true ; fi
5234 # Avoid having to add intl to our include paths.
5235 if test -f intl/libintl.h; then
5236 echo creating libintl.h
5237 echo '#include "intl/libintl.h"' >libintl.h
5238 fi
5239 ],
5240 [
5241 host='${host}'
5242 build='${build}'
5243 target='${target}'
5244 target_alias='${target_alias}'
5245 srcdir='${srcdir}'
5246 subdirs='${subdirs}'
5247 oldstyle_subdirs='${oldstyle_subdirs}'
5248 symbolic_link='${symbolic_link}'
5249 program_transform_set='${program_transform_set}'
5250 program_transform_name='${program_transform_name}'
5251 dep_host_xmake_file='${dep_host_xmake_file}'
5252 host_xmake_file='${host_xmake_file}'
5253 dep_tmake_file='${dep_tmake_file}'
5254 tmake_file='${tmake_file}'
5255 thread_file='${thread_file}'
5256 gcc_version='${gcc_version}'
5257 gcc_version_trigger='${gcc_version_trigger}'
5258 local_prefix='${local_prefix}'
5259 build_install_headers_dir='${build_install_headers_dir}'
5260 build_exeext='${build_exeext}'
5261 host_exeext='${host_exeext}'
5262 out_file='${out_file}'
5263 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
5264 SET_MAKE='${SET_MAKE}'
5265 target_list='${target_list}'
5266 target_overrides='${target_overrides}'
5267 host_overrides='${host_overrides}'
5268 cross_defines='${cross_defines}'
5269 cross_overrides='${cross_overrides}'
5270 build_overrides='${build_overrides}'
5271 cpp_install_dir='${cpp_install_dir}'
5272 ])