]> gcc.gnu.org Git - gcc.git/blob - libstdc++-v3/configure.host
60d4075ad931f894bdd5f54f623fc03ece71c259
[gcc.git] / libstdc++-v3 / configure.host
1 # configure.host
2 #
3 # This shell script handles all host based configuration for libstdc++.
4 # It sets various shell variables based on the the host and the
5 # configuration options. You can modify this shell script without needing
6 # to rerun autoconf/aclocal/etc. This file is "sourced" not executed.
7 #
8 # You should read docs/html/17_intro/porting.* to make sense of this file.
9 #
10 #
11 # It uses the following shell variables as set by config.guess:
12 # host The configuration host (full CPU-vendor-OS triplet)
13 # host_cpu The configuration host CPU
14 # host_os The configuration host OS
15 #
16 #
17 # It sets the following shell variables:
18 #
19 # cpu_include_dir CPU-specific directory, defaults to cpu/generic
20 # if cpu/host_cpu doesn't exist. This is
21 # used to set atomicity_include_dir.
22 #
23 # os_include_dir OS-specific directory, defaults to os/generic.
24 #
25 # c_model the "C" header model, defaults to c_std.
26 #
27 # c_compatibility if "C" compatibility headers are necessary,
28 # defaults to no.
29 #
30 # abi_baseline_pair directory name for ABI compat testing,
31 # defaults to host_cpu-host_os (as per config.guess)
32 #
33 # fpos_include_dir directory for definition of fpos template
34 #
35 # atomicity_include_dir location of atomicity.h,
36 # defaults to cpu_include_dir
37 #
38 # It possibly modifies the following variables:
39 #
40 # OPT_LDFLAGS extra flags to pass when linking the library, of
41 # the form '-Wl,blah'
42 # (defaults to empty in acinclude.m4)
43 #
44 # port_specific_symbol_files
45 # whitespace-seperated list of files containing
46 # additional symbols to export from the shared
47 # library, when symbol versioning is in use
48 #
49 #
50 # If the defaults will not work for your platform, you need only change the
51 # variables that won't work, i.e., you do not need to explicitly set a
52 # working variable to its default. Most hosts only need to change the two
53 # *_include_dir variables.
54
55
56 # DEFAULTS
57 # Try to guess a default cpu_include_dir based on the name of the CPU. We
58 # cannot do this for os_include_dir; there are too many portable operating
59 # systems out there. :-)
60 c_model=c_std
61 c_compatibility=no
62 fpos_include_dir="os/generic"
63
64 # HOST-SPECIFIC OVERRIDES
65 # Set any CPU-dependent bits.
66 # Here we override defaults and catch more general cases due to naming
67 # conventions (e.g., chip_name* to catch all variants).
68
69 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
70 case "${host_cpu}" in
71 alpha*)
72 try_cpu=alpha
73 ;;
74 i[567]86 | x86_64)
75 try_cpu=i486
76 ;;
77 hppa*)
78 try_cpu=hppa
79 ;;
80 mips*)
81 # NB: cpu/mips/atomicity.h needs MIPS II or above.
82 # Of course, there is no sane way to test for this, no ABI macro,
83 # and no consistent host_cpu name differentiation. Therefore, only
84 # use it where it is known to be safe, ie it runs linux (see below).
85 try_cpu=generic
86 ;;
87 m680[246]0)
88 try_cpu=m68k
89 ;;
90 powerpc* | rs6000)
91 try_cpu=powerpc
92 ;;
93 s390x)
94 try_cpu=s390
95 ;;
96 sparc* | ultrasparc)
97 try_cpu=sparc
98 ;;
99 *)
100 if test -d ${glibcxx_srcdir}/config/cpu/${host_cpu}; then
101 try_cpu=${host_cpu}
102 else
103 try_cpu=generic
104 fi
105 ;;
106 esac
107
108 # Now look for the file(s) usually tied to a CPU model, and make
109 # default choices for those if they haven't been explicitly set
110 # already.
111 cpu_include_dir="cpu/${try_cpu}"
112 atomicity_include_dir=$cpu_include_dir
113 abi_baseline_pair=${try_cpu}-${host_os}
114
115
116 # Set any OS-dependent bits.
117 # Set the os_include_dir.
118 # Set c_model, c_compatibility here.
119 # If atomic ops and/or numeric limits are OS-specific rather than
120 # CPU-specifc, set those here too.
121 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
122 case "${host_os}" in
123 aix4.[3456789]* | aix[56789]*)
124 # We set os_include_dir to os/aix only on AIX 4.3 and newer, but
125 # os/aix/atomicity.h works on earlier versions of AIX 4.*, so we
126 # explicitly duplicate the directory for 4.[<3].
127 os_include_dir="os/aix"
128 atomicity_include_dir="os/aix"
129 OPT_LDFLAGS="-Wl,-G"
130 ;;
131 aix4.*)
132 atomicity_include_dir="os/aix"
133 ;;
134 aix*)
135 atomicity_include_dir="cpu/generic"
136 ;;
137 bsd*)
138 # Plain BSD attempts to share FreeBSD files.
139 os_include_dir="os/bsd/freebsd"
140 ;;
141 cygwin*)
142 os_include_dir="os/newlib"
143 ;;
144 *djgpp*) # leading * picks up "msdosdjgpp"
145 os_include_dir="os/djgpp"
146 ;;
147 freebsd*)
148 os_include_dir="os/bsd/freebsd"
149 ;;
150 gnu* | linux*)
151 os_include_dir="os/gnu-linux"
152 fpos_include_dir=$os_include_dir
153 ;;
154 hpux*)
155 os_include_dir="os/hpux"
156 ;;
157 irix[1-6] | irix[1-5].* | irix6.[0-4]*)
158 # This is known to work on at least IRIX 5.2 and 6.3.
159 os_include_dir="os/irix/irix5.2"
160 atomicity_include_dir=$os_include_dir
161 ;;
162 irix6.5*)
163 os_include_dir="os/irix/irix6.5"
164 atomicity_include_dir=$os_include_dir
165 ;;
166 mingw32*)
167 os_include_dir="os/mingw32"
168 ;;
169 netbsd*)
170 os_include_dir="os/bsd/netbsd"
171 ;;
172 qnx6.[12]*)
173 os_include_dir="os/qnx/qnx6.1"
174 c_model=c
175 ;;
176 solaris2.5*)
177 os_include_dir="os/solaris/solaris2.5"
178 ;;
179 solaris2.6*)
180 os_include_dir="os/solaris/solaris2.6"
181 ;;
182 solaris2.[789]*)
183 os_include_dir="os/solaris/solaris2.7"
184 ;;
185 windiss*)
186 os_include_dir="os/windiss"
187 ;;
188 *)
189 os_include_dir="os/generic"
190 ;;
191 esac
192
193
194 # Set any OS-dependent and CPU-dependent bits.
195 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
196 case "${host}" in
197 mips*-*-linux*)
198 atomicity_include_dir="cpu/mips"
199 ;;
200 x86_64-*-linux*)
201 abi_baseline_pair="x86_64-linux-gnu"
202 ;;
203 alpha*-*-freebsd5*)
204 abi_baseline_pair="alpha-freebsd5"
205 ;;
206 i*86-*-freebsd4*)
207 abi_baseline_pair="i386-freebsd4"
208 ;;
209 i*86-*-freebsd5*)
210 abi_baseline_pair="i386-freebsd5"
211 ;;
212 sparc*-*-freebsd5*)
213 abi_baseline_pair="sparc-freebsd5"
214 ;;
215 esac
This page took 0.046609 seconds and 5 git commands to generate.