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 |
---|
6 | # needing to rerun autoconf. |
---|
7 | |
---|
8 | # This shell script should be invoked as |
---|
9 | # . configure.target |
---|
10 | # If it encounters an error, it will exit with a message. |
---|
11 | |
---|
12 | # It uses the following shell variables: |
---|
13 | # target The configuration target |
---|
14 | # target_cpu The configuration target CPU |
---|
15 | # target_os The configuration target OS |
---|
16 | |
---|
17 | # It possibly modifies the following shell variables: |
---|
18 | # cpu_include_dir CPU-specific include directory, relative to srcdir |
---|
19 | # |
---|
20 | # os_include_dir OS-specific include directory, relative to srcdir |
---|
21 | # |
---|
22 | # c_model the model to use for "C" headers, defaults to c_std. |
---|
23 | # |
---|
24 | # c_compatibility if "C" compatibility headers are necessary, |
---|
25 | # defaults to no. |
---|
26 | |
---|
27 | # DEFAULTS |
---|
28 | c_model=c_std |
---|
29 | c_compatibility=no |
---|
30 | abi_baseline_triplet=${target} |
---|
31 | |
---|
32 | |
---|
33 | # TARGET-SPECIFIC OVERRIDES |
---|
34 | # Set any CPU-dependent bits. |
---|
35 | # THIS TABLE IS SORTED. KEEP IT THAT WAY. |
---|
36 | case "${target_cpu}" in |
---|
37 | alpha*) |
---|
38 | cpu_include_dir="config/cpu/alpha" |
---|
39 | ;; |
---|
40 | arm*) |
---|
41 | cpu_include_dir="config/cpu/arm" |
---|
42 | ;; |
---|
43 | cris) |
---|
44 | cpu_include_dir="config/cpu/cris" |
---|
45 | ;; |
---|
46 | ia64) |
---|
47 | cpu_include_dir="config/cpu/ia64" |
---|
48 | ;; |
---|
49 | i386) |
---|
50 | cpu_include_dir="config/cpu/i386" |
---|
51 | ;; |
---|
52 | i486 | i586 | i686 | i786) |
---|
53 | cpu_include_dir="config/cpu/i486" |
---|
54 | ;; |
---|
55 | m68k | m680[246]0) |
---|
56 | cpu_include_dir="config/cpu/m68k" |
---|
57 | ;; |
---|
58 | powerpc | rs6000) |
---|
59 | cpu_include_dir="config/cpu/powerpc" |
---|
60 | ;; |
---|
61 | s390 | s390x) |
---|
62 | cpu_include_dir="config/cpu/s390" |
---|
63 | ;; |
---|
64 | sparc* | ultrasparc) |
---|
65 | cpu_include_dir="config/cpu/sparc" |
---|
66 | ;; |
---|
67 | x86_64*) |
---|
68 | cpu_include_dir="config/cpu/x86-64" |
---|
69 | ;; |
---|
70 | *) |
---|
71 | cpu_include_dir="config/cpu/generic" |
---|
72 | ;; |
---|
73 | esac |
---|
74 | |
---|
75 | |
---|
76 | # Set any OS dependent compiler flags. |
---|
77 | # THIS TABLE IS SORTED. KEEP IT THAT WAY. |
---|
78 | case "${target_os}" in |
---|
79 | aix4.[3456789]* | aix[56789]*) |
---|
80 | os_include_dir="config/os/aix" |
---|
81 | OPT_LDFLAGS="-Wl,-G" |
---|
82 | ;; |
---|
83 | bsd* | freebsd* ) |
---|
84 | os_include_dir="config/os/bsd/freebsd" |
---|
85 | ;; |
---|
86 | cygwin*) |
---|
87 | os_include_dir="config/os/newlib" |
---|
88 | ;; |
---|
89 | *djgpp*) |
---|
90 | os_include_dir="config/os/djgpp" |
---|
91 | ;; |
---|
92 | linux* | gnu*) |
---|
93 | os_include_dir="config/os/gnu-linux" |
---|
94 | ;; |
---|
95 | irix[1-6] | irix[1-5].* | irix6.[0-4]) |
---|
96 | # This is known to work on at least IRIX 5.2 and 6.3. |
---|
97 | os_include_dir="config/os/irix/irix5.2" |
---|
98 | ;; |
---|
99 | irix6.5) |
---|
100 | os_include_dir="config/os/irix/irix6.5" |
---|
101 | ;; |
---|
102 | mingw32*) |
---|
103 | os_include_dir="config/os/mingw32" |
---|
104 | ;; |
---|
105 | netbsd*) |
---|
106 | os_include_dir="config/os/bsd/netbsd" |
---|
107 | ;; |
---|
108 | solaris2.5*) |
---|
109 | os_include_dir="config/os/solaris/solaris2.5" |
---|
110 | ;; |
---|
111 | solaris2.6*) |
---|
112 | os_include_dir="config/os/solaris/solaris2.6" |
---|
113 | ;; |
---|
114 | solaris2.7* | solaris2.8*) |
---|
115 | os_include_dir="config/os/solaris/solaris2.7" |
---|
116 | ;; |
---|
117 | hpux*) |
---|
118 | os_include_dir="config/os/hpux" |
---|
119 | ;; |
---|
120 | qnx6.[12]*) |
---|
121 | os_include_dir="config/os/qnx/qnx6.1" |
---|
122 | c_model=c |
---|
123 | ;; |
---|
124 | *) |
---|
125 | os_include_dir="config/os/generic" |
---|
126 | ;; |
---|
127 | esac |
---|
128 | |
---|
129 | |
---|
130 | # Set any flags dependent on the full target triplet. |
---|
131 | # THIS TABLE IS SORTED. KEEP IT THAT WAY. |
---|
132 | case "${target}" in |
---|
133 | *-*-aix[456789]*) |
---|
134 | # We set os_include_dir to config/os/aix only on AIX 4.3 and |
---|
135 | # newer, but config/os/aix/bits/atomicity.h works on earlier |
---|
136 | # versions of AIX 4.*, so we explicitly duplicate the directory |
---|
137 | # here, because os_include_dir. |
---|
138 | ATOMICITYH=config/os/aix |
---|
139 | ;; |
---|
140 | *-*-aix*) |
---|
141 | ATOMICITYH=config/cpu/generic |
---|
142 | ;; |
---|
143 | *-*-irix*) |
---|
144 | ATOMICITYH=$os_include_dir |
---|
145 | ;; |
---|
146 | mcore-*-pe*) |
---|
147 | # The EPOC C++ environment does not support exceptions. |
---|
148 | if test -z "$enable_cxx_flags"; then |
---|
149 | enable_cxx_flags="-frtti -fno-exceptions" |
---|
150 | fi |
---|
151 | ATOMICITYH=$cpu_include_dir |
---|
152 | ;; |
---|
153 | *) |
---|
154 | ATOMICITYH=$cpu_include_dir |
---|
155 | ;; |
---|
156 | esac |
---|
157 | |
---|
158 | # Set CPULIMITSH to the directory where the configuration-dependent |
---|
159 | # cpu_limits.h can be found. |
---|
160 | # THIS TABLE IS SORTED. KEEP IT THAT WAY. |
---|
161 | case "${target}" in |
---|
162 | *-*-hpux*) |
---|
163 | CPULIMITSH=config/os/hpux |
---|
164 | ;; |
---|
165 | alpha*-*-*osf5*) |
---|
166 | CPULIMITSH=config/os/osf/osf5.0 |
---|
167 | ;; |
---|
168 | alpha*-*-*) |
---|
169 | CPULIMITSH=config/cpu/alpha |
---|
170 | ;; |
---|
171 | cris-*-*) |
---|
172 | CPULIMITSH=config/cpu/cris |
---|
173 | ;; |
---|
174 | ia64-*-*) |
---|
175 | CPULIMITSH=config/cpu/ia64 |
---|
176 | ;; |
---|
177 | i?86-*-*) |
---|
178 | CPULIMITSH=config/cpu/i386 |
---|
179 | ;; |
---|
180 | m68k-*-* | m680[246]0-*-*) |
---|
181 | CPULIMITSH=config/cpu/m68k |
---|
182 | ;; |
---|
183 | mmix-*-*) |
---|
184 | CPULIMITSH=config/cpu/mmix |
---|
185 | ;; |
---|
186 | powerpc-*-* | rs6000-*-*) |
---|
187 | CPULIMITSH=config/cpu/powerpc |
---|
188 | ;; |
---|
189 | s390-*-* | s390x-*-*) |
---|
190 | CPULIMITSH=config/cpu/s390 |
---|
191 | ;; |
---|
192 | x86_64-*-*) |
---|
193 | CPULIMITSH=config/cpu/x86-64 |
---|
194 | ;; |
---|
195 | *) |
---|
196 | CPULIMITSH=config/cpu/generic |
---|
197 | ;; |
---|
198 | esac |
---|