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