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