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