1132718Skan# GCC host-specific configuration file.
2169689Skan# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006
3132718Skan# Free Software Foundation, Inc.
4132718Skan
5132718Skan#This file is part of GCC.
6132718Skan
7132718Skan#GCC is free software; you can redistribute it and/or modify it under
8132718Skan#the terms of the GNU General Public License as published by the Free
9132718Skan#Software Foundation; either version 2, or (at your option) any later
10132718Skan#version.
11132718Skan
12132718Skan#GCC is distributed in the hope that it will be useful, but WITHOUT
13132718Skan#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14132718Skan#FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15132718Skan#for more details.
16132718Skan
17132718Skan#You should have received a copy of the GNU General Public License
18132718Skan#along with GCC; see the file COPYING.  If not, write to the Free
19169689Skan#Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
20169689Skan#02110-1301, USA.
21132718Skan
22132718Skan# This is the GCC host-specific configuration file
23132718Skan# where a configuration type is mapped to different system-specific
24132718Skan# definitions and files.  This is invoked by the autoconf-generated
25132718Skan# configure script.  Putting it in a separate shell file lets us skip
26132718Skan# running autoconf when modifying host-specific information.
27132718Skan
28132718Skan# This file switches on the shell variable ${host}.  As much of this as
29132718Skan# is reasonable should be replaced with autoconf tests in the future.
30132718Skan
31132718Skan# This file sets the following shell variables for use by the
32132718Skan# autoconf-generated configure script:
33132718Skan#
34132718Skan#  host_xm_file         List of files to include when compiling for the
35132718Skan#                       host machine.
36132718Skan#
37132718Skan#  host_xm_defines      List of macros to define when compiling for the
38132718Skan#                       host machine.
39132718Skan#
40132718Skan#  host_xmake_file      List of host-specific makefile-fragments.
41132718Skan#
42132718Skan#  host_exeext          Set to the suffix, if the host machine requires
43132718Skan#                       executables to have a file name suffix.
44132718Skan#
45132718Skan#  host_extra_objs      List of extra host-dependent objects that should
46132718Skan#                       be linked into the compiler proper.
47132718Skan#
48132718Skan#  host_extra_gcc_objs  List of extra host-dependent objects that should
49132718Skan#                       be linked into the gcc driver.
50132718Skan#
51132718Skan#  out_host_hook_obj    An object file that provides the host hooks.
52169689Skan#
53169689Skan#  host_can_use_collect2 Set to yes normally; to no if the host cannot
54169689Skan#			link or otherwise use collect2
55169689Skan#  use_long_long_for_widest_fast_int Set this to 'yes' if 'long long'
56169689Skan#			(or '__int64') is wider than 'long' but still
57169689Skan#			efficeiently supported by the host hardware.
58169689Skan#			Only affects compile speed.  Default is 'no'.
59132718Skan
60132718Skan# When setting any of these variables, check to see if a corresponding
61132718Skan# variable is present in config.build; if so, you will likely want to 
62132718Skan# set it in both places.
63132718Skan
64132718Skan# Default settings.
65132718Skanhost_xm_file=
66132718Skanhost_xm_defines=
67132718Skanhost_xmake_file=
68132718Skanhost_exeext=
69132718Skanhost_extra_objs=
70132718Skanhost_extra_gcc_objs=
71132718Skanout_host_hook_obj=host-default.o
72169689Skanhost_can_use_collect2=yes
73169689Skanuse_long_long_for_widest_fast_int=no
74132718Skan
75132718Skan# Unsupported hosts list.  Generally, only include hosts known to fail here,
76132718Skan# since we allow hosts not listed to be supported generically.
77132718Skancase ${host} in
78132718Skan   i[34567]86-sequent-sysv \
79132718Skan | i[34567]86-sequent-sysv[123]* \
80132718Skan | i[34567]86-go32-* \
81132718Skan | i[34567]86-*-go32* \
82132718Skan | vax-*-vms*)
83132718Skan    echo "*** Configuration for host ${host} not supported" 1>&2
84132718Skan    exit 1
85132718Skan    ;;
86132718Skanesac
87132718Skan
88169689Skan# Common parts for widely ported systems.
89169689Skancase ${host} in
90169689Skan  *-darwin*)
91169689Skan    # Generic darwin host support.
92169689Skan    out_host_hook_obj=host-darwin.o
93169689Skan    host_xmake_file="${host_xmake_file} x-darwin"
94169689Skan    ;;
95169689Skanesac
96169689Skan
97169689Skancase ${host} in
98169689Skan  i[34567]86-*-* \
99169689Skan  | x86_64-*-* )
100169689Skan    case ${target} in
101169689Skan      i[34567]86-*-* \
102169689Skan      | x86_64-*-* )
103169689Skan	host_extra_gcc_objs="driver-i386.o"
104169689Skan	host_xmake_file="${host_xmake_file} i386/x-i386"
105169689Skan      ;;
106169689Skan    esac
107169689Skan    ;;
108169689Skanesac
109169689Skan
110132718Skan# Machine-specific settings.
111132718Skancase ${host} in
112132718Skan  alpha*-dec-*vms*)
113132718Skan    host_xm_file=alpha/xm-vms.h
114169689Skan    host_xmake_file="${host_xmake_file} alpha/x-vms"
115132718Skan    host_exeext=.exe
116169689Skan    host_can_use_collect2=no
117132718Skan    # This removes the cpu type and manufacturer components and
118132718Skan    #  replaces "." with "_" in the operating system version.
119132718Skan    target_noncanonical=`echo $host | sed 's/.*-.*-\(.*\)$/\1/' | sed 's/\./_/g'`
120132718Skan    prefix=/gnu
121132718Skan    local_prefix=/gnu
122132718Skan    ;;
123132718Skan  hppa1.1-*-pro*)
124169689Skan    host_xmake_file="${host_xmake_file} pa/x-ada"
125132718Skan    ;;
126132718Skan  hppa1.1-*-osf*)
127169689Skan    host_xmake_file="${host_xmake_file} pa/x-ada"
128132718Skan    ;;
129132718Skan  hppa1.1-*-rtems*)
130169689Skan    host_xmake_file="${host_xmake_file} pa/x-ada"
131132718Skan    ;;
132132718Skan  hppa1.1-*-bsd*)
133169689Skan    host_xmake_file="${host_xmake_file} pa/x-ada"
134132718Skan    ;;
135169689Skan  hppa1.0-*-hpux10* | hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
136169689Skan    out_host_hook_obj=host-hpux.o
137169689Skan    host_xmake_file="${host_xmake_file} pa/x-ada-hpux10 x-hpux"
138169689Skan    ;;
139132718Skan  hppa1.0-*-hpux11* | hppa1.1-*-hpux11* | hppa2*-*-hpux11* | \
140132718Skan  hppa*64*-*-hpux11*)
141169689Skan    out_host_hook_obj=host-hpux.o
142169689Skan    host_xmake_file="${host_xmake_file} pa/x-ada x-hpux"
143132718Skan    ;;
144161651Skan  hppa*-*-linux*)
145169689Skan    out_host_hook_obj=host-hpux.o
146169689Skan    host_xmake_file="${host_xmake_file} x-hpux"
147161651Skan    ;;
148132718Skan  i370-*-opened* | i370-*-mvs* ) # IBM 360/370/390 Architecture
149132718Skan    host_xm_defines='FATAL_EXIT_CODE=12'
150132718Skan    ;;
151132718Skan  i[34567]86-*-solaris2*)
152161651Skan    out_host_hook_obj=host-solaris.o
153169689Skan    host_xmake_file="${host_xmake_file} x-solaris"
154132718Skan    ;;
155132718Skan  i[34567]86-pc-msdosdjgpp*)
156132718Skan    host_xm_file=i386/xm-djgpp.h
157132718Skan    host_exeext=.exe
158132718Skan    # Shorten $target_noncanonical for 8.3 filename conventions.
159132718Skan    case ${target} in
160132718Skan      *pc-msdosdjgpp*)
161132718Skan        target_noncanonical=djgpp
162132718Skan        ;;
163132718Skan    esac
164132718Skan    ;;
165132718Skan  i[34567]86-*-pe | i[34567]86-*-cygwin*)
166132718Skan    host_xm_file=i386/xm-cygwin.h
167169689Skan    out_host_hook_obj=host-cygwin.o
168169689Skan    host_xmake_file="${host_xmake_file} i386/x-cygwin"
169132718Skan    host_exeext=.exe
170132718Skan    ;;
171132718Skan  i[34567]86-*-mingw32*)
172132718Skan    host_xm_file=i386/xm-mingw32.h
173169689Skan    host_xmake_file="${host_xmake_file} i386/x-mingw32"
174132718Skan    host_exeext=.exe
175169689Skan    out_host_hook_obj=host-mingw32.o
176132718Skan    ;;
177132718Skan  i[34567]86-*-uwin*)
178132718Skan    echo "*** UWIN may not be used as a host platform because"
179132718Skan    echo "*** linking with posix.dll is not allowed by the GNU GPL."
180132718Skan    exit 1
181132718Skan    ;;
182132718Skan  i[34567]86-*-interix3*)
183169689Skan    host_xmake_file="${host_xmake_file} x-interix"
184132718Skan    ;;
185169689Skan  i[34567]86-*-darwin* | x86_64-*-darwin*)
186169689Skan    out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o"
187169689Skan    host_xmake_file="${host_xmake_file} i386/x-darwin"
188132718Skan    ;;
189169689Skan  powerpc-*-beos*)
190169689Skan    host_can_use_collect2=no
191169689Skan    ;;
192132718Skan  powerpc-*-darwin*)
193169689Skan    out_host_hook_obj="${out_host_hook_obj} host-ppc-darwin.o"
194169689Skan    host_xmake_file="${host_xmake_file} rs6000/x-darwin"
195132718Skan    ;;
196169689Skan  powerpc64-*-darwin*)
197169689Skan    out_host_hook_obj="${out_host_hook_obj} host-ppc64-darwin.o"
198169689Skan    host_xmake_file="${host_xmake_file} rs6000/x-darwin64"
199169689Skan    ;;
200161651Skan  *-*-solaris2*)
201161651Skan    out_host_hook_obj=host-solaris.o
202169689Skan    host_xmake_file="${host_xmake_file} x-solaris"
203161651Skan    ;;
204161651Skan  *-*-linux*)
205161651Skan    out_host_hook_obj=host-linux.o
206169689Skan    host_xmake_file="${host_xmake_file} x-linux"
207161651Skan    ;;
208169689Skan  ia64-*-hpux*)
209169689Skan    use_long_long_for_widest_fast_int=yes
210169689Skan    out_host_hook_obj=host-hpux.o
211169689Skan    host_xmake_file="${host_xmake_file} x-hpux"
212169689Skan    ;;
213132718Skanesac
214