* config/ia64/ia64.md: Follow recent emit_note API change.
[official-gcc.git] / libstdc++-v3 / configure.host
blob5dd5a74f66ee26e06127ffc6774f0f6d608bf29f
1 # configure.host
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.
8 # You should read docs/html/17_intro/porting.* to make sense of this file.
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
17 # It sets the following shell variables:
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.
23 #   os_include_dir         OS-specific directory, defaults to os/generic.
25 #   c_model                the "C" header model, defaults to c_std.
27 #   c_compatibility        if "C" compatibility headers are necessary,
28 #                          defaults to no.
30 #   abi_baseline_pair      directory name for ABI compat testing,
31 #                          defaults to host_cpu-host_os (as per config.guess)
33 #   ATOMICITYH             location of atomicity.h,
34 #                          defaults to cpu_include_dir
36 # It possibly modifies the following variables:
38 #   OPT_LDFLAGS            extra flags to pass when linking the library, of
39 #                          the form '-Wl,blah'
40 #                          (defaults to empty in acinclude.m4)
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.
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
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).
62 # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
63 case "${host_cpu}" in
64   alpha*)
65     try_cpu=alpha
66     ;;
67   athlon* | i586 | i686 | i786 | x86_64)
68     try_cpu=i486
69     ;;
70   hppa*)
71     try_cpu=hppa
72     ;;
73   mips*)
74     # NB: cpu/mips/atomicity.h needs MIPS II or above.  
75     # Of course, there is no sane way to test for this, no ABI macro,
76     # and no consistent host_cpu name differentiation. Therefore, only
77     # use it where it is known to be safe, ie it runs linux (see below).
78     try_cpu=generic
79     ;;
80   m680[246]0)
81     try_cpu=m68k
82     ;;
83   powerpc* | rs6000)
84     try_cpu=powerpc
85     ;;
86   s390x)
87     try_cpu=s390
88     ;;
89   sparc* | ultrasparc)
90     try_cpu=sparc
91     ;;
92   *)
93     if test -d ${glibcpp_srcdir}/config/cpu/${host_cpu}; then
94       try_cpu=${host_cpu}
95     else
96       try_cpu=generic
97     fi
98     ;;
99 esac
101 # Now look for the file(s) usually tied to a CPU model, and make
102 # default choices for those if they haven't been explicitly set
103 # already.  
104 cpu_include_dir="cpu/${try_cpu}"
105 ATOMICITYH=$cpu_include_dir
106 abi_baseline_pair=${try_cpu}-${host_os}
109 # Set any OS-dependent bits.
110 # Set the os_include_dir.
111 # Set c_model, c_compatibility here.
112 # If atomic ops and/or numeric limits are OS-specific rather than
113 # CPU-specifc, set those here too.
114 # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
115 case "${host_os}" in
116   aix4.[3456789]* | aix[56789]*)
117     # We set os_include_dir to os/aix only on AIX 4.3 and newer, but
118     # os/aix/atomicity.h works on earlier versions of AIX 4.*, so we
119     # explicitly duplicate the directory for 4.[<3].
120     os_include_dir="os/aix"
121     ATOMICITYH="os/aix"
122     OPT_LDFLAGS="-Wl,-G"
123     ;;
124   aix4.*)
125     ATOMICITYH="os/aix"
126     ;;
127   aix*)
128     ATOMICITYH="cpu/generic"
129     ;;
130   bsd*)
131     # Plain BSD attempts to share FreeBSD files.
132     os_include_dir="os/bsd/freebsd"
133     ;;
134   cygwin*)
135     os_include_dir="os/newlib"
136     ;;
137   *djgpp*)      # leading * picks up "msdosdjgpp"
138     os_include_dir="os/djgpp"
139     ;;
140   freebsd*)
141     os_include_dir="os/bsd/freebsd"
142     ;;
143   gnu* | linux*)
144     os_include_dir="os/gnu-linux"
145     ;;
146   hpux*)
147     os_include_dir="os/hpux"
148     ;;
149   irix[1-6] | irix[1-5].* | irix6.[0-4]*)
150     # This is known to work on at least IRIX 5.2 and 6.3.
151     os_include_dir="os/irix/irix5.2"
152     ATOMICITYH=$os_include_dir
153     ;;
154   irix6.5*)
155     os_include_dir="os/irix/irix6.5"
156     ATOMICITYH=$os_include_dir
157     ;;
158   mingw32*)
159     os_include_dir="os/mingw32"
160     ;;
161   netbsd*)
162     os_include_dir="os/bsd/netbsd"
163     ;;
164   solaris2.5*)
165     os_include_dir="os/solaris/solaris2.5"
166     ;;
167   solaris2.6*)
168     os_include_dir="os/solaris/solaris2.6"
169     ;;
170   solaris2.[789]*)
171     os_include_dir="os/solaris/solaris2.7"
172     ;;
173   windiss*)
174     os_include_dir="os/windiss"
175     ;;
176   qnx6.[12]*)
177     os_include_dir="os/qnx/qnx6.1"
178     c_model=c
179     ;;
180   *)
181     os_include_dir="os/generic"
182     ;;
183 esac
186 # Set any OS-dependent and CPU-dependent bits.
187 # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
188 case "${host}" in
189   mips*-*-linux*)
190     ATOMICITYH="cpu/mips"
191     ;;
192   x86_64-*-linux*)
193     abi_baseline_pair="x86_64-linux-gnu"
194     ;;
195   alpha*-*-freebsd5*)
196     abi_baseline_pair="alpha-freebsd5"
197     ;;
198   i*86-*-freebsd4*)
199     abi_baseline_pair="i386-freebsd4"
200     ;;
201   i*86-*-freebsd5*)
202     abi_baseline_pair="i386-freebsd5"
203     ;;
204   sparc*-*-freebsd5*)
205     abi_baseline_pair="sparc-freebsd5"
206     ;;
207 esac