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