i686-pc-linux-gnu: To..
[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 ATOMICITYH.
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 # ATOMICITYH location of atomicity.h,
34 # defaults to cpu_include_dir
35 #
36 # It possibly modifies the following variables:
37 #
38 # OPT_LDFLAGS extra flags to pass when linking the library, of
39 # the form '-Wl,blah'
40 # (defaults to empty in acinclude.m4)
41 #
42 #
43 # If the defaults will not work for your platform, you need only change the
44 # variables that won't work, i.e., you do not need to explicitly set a
45 # working variable to its default. Most hosts only need to change the two
46 # *_include_dir variables.
47
48
49 # DEFAULTS
50 # Try to guess a default cpu_include_dir based on the name of the CPU. We
51 # cannot do this for os_include_dir; there are too many portable operating
52 # systems out there. :-)
53 c_model=c_std
54 c_compatibility=no
55
56
57 # HOST-SPECIFIC OVERRIDES
58 # Set any CPU-dependent bits.
59 # Here we override defaults and catch more general cases due to naming
60 # conventions (e.g., chip_name* to catch all variants).
61 if test -d ${glibcpp_srcdir}/config/cpu/${host_cpu}; then
62 try_cpu=${host_cpu}
63 fi
64
65 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
66 case "${host_cpu}" in
67 alpha*)
68 try_cpu=alpha
69 ;;
70 athlon* | i586 | i686 | i786 | x86_64)
71 try_cpu=i486
72 ;;
73 hppa*)
74 try_cpu=hppa
75 ;;
76 mips*)
77 # NB: cpu/mips/atomicity.h needs MIPS II or above.
78 # Of course, there is no sane way to test for this, no ABI macro,
79 # and no consistent host_cpu name differentiation. Therefore, only
80 # use it where it is known to be safe, ie it runs linux (see below).
81 try_cpu=generic
82 ;;
83 m680[246]0)
84 try_cpu=m68k
85 ;;
86 powerpc* | rs6000)
87 try_cpu=powerpc
88 ;;
89 s390x)
90 try_cpu=s390
91 ;;
92 sparc* | ultrasparc)
93 try_cpu=sparc
94 ;;
95 *)
96 try_cpu=generic
97 ;;
98 esac
99
100
101 # Now look for the file(s) usually tied to a CPU model, and make default
102 # choices for those if they haven't been explicitly set already.
103 cpu_include_dir="cpu/${try_cpu}"
104 ATOMICITYH=$cpu_include_dir
105
106
107 # Check whether ABI baseline file exists, if not try to guess name.
108 abi_baseline_pair=${try_cpu}-${host_os}
109 try_baseline_file=config/abi/${abi_baseline_pair}/baseline_symbols.txt
110 if test ! -e ${glibcpp_srcdir}/${try_baseline_file} ; then
111 case "${host}" in
112 i*86-*-freebsd4*)
113 abi_baseline_pair="i386-freebsd4"
114 ;;
115 esac
116 fi
117
118
119 # Set any OS-dependent bits.
120 # Set the os_include_dir.
121 # Set c_model, c_compatibility here.
122 # If atomic ops and/or numeric limits are OS-specific rather than
123 # CPU-specifc, set those here too.
124 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
125 case "${host_os}" in
126 aix4.[3456789]* | aix[56789]*)
127 # We set os_include_dir to os/aix only on AIX 4.3 and newer, but
128 # os/aix/atomicity.h works on earlier versions of AIX 4.*, so we
129 # explicitly duplicate the directory for 4.[<3].
130 os_include_dir="os/aix"
131 ATOMICITYH="os/aix"
132 OPT_LDFLAGS="-Wl,-G"
133 ;;
134 aix4.*)
135 ATOMICITYH="os/aix"
136 ;;
137 aix*)
138 ATOMICITYH="cpu/generic"
139 ;;
140 bsd*)
141 # Plain BSD attempts to share FreeBSD files.
142 os_include_dir="os/bsd/freebsd"
143 ;;
144 cygwin*)
145 os_include_dir="os/newlib"
146 ;;
147 *djgpp*) # leading * picks up "msdosdjgpp"
148 os_include_dir="os/djgpp"
149 ;;
150 freebsd*)
151 os_include_dir="os/bsd/freebsd"
152 ;;
153 gnu* | linux*)
154 os_include_dir="os/gnu-linux"
155 ;;
156 hpux*)
157 os_include_dir="os/hpux"
158 ;;
159 irix[1-6] | irix[1-5].* | irix6.[0-4]*)
160 # This is known to work on at least IRIX 5.2 and 6.3.
161 os_include_dir="os/irix/irix5.2"
162 ATOMICITYH=$os_include_dir
163 ;;
164 irix6.5*)
165 os_include_dir="os/irix/irix6.5"
166 ATOMICITYH=$os_include_dir
167 ;;
168 mingw32*)
169 os_include_dir="os/mingw32"
170 ;;
171 netbsd*)
172 os_include_dir="os/bsd/netbsd"
173 ;;
174 solaris2.5*)
175 os_include_dir="os/solaris/solaris2.5"
176 ;;
177 solaris2.6*)
178 os_include_dir="os/solaris/solaris2.6"
179 ;;
180 solaris2.[789]*)
181 os_include_dir="os/solaris/solaris2.7"
182 ;;
183 windiss*)
184 os_include_dir="os/windiss"
185 ;;
186 qnx6.[12]*)
187 os_include_dir="os/qnx/qnx6.1"
188 c_model=c
189 ;;
190 *)
191 os_include_dir="os/generic"
192 ;;
193 esac
194
195
196 # Set any OS-dependent and CPU-dependent bits.
197 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
198 case "${host}" in
199 mips*-*-linux*)
200 ATOMICITYH="cpu/mips"
201 ;;
202 esac