Daily bump.
[gcc.git] / libstdc++-v3 / configure.target
1 # configure.target
2 #
3 # This shell script handles all target based configuration for libstdc++.
4 # It sets various shell variables based on the the target 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 # target The configuration target (full CPU-vendor-OS triplet)
13 # target_cpu The configuration target CPU
14 # target_os The configuration target 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/target_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 model to use for "C" headers, defaults to c_std.
26 #
27 # c_compatibility if "C" compatibility headers are necessary,
28 # defaults to no.
29 #
30 # abi_baseline_triplet directory name for ABI compat testing,
31 # defaults to target (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 targets 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 abi_baseline_triplet=${target}
54 c_model=c_std
55 c_compatibility=no
56 if test -d ${glibcpp_srcdir}/config/cpu/${target_cpu}; then
57 cpu_include_dir="cpu/${target_cpu}"
58 else
59 cpu_include_dir="cpu/generic"
60 fi
61
62
63 # TARGET-SPECIFIC OVERRIDES
64 # Set any CPU-dependent bits.
65 # Here we override defaults and catch more general cases due to naming
66 # conventions (e.g., chip_name* to catch all variants).
67 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
68 case "${target_cpu}" in
69 alpha*)
70 cpu_include_dir="cpu/alpha"
71 ;;
72 athlon* | i586 | i686 | i786 | x86_64)
73 cpu_include_dir="cpu/i486"
74 ;;
75 hppa*)
76 cpu_include_dir="cpu/hppa"
77 ;;
78 m680[246]0)
79 cpu_include_dir="cpu/m68k"
80 ;;
81 powerpc* | rs6000)
82 cpu_include_dir="cpu/powerpc"
83 ;;
84 s390x)
85 cpu_include_dir="cpu/s390"
86 ;;
87 sparc* | ultrasparc)
88 cpu_include_dir="cpu/sparc"
89 ;;
90 esac
91
92
93 # Now look for the file(s) usually tied to a CPU model, and make default
94 # choices for those if they haven't been explicitly set already.
95 _cpu_incdir_fullpath=${glibcpp_srcdir}/config/${cpu_include_dir}
96 if test x${ATOMICITYH+set} != xset; then
97 if test -f ${_cpu_incdir_fullpath}/atomicity.h; then
98 ATOMICITYH=$cpu_include_dir
99 else
100 ATOMICITYH="cpu/generic"
101 fi
102 fi
103 unset _cpu_incdir_fullpath
104
105
106 # Set any OS-dependent bits.
107 # Set the os_include_dir.
108 # Set c_model, c_compatibility here.
109 # If atomic ops and/or numeric limits are OS-specific rather than
110 # CPU-specifc, set those here too.
111 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
112 case "${target_os}" in
113 aix4.[3456789]* | aix[56789]*)
114 # We set os_include_dir to os/aix only on AIX 4.3 and newer, but
115 # os/aix/atomicity.h works on earlier versions of AIX 4.*, so we
116 # explicitly duplicate the directory for 4.[<3].
117 os_include_dir="os/aix"
118 ATOMICITYH="os/aix"
119 OPT_LDFLAGS="-Wl,-G"
120 ;;
121 aix4.*)
122 ATOMICITYH="os/aix"
123 ;;
124 aix*)
125 ATOMICITYH="cpu/generic"
126 ;;
127 bsd*)
128 # Plain BSD attempts to share FreeBSD files.
129 os_include_dir="os/bsd/freebsd"
130 ;;
131 cygwin*)
132 os_include_dir="os/newlib"
133 ;;
134 *djgpp*) # leading * picks up "msdosdjgpp"
135 os_include_dir="os/djgpp"
136 ;;
137 freebsd*)
138 os_include_dir="os/bsd/freebsd"
139 # The FreeBSD ABI is expressed in the major version number only.
140 abi_baseline_triplet=`echo ${target} | sed 's,\(\.[0-9]*\)*$,,'`
141 ;;
142 gnu* | linux*)
143 os_include_dir="os/gnu-linux"
144 ;;
145 hpux*)
146 os_include_dir="os/hpux"
147 ;;
148 irix[1-6] | irix[1-5].* | irix6.[0-4]*)
149 # This is known to work on at least IRIX 5.2 and 6.3.
150 os_include_dir="os/irix/irix5.2"
151 ATOMICITYH=$os_include_dir
152 ;;
153 irix6.5*)
154 os_include_dir="os/irix/irix6.5"
155 ATOMICITYH=$os_include_dir
156 ;;
157 mingw32*)
158 os_include_dir="os/mingw32"
159 ;;
160 netbsd*)
161 os_include_dir="os/bsd/netbsd"
162 ;;
163 solaris2.5*)
164 os_include_dir="os/solaris/solaris2.5"
165 ;;
166 solaris2.6*)
167 os_include_dir="os/solaris/solaris2.6"
168 ;;
169 solaris2.[78]*)
170 os_include_dir="os/solaris/solaris2.7"
171 ;;
172 windiss*)
173 os_include_dir="os/windiss"
174 ;;
175 qnx6.[12]*)
176 os_include_dir="os/qnx/qnx6.1"
177 c_model=c
178 ;;
179 *)
180 os_include_dir="os/generic"
181 ;;
182 esac
183
184
185 # Set any OS-dependent and CPU-dependent bits.
186 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
187 case "${target}" in
188 mips*-*-linux*)
189 ATOMICITYH="cpu/mips"
190 ;;
191 esac