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