home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / gcc / configure < prev    next >
Text File  |  1997-01-23  |  79KB  |  3,224 lines

  1. #!/bin/sh
  2. # Configuration script for GNU CC
  3. #   Copyright (C) 1988, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
  4.  
  5. #This file is part of GNU CC.
  6.  
  7. #GNU CC is free software; you can redistribute it and/or modify
  8. #it under the terms of the GNU General Public License as published by
  9. #the Free Software Foundation; either version 2, or (at your option)
  10. #any later version.
  11.  
  12. #GNU CC is distributed in the hope that it will be useful,
  13. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. #GNU General Public License for more details.
  16.  
  17. #You should have received a copy of the GNU General Public License
  18. #along with GNU CC; see the file COPYING.  If not, write to
  19. #the Free Software Foundation, 59 Temple Place - Suite 330,
  20. #Boston, MA 02111-1307, USA.
  21.  
  22. #
  23. # Shell script to create proper links to machine-dependent files in
  24. # preparation for compiling gcc.
  25. #
  26. # Options: --srcdir=DIR        specifies directory where sources are.
  27. #        --host=HOST        specifies host configuration.
  28. #       --target=TARGET    specifies target configuration.
  29. #       --build=TARGET    specifies configuration of machine you are
  30. #                using to compile GCC.
  31. #       --prefix=DIR        specifies directory to install in.
  32. #       --local-prefix=DIR    specifies directory to put local ./include in.
  33. #       --gxx-include-dir=DIR specifies directory to put g++ header files in.
  34. #       --exec-prefix=DIR    specifies directory to install executables in.
  35. #       --with-gnu-ld    arrange to work with GNU ld.
  36. #       --with-gnu-as    arrange to work with GAS.
  37. #       --with-stabs        arrange to use stabs instead of host debug format.
  38. #       --with-elf        arrange to use elf instead of host debug format.
  39. #       --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)
  40. #       --disable-FOO    do not include feature FOO
  41. #       --nfp        assume system has no FPU.
  42. #       --program-prefix=PREFIX specifies prefix for executable names.
  43. #       --program-suffix=SUFFIX specifies suffix for executable names.
  44. #       --program-transform-name=SED-EXPR specifies `sed' expression to
  45. #                apply to executable names.
  46. #
  47. # If configure succeeds, it leaves its status in config.status.
  48. # If configure fails after disturbing the status quo, 
  49. #     config.status is removed.
  50. #
  51.  
  52. progname=$0
  53.  
  54. # Default --srcdir to the directory where the script is found, 
  55. # if a directory was specified.
  56. # The second sed call is to convert `.//configure' to `./configure'.
  57. srcdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
  58. if [ x$srcdir = x$0 ]
  59. then
  60. srcdir=
  61. fi
  62.  
  63. host=
  64.  
  65. # Declare known makefile conditions
  66. all_makefile_conds="next-headers next-pdo solaris-pdo win32-pdo"
  67.  
  68. # Default prefix to /usr/local.
  69. prefix=/usr/local
  70.  
  71. # On systems where GCC is the native compiler, $prefix should be
  72. # /usr. But the user can change it with configure --prefix=/foo/bar
  73. native_prefix=/usr
  74.  
  75. # local_prefix specifies where to find the directory /usr/local/include
  76. # We don't use $(prefix) for this
  77. # because we always want GCC to search /usr/local/include
  78. # even if GCC is installed somewhere other than /usr/local.
  79. # Think THREE TIMES before specifying any other value for this!
  80. # DO NOT make this use $prefix!
  81. local_prefix=/usr/local
  82. # Default is to let the Makefile set exec_prefix from $(prefix)
  83. exec_prefix='$(prefix)'
  84. #
  85. # The default g++ include directory is $(libdir)/g++-include.
  86. gxx_include_dir='$(libdir)/g++-include'
  87.  
  88. # Default --program-transform-name to nothing.
  89. program_transform_name=
  90. program_transform_set=
  91.  
  92. remove=rm
  93. hard_link=ln
  94. symbolic_link='ln -s'
  95. copy=cp
  96.  
  97. # Record all the arguments, to write them in config.status.
  98. arguments=$*
  99.  
  100. #for Test
  101. #remove="echo rm"
  102. #hard_link="echo ln"
  103. #symbolic_link="echo ln -s"
  104.  
  105. target=
  106. host=
  107. build=
  108. name1=
  109. name2=
  110.  
  111. for arg in $*;
  112. do
  113.   case $next_arg in
  114.   --srcdir)
  115.     srcdir=$arg
  116.     next_arg=
  117.     ;;
  118.   --host)
  119.     host=$arg
  120.     next_arg=
  121.     ;;
  122.   --target)
  123.     target=$arg
  124.     next_arg=
  125.     ;;
  126.   --build)
  127.     build=$arg
  128.     next_arg=
  129.     ;;
  130.   --prefix)
  131.     prefix=$arg
  132.     native_prefix=$prefix
  133.     next_arg=
  134.     ;;
  135.   --local-prefix)
  136.     local_prefix=$arg
  137.     next_arg=
  138.     ;;
  139.   --gxx-include-dir)
  140.     gxx_include_dir=$arg
  141.     next_arg=
  142.     ;;
  143.   --exec-prefix)
  144.     exec_prefix=$arg
  145.     next_arg=
  146.     ;;
  147.   --program-transform-name)
  148.     # Double any backslashes or dollar signs in the argument.
  149.     if [ -n "${arg}" ] ; then
  150.       program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
  151.     fi
  152.     program_transform_set=yes
  153.     next_arg=
  154.     ;;    
  155.   --program-prefix)
  156.     if [ -n "${arg}" ]; then
  157.       program_transform_name="${program_transform_name} -e s,^,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  158.     fi
  159.     program_transform_set=yes
  160.     next_arg=
  161.     ;;
  162.   --program-suffix)
  163.     if [ -n "${arg}" ]; then
  164.       program_transform_name="${program_transform_name} -e s,\$\$,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  165.     fi
  166.     program_transform_set=yes
  167.     next_arg=
  168.     ;;
  169.   --x-*)
  170.     next_arg=
  171.     ;;
  172.   *)
  173.     case $arg in
  174.       -*)
  175.     if [ x$name1 != x ]
  176.     then
  177.         echo "Positional arguments must be last." 1>&2
  178.         exit 1
  179.     fi
  180.     ;;
  181.     esac
  182.  
  183.     case $arg in
  184.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  185.     next_arg=--srcdir
  186.     ;;
  187.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  188.     srcdir=`echo $arg | sed 's/-*s[a-z]*=//'`
  189.     ;;
  190.      -host | --host | --hos | --ho)
  191.     next_arg=--host
  192.     ;;
  193.      -host=* | --host=* | --hos=* | --ho=*)
  194.     host=`echo $arg | sed 's/-*h[a-z]*=//'`
  195.     ;; 
  196.      -target | --target | --targe | --targ | --tar | --ta | --t)
  197.     next_arg=--target
  198.     ;;
  199.      -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  200.     target=`echo $arg | sed 's/-*t[a-z]*=//'`
  201.     ;; 
  202.      -build | --build | --buil | --bui | --bu | --b)
  203.     next_arg=--build
  204.     ;;
  205.      -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  206.     build=`echo $arg | sed 's/-*b[a-z]*=//'`
  207.     ;; 
  208.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  209.     next_arg=--prefix
  210.     ;;
  211.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  212.     prefix=`echo $arg | sed 's/-*p[a-z]*=//'`
  213.     native_prefix=$prefix
  214.     ;;
  215.      -local-prefix | --local-prefix | --local-prefi | --local-pref | --local-pre \
  216.     | --local-pr | --local-p | --local- | --local | --loc | --lo | --l)
  217.     next_arg=--local-prefix
  218.     ;;
  219.      -local-prefix=* | --local-prefix=* | --local-prefi=* | --local-pref=* \
  220.     | --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
  221.     | --loc=* | --lo=* | --l=*)
  222.     local_prefix=`echo $arg | sed 's/-*l[-a-z]*=//'`
  223.     ;;
  224.      -gxx-include-dir | --gxx-include-dir | --gxx-include \
  225.     | --gxx-incl | --gxx-inc | --gxx-in | --gxx-i | --gxx- \
  226.     | --gxx | --gxx | --gx | --g)
  227.     next_arg=--gxx-include-dir
  228.     ;;
  229.      -gxx-include-dir=* | --gxx-include-dir=* | --gxx-include=* \
  230.     | --gxx-incl=* | --gxx-inc=* | --gxx-in=* | --gxx-i=* \
  231.     | --gxx-=* | --gxx=* | --gxx=* | --gxx=* | --g=*)
  232.     gxx_include_dir=`echo $arg | sed 's/-*g[-a-z]*=//'`
  233.     ;;
  234.      -exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
  235.     | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  236.     next_arg=--exec-prefix
  237.     ;;
  238.      -exec-prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* \
  239.     | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
  240.     | --exe=* | --ex=* | --e=*)
  241.     exec_prefix=`echo $arg | sed 's/-*e[-a-z]*=//'`
  242.     ;;
  243.      -program-transform-name | --program-transform-name \
  244.     | --program-transform-nam | --program-transform-na \
  245.     | --program-transform-n | --program-transform- | --program-transform \
  246.     | --program-transfor | --program-transfo | --program-transf \
  247.     | --program-trans | --program-tran | --program-tra \
  248.     | --program-tr | --program-t)
  249.     next_arg=--program-transform-name
  250.     ;;
  251.      -program-transform-name=* | --program-transform-name=* \
  252.     | --program-transform-nam=* | --program-transform-na=* \
  253.     | --program-transform-n=* | --program-transform-=* \
  254.     | --program-transform=* | --program-transfor=* | --program-transfo=* \
  255.     | --program-transf=* | --program-trans=* | --program-tran=* \
  256.     | --program-tra=* | --program-tr=* | --program-t=*)
  257.     arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`
  258.     # Double any \ or $ in the argument.
  259.     if [ -n "${arg}" ] ; then
  260.       program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
  261.     fi
  262.     program_transform_set=yes
  263.     ;;
  264.      -program-prefix | --program-prefix | --program-prefi \
  265.     | --program-pref | --program-pre | --program-pr \
  266.     | --program-p)
  267.     next_arg=--program-prefix
  268.     ;;
  269.      -program-prefix=* | --program-prefix=* | --program-prefi=* \
  270.     | --program-pref=* | --program-pre=* | --program-pr=* \
  271.     | --program-p=*)
  272.     arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`
  273.     if [ -n "${arg}" ]; then
  274.       program_transform_name="${program_transform_name} -e s,^,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  275.     fi
  276.     program_transform_set=yes
  277.     ;;
  278.      -program-suffix | --program-suffix | --program-suffi \
  279.     | --program-suff | --program-suf | --program-su \
  280.     | --program-s)
  281.     next_arg=--program-suffix
  282.     ;;
  283.      -program-suffix=* | --program-suffix=* | --program-suffi=* \
  284.     | --program-suff=* | --program-suf=* | --program-su=* \
  285.     | --program-s=*)
  286.     arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`
  287.     if [ -n "${arg}" ]; then
  288.       program_transform_name="${program_transform_name} -e s,\$\$,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  289.     fi
  290.     program_transform_set=yes
  291.     ;;
  292.      -with-gnu-ld | --with-gnu-ld | --with-gnu-l)
  293.     gnu_ld=yes
  294.     ;;
  295.      -gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a)
  296.         gas=yes
  297.     ;;
  298.      -nfp | --nfp | --nf | --n)
  299.     nfp=yes
  300.     ;;
  301.      -with-stabs | -with-stab | -with-sta | -with-st | -with-s \
  302.     | --with-stabs | --with-stab | --with-sta | --with-st | --with-s \
  303.     | -stabs | -stab | -sta | -st  \
  304.     | --stabs | --stab | --sta | --st)
  305.     stabs=yes
  306.     ;;
  307.      -with-elf | -with-el | -with-se \
  308.     | --with-elf | --with-el | --with-e \
  309.     | -elf | -el | -e \
  310.     |--elf | --el | --e)
  311.     elf=yes
  312.     ;;
  313.      -with-* | --with-*) ;; #ignored
  314.      -without-* | --without-*) ;; #ignored
  315.      -disable-* | --disable-*)
  316.     enableopt=`echo ${arg} | sed 's:^-*disable-:enable_:;s:-:_:g'`
  317.     eval $enableopt=no
  318.     ;;
  319.      -enable-* | --enable-*)
  320.     case "$arg" in
  321.     *=*)    optarg=`echo $arg | sed 's:^[^=]*=::;s:-:_:g'` ;;
  322.     *)    optarg=yes ;;
  323.     esac
  324.     enableopt=`echo ${arg} | sed 's:^-*::;s:=.*$::;s:-:_:g'`
  325.     eval $enableopt="$optarg"
  326.     ;;
  327.      -x | --x) ;; # ignored
  328.      -x-*=* | --x-*=*) ;; # ignored
  329.      -x-* | --x-*)
  330.     next_arg=--x-ignored # ignored
  331.     ;;
  332.      --he*) ;; # ignored for now (--help)
  333.      --vers*) ;; # ignored for now (--version)
  334.      -v | -verb* | --verb*) ;; # ignored for now (--verbose)
  335.      --program-*) ;; #ignored (--program-prefix, --program-suffix)
  336.      --c*) ;; #ignored (--cache-file)
  337.      --q*) ;; #ignored (--quiet)
  338.      --si*) ;; #ignored (--silent)
  339.      -*)
  340.     echo "Invalid option \`$arg'" 1>&2
  341.     exit 1
  342.     ;;
  343.      *)
  344. # Allow configure HOST TARGET.  If just one name is given, it is used
  345. # as both unless a host was previously given, in which case it is
  346. # just the target.
  347.     if [ x$name1 != x ]
  348.     then
  349.         if [ x$name2 != x ]
  350.         then
  351.             echo "More than two configuration names." 1>&2
  352.             exit 1
  353.         fi
  354.         name2=$arg
  355.     elif [ x$host != x ]
  356.     then
  357.         name1=$host
  358.         name2=$arg
  359.         host=
  360.     else
  361.         name1=$arg
  362.     fi
  363.     ;;
  364.     esac
  365.   esac
  366. done
  367.  
  368. if [ x$name1 != x ]
  369. then
  370.     if [ x$name2 = x ]
  371.     then
  372.         name2=$name1
  373.     fi
  374.  
  375.     if [ x$host != x ]
  376.     then
  377.         echo "Duplicate specification of host." 1>&2
  378.         exit 1
  379.     fi
  380.  
  381.     if [ x$target != x ]
  382.     then
  383.         echo "Duplicate specification of target." 1>&2
  384.         exit 1
  385.     fi
  386.  
  387.     host=$name1
  388.     build=$name1
  389.     target=$name2
  390. fi
  391.  
  392. # Find the source files, if location was not specified.
  393. if [ x$srcdir = x ]
  394. then
  395.     srcdirdefaulted=1
  396.     srcdir=.
  397.     if [ ! -r tree.c ]
  398.     then
  399.         srcdir=..
  400.     fi
  401. fi
  402.  
  403. if [ ! -r ${srcdir}/tree.c ]
  404. then
  405.     if [ x$srcdirdefaulted = x ]
  406.     then
  407.       echo "$progname: Can't find compiler sources in \`${srcdir}'" 1>&2
  408.     else
  409.       echo "$progname: Can't find compiler sources in \`.' or \`..'" 1>&2
  410.     fi
  411.     exit 1
  412. fi
  413.  
  414. if [ -r ${srcdir}/config.status ] && [ x$srcdir != x. ]
  415. then
  416.     echo "$progname: \`configure' has been run in \`${srcdir}'" 1>&2
  417.     exit 1
  418. fi
  419.  
  420. # Complain if an arg is missing
  421. if [ x$build = x ]
  422. then
  423.     # If host was specified, always use it for build also to avoid
  424.     # confusion.  If someone wants a cross compiler where build != host,
  425.     # then they must specify build explicitly.  Since this case is
  426.     # extremely rare, it does not matter that it is slightly inconvenient.
  427.     if [ x$host != x ]
  428.     then
  429.         build=$host
  430.     
  431.     # This way of testing the result of a command substitution is
  432.     # defined by Posix.2 (section 3.9.1) as well as traditional shells.
  433.     elif build=`${srcdir}/config.guess`
  434.     then
  435.         echo "This appears to be a ${build} system." 1>&2
  436.  
  437.     elif [ x$target != x ]
  438.     then
  439.         echo 'Config.guess failed to determine the host type.  Defaulting to target.'
  440.         build=$target
  441.     else
  442.         echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
  443.         echo "\
  444. Usage: `basename $progname` [--host=HOST] [--build=BUILD]
  445.        [--prefix=DIR] [--gxx-include-dir=DIR] [--local-pref=DIR] [--exec-pref=DIR]
  446.        [--with-gnu-as] [--with-gnu-ld] [--with-stabs] [--with-elf] [--nfp] TARGET" 1>&2
  447.     echo "Where HOST, TARGET and BUILD are three-part configuration names " 1>&2
  448.         if [ -r config.status ]
  449.         then
  450.             tail +2 config.status 1>&2
  451.         fi
  452.         exit 1
  453.     fi
  454. fi
  455.  
  456. # If $host was not specified, use $build.
  457. if [ x$host = x ]
  458. then
  459.     host=$build
  460. fi
  461.  
  462. # If $target was not specified, use $host.
  463. if [ x$target = x ]
  464. then
  465.     target=$host
  466. fi
  467.  
  468. build_xm_file=
  469. host_xm_file=
  470. host_xmake_file=
  471. host_broken_install=
  472. host_install_headers_dir=install-headers-tar
  473. host_truncate_target=
  474.  
  475. # On non-Unix systems, sh may not be in /bin.
  476. BIN_SH=`if [ -f /bin/sh ]; then echo /bin/sh; else echo sh; fi`
  477.  
  478. # Validate the specs, and canonicalize them.
  479. canon_build=`$BIN_SH $srcdir/config.sub $build` || exit 1
  480. canon_host=`$BIN_SH $srcdir/config.sub $host` || exit 1
  481. canon_target=`$BIN_SH $srcdir/config.sub $target` || exit 1
  482.  
  483. # Set name of null device.
  484. null=`case $canon_build in *win*) echo NUL: ;; *) echo /dev/null ;; esac`
  485.  
  486. # Decode the host machine, then the target machine.
  487. # For the host machine, we save the xm_file variable as host_xm_file;
  488. # then we decode the target machine and forget everything else
  489. # that came from the host machine.
  490. for machine in $canon_build $canon_host $canon_target; do
  491.  
  492.     cpu_type=
  493.     xm_file=
  494.     tm_file=
  495.     out_file=
  496.     xmake_file=
  497.     tmake_file=
  498.     extra_headers=
  499.     extra_passes=
  500.     extra_parts=
  501.     extra_programs=
  502.     extra_objs=
  503.     extra_gcc_objs=
  504.     # Set this to force installation and use of collect2.
  505.     use_collect2=
  506.     # Set this to override the default target model.
  507.     target_cpu_default=
  508.     # Set this to force use of install.sh.
  509.     broken_install=
  510.     # Set this to control which fixincludes program to use.
  511.     fixincludes=fixincludes
  512.     # Set this to control how the header file directory is installed.
  513.     install_headers_dir=install-headers-tar
  514.     # Set this to a non-empty list of args to pass to cpp if the target
  515.     # wants its .md file passed through cpp.
  516.     md_cppflags=
  517.     # Set this if directory names should be truncated to 14 characters.
  518.     truncate_target=
  519.     # Set this if gdb needs a dir command with `dirname $out_file`
  520.     gdb_needs_out_file_path=
  521.  
  522.     case $machine in
  523.     # Support site-specific machine types.
  524.     *local*)
  525.         cpu_type=`echo $machine | sed -e 's/-.*//'`
  526.         rest=`echo $machine | sed -e "s/$cpu_type-//"`
  527.         xm_file=${cpu_type}/xm-$rest.h
  528.         tm_file=${cpu_type}/$rest.h
  529.         if [ -f $srcdir/config/${cpu_type}/x-$rest ] ; \
  530.         then xmake_file=${cpu_type}/x-$rest; \
  531.         else true; \
  532.         fi
  533.         if [ -f $srcdir/config/${cpu_type}/t-$rest ] ; \
  534.         then tmake_file=${cpu_type}/t-$rest; \
  535.         else true; \
  536.         fi
  537.         ;;
  538.     1750a-*-*)
  539.         ;;
  540.     a29k-*-bsd* | a29k-*-sym1*)
  541.         tm_file=a29k/unix.h
  542.         xm_file=a29k/xm-unix.h
  543.         xmake_file=a29k/x-unix
  544.         tmake_file=a29k/t-a29k
  545.         use_collect2=yes
  546.         ;;
  547.     a29k-*-udi | a29k-*-coff)
  548.         tmake_file=a29k/t-a29kbare
  549.         tm_file=a29k/a29k-udi.h
  550.         ;;
  551.     a29k-*-vxworks*)
  552.         tmake_file=a29k/t-vx29k
  553.         tm_file=a29k/vx29k.h
  554.         extra_parts="crtbegin.o crtend.o"
  555.         ;;
  556.     a29k-*-*)            # Default a29k environment.
  557.         use_collect2=yes
  558.         ;;
  559.         alpha-nextpdo-osf3*)
  560.                 tm_file=alpha/next-pdo.h 
  561.         tmake_file=alpha/t-nextpdo
  562.         extra_programs=ld
  563.         extra_passes="cc1obj cc1plus mips-tfile mips-tdump"
  564.                 broken_install=yes
  565.                 use_collect2=yes
  566.         makefile_cond="$makefile_cond next-pdo"
  567.                 ;;
  568.     alpha-dec-osf[23456789]*)
  569.         tm_file=alpha/osf2.h
  570.         if [ x$stabs = xyes ]
  571.         then
  572.             tm_file=alpha/gdb-osf2.h
  573.         fi
  574.         if [ x$gas != xyes ]
  575.         then
  576.             extra_passes="mips-tfile mips-tdump"
  577.         fi
  578.         broken_install=yes
  579.         use_collect2=yes
  580.         ;;
  581.     alpha-dec-osf1.2)
  582.         tm_file=alpha/osf12.h
  583.         if [ x$stabs = xyes ]
  584.         then
  585.             tm_file=alpha/gdb-osf12.h
  586.         fi
  587.         if [ x$gas != xyes ]
  588.         then
  589.             extra_passes="mips-tfile mips-tdump"
  590.         fi
  591.         broken_install=yes
  592.         use_collect2=yes
  593.         ;;
  594.     alpha-*-osf*)
  595.         if [ x$stabs = xyes ]
  596.         then
  597.             tm_file=alpha/gdb.h
  598.         fi
  599.         if [ x$gas != xyes ]
  600.         then
  601.             extra_passes="mips-tfile mips-tdump"
  602.         fi
  603.         broken_install=yes
  604.         use_collect2=yes
  605.         ;;
  606.     alpha-*-winnt3*)
  607.         tm_file=alpha/win-nt.h
  608.         xm_file=alpha/xm-winnt.h
  609.         tmake_file=t-libc-ok
  610.         xmake_file=winnt/x-winnt
  611.         extra_objs=oldnames.o
  612.         extra_gcc_objs="spawnv.o oldnames.o"
  613.         fixincludes=fixinc.winnt
  614.         if [ x$gnu_ld != xyes ]
  615.         then
  616.             extra_programs=ld.exe
  617.         fi
  618.         ;;
  619.     arm-*-riscix1.[01]*)        # Acorn RISC machine (early versions)
  620.         tm_file=arm/riscix1-1.h
  621.         use_collect2=yes
  622.         ;;
  623.     arm-*-riscix*)            # Acorn RISC machine
  624.         if [ x$gas = xyes ]
  625.         then
  626.             tm_file=arm/rix-gas.h
  627.         else
  628.             tm_file=arm/riscix.h
  629.         fi
  630.         xmake_file=arm/x-riscix
  631.         tmake_file=arm/t-riscix
  632.         use_collect2=yes
  633.         ;;
  634.     arm-semi-aout | armel-semi-aout)
  635.         cpu_type=arm
  636.         tm_file=arm/semi.h
  637.         tmake_file=arm/t-semi
  638.         fixincludes=Makefile.in # There is nothing to fix
  639.         ;;
  640.     arm-*-*)            # generic version
  641.         ;;
  642.     c1-convex-*)            # Convex C1
  643.         cpu_type=convex
  644.         tm_file=convex/convex1.h
  645.         use_collect2=yes
  646.         fixincludes=Makefile.in
  647.         ;;
  648.     c2-convex-*)            # Convex C2
  649.         cpu_type=convex
  650.         tm_file=convex/convex2.h
  651.         use_collect2=yes
  652.         fixincludes=Makefile.in
  653.         ;;
  654.     c32-convex-*)
  655.         cpu_type=convex
  656.         tm_file=convex/convex32.h    # Convex C32xx
  657.         use_collect2=yes
  658.         fixincludes=Makefile.in
  659.         ;;
  660.     c34-convex-*)
  661.         cpu_type=convex
  662.         tm_file=convex/convex34.h    # Convex C34xx
  663.         use_collect2=yes
  664.         fixincludes=Makefile.in
  665.         ;;
  666.     c38-convex-*)
  667.         cpu_type=convex
  668.         tm_file=convex/convex38.h    # Convex C38xx
  669.         use_collect2=yes
  670.         fixincludes=Makefile.in
  671.         ;;
  672.     clipper-intergraph-clix*)
  673.         broken_install=yes
  674.         cpu_type=clipper
  675.         xm_file=clipper/xm-clix.h
  676.         tm_file=clipper/clix.h
  677.         extra_headers=va-clipper.h
  678.         extra_parts="crtbegin.o crtend.o"
  679.         xmake_file=clipper/x-clix
  680.         install_headers_dir=install-headers-cpio
  681.         ;;
  682.     dsp16xx-*)
  683.         ;;
  684.     elxsi-elxsi-*)
  685.         use_collect2=yes
  686.         ;;
  687. # This hasn't been upgraded to GCC 2.
  688. #    fx80-alliant-*)            # Alliant FX/80
  689. #        ;;
  690.     h8300-*-*)
  691.         cpu_type=h8300
  692.         ;;
  693.     hppa1.1-*-osf*)
  694.         cpu_type=pa
  695.         tm_file=pa/pa1-osf.h
  696.         use_collect2=yes
  697.         fixincludes=Makefile.in
  698.         ;;
  699.     hppa1.0-*-osf*)
  700.         cpu_type=pa
  701.         tm_file=pa/pa-osf.h
  702.         use_collect2=yes
  703.         fixincludes=Makefile.in
  704.         ;;
  705.     hppa1.1-*-bsd*)
  706.         cpu_type=pa
  707.         tm_file=pa/pa1.h
  708.         use_collect2=yes
  709.         fixincludes=Makefile.in
  710.         ;;
  711.     hppa1.0-*-bsd*)
  712.         cpu_type=pa
  713.         use_collect2=yes
  714.         fixincludes=Makefile.in
  715.         ;;
  716.     hppa1.0-*-hpux7*)
  717.         cpu_type=pa
  718.         xm_file=pa/xm-pahpux.h
  719.         xmake_file=pa/x-pa-hpux
  720.         tmake_file=pa/t-pa
  721.         if [ x$gas = xyes ]
  722.         then
  723.             tm_file=pa/pa-gux7.h
  724.         else
  725.             tm_file=pa/pa-hpux7.h
  726.         fi
  727.         broken_install=yes
  728.         install_headers_dir=install-headers-cpio
  729.         use_collect2=yes
  730.         ;;
  731.     hppa1.0-*-hpux8.0[0-2]*)
  732.         cpu_type=pa
  733.         xm_file=pa/xm-pahpux.h
  734.         xmake_file=pa/x-pa-hpux
  735.         tmake_file=pa/t-pa
  736.         if [ x$gas = xyes ]
  737.         then
  738.             tm_file=pa/pa-ghpux.h
  739.         else
  740.             tm_file=pa/pa-oldas.h
  741.         fi
  742.         broken_install=yes
  743.         install_headers_dir=install-headers-cpio
  744.         use_collect2=yes
  745.         ;;
  746.     hppa1.1-*-next*)
  747.         cpu_type=pa
  748.         tm_file=pa/next.h
  749.         out_file=pa/next.c
  750.         xm_file=pa/xm-next.h
  751.         tmake_file=next/t-next
  752.         xmake_file=next/x-next
  753.         extra_objs=machopic.o
  754.         extra_passes=cc1obj
  755.         fixincludes=Makefile.in # On NeXT, the headers are ok already.
  756.         makefile_cond="$makefile_cond next-headers"
  757.         ;;
  758.     hppa1.1-nextpdo-hpux*)
  759.         cpu_type=pa
  760.         tm_file=pa/next-pdo.h
  761.         xm_file=pa/xm-pahpux.h
  762.         tmake_file=pa/t-nextpdo
  763.         out_file=pa/next-pdo.c
  764.         extra_programs=ld
  765.         extra_passes="cc1obj cc1plus"
  766.         broken_install=yes
  767.         use_collect2=yes
  768.         makefile_cond="$makefile_cond next-pdo"
  769.         ;;
  770.     hppa1.1-*-hpux8.0[0-2]*)
  771.         cpu_type=pa
  772.         xm_file=pa/xm-pahpux.h
  773.         xmake_file=pa/x-pa-hpux
  774.         tmake_file=pa/t-pa
  775.         if [ x$gas = xyes ]
  776.         then
  777.             tm_file=pa/pa1-ghpux.h
  778.         else
  779.             tm_file=pa/pa1-oldas.h
  780.         fi
  781.         broken_install=yes
  782.         install_headers_dir=install-headers-cpio
  783.         use_collect2=yes
  784.         ;;
  785.     hppa1.1-*-hpux9* | \
  786.     hppa1.1-*-hpux10*)
  787.         cpu_type=pa
  788.         xm_file=pa/xm-pahpux.h
  789.         xmake_file=pa/x-pa-hpux
  790.         tmake_file=pa/t-pa
  791.         if [ x$gas = xyes ]
  792.         then
  793.             tm_file=pa/pa1-ghpux9.h
  794.         else
  795.             tm_file=pa/pa1-hpux9.h
  796.         fi
  797.         broken_install=yes
  798.         install_headers_dir=install-headers-cpio
  799.         use_collect2=yes
  800.         ;;
  801.     hppa1.0-*-hpux9* | \
  802.     hppa1.0-*-hpux10*)
  803.         cpu_type=pa
  804.         xm_file=pa/xm-pahpux.h
  805.         xmake_file=pa/x-pa-hpux
  806.         tmake_file=pa/t-pa
  807.         if [ x$gas = xyes ]
  808.         then
  809.             tm_file=pa/pa-ghpux9.h
  810.         else
  811.             tm_file=pa/pa-hpux9.h
  812.         fi
  813.         broken_install=yes
  814.         install_headers_dir=install-headers-cpio
  815.         use_collect2=yes
  816.         ;;
  817.     hppa1.1-*-hpux*)
  818.         cpu_type=pa
  819.         xm_file=pa/xm-pahpux.h
  820.         xmake_file=pa/x-pa-hpux
  821.         tmake_file=pa/t-pa
  822.         if [ x$gas = xyes ]
  823.         then
  824.             tm_file=pa/pa1-ghpux.h
  825.         else
  826.             tm_file=pa/pa1-hpux.h
  827.         fi
  828.         broken_install=yes
  829.         install_headers_dir=install-headers-cpio
  830.         use_collect2=yes
  831.         ;;
  832.     hppa1.0-*-hpux*)
  833.         cpu_type=pa
  834.         xm_file=pa/xm-pahpux.h
  835.         xmake_file=pa/x-pa-hpux
  836.         tmake_file=pa/t-pa
  837.         if [ x$gas = xyes ]
  838.         then
  839.             tm_file=pa/pa-ghpux.h
  840.         else
  841.             tm_file=pa/pa-hpux.h
  842.         fi
  843.         broken_install=yes
  844.         install_headers_dir=install-headers-cpio
  845.         use_collect2=yes
  846.         ;;
  847.     hppa1.1-*-hiux*)
  848.         cpu_type=pa
  849.         xm_file=pa/xm-pahpux.h
  850.         xmake_file=pa/x-pa-hpux
  851.         tmake_file=pa/t-pa
  852.         if [ x$gas = xyes ]
  853.         then
  854.             tm_file=pa/pa1-ghiux.h
  855.         else
  856.             tm_file=pa/pa1-hiux.h
  857.         fi
  858.         broken_install=yes
  859.         install_headers_dir=install-headers-cpio
  860.         use_collect2=yes
  861.         ;;
  862.     hppa1.0-*-hiux*)
  863.         cpu_type=pa
  864.         xm_file=pa/xm-pahpux.h
  865.         xmake_file=pa/x-pa-hpux
  866.         tmake_file=pa/t-pa
  867.         if [ x$gas = xyes ]
  868.         then
  869.             tm_file=pa/pa-ghiux.h
  870.         else
  871.             tm_file=pa/pa-hiux.h
  872.         fi
  873.         broken_install=yes
  874.         install_headers_dir=install-headers-cpio
  875.         use_collect2=yes
  876.         ;;
  877.     hppa*-*-lites*)
  878.         cpu_type=pa
  879.         tm_file=pa/pa1.h
  880.         use_collect2=yes
  881.         fixincludes=Makefile.in
  882.         ;;
  883.     i370-*-mvs*)
  884.         cpu_type=i370
  885.         tm_file=i370/mvs.h
  886.         xm_file=i370/xm-mvs.h
  887.         out_file=i370/mvs370.c
  888.         ;;
  889.     i[345]86-ibm-aix*)        # IBM PS/2 running AIX
  890.         cpu_type=i386
  891.                 if [ x$gas = xyes ]
  892.         then
  893.             tm_file=i386/aix386.h
  894.             extra_parts="crtbegin.o crtend.o"
  895.             tmake_file=i386/t-crtstuff
  896.         else
  897.             tm_file=i386/aix386ng.h
  898.             use_collect2=yes
  899.         fi
  900.         xm_file=i386/xm-aix.h
  901.         xmake_file=i386/x-aix
  902.         broken_install=yes
  903.         ;;
  904.     i486-ncr-sysv4*)        # NCR 3000 - i486 running system V.4
  905.         cpu_type=i386
  906.         xm_file=i386/xm-sysv4.h
  907.         xmake_file=i386/x-ncr3000
  908.         tm_file=i386/sysv4.h
  909.         extra_parts="crtbegin.o crtend.o"
  910.         tmake_file=i386/t-crtpic
  911.         ;;
  912.     i[345]86-*-next*)
  913.         cpu_type=i386
  914.         tm_file=i386/next.h
  915.         out_file=i386/next.c
  916.         xm_file=i386/xm-next.h
  917.         tmake_file=next/t-next
  918.         xmake_file=next/x-next
  919.         extra_objs=machopic.o
  920.         extra_passes=cc1obj
  921.         fixincludes=Makefile.in # On NeXT, the headers are ok already.
  922.         makefile_cond="$makefile_cond next-headers"
  923.         ;;
  924.     i[345]86-sequent-bsd*)         # 80386 from Sequent
  925.         cpu_type=i386
  926.         use_collect2=yes
  927.         if [ x$gas = xyes ]
  928.         then
  929.             tm_file=i386/seq-gas.h
  930.         else
  931.             tm_file=i386/sequent.h
  932.         fi
  933.         ;;
  934.     i[345]86-sequent-ptx1*)
  935.         cpu_type=i386
  936.         xm_file=i386/xm-sysv3.h
  937.         xmake_file=i386/x-sysv3
  938.         tm_file=i386/seq-sysv3.h
  939.         tmake_file=i386/t-crtstuff
  940.         fixincludes=fixinc.ptx
  941.         extra_parts="crtbegin.o crtend.o"
  942.         install_headers_dir=install-headers-cpio
  943.         broken_install=yes
  944.         ;;
  945.     i[345]86-sequent-ptx2* | i[345]86-sequent-sysv*)
  946.         cpu_type=i386
  947.         xm_file=i386/xm-sysv3.h
  948.         xmake_file=i386/x-sysv3
  949.         tm_file=i386/seq2-sysv3.h
  950.         tmake_file=i386/t-crtstuff
  951.         extra_parts="crtbegin.o crtend.o"
  952.         fixincludes=fixinc.ptx
  953.         install_headers_dir=install-headers-cpio
  954.         broken_install=yes
  955.         ;;
  956.     i386-sun-sunos*)        # Sun i386 roadrunner
  957.         xm_file=i386/xm-sun.h
  958.         tm_file=i386/sun.h
  959.         use_collect2=yes
  960.         ;;
  961.     i[345]86-*-aout*)
  962.         cpu_type=i386
  963.         tm_file=i386/i386-aout.h
  964.         tmake_file=i386/t-i386bare
  965.         ;;
  966.     i[345]86-*-bsdi* | i[345]86-*-bsd386*)
  967.         cpu_type=i386
  968.         tm_file=i386/bsd386.h
  969.         xm_file=i386/xm-bsd386.h
  970. #        tmake_file=t-libc-ok
  971.         ;;
  972.     i[345]86-*-bsd*)
  973.         cpu_type=i386
  974.         tm_file=i386/386bsd.h
  975.         xm_file=i386/xm-bsd386.h
  976. #        tmake_file=t-libc-ok
  977. # Next line turned off because both 386BSD and BSD/386 use GNU ld.
  978. #        use_collect2=yes
  979.         ;;
  980.     i[345]86-*-freebsd*)
  981.         cpu_type=i386
  982.         tm_file=i386/freebsd.h
  983.         xm_file=i386/xm-freebsd.h
  984.         # On FreeBSD, the headers are already ok.
  985.         fixincludes=Makefile.in
  986.         xmake_file=i386/x-freebsd
  987.         ;;
  988.     i[345]86-*-netbsd*)
  989.         cpu_type=i386
  990.         tm_file=i386/netbsd.h
  991.         xm_file=i386/xm-netbsd.h
  992.         # On NetBSD, the headers are already okay.
  993.         fixincludes=Makefile.in
  994.         tmake_file=t-libc-ok
  995.         xmake_file=x-netbsd
  996.         ;;
  997.     i[345]86-*-coff*)
  998.         cpu_type=i386
  999.         tm_file=i386/i386-coff.h
  1000.         tmake_file=i386/t-i386bare
  1001.         ;;
  1002.     i[345]86-*-gnu*)
  1003.         cpu_type=i386    # GNU supports this CPU; rest done below.
  1004.         ;;
  1005.     i[345]86-*-isc*)        # 80386 running ISC system
  1006.         cpu_type=i386
  1007.         xm_file=i386/xm-isc.h
  1008.         case $machine in
  1009.           i[345]86-*-isc[34]*)
  1010.             xmake_file=i386/x-isc3
  1011.             ;;
  1012.           *)
  1013.             xmake_file=i386/x-isc
  1014.             ;;
  1015.         esac
  1016.         echo $xmake_file
  1017.                 if [ x$gas = xyes -a x$stabs = xyes ]
  1018.         then
  1019.             tm_file=i386/iscdbx.h
  1020.             tmake_file=i386/t-svr3dbx
  1021.             extra_parts="crtbegin.o crtend.o svr3.ifile svr3z.ifile"
  1022.         else
  1023.             tm_file=i386/isccoff.h
  1024.             tmake_file=i386/t-crtstuff
  1025.             extra_parts="crtbegin.o crtend.o"
  1026.         fi
  1027.         install_headers_dir=install-headers-cpio
  1028.         broken_install=yes
  1029.         ;;
  1030.     i[345]86-*-linux*oldld*)    # Intel 80386's running Linux
  1031.         cpu_type=i386        # with a.out format using pre BFD linkers
  1032.         xm_file=i386/xm-linux.h
  1033.         xmake_file=x-linux
  1034.         tm_file=i386/linux-oldld.h
  1035.         fixincludes=Makefile.in #On Linux, the headers are ok already.
  1036.         broken_install=yes
  1037.         gnu_ld=yes
  1038.         ;;
  1039.     i[345]86-*-linux*aout*)        # Intel 80386's running Linux
  1040.         cpu_type=i386        # with a.out format
  1041.         xm_file=i386/xm-linux.h
  1042.         xmake_file=x-linux
  1043.         tm_file=i386/linux-aout.h
  1044.         fixincludes=Makefile.in #On Linux, the headers are ok already.
  1045.         broken_install=yes
  1046.         gnu_ld=yes
  1047.         ;;
  1048.     i[345]86-*-linux*)        # Intel 80386's running Linux
  1049.         cpu_type=i386        # with ELF format
  1050.         xm_file=i386/xm-linux.h
  1051.         xmake_file=x-linux
  1052.         tm_file=i386/linux.h
  1053.         fixincludes=Makefile.in #On Linux, the headers are ok already.
  1054.         broken_install=yes
  1055.         gnu_ld=yes
  1056.         # Don't use it. Linux uses a slightly different one.
  1057.         # The real one comes with the Linux C library.
  1058.         #extra_parts="crtbegin.o crtend.o"
  1059.         ;;
  1060.       i[345]86-go32-msdos | i[345]86-*-go32)
  1061.               cpu_type=i386
  1062.               tm_file=i386/go32.h
  1063.               ;;
  1064.     i[345]86-*-lynxos*)
  1065.         cpu_type=i386
  1066.         if [ x$gas = xyes ]
  1067.         then
  1068.             tm_file=i386/lynx.h
  1069.         else
  1070.             tm_file=i386/lynx-ng.h
  1071.         fi
  1072.         xm_file=i386/xm-lynx.h
  1073.         tmake_file=i386/t-i386bare
  1074.         xmake_file=x-lynx
  1075.         ;;
  1076.     i[345]86-*-mach*)
  1077.         cpu_type=i386
  1078.         tm_file=i386/mach.h
  1079. #        tmake_file=t-libc-ok
  1080.         use_collect2=yes
  1081.         ;;
  1082.     i[345]86-*-osfrose*)        # 386 using OSF/rose
  1083.         cpu_type=i386
  1084.                 if [ x$elf = xyes ]
  1085.         then
  1086.             tm_file=i386/osfelf.h
  1087.             use_collect2=
  1088.         else
  1089.             tm_file=i386/osfrose.h
  1090.             use_collect2=yes
  1091.         fi
  1092.         xm_file=i386/xm-osf.h
  1093.         xmake_file=i386/x-osfrose
  1094.         extra_objs=halfpic.o
  1095.         ;;
  1096.     i[345]86-*-sco3.2v4*)         # 80386 running SCO 3.2v4 system
  1097.         cpu_type=i386
  1098.         xm_file=i386/xm-sco.h
  1099.         xmake_file=i386/x-sco4
  1100.         fixincludes=fixinc.sco
  1101.         broken_install=yes
  1102.         install_headers_dir=install-headers-cpio
  1103.                 if [ x$stabs = xyes ]
  1104.         then
  1105.             tm_file=i386/sco4dbx.h
  1106.             tmake_file=i386/t-svr3dbx
  1107.             extra_parts="svr3.ifile svr3z.rfile"
  1108.         else
  1109.             tm_file=i386/sco4.h
  1110.             tmake_file=i386/t-crtstuff
  1111.             extra_parts="crtbegin.o crtend.o"
  1112.         fi
  1113.         ;;
  1114.     i[345]86-*-sco*)         # 80386 running SCO system
  1115.         cpu_type=i386
  1116.         xm_file=i386/xm-sco.h
  1117.         xmake_file=i386/x-sco
  1118.         broken_install=yes
  1119.         install_headers_dir=install-headers-cpio
  1120.                 if [ x$stabs = xyes ]
  1121.         then
  1122.             tm_file=i386/scodbx.h
  1123.             tmake_file=i386/t-svr3dbx
  1124.             extra_parts="svr3.ifile svr3z.rfile"
  1125.         else
  1126.             tm_file=i386/sco.h
  1127.             extra_parts="crtbegin.o crtend.o"
  1128.             tmake_file=i386/t-crtstuff
  1129.         fi
  1130.         truncate_target=yes
  1131.         ;;
  1132.     i[345]86-*-solaris2* | i[345]86-*-sunos5*)
  1133.         cpu_type=i386
  1134.         xm_file=i386/xm-sysv4.h
  1135.         tm_file=i386/sol2.h
  1136.         tmake_file=i386/t-sol2
  1137.         extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
  1138.         xmake_file=x-svr4
  1139.         fixincludes=fixinc.svr4
  1140.         broken_install=yes
  1141.         ;;
  1142.     i[345]86-*-sysv4*)        # Intel 80386's running system V.4
  1143.         cpu_type=i386
  1144.         xm_file=i386/xm-sysv4.h
  1145.         if [ x$stabs = xyes ]
  1146.         then
  1147.             tm_file=i386/sysv4gdb.h
  1148.         else
  1149.             tm_file=i386/sysv4.h
  1150.         fi
  1151.         tmake_file=i386/t-crtpic
  1152.         xmake_file=x-svr4
  1153.         extra_parts="crtbegin.o crtend.o"
  1154.         ;;
  1155.     i[345]86-*-sysv*)        # Intel 80386's running system V
  1156.         cpu_type=i386
  1157.         xm_file=i386/xm-sysv3.h
  1158.         xmake_file=i386/x-sysv3
  1159.         if [ x$gas = xyes ]
  1160.         then
  1161.             if [ x$stabs = xyes ]
  1162.             then
  1163.                 tm_file=i386/svr3dbx.h
  1164.                 tmake_file=i386/t-svr3dbx
  1165.                 extra_parts="svr3.ifile svr3z.rfile"
  1166.             else
  1167.                 tm_file=i386/svr3gas.h
  1168.                 extra_parts="crtbegin.o crtend.o"
  1169.                 tmake_file=i386/t-crtstuff
  1170.             fi
  1171.         else
  1172.             tm_file=i386/sysv3.h
  1173.             extra_parts="crtbegin.o crtend.o"
  1174.             tmake_file=i386/t-crtstuff
  1175.         fi
  1176.         ;;
  1177.     i386-*-vsta)            # Intel 80386's running VSTa kernel
  1178.         xm_file=i386/xm-vsta.h
  1179.         tm_file=i386/vsta.h
  1180.         tmake_file=i386/t-vsta
  1181.         xmake_file=i386/x-vsta
  1182.         ;;
  1183.     i[345]86-nextpdo-winnt3*)
  1184.         cpu_type=i386
  1185.         out_file=i386/i386.c
  1186.         tm_file=i386/next-pdo.h
  1187.         xm_file=i386/xm-winnt.h
  1188.         xmake_file=winnt/x-winnt
  1189.         tmake_file=i386/t-winnt
  1190.         extra_gcc_objs="spawnv.o oldnames.o"
  1191.         extra_passes=cc1obj.exe
  1192.         extra_programs=ld.exe
  1193.         broken_install=yes
  1194.         fixincludes=Makefile.in # At the moment there is nothing to fix
  1195.         makefile_cond="$makefile_cond next-pdo win32-pdo"
  1196.         ;;
  1197.     i[345]86-*-winnt3*)
  1198.         cpu_type=i386
  1199.         tm_file=i386/win-nt.h
  1200.         out_file=i386/i386.c
  1201.         xm_file=i386/xm-winnt.h
  1202.         xmake_file=winnt/x-winnt
  1203.         tmake_file=i386/t-winnt
  1204.         extra_objs="winnt.o oldnames.o"
  1205.         extra_gcc_objs="spawnv.o oldnames.o"
  1206.         fixincludes=fixinc.winnt
  1207.         if [ x$gnu_ld != xyes ]
  1208.         then
  1209.             extra_programs=ld.exe
  1210.         fi
  1211.         ;;
  1212.     i860-alliant-*)        # Alliant FX/2800
  1213.         xm_file=i860/xm-fx2800.h
  1214.         xmake_file=i860/x-fx2800
  1215.         tm_file=i860/fx2800.h
  1216.         tmake_file=i860/t-fx2800
  1217.         extra_parts="crtbegin.o crtend.o"
  1218.         ;;
  1219.     i860-*-bsd*)
  1220.         if [ x$gas = xyes ]
  1221.         then
  1222.             tm_file=i860/bsd-gas.h
  1223.         else
  1224.             tm_file=i860/bsd.h
  1225.         fi
  1226.         use_collect2=yes
  1227.         ;;
  1228.     i860-*-mach*)
  1229.         xm_file=i860/xm-i860.h
  1230.         tm_file=i860/mach.h
  1231.         tmake_file=t-libc-ok
  1232.         ;;
  1233.     i860-*-osf*)            # Intel Paragon XP/S, OSF/1AD
  1234.         xm_file=i860/xm-paragon.h
  1235.         tm_file=i860/paragon.h
  1236.         tmake_file=t-osf
  1237.         broken_install=yes
  1238.         ;;
  1239.     i860-*-sysv3*)
  1240.         xm_file=i860/xm-sysv3.h
  1241.         xmake_file=i860/x-sysv3
  1242.         tm_file=i860/sysv3.h
  1243.         extra_parts="crtbegin.o crtend.o"
  1244.         ;;
  1245.     i860-*-sysv4*)
  1246.         xm_file=i860/xm-sysv4.h
  1247.         xmake_file=i860/x-sysv4
  1248.         tm_file=i860/sysv4.h
  1249.         tmake_file=t-svr4
  1250.         extra_parts="crtbegin.o crtend.o"
  1251.         ;;
  1252.     i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
  1253.         tmake_file=i960/t-vxworks960
  1254.         tm_file=i960/vx960.h
  1255.         use_collect2=yes
  1256.         ;;
  1257.     i960-wrs-vxworks5*)
  1258.         tmake_file=i960/t-vxworks960
  1259.         tm_file=i960/vx960-coff.h
  1260.         use_collect2=yes
  1261.         ;;
  1262.     i960-wrs-vxworks*)
  1263.         tmake_file=i960/t-vxworks960
  1264.         tm_file=i960/vx960.h
  1265.         use_collect2=yes
  1266.         ;;
  1267.     i960-*-coff*)
  1268.         tmake_file=i960/t-960bare
  1269.         tm_file=i960/i960-coff.h
  1270.         use_collect2=yes
  1271.         ;;
  1272.     i960-*-*)            # Default i960 environment.
  1273.         use_collect2=yes
  1274.         ;;
  1275.     m68000-convergent-sysv*)
  1276.         cpu_type=m68k
  1277.         xm_file=m68k/xm-3b1.h
  1278.         tm_file=m68k/ctix.h
  1279.         use_collect2=yes
  1280.         extra_headers=math-68881.h
  1281.         ;;
  1282.     m68000-hp-bsd*)            # HP 9000/200 running BSD
  1283.         cpu_type=m68k
  1284.         tm_file=m68k/hp2bsd.h
  1285.         xmake_file=m68k/x-hp2bsd
  1286.         use_collect2=yes
  1287.         extra_headers=math-68881.h
  1288.         ;;
  1289.     m68000-hp-hpux*)        # HP 9000 series 300
  1290.         cpu_type=m68k
  1291.         xm_file=m68k/xm-hp320.h
  1292.         if [ x$gas = xyes ]
  1293.         then
  1294.             xmake_file=m68k/x-hp320g
  1295.             tm_file=m68k/hp310g.h
  1296.         else
  1297.             xmake_file=m68k/x-hp320
  1298.             tm_file=m68k/hp310.h
  1299.         fi
  1300.         broken_install=yes
  1301.         install_headers_dir=install-headers-cpio
  1302.         use_collect2=yes
  1303.         extra_headers=math-68881.h
  1304.         ;;
  1305.     m68000-sun-sunos3*)
  1306.         cpu_type=m68k
  1307.         tm_file=m68k/sun2.h
  1308.         use_collect2=yes
  1309.         extra_headers=math-68881.h
  1310.         ;;
  1311.     m68000-sun-sunos4*)
  1312.         cpu_type=m68k
  1313.         tm_file=m68k/sun2o4.h
  1314.         use_collect2=yes
  1315.         extra_headers=math-68881.h
  1316.         ;;
  1317.     m68000-att-sysv*)
  1318.         cpu_type=m68k
  1319.         xm_file=m68k/xm-3b1.h
  1320.         if [ x$gas = xyes ]
  1321.         then
  1322.             tm_file=m68k/3b1g.h
  1323.         else
  1324.             tm_file=m68k/3b1.h
  1325.         fi
  1326.         use_collect2=yes
  1327.         extra_headers=math-68881.h
  1328.         ;;
  1329.     m68k-apollo-*)
  1330.         xmake_file=m68k/x-apollo68
  1331.         tm_file=m68k/apollo68.h
  1332.         use_collect2=yes
  1333.         extra_headers=math-68881.h
  1334.         ;;
  1335.     m68k-altos-sysv*)           # Altos 3068
  1336.         if [ x$gas = xyes ]
  1337.         then
  1338.                 xm_file=m68k/xm-altos3068.h
  1339.                 tm_file=m68k/altos3068.h
  1340.         else
  1341.             echo "The Altos is supported only with the GNU assembler" 1>&2
  1342.             exit 1
  1343.         fi
  1344.         extra_headers=math-68881.h
  1345.             ;;
  1346.     m68k-bull-sysv*)        # Bull DPX/2
  1347.         if [ x$gas = xyes ]
  1348.         then
  1349.             if [ x$stabs = xyes ]
  1350.             then
  1351.                 tm_file=m68k/dpx2cdbx.h
  1352.             else
  1353.                 tm_file=m68k/dpx2g.h
  1354.             fi
  1355.         else
  1356.             tm_file=m68k/dpx2.h
  1357.         fi
  1358.         xm_file=m68k/xm-m68kv.h
  1359.         xmake_file=m68k/x-dpx2
  1360.         use_collect2=yes
  1361.         extra_headers=math-68881.h
  1362.         ;;
  1363.     m68k-atari-sysv4*)              # Atari variant of V.4.
  1364.         tm_file=m68k/atari.h
  1365.         xm_file=m68k/xm-atari.h
  1366.         tmake_file=t-svr4
  1367.         extra_parts="crtbegin.o crtend.o"
  1368.         extra_headers=math-68881.h
  1369.         ;;
  1370.     m68k-motorola-sysv*)
  1371.         xm_file=m68k/xm-mot3300.h
  1372.         xmake_file=m68k/x-mot3300
  1373.         if [ x$gas = xyes ]
  1374.         then
  1375.             tm_file=m68k/mot3300g.h
  1376.         else
  1377.             tm_file=m68k/mot3300.h
  1378.             gdb_needs_out_file_path=yes
  1379.         fi
  1380.         use_collect2=yes
  1381.         extra_headers=math-68881.h
  1382.         ;;
  1383.     m68k-ncr-sysv*)            # NCR Tower 32 SVR3
  1384.         tm_file=m68k/tower-as.h
  1385.         xm_file=m68k/xm-tower.h
  1386.         xmake_file=m68k/x-tower
  1387.         extra_parts="crtbegin.o crtend.o"
  1388.         extra_headers=math-68881.h
  1389.         ;;
  1390.         m68k-plexus-sysv*)
  1391.         tm_file=m68k/plexus.h
  1392.         xm_file=m68k/xm-plexus.h
  1393.         use_collect2=yes
  1394.         extra_headers=math-68881.h
  1395.         ;;
  1396.     m68k-tti-*)
  1397.         tm_file=m68k/pbb.h
  1398.         xm_file=m68k/xm-m68kv.h
  1399.         extra_headers=math-68881.h
  1400.         ;;
  1401.     m68k-crds-unos*)
  1402.         xm_file=m68k/xm-crds.h
  1403.         xmake_file=m68k/x-crds
  1404.         tm_file=m68k/crds.h
  1405.         broken_install=yes
  1406.         use_collect2=yes
  1407.         extra_headers=math-68881.h
  1408.         ;;
  1409.     m68k-cbm-sysv4*)        # Commodore variant of V.4.
  1410.         tm_file=m68k/amix.h
  1411.         xm_file=m68k/xm-amix.h
  1412.         xmake_file=m68k/x-amix
  1413.         tmake_file=t-svr4
  1414.         extra_parts="crtbegin.o crtend.o"
  1415.         extra_headers=math-68881.h
  1416.         ;;
  1417.     m68k-ccur-rtu)
  1418.         tm_file=m68k/ccur-GAS.h
  1419.         xmake_file=m68k/x-ccur
  1420.         extra_headers=math-68881.h
  1421.         use_collect2=yes
  1422.         broken_install=yes
  1423.         ;;
  1424.     m68k-hp-bsd4.4*)        # HP 9000/3xx running 4.4bsd
  1425.         tm_file=m68k/hp3bsd44.h
  1426.         xmake_file=m68k/x-hp3bsd44
  1427.         use_collect2=yes
  1428.         extra_headers=math-68881.h
  1429.         ;;
  1430.     m68k-hp-bsd*)            # HP 9000/3xx running Berkeley Unix
  1431.         tm_file=m68k/hp3bsd.h
  1432.         use_collect2=yes
  1433.         extra_headers=math-68881.h
  1434.         ;;
  1435.     m68k-isi-bsd*)
  1436.         if [ x$nfp = xyes ]
  1437.         then
  1438.             tm_file=m68k/isi-nfp.h
  1439.         else
  1440.             tm_file=m68k/isi.h
  1441.         fi
  1442.         use_collect2=yes
  1443.         extra_headers=math-68881.h
  1444.         ;;
  1445.     m68k-hp-hpux7*)    # HP 9000 series 300 running HPUX version 7.
  1446.         xm_file=m68k/xm-hp320.h
  1447.         if [ x$gas = xyes ]
  1448.         then
  1449.             xmake_file=m68k/x-hp320g
  1450.             tm_file=m68k/hp320g.h
  1451.         else
  1452.             xmake_file=m68k/x-hp320
  1453.             tm_file=m68k/hpux7.h
  1454.         fi
  1455.         broken_install=yes
  1456.         install_headers_dir=install-headers-cpio
  1457.         use_collect2=yes
  1458.         extra_headers=math-68881.h
  1459.         ;;
  1460.     m68k-hp-hpux*)    # HP 9000 series 300
  1461.         xm_file=m68k/xm-hp320.h
  1462.         if [ x$gas = xyes ]
  1463.         then
  1464.             xmake_file=m68k/x-hp320g
  1465.             tm_file=m68k/hp320g.h
  1466.         else
  1467.             xmake_file=m68k/x-hp320
  1468.             tm_file=m68k/hp320.h
  1469.         fi
  1470.         broken_install=yes
  1471.         install_headers_dir=install-headers-cpio
  1472.         use_collect2=yes
  1473.         extra_headers=math-68881.h
  1474.         ;;
  1475.     m68k-sun-mach*)
  1476.         tm_file=m68k/sun3mach.h
  1477.         use_collect2=yes
  1478.         extra_headers=math-68881.h
  1479.         ;;
  1480.     m68k-sony-newsos3*)
  1481.         if [ x$gas = xyes ]
  1482.         then
  1483.             tm_file=m68k/news3gas.h
  1484.         else
  1485.             tm_file=m68k/news3.h
  1486.         fi
  1487.         use_collect2=yes
  1488.         extra_headers=math-68881.h
  1489.         ;;
  1490.     m68k-sony-bsd* | m68k-sony-newsos*)
  1491.         if [ x$gas = xyes ]
  1492.         then
  1493.             tm_file=m68k/newsgas.h
  1494.         else
  1495.             tm_file=m68k/news.h
  1496.         fi
  1497.         use_collect2=yes
  1498.         extra_headers=math-68881.h
  1499.         ;;
  1500.     m68k-next-nextstep2*)
  1501.         tm_file=m68k/next21.h
  1502.         out_file=m68k/next.c
  1503.         xm_file=m68k/xm-next.h
  1504.         tmake_file=next/t-next
  1505.         xmake_file=next/x-next
  1506.         extra_headers=math-68881.h
  1507.         use_collect2=yes
  1508.                 ;;
  1509.     m68k-next-nextstep3*)
  1510.         tm_file=m68k/next.h
  1511.         out_file=m68k/next.c
  1512.         xm_file=m68k/xm-next.h
  1513.         tmake_file=next/t-next
  1514.         xmake_file=next/x-next
  1515.         extra_objs=machopic.o
  1516.         extra_passes=cc1obj
  1517.         extra_headers=math-68881.h
  1518.         fixincludes=Makefile.in # On NeXT, the headers are ok already.
  1519.         makefile_cond="$makefile_cond next-headers"
  1520.         ;;
  1521.     m68k-sun-sunos3*)
  1522.         if [ x$nfp = xyes ]
  1523.         then
  1524.             tm_file=m68k/sun3n3.h
  1525.         else
  1526.             tm_file=m68k/sun3o3.h
  1527.         fi
  1528.         use_collect2=yes
  1529.         extra_headers=math-68881.h
  1530.         ;;
  1531.     m68k-sun-sunos*)            # For SunOS 4 (the default).
  1532.         if [ x$nfp = xyes ]
  1533.         then
  1534.             tm_file=m68k/sun3n.h
  1535.         else
  1536.             tm_file=m68k/sun3.h
  1537.         fi
  1538.         use_collect2=yes
  1539.         extra_headers=math-68881.h
  1540.         ;;
  1541.     m68k-wrs-vxworks*)
  1542.         tm_file=m68k/vxm68k.h
  1543.         tmake_file=m68k/t-vxworks68
  1544.         extra_headers=math-68881.h
  1545.         ;;
  1546.     m68k-*-aout*)
  1547.         tmake_file=m68k/t-m68kbare
  1548.         tm_file=m68k/m68k-aout.h
  1549.         extra_headers=math-68881.h
  1550.         ;;
  1551.     m68k-*-coff*)
  1552.         tmake_file=m68k/t-m68kbare
  1553.         tm_file=m68k/m68k-coff.h
  1554.         extra_headers=math-68881.h
  1555.         ;;
  1556.     m68k-*-lynxos*)
  1557.         if [ x$gas = xyes ]
  1558.         then
  1559.             tm_file=m68k/lynx.h
  1560.         else
  1561.             tm_file=m68k/lynx-ng.h
  1562.         fi
  1563.         xm_file=m68k/xm-lynx.h
  1564.         xmake_file=x-lynx
  1565.         tmake_file=m68k/t-lynx
  1566.         extra_headers=math-68881.h
  1567.         ;;
  1568.     m68k-*-netbsd*)
  1569.         cpu_type=m68k
  1570.         tm_file=m68k/netbsd.h
  1571.         xm_file=m68k/xm-netbsd.h
  1572.         # On NetBSD, the headers are already okay.
  1573.         fixincludes=Makefile.in
  1574.         tmake_file=t-libc-ok
  1575.         xmake_file=x-netbsd
  1576.         ;;
  1577.     m68k-*-sysv3*)            # Motorola m68k's running system V.3
  1578.         xm_file=m68k/xm-m68kv.h
  1579.         xmake_file=m68k/x-m68kv
  1580.         extra_parts="crtbegin.o crtend.o"
  1581.         extra_headers=math-68881.h
  1582.         ;;
  1583.     m68k-*-sysv4*)            # Motorola m68k's running system V.4
  1584.         tm_file=m68k/m68kv4.h
  1585.         xm_file=m68k/xm-m68kv.h
  1586.         tmake_file=t-svr4
  1587.         extra_parts="crtbegin.o crtend.o"
  1588.         extra_headers=math-68881.h
  1589.         ;;
  1590.     m68k-*-linux*aout*)        # Motorola m68k's running Linux
  1591.         xm_file=m68k/xm-linux.h    # with a.out format
  1592.         xmake_file=x-linux
  1593.         tm_file=m68k/linux-aout.h
  1594.         tmake_file=m68k/t-linux
  1595.         fixincludes=Makefile.in #On Linux, the headers are ok already.
  1596.         extra_headers=math-68881.h
  1597.         gnu_ld=yes
  1598.         ;;
  1599.     m68k-*-linux*)            # Motorola m68k's running Linux
  1600.         xm_file=m68k/xm-linux.h    # with ELF format
  1601.         xmake_file=x-linux
  1602.         tm_file=m68k/linux.h
  1603.         tmake_file=m68k/t-linux
  1604.         fixincludes=Makefile.in #On Linux, the headers are ok already.
  1605.         extra_headers=math-68881.h
  1606.         gnu_ld=yes
  1607.         # Don't use it. Linux uses a slightly different one.
  1608.         # The real one comes with the Linux C library.
  1609.         #extra_parts="crtbegin.o crtend.o"
  1610.         ;;
  1611.     m88k-dg-dgux*)
  1612.         case $machine in
  1613.           m88k-dg-dguxbcs*)
  1614.             tm_file=m88k/dguxbcs.h
  1615.             xmake_file=m88k/x-dguxbcs
  1616.             ;;
  1617.           *)
  1618.             tm_file=m88k/dgux.h
  1619.             xmake_file=m88k/x-dgux
  1620.             ;;
  1621.         esac
  1622.         extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
  1623.         broken_install=yes
  1624.         if [ x$gas = xyes ]
  1625.         then
  1626.             tmake_file=m88k/t-dgux-gas
  1627.         else
  1628.             tmake_file=m88k/t-dgux
  1629.         fi
  1630.         fixincludes=fixinc.dgux
  1631.         ;;
  1632.     m88k-dolphin-sysv3*)
  1633.         tm_file=m88k/dolph.h
  1634.         extra_parts="crtbegin.o crtend.o"
  1635.         xm_file=m88k/xm-sysv3.h
  1636.         xmake_file=m88k/x-dolph
  1637.         if [ x$gas = xyes ]
  1638.         then
  1639.             tmake_file=m88k/t-m88k-gas
  1640.         fi
  1641.         ;;
  1642.     m88k-tektronix-sysv3)
  1643.         tm_file=m88k/tekXD88.h
  1644.         extra_parts="crtbegin.o crtend.o"
  1645.         xm_file=m88k/xm-sysv3.h
  1646.         xmake_file=m88k/x-tekXD88
  1647.         if [ x$gas = xyes ]
  1648.         then
  1649.             tmake_file=m88k/t-m88k-gas
  1650.         fi
  1651.         ;;
  1652.     m88k-*-aout*)
  1653.         cpu_type=m88k
  1654.         tm_file=m88k/m88k-aout.h
  1655.         ;;
  1656.     m88k-*-coff*)
  1657.         cpu_type=m88k
  1658.         tm_file=m88k/m88k-coff.h
  1659.         tmake_file=m88k/t-bug
  1660.         ;;
  1661.     m88k-*-luna*)
  1662.         tm_file=m88k/luna.h
  1663.         extra_parts="crtbegin.o crtend.o"
  1664.         if [ x$gas = xyes ]
  1665.         then
  1666.             tmake_file=m88k/t-luna-gas
  1667.         else
  1668.             tmake_file=m88k/t-luna
  1669.         fi
  1670.         ;;
  1671.     m88k-*-sysv3*)
  1672.         tm_file=m88k/sysv3.h
  1673.         extra_parts="crtbegin.o crtend.o"
  1674.         xm_file=m88k/xm-sysv3.h
  1675.         xmake_file=m88k/x-sysv3
  1676.         if [ x$gas = xyes ]
  1677.         then
  1678.             tmake_file=m88k/t-m88k-gas
  1679.         fi
  1680.         ;;
  1681.     m88k-*-sysv4*)
  1682.         tm_file=m88k/sysv4.h
  1683.         extra_parts="crtbegin.o crtend.o"
  1684.         xmake_file=m88k/x-sysv4
  1685.         tmake_file=m88k/t-sysv4
  1686.         ;;
  1687.     mips-sgi-irix6*)        # SGI System V.4., IRIX 6
  1688.         tm_file=mips/iris6.h
  1689.         xm_file=mips/xm-iris6.h
  1690.         broken_install=yes
  1691.         fixincludes=Makefile.in
  1692.         xmake_file=mips/x-iris6
  1693.         tmake_file=mips/t-iris6
  1694.         # See comment in mips/iris[56].h files.
  1695.         use_collect2=yes
  1696.         ;;
  1697.     mips-sgi-irix5cross64)        # Irix5 host, Irix 6 target, cross64
  1698.         tm_file=mips/cross64.h
  1699.         xm_file=mips/xm-iris5.h
  1700.         broken_install=yes
  1701.         fixincludes=Makefile.in
  1702.         xmake_file=mips/x-iris
  1703.         tmake_file=mips/t-cross64
  1704.         # See comment in mips/iris[56].h files.
  1705.         use_collect2=yes
  1706.         ;;
  1707.     mips-sgi-irix5*)        # SGI System V.4., IRIX 5
  1708.         if [ x$gas = xyes ]
  1709.         then
  1710.             if [ x$stabs = xyes ]
  1711.             then
  1712.                 tm_file=mips/iris5gdb.h
  1713.             else
  1714.                 tm_file=mips/iris5gas.h
  1715.             fi
  1716.         else
  1717.             tm_file=mips/iris5.h
  1718.         fi
  1719.         xm_file=mips/xm-iris5.h
  1720.         broken_install=yes
  1721.         fixincludes=Makefile.in
  1722.         xmake_file=mips/x-iris
  1723.         # mips-tfile doesn't work yet
  1724.         tmake_file=mips/t-mips-gas
  1725.         # See comment in mips/iris5.h file.
  1726.         use_collect2=yes
  1727.         ;;
  1728.     mips-sgi-irix4loser*)        # Mostly like a MIPS.
  1729.         if [ x$stabs = xyes ]; then
  1730.             tm_file=mips/iris4gl.h
  1731.         else
  1732.             tm_file=mips/iris4loser.h
  1733.         fi
  1734.         xm_file=mips/xm-iris4.h
  1735.         broken_install=yes
  1736.         xmake_file=mips/x-iris
  1737.         if [ x$gas = xyes ]
  1738.         then
  1739.             tmake_file=mips/t-mips-gas
  1740.         else
  1741.             extra_passes="mips-tfile mips-tdump"
  1742.         fi
  1743.         if [ x$gnu_ld != xyes ]
  1744.         then
  1745.             use_collect2=yes
  1746.         fi
  1747.         ;;
  1748.     mips-sgi-irix4*)        # Mostly like a MIPS.
  1749.         if [ x$stabs = xyes ]; then
  1750.             tm_file=mips/iris4-gdb.h
  1751.         else
  1752.             tm_file=mips/iris4.h
  1753.         fi
  1754.         xm_file=mips/xm-iris4.h
  1755.         broken_install=yes
  1756.         xmake_file=mips/x-iris
  1757.         if [ x$gas = xyes ]
  1758.         then
  1759.             tmake_file=mips/t-mips-gas
  1760.         else
  1761.             extra_passes="mips-tfile mips-tdump"
  1762.         fi
  1763.         if [ x$gnu_ld != xyes ]
  1764.         then
  1765.             use_collect2=yes
  1766.         fi
  1767.         ;;
  1768.     mips-sgi-*)            # Mostly like a MIPS.
  1769.         if [ x$stabs = xyes ]; then
  1770.             tm_file=mips/iris3-gdb.h
  1771.         else
  1772.             tm_file=mips/iris3.h
  1773.         fi
  1774.         xm_file=mips/xm-iris3.h
  1775.         broken_install=yes
  1776.         xmake_file=mips/x-iris3
  1777.         if [ x$gas = xyes ]
  1778.         then
  1779.             tmake_file=mips/t-mips-gas
  1780.         else
  1781.             extra_passes="mips-tfile mips-tdump"
  1782.         fi
  1783.         if [ x$gnu_ld != xyes ]
  1784.         then
  1785.             use_collect2=yes
  1786.         fi
  1787.         ;;
  1788.     mips-dec-osfrose*)        # Decstation running OSF/1 reference port with OSF/rose.
  1789.         tm_file=mips/osfrose.h
  1790.         xmake_file=mips/x-osfrose
  1791.         tmake_file=mips/t-osfrose
  1792.         extra_objs=halfpic.o
  1793.         use_collect2=yes
  1794.         ;;
  1795.     mips-dec-osf*)            # Decstation running OSF/1 as shipped by DIGITAL
  1796.         if [ x$stabs = xyes ]; then
  1797.             tm_file=mips/dec-gosf1.h
  1798.         else
  1799.             tm_file=mips/dec-osf1.h
  1800.         fi
  1801.         xmake_file=mips/x-dec-osf1
  1802.         if [ x$gas = xyes ]
  1803.         then
  1804.             tmake_file=mips/t-mips-gas
  1805.         else
  1806.             tmake_file=mips/t-ultrix
  1807.             extra_passes="mips-tfile mips-tdump"
  1808.         fi
  1809.         if [ x$gnu_ld != xyes ]
  1810.         then
  1811.             use_collect2=yes
  1812.         fi
  1813.         ;;
  1814.     mips-dec-bsd*)                  # Decstation running 4.4 BSD
  1815.               tm_file=mips/dec-bsd.h
  1816.               xmake_file=
  1817.               tmake_file=
  1818.               fixincludes=
  1819.           if [ x$gas = xyes ]
  1820.           then
  1821.                tmake_file=mips/t-mips-gas
  1822.           else
  1823.             tmake_file=mips/t-ultrix
  1824.             extra_passes="mips-tfile mips-tdump"
  1825.           fi
  1826.           if [ x$gnu_ld != xyes ]
  1827.           then
  1828.             use_collect2=yes
  1829.           fi
  1830.           ;;
  1831.     mips-dec-netbsd*)                  # Decstation running NetBSD
  1832.         tm_file=mips/netbsd.h
  1833.         xm_file=mips/xm-netbsd.h
  1834.         xmake_file=x-netbsd
  1835.         tmake_file=t-libc-ok
  1836.         fixincludes=Makefile.in
  1837.         prefix=$native_prefix
  1838.         ;;
  1839.     mips-sony-bsd* | mips-sony-newsos*)    # Sony NEWS 3600 or risc/news.
  1840.         if [ x$stabs = xyes ]; then
  1841.             tm_file=mips/news4-gdb.h
  1842.         else
  1843.             tm_file=mips/news4.h
  1844.         fi
  1845.         if [ x$gas = xyes ]
  1846.         then
  1847.             tmake_file=mips/t-mips-gas
  1848.         else
  1849.             extra_passes="mips-tfile mips-tdump"
  1850.         fi
  1851.         if [ x$gnu_ld != xyes ]
  1852.         then
  1853.             use_collect2=yes
  1854.         fi
  1855.         xmake_file=mips/x-sony
  1856.         ;;
  1857.     mips-sony-sysv*)        # Sony NEWS 3800 with NEWSOS5.0.
  1858.                     # That is based on svr4.
  1859.         # t-svr4 is not right because this system doesn't use ELF.
  1860.         if [ x$stabs = xyes ]; then
  1861.             tm_file=mips/news5-gdb.h
  1862.         else
  1863.             tm_file=mips/news5.h
  1864.         fi
  1865.         xm_file=mips/xm-news.h
  1866.         if [ x$gas = xyes ]
  1867.         then
  1868.             tmake_file=mips/t-mips-gas
  1869.         else
  1870.             extra_passes="mips-tfile mips-tdump"
  1871.         fi
  1872.         if [ x$gnu_ld != xyes ]
  1873.         then
  1874.             use_collect2=yes
  1875.         fi
  1876.         ;;
  1877.     mips-tandem-sysv4*)        # Tandem S2 running NonStop UX
  1878.         if [ x$stabs = xyes ]; then
  1879.             tm_file=mips/svr4-t-gdb.h
  1880.         else
  1881.             tm_file=mips/svr4-t.h
  1882.         fi
  1883.         xm_file=mips/xm-sysv4.h
  1884.         xmake_file=mips/x-sysv
  1885.         if [ x$gas = xyes ]
  1886.         then
  1887.             tmake_file=mips/t-mips-gas
  1888.             extra_parts="crtbegin.o crtend.o"
  1889.         else
  1890.             tmake_file=mips/t-mips
  1891.             extra_passes="mips-tfile mips-tdump"
  1892.         fi
  1893.         if [ x$gnu_ld != xyes ]
  1894.         then
  1895.             use_collect2=yes
  1896.         fi
  1897.         broken_install=yes
  1898.         ;;
  1899.     mips-*-ultrix* | mips-dec-mach3)    # Decstation.
  1900.         if [ x$stabs = xyes ]; then
  1901.             tm_file=mips/ultrix-gdb.h
  1902.         else
  1903.             tm_file=mips/ultrix.h
  1904.         fi
  1905.         xmake_file=mips/x-ultrix
  1906.         if [ x$gas = xyes ]
  1907.         then
  1908.             tmake_file=mips/t-mips-gas
  1909.         else
  1910.             tmake_file=mips/t-ultrix
  1911.             extra_passes="mips-tfile mips-tdump"
  1912.         fi
  1913.         if [ x$gnu_ld != xyes ]
  1914.         then
  1915.             use_collect2=yes
  1916.         fi
  1917.             ;;
  1918.     mips-*-riscos[56789]bsd*)
  1919.         if [ x$stabs = xyes ]; then    # MIPS BSD 4.3, RISC-OS 5.0
  1920.             tm_file=mips/bsd-5-gdb.h
  1921.         else
  1922.             tm_file=mips/bsd-5.h
  1923.         fi
  1924.         if [ x$gas = xyes ]
  1925.         then
  1926.             tmake_file=mips/t-bsd-gas
  1927.         else
  1928.             tmake_file=mips/t-bsd
  1929.             extra_passes="mips-tfile mips-tdump"
  1930.         fi
  1931.         if [ x$gnu_ld != xyes ]
  1932.         then
  1933.             use_collect2=yes
  1934.         fi
  1935.         broken_install=yes
  1936.             ;;
  1937.     mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
  1938.         if [ x$stabs = xyes ]; then    # MIPS BSD 4.3, RISC-OS 4.0
  1939.             tm_file=mips/bsd-4-gdb.h
  1940.         else
  1941.             tm_file=mips/bsd-4.h
  1942.         fi
  1943.         if [ x$gas = xyes ]
  1944.         then
  1945.             tmake_file=mips/t-bsd-gas
  1946.         else
  1947.             tmake_file=mips/t-bsd
  1948.             extra_passes="mips-tfile mips-tdump"
  1949.         fi
  1950.         if [ x$gnu_ld != xyes ]
  1951.         then
  1952.             use_collect2=yes
  1953.         fi
  1954.         broken_install=yes
  1955.             ;;
  1956.     mips-*-riscos[56789]sysv4*)
  1957.         if [ x$stabs = xyes ]; then    # MIPS System V.4., RISC-OS 5.0
  1958.             tm_file=mips/svr4-5-gdb.h
  1959.         else
  1960.             tm_file=mips/svr4-5.h
  1961.         fi
  1962.         xm_file=mips/xm-sysv4.h
  1963.         xmake_file=mips/x-sysv
  1964.         if [ x$gas = xyes ]
  1965.         then
  1966.             tmake_file=mips/t-svr4-gas
  1967.         else
  1968.             tmake_file=mips/t-svr4
  1969.             extra_passes="mips-tfile mips-tdump"
  1970.         fi
  1971.         if [ x$gnu_ld != xyes ]
  1972.         then
  1973.             use_collect2=yes
  1974.         fi
  1975.         broken_install=yes
  1976.         ;;
  1977.     mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
  1978.         if [ x$stabs = xyes ]; then    # MIPS System V.4. RISC-OS 4.0
  1979.             tm_file=mips/svr4-4-gdb.h
  1980.         else
  1981.             tm_file=mips/svr4-4.h
  1982.         fi
  1983.         xm_file=mips/xm-sysv.h
  1984.         xmake_file=mips/x-sysv
  1985.         if [ x$gas = xyes ]
  1986.         then
  1987.             tmake_file=mips/t-svr4-gas
  1988.         else
  1989.             tmake_file=mips/t-svr4
  1990.             extra_passes="mips-tfile mips-tdump"
  1991.         fi
  1992.         if [ x$gnu_ld != xyes ]
  1993.         then
  1994.             use_collect2=yes
  1995.         fi
  1996.         broken_install=yes
  1997.         ;;
  1998.     mips-*-riscos[56789]sysv*)
  1999.         if [ x$stabs = xyes ]; then    # MIPS System V.3, RISC-OS 5.0
  2000.             tm_file=mips/svr3-5-gdb.h
  2001.         else
  2002.             tm_file=mips/svr3-5.h
  2003.         fi
  2004.         xm_file=mips/xm-sysv.h
  2005.         xmake_file=mips/x-sysv
  2006.         if [ x$gas = xyes ]
  2007.         then
  2008.             tmake_file=mips/t-svr3-gas
  2009.         else
  2010.             tmake_file=mips/t-svr3
  2011.             extra_passes="mips-tfile mips-tdump"
  2012.         fi
  2013.         if [ x$gnu_ld != xyes ]
  2014.         then
  2015.             use_collect2=yes
  2016.         fi
  2017.         broken_install=yes
  2018.         ;;
  2019.     mips-*-sysv* | mips-*-riscos*sysv*)
  2020.         if [ x$stabs = xyes ]; then    # MIPS System V.3, RISC-OS 4.0
  2021.             tm_file=mips/svr3-4-gdb.h
  2022.         else
  2023.             tm_file=mips/svr3-4.h
  2024.         fi
  2025.         xm_file=mips/xm-sysv.h
  2026.         xmake_file=mips/x-sysv
  2027.         if [ x$gas = xyes ]
  2028.         then
  2029.             tmake_file=mips/t-svr3-gas
  2030.         else
  2031.             tmake_file=mips/t-svr3
  2032.             extra_passes="mips-tfile mips-tdump"
  2033.         fi
  2034.         if [ x$gnu_ld != xyes ]
  2035.         then
  2036.             use_collect2=yes
  2037.         fi
  2038.         broken_install=yes
  2039.         ;;
  2040.     mips-*-riscos[56789]*)            # Default MIPS RISC-OS 5.0.
  2041.         if [ x$stabs = xyes ]; then
  2042.             tm_file=mips/mips-5-gdb.h
  2043.         else
  2044.             tm_file=mips/mips-5.h
  2045.         fi
  2046.         if [ x$gas = xyes ]
  2047.         then
  2048.             tmake_file=mips/t-mips-gas
  2049.         else
  2050.             extra_passes="mips-tfile mips-tdump"
  2051.         fi
  2052.         if [ x$gnu_ld != xyes ]
  2053.         then
  2054.             use_collect2=yes
  2055.         fi
  2056.         broken_install=yes
  2057.         ;;
  2058.     mips-*-gnu*)
  2059.         cpu_type=mips    # GNU supports this CPU; rest done below.
  2060.         ;;
  2061.     mipsel-*-ecoff*)
  2062.         cpu_type=mips
  2063.         if [ x$stabs = xyes ]; then
  2064.             tm_file=mips/ecoffl-gdb.h
  2065.         else
  2066.             tm_file=mips/ecoffl.h
  2067.         fi
  2068.         tmake_file=mips/t-ecoff
  2069.         ;;
  2070.     mips-*-ecoff*)
  2071.         if [ x$stabs = xyes ]; then
  2072.             tm_file=mips/ecoff-gdb.h
  2073.         else
  2074.             tm_file=mips/ecoff.h
  2075.         fi
  2076.         tmake_file=mips/t-ecoff
  2077.         broken_install=yes
  2078.         ;;
  2079.     mipsel-*-elf*)
  2080.         cpu_type=mips
  2081.         tm_file=mips/elfl.h
  2082.         tmake_file=mips/t-ecoff
  2083.         ;;
  2084.     mips-*-elf*)
  2085.         cpu_type=mips
  2086.         tm_file=mips/elf.h
  2087.         tmake_file=mips/t-ecoff
  2088.         ;;
  2089.     mips64el-*-elf*)
  2090.         cpu_type=mips
  2091.         tm_file=mips/elfl64.h
  2092.         tmake_file=mips/t-ecoff
  2093.         ;;
  2094.     mips64orionel-*-elf*)
  2095.         cpu_type=mips
  2096.         tm_file=mips/elflorion.h
  2097.         tmake_file=mips/t-ecoff
  2098.         ;;
  2099.     mips64-*-elf*)
  2100.         cpu_type=mips
  2101.         tm_file=mips/elf64.h
  2102.         tmake_file=mips/t-ecoff
  2103.         ;;
  2104.     mips64orion-*-elf*)
  2105.         cpu_type=mips
  2106.         tm_file=mips/elforion.h
  2107.         tmake_file=mips/t-ecoff
  2108.         ;;
  2109.     mips-*-*)                # Default MIPS RISC-OS 4.0.
  2110.         if [ x$stabs = xyes ]; then
  2111.             tm_file=mips/mips-4-gdb.h
  2112.         else
  2113.             tm_file=mips/mips.h
  2114.         fi
  2115.         if [ x$gas = xyes ]
  2116.         then
  2117.             tmake_file=mips/t-mips-gas
  2118.         else
  2119.             extra_passes="mips-tfile mips-tdump"
  2120.         fi
  2121.         if [ x$gnu_ld != xyes ]
  2122.         then
  2123.             use_collect2=yes
  2124.         fi
  2125.         ;;
  2126.     ns32k-encore-bsd*)
  2127.         tm_file=ns32k/encore.h
  2128.         use_collect2=yes
  2129.         ;;
  2130.     ns32k-sequent-bsd*)
  2131.         tm_file=ns32k/sequent.h
  2132.         use_collect2=yes
  2133.         ;;
  2134.     ns32k-tek6100-bsd*)
  2135.         tm_file=ns32k/tek6100.h
  2136.         broken_install=yes
  2137.         use_collect2=yes
  2138.         ;;
  2139.     ns32k-tek6200-bsd*)
  2140.         tm_file=ns32k/tek6200.h
  2141.         broken_install=yes
  2142.         use_collect2=yes
  2143.         ;;
  2144. # This has not been updated to GCC 2.
  2145. #    ns32k-ns-genix*)
  2146. #        xm_file=ns32k/xm-genix.h
  2147. #        xmake_file=ns32k/x-genix
  2148. #        tm_file=ns32k/genix.h
  2149. #        broken_install=yes
  2150. #        use_collect2=yes
  2151. #        ;;
  2152.     ns32k-merlin-*)
  2153.         tm_file=ns32k/merlin.h
  2154.         use_collect2=yes
  2155.         ;;
  2156.     ns32k-pc532-mach*)
  2157.         tm_file=ns32k/pc532-mach.h
  2158.         use_collect2=yes
  2159.         ;;
  2160.     ns32k-pc532-minix*)
  2161.         tm_file=ns32k/pc532-min.h
  2162.         xm_file=ns32k/xm-pc532-min.h
  2163.         use_collect2=yes
  2164.         ;;
  2165.     ns32k-pc532-netbsd*)
  2166.         tm_file=ns32k/netbsd.h
  2167.         xm_file=ns32k/xm-netbsd.h
  2168.         tmake_file=t-libc-ok
  2169.         # On NetBSD, the headers are already okay.
  2170.         fixincludes=Makefile.in
  2171.         xmake_file=x-netbsd
  2172.         ;;
  2173.     pyramid-*-*)
  2174.         cpu_type=pyr
  2175.         xmake_file=pyr/x-pyr
  2176.         use_collect2=yes
  2177.         ;;
  2178.     romp-*-aos*)
  2179.         use_collect2=yes
  2180.         ;;
  2181.     romp-*-mach*)
  2182.         xmake_file=romp/x-mach
  2183.         use_collect2=yes
  2184.         ;;
  2185.     powerpc-ibm-aix[456789].*)
  2186.         cpu_type=rs6000
  2187.         tm_file=rs6000/aix41ppc.h
  2188.         tmake_file=rs6000/t-newas
  2189.         use_collect2=yes
  2190.         ;;
  2191.     powerpc-ibm-aix*)
  2192.         cpu_type=rs6000
  2193.         tm_file=rs6000/powerpc.h
  2194.         tmake_file=rs6000/t-rs6000
  2195.         use_collect2=yes
  2196.         ;;
  2197.     powerpc-*-sysv4* | powerpc-*-elf*)
  2198.         cpu_type=rs6000
  2199.         xm_file=rs6000/xm-sysv4.h
  2200.         tm_file=rs6000/sysv4.h
  2201.         if [ x$gas = xyes ]
  2202.         then
  2203.              tmake_file=rs6000/t-ppcgas
  2204.         else
  2205.              tmake_file=rs6000/t-ppc
  2206.         fi
  2207.         xmake_file=rs6000/x-sysv4
  2208.         ;;
  2209.     powerpc-*-eabiaix*)
  2210.         cpu_type=rs6000
  2211.         tm_file=rs6000/eabiaix.h
  2212.         tmake_file=rs6000/t-eabiaix
  2213.         fixincludes=Makefile.in
  2214.         ;;
  2215.     powerpc-*-eabisim*)
  2216.         cpu_type=rs6000
  2217.         tm_file=rs6000/eabisim.h
  2218.         tmake_file=rs6000/t-eabisim
  2219.         fixincludes=Makefile.in
  2220.         ;;
  2221.     powerpc-*-eabi*)
  2222.         cpu_type=rs6000
  2223.         tm_file=rs6000/eabi.h
  2224.         if [ x$gas = xyes ]
  2225.         then
  2226.              tmake_file=rs6000/t-eabigas
  2227.         else
  2228.              tmake_file=rs6000/t-eabi
  2229.         fi
  2230.         fixincludes=Makefile.in
  2231.         ;;
  2232.     powerpcle-*-sysv4* | powerpcle-*-elf*)
  2233.         cpu_type=rs6000
  2234.         xm_file=rs6000/xm-sysv4.h
  2235.         tm_file=rs6000/sysv4le.h
  2236.         if [ x$gas = xyes ]
  2237.         then
  2238.              tmake_file=rs6000/t-ppclegas
  2239.         else
  2240.              tmake_file=rs6000/t-ppc
  2241.         fi
  2242.         xmake_file=rs6000/x-sysv4
  2243.         ;;
  2244.     powerpcle-*-eabisim*)
  2245.         cpu_type=rs6000
  2246.         tm_file=rs6000/eabilesim.h
  2247.         tmake_file=rs6000/t-eabisim
  2248.         fixincludes=Makefile.in
  2249.         ;;
  2250.     powerpcle-*-eabi*)
  2251.         cpu_type=rs6000
  2252.         tm_file=rs6000/eabile.h
  2253.         if [ x$gas = xyes ]
  2254.         then
  2255.              tmake_file=rs6000/t-eabilegas
  2256.         else
  2257.              tmake_file=rs6000/t-eabi
  2258.         fi
  2259.         fixincludes=Makefile.in
  2260.         ;;
  2261.     rs6000-ibm-aix3.[01]*)
  2262.         tm_file=rs6000/aix31.h
  2263.         tmake_file=rs6000/t-rs6000
  2264.         xmake_file=rs6000/x-aix31
  2265.         use_collect2=yes
  2266.         ;;
  2267.     rs6000-ibm-aix3.2.[456789]*)
  2268.         tm_file=rs6000/aix3newas.h
  2269.         tmake_file=rs6000/t-newas
  2270.         use_collect2=yes
  2271.         ;;
  2272.     rs6000-ibm-aix[456789].*)
  2273.         tm_file=rs6000/aix41.h
  2274.         tmake_file=rs6000/t-newas
  2275.         xmake_file=rs6000/x-aix31
  2276.         use_collect2=yes
  2277.         ;;
  2278.     rs6000-ibm-aix*)
  2279.         use_collect2=yes
  2280.         tmake_file=rs6000/t-rs6000
  2281.         ;;
  2282.     rs6000-bull-bosx)
  2283.         tmake_file=rs6000/t-rs6000
  2284.         use_collect2=yes
  2285.         ;;
  2286.     rs6000-*-mach*)
  2287.         xm_file=rs6000/xm-mach.h
  2288.         tm_file=rs6000/mach.h
  2289.         tmake_file=rs6000/t-rs6000
  2290.         xmake_file=rs6000/x-mach
  2291.         use_collect2=yes
  2292.         ;;
  2293.     rs6000-*-lynxos*)
  2294.         xmake_file=rs6000/x-lynx
  2295.         xm_file=rs6000/xm-lynx.h
  2296.         tm_file=rs6000/lynx.h
  2297.         tmake_file=rs6000/t-rs6000
  2298.         use_collect2=yes
  2299.         ;;
  2300.     sh-*-*)
  2301.         cpu_type=sh
  2302.         ;;
  2303.        sparc-*-next*)
  2304.          tm_file=sparc/next.h
  2305.          out_file=sparc/next.c
  2306.          xm_file=sparc/xm-next.h
  2307.          tmake_file=next/t-next
  2308.          xmake_file=next/x-next
  2309.         extra_objs=machopic.o
  2310.         extra_passes=cc1obj
  2311.          fixincludes=Makefile.in # On NeXT, the headers are ok already.
  2312.          makefile_cond="$makefile_cond next-headers"
  2313.          ;;
  2314.     sparc-tti-*)
  2315.         tm_file=sparc/pbd.h
  2316.         xm_file=sparc/xm-pbd.h
  2317.         ;;
  2318.     sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
  2319.         cpu_type=sparc
  2320.         tm_file=sparc/vxsparc.h
  2321.         tmake_file=sparc/t-vxsparc
  2322.         use_collect2=yes
  2323.         ;;
  2324.     sparc-*-aout*)
  2325.         tmake_file=sparc/t-sparcbare
  2326.         tm_file=sparc/sparc-aout.h
  2327.         ;;
  2328.     sparc-*-netbsd*)
  2329.         tm_file=sparc/netbsd.h
  2330.         xm_file=sparc/xm-netbsd.h
  2331.         # On NetBSD, the headers are already okay.
  2332.         fixincludes=Makefile.in
  2333.         tmake_file=t-libc-ok
  2334.         xmake_file=x-netbsd
  2335.         ;;
  2336.     sparc-*-bsd*)
  2337.         tm_file=sparc/bsd.h
  2338.         ;;
  2339.     sparc-*-lynxos*)
  2340.         if [ x$gas = xyes ]
  2341.         then
  2342.             tm_file=sparc/lynx.h
  2343.         else
  2344.             tm_file=sparc/lynx-ng.h
  2345.         fi
  2346.         xm_file=sparc/xm-lynx.h
  2347.         tmake_file=sparc/t-sunos41
  2348.         xmake_file=x-lynx
  2349.         ;;
  2350.     sparc-nextpdo-solaris2*)
  2351.         tm_file=sparc/next-pdo-sol2.h
  2352.         xm_file=sparc/xm-sol2.h
  2353.         tmake_file=sparc/t-sol2-nextpdo
  2354.         xmake_file=sparc/x-sysv4
  2355.         extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o collect2"
  2356.         fixincludes=fixinc.svr4
  2357.         broken_install=yes
  2358.         makefile_cond="$makefile_cond next-pdo solaris-pdo"
  2359.         ;;
  2360.     sparc-*-solaris2* | sparc-*-sunos5*)
  2361.         xm_file=sparc/xm-sol2.h
  2362.         tm_file=sparc/sol2.h
  2363.         tmake_file=sparc/t-sol2
  2364.         xmake_file=sparc/x-sysv4
  2365.         extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
  2366.         fixincludes=fixinc.svr4
  2367.         broken_install=yes
  2368.         ;;
  2369.     sparc-*-sunos4.0*)
  2370.         tm_file=sparc/sunos4.h
  2371.         tmake_file=sparc/t-sunos40
  2372.         use_collect2=yes
  2373.         ;;
  2374.         sparc-nextpdo-sunos4*)
  2375.         xm_file=sparc/xm-nextpdo-sunos4.h
  2376.         tm_file=sparc/next-pdo.h
  2377.         tmake_file=sparc/t-sunos4-nextpdo
  2378.         extra_programs=ld
  2379.         extra_passes="cc1obj cc1plus"
  2380.         extra_parts=libgcc.a
  2381.         use_collect2=yes
  2382.         makefile_cond="$makefile_cond next-pdo"
  2383.                 ;;
  2384.     sparc-*-sunos4*)
  2385.         tm_file=sparc/sunos4.h
  2386.         tmake_file=sparc/t-sunos41
  2387.         use_collect2=yes
  2388.         ;;
  2389.     sparc-*-sunos3*)
  2390.         tm_file=sparc/sun4o3.h
  2391.         use_collect2=yes
  2392.         ;;
  2393.     sparc-*-sysv4*)
  2394.         xm_file=sparc/xm-sysv4.h
  2395.         tm_file=sparc/sysv4.h
  2396.         tmake_file=t-svr4
  2397.         xmake_file=sparc/x-sysv4
  2398.         extra_parts="crtbegin.o crtend.o"
  2399.         ;;
  2400.     sparclite-*-coff*)
  2401.         cpu_type=sparc
  2402.         tm_file=sparc/litecoff.h
  2403.         tmake_file=sparc/t-sparclite
  2404.         ;;
  2405.     sparclite-*-*)
  2406.         cpu_type=sparc
  2407.         tm_file=sparc/lite.h
  2408.         tmake_file=sparc/t-sparclite
  2409.         use_collect2=yes
  2410.         ;;
  2411.     sparc64-*-aout*)
  2412.         cpu_type=sparc
  2413.         tmake_file=sparc/t-sp64
  2414.         tm_file=sparc/sp64-aout.h
  2415.         ;;
  2416.     sparc64-*-elf*)
  2417.         cpu_type=sparc
  2418.         tmake_file=sparc/t-sp64
  2419.         tm_file=sparc/sp64-elf.h
  2420.         extra_parts="crtbegin.o crtend.o"
  2421.         ;;
  2422. # This hasn't been upgraded to GCC 2.
  2423. #    tahoe-harris-*)            # Harris tahoe, using COFF.
  2424. #        tm_file=tahoe/harris.h
  2425. #        ;;
  2426. #    tahoe-*-bsd*)            # tahoe running BSD
  2427. #        ;;
  2428. # This hasn't been upgraded to GCC 2.
  2429. #    tron-*-*)
  2430. #        cpu_type=gmicro
  2431. #        use_collect2=yes
  2432. #        ;;
  2433.     vax-*-bsd*)            # vaxen running BSD
  2434.         use_collect2=yes
  2435.         ;;
  2436.     vax-*-sysv*)            # vaxen running system V
  2437.         xm_file=vax/xm-vaxv.h
  2438.         tm_file=vax/vaxv.h
  2439.         ;;
  2440.     vax-*-netbsd*)
  2441.         tm_file=vax/netbsd.h
  2442.         xm_file=vax/xm-netbsd.h
  2443.         tmake_file=t-libc-ok
  2444.         # On NetBSD, the headers are already okay.
  2445.         fixincludes=Makefile.in
  2446.         xmake_file=x-netbsd
  2447.         ;;
  2448.     vax-*-ultrix*)            # vaxen running ultrix
  2449.         tm_file=vax/ultrix.h
  2450.         use_collect2=yes
  2451.         ;;
  2452.     vax-*-vms*)            # vaxen running VMS
  2453.         xm_file=vax/xm-vms.h
  2454.         tm_file=vax/vms.h
  2455.         ;;
  2456.         pdp11-*-bsd)
  2457.         xm_file=pdp11/xm-pdp11.h
  2458.         tm_file=pdp11/2bsd.h
  2459.         tmake_file=pdp11/t-pdp11
  2460.                 ;;
  2461.         pdp11-*-*)
  2462.         xm_file=pdp11/xm-pdp11.h
  2463.         tm_file=pdp11/pdp11.h
  2464.         tmake_file=pdp11/t-pdp11
  2465.         ;;
  2466.     we32k-att-sysv*)
  2467.         cpu_type=we32k
  2468.         use_collect2=yes
  2469.         ;;
  2470.     *)
  2471.         echo "Configuration $machine not supported" 1>&2
  2472.         exit 1
  2473.         ;;
  2474.     esac
  2475.  
  2476.     case $machine in
  2477.     *-*-gnu*)
  2478.         # On the GNU system, the setup is just about the same on
  2479.         # each different CPU.  The specific machines that GNU
  2480.         # supports are matched above and just set $cpu_type.
  2481.         xm_file=${cpu_type}/xm-gnu.h
  2482.         tm_file=${cpu_type}/gnu.h
  2483.         extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  2484.         # GNU always uses ELF.
  2485.         elf=yes
  2486.         # GNU tools are the only tools.
  2487.         gnu_ld=yes
  2488.         gas=yes
  2489.         # On GNU, the headers are already okay.
  2490.         fixincludes=Makefile.in
  2491.         # Don't build libgcc1.c, because there is no non-GNU
  2492.         # compiler to build it with.  The GNU system C library will
  2493.         # include assembly versions of any needed functions.
  2494.         tmake_file=t-libc-ok
  2495.         ;;
  2496.     *-*-sysv4*)
  2497.         fixincludes=fixinc.svr4
  2498.         xmake_try_sysv=x-sysv
  2499.         broken_install=yes
  2500.         install_headers_dir=install-headers-cpio
  2501.         ;;
  2502.     *-*-sysv*)
  2503.         broken_install=yes
  2504.         install_headers_dir=install-headers-cpio
  2505.         ;;
  2506.     esac
  2507.  
  2508.     # Distinguish i386 from i486/i586.
  2509.     # ??? For the moment we treat i586 as an i486.
  2510.     # Also, do not run mips-tfile on MIPS if using gas.
  2511.     case $machine in
  2512.     i[45]86-*-*)
  2513.         target_cpu_default=2
  2514.         ;;
  2515.     mips*-*-*)
  2516.         if [ x$gas = xyes ]
  2517.         then
  2518.             target_cpu_default=16
  2519.         fi
  2520.         ;;
  2521.     alpha-*-*)
  2522.         if [ x$gas = xyes ]
  2523.         then
  2524.             target_cpu_default=4
  2525.         fi
  2526.         ;;
  2527.     esac
  2528.  
  2529.     # No need for collect2 if we have the GNU linker.
  2530.     case x$gnu_ld in 
  2531.     xyes)
  2532.         use_collect2=
  2533.         ;;
  2534.     esac
  2535.  
  2536. # Default certain vars that apply to both host and target in turn.
  2537.     if [ x$cpu_type = x ]
  2538.     then cpu_type=`echo $machine | sed 's/-.*$//'`
  2539.     fi
  2540.  
  2541. # Save data on machine being used to compile GCC in build_xm_file.
  2542. # Save data on host machine in vars host_xm_file and host_xmake_file.
  2543.     if [ x$pass1done = x ]
  2544.     then
  2545.         if [ x$xm_file = x ]
  2546.         then build_xm_file=$cpu_type/xm-$cpu_type.h
  2547.         else build_xm_file=$xm_file
  2548.         fi
  2549.         pass1done=yes
  2550.     else
  2551.         if [ x$pass2done = x ]
  2552.         then
  2553.             if [ x$xm_file = x ]
  2554.             then host_xm_file=$cpu_type/xm-$cpu_type.h
  2555.             else host_xm_file=$xm_file
  2556.             fi
  2557.             if [ x$xmake_file = x ]
  2558.             then xmake_file=$cpu_type/x-$cpu_type
  2559.             fi
  2560.             host_xmake_file=$xmake_file
  2561.             host_broken_install=$broken_install
  2562.             host_install_headers_dir=$install_headers_dir
  2563.             host_truncate_target=$truncate_target
  2564.             pass2done=yes
  2565.         fi
  2566.     fi
  2567. done
  2568.  
  2569. # Default the target-machine variables that were not explicitly set.
  2570. if [ x$tm_file = x ]
  2571. then tm_file=$cpu_type/$cpu_type.h; fi
  2572.  
  2573. if [ x$extra_headers = x ]
  2574. then extra_headers=; fi
  2575.  
  2576. if [ x$xm_file = x ]
  2577. then xm_file=$cpu_type/xm-$cpu_type.h; fi
  2578.  
  2579. md_file=$cpu_type/$cpu_type.md
  2580.  
  2581. if [ x$out_file = x ]
  2582. then out_file=$cpu_type/$cpu_type.c; fi
  2583.  
  2584. if [ x$tmake_file = x ]
  2585. then tmake_file=$cpu_type/t-$cpu_type
  2586. fi
  2587.  
  2588. # Say what files are being used for the output code and MD file.
  2589. echo "Using \`$srcdir/config/$out_file' to output insns."
  2590. echo "Using \`$srcdir/config/$md_file' as machine description file."
  2591. echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
  2592. echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
  2593. if [ $host_xm_file != $build_xm_file ]; then
  2594.     echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
  2595. fi
  2596.  
  2597. # Set up the list of links to be made.
  2598. # $links is the list of link names, and $files is the list of names to link to.
  2599. files="$host_xm_file $tm_file $xm_file $build_xm_file"
  2600. links="config.h tm.h tconfig.h hconfig.h"
  2601.  
  2602. rm -f config.bak
  2603. if [ -f config.status ]; then mv -f config.status config.bak; fi
  2604.  
  2605. # Make the links.
  2606. while [ -n "$files" ]
  2607. do
  2608.     # set file to car of files, files to cdr of files
  2609.     set $files; file=$1; shift; files=$*
  2610.     set $links; link=$1; shift; links=$*
  2611.  
  2612.     rm -f $link
  2613.     echo "#include \"$file\"" >$link
  2614. done
  2615.  
  2616. # Truncate the target if necessary
  2617. if [ x$host_truncate_target != x ]; then
  2618.     target=`echo $target | sed -e 's/\(..............\).*/\1/'`
  2619. fi
  2620.  
  2621. # Get the version number from the toplevel
  2622. version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/version.c`
  2623.  
  2624. # For the current directory and all of the language subdirectories,
  2625. # do the rest of the script ...
  2626.  
  2627. subdirs=
  2628. for lang in ${srcdir}/*/config-lang.in ..
  2629. do
  2630.     case $lang in
  2631.     ..) ;;
  2632.     # The odd quoting in the next line works around
  2633.     # an apparent bug in bash 1.12 on linux.
  2634.     ${srcdir}/[*]/config-lang.in) ;;
  2635.     *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
  2636.     esac
  2637. done
  2638.  
  2639. # Are we using gcc as the native compiler?
  2640. case $canon_host in
  2641. *linux*)    # All Linux's use gcc as the native compiler.
  2642.     prefix=$native_prefix
  2643.     ;;
  2644. esac
  2645.  
  2646. # Make empty files to contain the specs and options for each language.
  2647. # Then add #include lines to for a compiler that has specs and/or options.
  2648.  
  2649. lang_specs_files=
  2650. lang_options_files=
  2651. rm -f specs.h options.h
  2652. touch specs.h options.h
  2653. for subdir in . $subdirs
  2654. do
  2655.     if [ -f $srcdir/$subdir/lang-specs.h ]; then
  2656.         echo "#include \"$subdir/lang-specs.h\"" >>specs.h
  2657.         lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
  2658.     fi
  2659.     if [ -f $srcdir/$subdir/lang-options.h ]; then
  2660.         echo "#include \"$subdir/lang-options.h\"" >>options.h
  2661.         lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
  2662.     fi
  2663. done
  2664.  
  2665. # Define SET_MAKE if this old version of `make' doesn't define $(MAKE).
  2666. rm -f Makefile.xx
  2667. (echo 'all:'; echo '    @echo maketemp=$(MAKE)') >Makefile.xx
  2668. case `${MAKE-make} -f Makefile.xx 2>$null | grep maketemp=` in
  2669. 'maketemp=')
  2670.     SET_MAKE="MAKE = ${MAKE-make}"
  2671.     ;;
  2672. *)
  2673.     SET_MAKE=
  2674.     ;;
  2675. esac
  2676. rm -f Makefile.xx
  2677.  
  2678. objectdir=`pwd`
  2679. savesrcdir=$srcdir
  2680. for subdir in . $subdirs
  2681. do
  2682.     oldsrcdir=$savesrcdir
  2683.     driveletter=
  2684.  
  2685.     # Remove drive letter if necessary
  2686.     case $canon_host in
  2687.     *winnt*)
  2688.         case $oldsrcdir in
  2689.         [A-Za-z]:*)
  2690.             driveletter=`echo $oldsrcdir | sed -e 's,:.*,:,'`
  2691.             oldsrcdir=`echo $oldsrcdir | sed -e 's,^[A-Za-z]:,,'`
  2692.             ;;
  2693.         esac
  2694.         ;;
  2695.     esac
  2696.  
  2697.     # Re-adjust the path
  2698.     case $oldsrcdir in
  2699.     /*)
  2700.         case $subdir in
  2701.         .)
  2702.             srcdir=$driveletter$oldsrcdir
  2703.             ;;
  2704.         *)
  2705.             srcdir=$driveletter$oldsrcdir/$subdir
  2706.             ;;
  2707.         esac
  2708.         ;;
  2709.     *)
  2710.         case $subdir in
  2711.         .)
  2712.             ;;
  2713.         *)
  2714.             oldsrcdir=../${oldsrcdir}
  2715.             srcdir=$driveletter$oldsrcdir/$subdir
  2716.             ;;
  2717.         esac
  2718.         ;;
  2719.     esac
  2720.  
  2721.     #Put back drive letter
  2722.     oldsrcdir=$driveletter$oldsrcdir
  2723.     mainsrcdir=$oldsrcdir
  2724.     STARTDIR=`pwd`
  2725.     test -d $subdir || mkdir $subdir
  2726.     cd $subdir
  2727.  
  2728.     # Create Makefile.tem from Makefile.in.
  2729.     # Make it set VPATH if necessary so that the sources are found.
  2730.     # Also change its value of srcdir.
  2731.     # Also create a .gdbinit file which runs the one in srcdir
  2732.     # and tells GDB to look there for source files.
  2733.     case $srcdir in
  2734.     . | ./$subdir | .././$subdir)
  2735.         rm -f Makefile.tem
  2736.         cp Makefile.in Makefile.tem
  2737.         chmod +w Makefile.tem
  2738.         ;;
  2739.     *)
  2740.         rm -f Makefile.tem
  2741.         echo "VPATH = ${srcdir}" \
  2742.           | cat - ${srcdir}/Makefile.in \
  2743.           | sed "s@^srcdir = \.@srcdir = ${srcdir}@" > Makefile.tem
  2744.         rm -f .gdbinit
  2745.         echo "dir ." > .gdbinit
  2746.         echo "dir ${srcdir}" >> .gdbinit
  2747.         if [ x$gdb_needs_out_file_path = xyes ]
  2748.         then
  2749.             echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
  2750.         fi
  2751.         if [ "x$subdirs" != x ]; then
  2752.             for s in $subdirs
  2753.             do
  2754.                 echo "dir ${srcdir}/$s" >> .gdbinit
  2755.             done
  2756.         fi
  2757.         echo "source ${srcdir}/.gdbinit" >> .gdbinit
  2758.         ;;
  2759.     esac
  2760.     
  2761.     # Conditionalize the makefile for this host machine.
  2762.     if [ -f ${mainsrcdir}/config/${host_xmake_file} ]
  2763.     then
  2764.         rm -f Makefile.xx
  2765.         sed -e "/####host/  r ${mainsrcdir}/config/${host_xmake_file}" Makefile.tem > Makefile.xx
  2766.         echo "Merged ${host_xmake_file}."
  2767.         rm -f Makefile.tem
  2768.         mv Makefile.xx Makefile.tem
  2769.         dep_host_xmake_file=${host_xmake_file}
  2770.     else
  2771.     # Say in the makefile that there is no host_xmake_file,
  2772.     # by using a name which (when interpreted relative to $srcdir/config)
  2773.     # will duplicate another dependency: $srcdir/Makefile.in.
  2774.         dep_host_xmake_file=../Makefile.in
  2775.     fi
  2776.  
  2777.     # Add a definition for MAKE if system wants one.
  2778.     case "$SET_MAKE" in
  2779.     ?*)
  2780.         rm -f Makefile.xx
  2781.         (echo "$SET_MAKE"; cat Makefile.tem) >Makefile.xx
  2782.         rm -f Makefile.tem
  2783.         mv Makefile.xx Makefile.tem
  2784.     esac
  2785.  
  2786.     # Add a definition for INSTALL if system wants one.
  2787.     # This substitutes for lots of x-* files.
  2788.     if [ x$host_broken_install = x ]
  2789.     then true
  2790.     else
  2791.         rm -f Makefile.xx
  2792.         abssrcdir=`cd ${srcdir}; pwd`
  2793.         sed "s|^INSTALL = .*|INSTALL = ${abssrcdir}/install.sh -c|" Makefile.tem > Makefile.xx
  2794.         rm -f Makefile.tem
  2795.         mv Makefile.xx Makefile.tem
  2796.     fi
  2797.  
  2798.     # Some of the following don't make sense in the language makefiles,
  2799.     # but rather than introduce another level of nesting, we leave them
  2800.     # as is.
  2801.  
  2802.     # Set EXTRA_HEADERS according to extra_headers.
  2803.     # This substitutes for lots of t-* files.
  2804.     if [ "x$extra_headers" = x ]
  2805.     then true
  2806.     else
  2807.         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
  2808.         list=
  2809.         for file in $extra_headers;
  2810.         do
  2811.             list="${list} ${srcdir}/ginclude/${file}"
  2812.         done
  2813.         rm -f Makefile.xx
  2814.         sed "s|^EXTRA_HEADERS =|EXTRA_HEADERS = ${list}|" Makefile.tem > Makefile.xx
  2815.         rm -f Makefile.tem
  2816.         mv Makefile.xx Makefile.tem
  2817.     fi
  2818.     
  2819.     # Set EXTRA_PASSES according to extra_passes.
  2820.     # This substitutes for lots of t-* files.
  2821.     if [ "x$extra_passes" = x ]
  2822.     then true
  2823.     else
  2824.         rm -f Makefile.xx
  2825.         sed "s/^EXTRA_PASSES =/EXTRA_PASSES = $extra_passes/" Makefile.tem > Makefile.xx
  2826.         rm -f Makefile.tem
  2827.         mv Makefile.xx Makefile.tem
  2828.     fi
  2829.     
  2830.     # Set EXTRA_PARTS according to extra_parts.
  2831.     # This substitutes for lots of t-* files.
  2832.     if [ "x$extra_parts" = x ]
  2833.     then true
  2834.     else
  2835.         rm -f Makefile.xx
  2836.         sed "s/^EXTRA_PARTS =/EXTRA_PARTS = $extra_parts/" Makefile.tem > Makefile.xx
  2837.         rm -f Makefile.tem
  2838.         mv Makefile.xx Makefile.tem
  2839.     fi
  2840.  
  2841.     # Set EXTRA_PROGRAMS according to extra_programs.
  2842.     if [ "x$extra_programs" = x ]
  2843.     then true
  2844.     else
  2845.         rm -f Makefile.xx
  2846.         sed "s/^EXTRA_PROGRAMS =/EXTRA_PROGRAMS = $extra_programs/" Makefile.tem > Makefile.xx
  2847.         rm -f Makefile.tem
  2848.         mv Makefile.xx Makefile.tem
  2849.     fi
  2850.  
  2851.     # Set EXTRA_OBJS according to extra_objs.
  2852.     # This substitutes for lots of t-* files.
  2853.     if [ "x$extra_objs" = x ]
  2854.     then true
  2855.     else
  2856.         rm -f Makefile.xx
  2857.         sed "s|^EXTRA_OBJS =|EXTRA_OBJS = $extra_objs|" Makefile.tem > Makefile.xx
  2858.         rm -f Makefile.tem
  2859.         mv Makefile.xx Makefile.tem
  2860.     fi
  2861.  
  2862.     # Set EXTRA_GCC_OBJS according to extra_gcc_objs.
  2863.     # This substitutes for lots of t-* files.
  2864.     if [ "x$extra_gcc_objs" = x ]
  2865.     then true
  2866.     else
  2867.         rm -f Makefile.xx
  2868.         sed "s|^EXTRA_GCC_OBJS =|EXTRA_GCC_OBJS = $extra_gcc_objs|" Makefile.tem > Makefile.xx
  2869.         rm -f Makefile.tem
  2870.         mv Makefile.xx Makefile.tem
  2871.     fi
  2872.  
  2873.     # Add a definition of USE_COLLECT2 if system wants one.
  2874.     # Also tell toplev.c what to do.
  2875.     # This substitutes for lots of t-* files.
  2876.     if [ x$use_collect2 = x ]
  2877.     then true
  2878.     else
  2879.         rm -f Makefile.xx
  2880.         (echo "USE_COLLECT2 = ld"; echo "MAYBE_USE_COLLECT2 = -DUSE_COLLECT2")\
  2881.             | cat - Makefile.tem > Makefile.xx
  2882.         rm -f Makefile.tem
  2883.         mv Makefile.xx Makefile.tem
  2884.     fi
  2885.     
  2886.     # Add -DTARGET_CPU_DEFAULT for toplev.c if system wants one.
  2887.     # This substitutes for lots of *.h files.
  2888.     if [ x$target_cpu_default = x ]
  2889.     then true
  2890.     else
  2891.         rm -f Makefile.xx
  2892.     # This used cat, but rfg@netcom.com said that ran into NFS bugs.
  2893.         sed -e "/^# Makefile for GNU C compiler./c\\
  2894. MAYBE_TARGET_DEFAULT = -DTARGET_CPU_DEFAULT=$target_cpu_default\\
  2895. \# Makefile for GNU C compiler." Makefile.tem > Makefile.xx
  2896.         rm -f Makefile.tem
  2897.         mv Makefile.xx Makefile.tem
  2898.     fi
  2899.     
  2900.     # Set MD_DEPS if the real md file is in md.pre-cpp.
  2901.     # Set MD_CPP to the cpp to pass the md file through.  Md files use ';'
  2902.     # for line oriented comments, so we must always use a GNU cpp.  If
  2903.     # building gcc with a cross compiler, use the cross compiler just
  2904.     # built.  Otherwise, we can use the cpp just built.
  2905.     if [ "x$md_cppflags" = x ]
  2906.     then
  2907.         md_file=$srcdir/config/$md_file
  2908.     else
  2909.         rm -f Makefile.xx
  2910.           (if [ x$host = x$build ] ; then
  2911.             echo "MD_DEPS = $(md_file) cpp" ; echo "MD_CPP = ./cpp"
  2912.         else
  2913.             echo "MD_DEPS = md.pre-cpp" ; echo "MD_CPP = \$(HOST_CC) -x c -E"
  2914.         fi
  2915.         md_file=md
  2916.         echo "MD_CPPFLAGS = $md_cppflags") | \
  2917.           cat - Makefile.tem | sed -e "s|^MD_FILE[     ]*=.*|MD_FILE = md|" > Makefile.xx
  2918.         rm -f Makefile.tem
  2919.         mv Makefile.xx Makefile.tem
  2920.     fi
  2921.     
  2922.     # If we have gas in the build tree, make a link to it.
  2923.     if [ -f ../gas/Makefile ]; then
  2924.         rm -f as; $symbolic_link ../gas/as.new as 2>$null
  2925.     fi
  2926.     
  2927.     # If we have ld in the build tree, make a link to it.
  2928.     if [ -f ../ld/Makefile ]; then
  2929.         if [ x$use_collect2 = x ]; then
  2930.             rm -f ld; $symbolic_link ../ld/ld.new ld 2>$null
  2931.         else
  2932.             rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>$null
  2933.         fi
  2934.     fi
  2935.     
  2936.     # If using -program-transform-name, override the installation names.
  2937.     if [ "x${program_transform_set}" = "xyes" ] ; then
  2938.         sed -e "s/^program_transform_name[     ]*=.*$/program_transform_name = $program_transform_name/" \
  2939.             -e "s/^program_transform_cross_name[     ]*=.*$/program_transform_cross_name = $program_transform_name/" \
  2940.             Makefile.tem > Makefile.xx
  2941.         rm -f Makefile.tem
  2942.         mv Makefile.xx Makefile.tem
  2943.     fi
  2944.     
  2945.     # Conditionalize the makefile for this target machine.
  2946.     if [ -f ${mainsrcdir}/config/${tmake_file} ]
  2947.     then
  2948.         rm -f Makefile.xx
  2949.         sed -e "/####target/  r ${mainsrcdir}/config/${tmake_file}" Makefile.tem > Makefile.xx
  2950.         echo "Merged ${tmake_file}."
  2951.         rm -f Makefile.tem
  2952.         mv Makefile.xx Makefile.tem
  2953.         dep_tmake_file=${tmake_file}
  2954.     else
  2955.     # Say in the makefile that there is no tmake_file,
  2956.     # by using a name which (when interpreted relative to $srcdir/config)
  2957.     # will duplicate another dependency: $srcdir/Makefile.in.
  2958.         dep_tmake_file=../Makefile.in
  2959.     fi
  2960.     
  2961.     # If this is the top level Makefile, add the language fragments.
  2962.     # Languages are added via two mechanisms.  Some information must be
  2963.     # recorded in makefile variables, these are defined in config-lang.in.
  2964.     # We accumulate them and plug them into the main Makefile.
  2965.     # The other mechanism is a set of hooks for each of the main targets
  2966.     # like `clean', `install', etc.
  2967.     if [ $subdir = . ]
  2968.     then
  2969.         # These (without "all_") are set in each config-lang.in.
  2970.         # `language' must be a single word so is spelled singularly.
  2971.         all_languages=
  2972.         all_compilers=
  2973.         all_stagestuff=
  2974.         all_diff_excludes=
  2975.         # List of language makefile fragments.
  2976.         all_lang_makefiles=
  2977.  
  2978.         rm -f Makefile.xx Makefile.ll
  2979.         touch Makefile.ll
  2980.         for s in .. $subdirs
  2981.         do
  2982.             if [ $s != ".." ]
  2983.             then
  2984.                 language=
  2985.                 compilers=
  2986.                 stagestuff=
  2987.                 diff_excludes=
  2988.                 . ${mainsrcdir}/$s/config-lang.in
  2989.                 if [ "x$language" = x ]
  2990.                 then
  2991.                     echo "${mainsrcdir}/$s/config-lang.in doesn't set \$language." 1>&2
  2992.                     exit 1
  2993.                 fi
  2994.                 all_lang_makefiles="$all_lang_makefiles ${mainsrcdir}/$s/Make-lang.in ${mainsrcdir}/$s/Makefile.in"
  2995.                 all_languages="$all_languages $language"
  2996.                 all_compilers="$all_compilers $compilers"
  2997.                 all_stagestuff="$all_stagestuff $stagestuff"
  2998.                 all_diff_excludes="$all_diff_excludes $diff_excludes"
  2999.  
  3000.                 cat ${mainsrcdir}/$s/Make-lang.in >> Makefile.ll
  3001.             fi
  3002.         done
  3003.         sed -e "/####language fragments/ r Makefile.ll" Makefile.tem > Makefile.xx
  3004.         rm -f Makefile.tem
  3005.         mv Makefile.xx Makefile.tem
  3006.         sed -e "s|^SUBDIRS[     ]*=.*$|SUBDIRS = $subdirs|" \
  3007.             -e "s|^LANGUAGES[     ]*=[     ]*\(.*\)$|LANGUAGES = \1 $all_languages|" \
  3008.             -e "s|^COMPILERS[     ]*=[     ]*\(.*\)$|COMPILERS = \1 $all_compilers|" \
  3009.             -e "s|^LANG_MAKEFILES[     ]*=.*$|LANG_MAKEFILES = $all_lang_makefiles|" \
  3010.             -e "s|^LANG_STAGESTUFF[     ]*=.*$|LANG_STAGESTUFF = $all_stagestuff|" \
  3011.             -e "s|^LANG_DIFF_EXCLUDES[     ]*=.*$|LANG_DIFF_EXCLUDES = $all_diff_excludes|" \
  3012.             Makefile.tem > Makefile.xx
  3013.         rm -f Makefile.tem
  3014.         mv Makefile.xx Makefile.tem
  3015.  
  3016.         # Since we can't use `::' targets, we link each language in
  3017.         # with a set of hooks, reached indirectly via lang.${target}.
  3018.  
  3019.         target_list="all.build all.cross start.encap rest.encap \
  3020.             info dvi \
  3021.             install-normal install-common install-info install-man \
  3022.             uninstall distdir \
  3023.             mostlyclean clean distclean extraclean maintainer-clean \
  3024.             stage1 stage2 stage3 stage4"
  3025.         rm -f Makefile.ll
  3026.         for t in $target_list
  3027.         do
  3028.             x=
  3029.             for l in .. $all_languages
  3030.             do
  3031.                 if [ $l != ".." ]; then
  3032.                     x="$x $l.$t"
  3033.                 fi
  3034.             done
  3035.             echo "lang.$t: $x" >> Makefile.ll
  3036.         done
  3037.         sed -e "/####language hooks/ r Makefile.ll" Makefile.tem > Makefile.xx
  3038.         rm -f Makefile.tem
  3039.         mv Makefile.xx Makefile.tem
  3040.         rm -f Makefile.ll
  3041.  
  3042.         # If the host doesn't support symlinks, modify CC in
  3043.         # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
  3044.         # Otherwise, we can use "CC=$(CC)".
  3045.         rm -f symtest.tem
  3046.         if $symbolic_link symtest1.tem symtest.tem 2>$null
  3047.         then
  3048.             sed -e 's,CC=set-by-configure,CC=$(CC),' \
  3049.                 Makefile.tem > Makefile.xx
  3050.         else
  3051.             sed -e "s,CC=set-by-configure,CC=\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`," \
  3052.                 Makefile.tem > Makefile.xx
  3053.         fi
  3054.         rm -f Makefile.tem
  3055.         mv Makefile.xx Makefile.tem
  3056.         rm -f symtest.tem
  3057.  
  3058.         if [ "x$all_languages" != x ]
  3059.         then
  3060.             # Missing space after `Merged' is intentional.
  3061.             echo "Merged$all_languages fragment(s)."
  3062.         fi
  3063.  
  3064.     # Otherwise, this is a language subdirectory.  If the host supports
  3065.     # symlinks, point stage[123] at ../stage[123] so bootstrapping and the
  3066.     # installation procedure can still use CC="stage1/xgcc -Bstage1/".
  3067.     # If the host doesn't support symlinks, FLAGS_TO_PASS has been
  3068.     # modified to solve the problem there.
  3069.     else
  3070.         for t in stage1 stage2 stage3 stage4 include
  3071.         do
  3072.             rm -f $t
  3073.             $symbolic_link ../$t $t 2>$null
  3074.         done
  3075.     fi
  3076.  
  3077.     out_object_file=`basename $out_file .c`.o
  3078.     
  3079.     # Remove all formfeeds, since some Makes get confused by them.
  3080.     # Also arrange to give the variables `target', `host_xmake_file',
  3081.     # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES'
  3082.     # `out_file', `out_object', `md_file', `lang_specs_files',
  3083.     # `lang_options_files', and `INSTALL_HEADERS_DIR' values in the
  3084.     # Makefile from the values they have in this script.
  3085.     rm -f Makefile.xx
  3086.     rm -f aux-output.c aux-output.o md
  3087.     # Create an empty Makefile.sed first, to work around a Nextstep 3.3 bug.
  3088.     echo 's| ||' > Makefile.sed
  3089.     rm Makefile.sed
  3090.     echo 's| ||' > Makefile.sed
  3091.     echo "s|^target=.*$|target=${target}|" >> Makefile.sed
  3092.     echo "s|^xmake_file=.*$|xmake_file=${dep_host_xmake_file}|" >> Makefile.sed
  3093.     echo "s|^tmake_file=.*$|tmake_file=${dep_tmake_file}|" >> Makefile.sed
  3094.     echo "s|^version=.*$|version=${version}|" >> Makefile.sed
  3095.     echo "s|^version=.*$|version=${version}|" >> Makefile.sed
  3096.     echo "s|^out_file=.*$|out_file=${srcdir}/config/${out_file}|" >> Makefile.sed
  3097.     echo "s|^out_object_file=.*$|out_object_file=${out_object_file}|" >> Makefile.sed
  3098.     echo "s|^md_file=.*$|md_file=${md_file}|" >> Makefile.sed
  3099.     echo "s|^tm_file=.*$|tm_file=${srcdir}/config/${tm_file}|" >> Makefile.sed
  3100.     echo "s|^host_xm_file=.*$|host_xm_file=${srcdir}/config/${host_xm_file}|" >> Makefile.sed
  3101.     echo "s|^build_xm_file=.*$|build_xm_file=${srcdir}/config/${build_xm_file}|" >> Makefile.sed
  3102.     echo "s|^lang_specs_files=.*$|lang_specs_files=${lang_specs_files}|" >> Makefile.sed
  3103.     echo "s|^lang_options_files=.*$|lang_options_files=${lang_options_files}|" >> Makefile.sed
  3104.     echo "s|^prefix[     ]*=.*|prefix = $prefix|" >> Makefile.sed
  3105.     echo "s|^gxx_include_dir[     ]*=.*|gxx_include_dir = $gxx_include_dir|" >> Makefile.sed
  3106.     echo "s|^local_prefix[     ]*=.*|local_prefix = $local_prefix|" >> Makefile.sed
  3107.     echo "s|^exec_prefix[     ]*=.*|exec_prefix = $exec_prefix|" >> Makefile.sed
  3108.     echo "s|^FIXINCLUDES[     ]*=.*|FIXINCLUDES = $fixincludes|" >> Makefile.sed
  3109.     echo "s|^INSTALL_HEADERS_DIR[     ]*=.*$|INSTALL_HEADERS_DIR = ${host_install_headers_dir}|" >> Makefile.sed
  3110.     sed -f Makefile.sed Makefile.tem > Makefile.xx
  3111.     rm -f Makefile.tem Makefile.sed
  3112.     mv Makefile.xx Makefile.tem
  3113.     
  3114. # Handle makefile conditions...
  3115. if [ "x$makefile_cond" != "x" ]; then
  3116.   for cond in $makefile_cond; do
  3117.     rm -f Makefile.xx
  3118.     sed -e "/^%if $cond\$/d" \
  3119.     -e "/^%else $cond\$/,/^%endif $cond\$/d" \
  3120.     -e "/^%endif $cond\$/d" \
  3121.       Makefile.tem > Makefile.xx
  3122.     rm -f Makefile.tem
  3123.     mv Makefile.xx Makefile.tem
  3124.   done
  3125. fi
  3126.  
  3127. # Remove other conditions
  3128. rm -f Makefile.xx 
  3129. for cond in $all_makefile_conds; do
  3130.   sed -e "/^%if $cond/,/^%else $cond/d" \
  3131.      -e "/^%if $cond\$/,/^%endif $cond\$/d" \
  3132.      -e "/^%endif $cond\$/d" \
  3133.      Makefile.tem > Makefile.xx
  3134.   rm -f Makefile.tem
  3135.   mv Makefile.xx Makefile.tem
  3136. done
  3137.  
  3138.     # Install Makefile for real, after making final changes.
  3139.     # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
  3140.     # Also use all.cross instead of all.internal, and add cross-make to Makefile.
  3141.     if [ x$canon_host = x$canon_target ]
  3142.     then
  3143.         rm -f Makefile
  3144.           if [ x$canon_host = x$canon_build ]
  3145.         then
  3146.             mv Makefile.tem Makefile
  3147.         else
  3148.     #        When building gcc with a cross-compiler, we need to fix a
  3149.     #        few things.
  3150.             echo "build= $build" > Makefile
  3151.                 sed -e "s|objc-runtime$||" \
  3152.                 -e "/####build/  r ${mainsrcdir}/build-make" Makefile.tem >> Makefile
  3153.             rm -f Makefile.tem Makefile.xx
  3154.         fi
  3155.     else
  3156.         rm -f Makefile
  3157.         echo "CROSS=-DCROSS_COMPILE" > Makefile
  3158.         sed -e "/####cross/  r ${mainsrcdir}/cross-make" Makefile.tem >> Makefile
  3159.         rm -f Makefile.tem Makefile.xx
  3160.     fi
  3161.  
  3162.     echo "Created \`$subdir/Makefile'."
  3163.  
  3164.     # If a subdirectory has a configure script, run it.
  3165.     if [ x$subdir != x. ]
  3166.     then
  3167.         if [ -f $srcdir/configure ]
  3168.         then
  3169.             ${CONFIG_SHELL-sh} $srcdir/configure $arguments --srcdir=$srcdir
  3170.         fi
  3171.     fi
  3172.  
  3173.     cd $STARTDIR
  3174. done   # end of current-dir SUBDIRS loop
  3175.     
  3176. srcdir=$savesrcdir
  3177.  
  3178. # Describe the chosen configuration in config.status.
  3179. # Make that file a shellscript which will reestablish the same configuration.
  3180. echo "#!/bin/sh
  3181. # GCC was configured as follows:
  3182. ${srcdir}/configure" $arguments > config.new
  3183. echo echo host=$canon_host target=$canon_target build=$canon_build >> config.new
  3184. chmod a+x config.new
  3185. if [ -f config.bak ] && cmp config.bak config.new >$null 2>$null;
  3186. then
  3187.     mv -f config.bak config.status
  3188.     rm -f config.new
  3189. else
  3190.     mv -f config.new config.status
  3191.     rm -f config.bak
  3192. fi
  3193.  
  3194. str2=
  3195. str3=
  3196. str4=.
  3197.  
  3198. if [ x$canon_host = x$canon_target ]
  3199. then
  3200.     str1="native "
  3201. else
  3202.     str1="cross-"
  3203.     str2=" from $canon_host"
  3204. fi
  3205.  
  3206. if [ x$canon_host != x$canon_build ]
  3207. then
  3208.     str3=" on a $canon_build system"
  3209. fi
  3210.  
  3211. if [ "x$str2" != x ] || [ "x$str3" != x ]
  3212. then
  3213.     str4=
  3214. fi
  3215.  
  3216. echo "Links are now set up to build a ${str1}compiler for ${canon_target}$str4" 1>&2
  3217.  
  3218. if [ "x$str2" != x ] || [ "x$str3" != x ]
  3219. then
  3220.     echo " ${str2}${str3}." 1>&2
  3221. fi
  3222.  
  3223. exit 0
  3224.