]>
Commit | Line | Data |
---|---|---|
f4d8f037 | 1 | ## -*- mode: perl; -*- |
f09e7ca9 | 2 | ## Standard openssl configuration targets. |
f09e7ca9 | 3 | |
2fe73036 RL |
4 | # Helper functions for the Windows configs |
5 | my $vc_win64a_info = {}; | |
6 | sub vc_win64a_info { | |
7 | unless (%$vc_win64a_info) { | |
8 | if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) { | |
abe256e7 RL |
9 | $vc_win64a_info = { AS => "nasm", |
10 | ASFLAGS => "-g", | |
11 | asflags => "-Ox -f win64 -DNEAR", | |
a2608e4b KP |
12 | asoutflag => "-o ", |
13 | perlasm_scheme => "nasm" }; | |
43800958 | 14 | } elsif ($disabled{asm}) { |
c059564a | 15 | # assembler is still used to compile uplink shim |
abe256e7 | 16 | $vc_win64a_info = { AS => "ml64", |
78a50c75 | 17 | ASFLAGS => "/nologo /Zi", |
abe256e7 | 18 | asflags => "/c /Cp /Cx", |
a2608e4b KP |
19 | asoutflag => "/Fo", |
20 | perlasm_scheme => "masm" }; | |
43800958 | 21 | } else { |
8937a4ed | 22 | $die->("NASM not found - make sure it's installed and available on %PATH%\n"); |
abe256e7 RL |
23 | $vc_win64a_info = { AS => "{unknown}", |
24 | ASFLAGS => "", | |
d63c12c6 | 25 | asflags => "", |
a2608e4b KP |
26 | asoutflag => "", |
27 | perlasm_scheme => "auto" }; | |
2fe73036 RL |
28 | } |
29 | } | |
30 | return $vc_win64a_info; | |
31 | } | |
32 | ||
43800958 RL |
33 | my $vc_win32_info = {}; |
34 | sub vc_win32_info { | |
35 | unless (%$vc_win32_info) { | |
36 | my $ver=`nasm -v 2>NUL`; | |
37 | my $vew=`nasmw -v 2>NUL`; | |
38 | if ($ver ne "" || $vew ne "") { | |
abe256e7 RL |
39 | $vc_win32_info = { AS => $ver ge $vew ? "nasm" : "nasmw", |
40 | ASFLAGS => "", | |
43800958 | 41 | asflags => "-f win32", |
b6954f3b | 42 | asoutflag => "-o ", |
43800958 RL |
43 | perlasm_scheme => "win32n" }; |
44 | } elsif ($disabled{asm}) { | |
c059564a | 45 | # not actually used, uplink shim is inlined into C code |
abe256e7 RL |
46 | $vc_win32_info = { AS => "ml", |
47 | ASFLAGS => "/nologo /Zi", | |
48 | asflags => "/Cp /coff /c /Cx", | |
43800958 RL |
49 | asoutflag => "/Fo", |
50 | perlasm_scheme => "win32" }; | |
51 | } else { | |
8937a4ed | 52 | $die->("NASM not found - make sure it's installed and available on %PATH%\n"); |
abe256e7 RL |
53 | $vc_win32_info = { AS => "{unknown}", |
54 | ASFLAGS => "", | |
d63c12c6 RL |
55 | asflags => "", |
56 | asoutflag => "", | |
57 | perlasm_scheme => "win32" }; | |
43800958 RL |
58 | } |
59 | } | |
60 | return $vc_win32_info; | |
61 | } | |
62 | ||
2fe73036 RL |
63 | my $vc_wince_info = {}; |
64 | sub vc_wince_info { | |
65 | unless (%$vc_wince_info) { | |
66 | # sanity check | |
17f16617 RL |
67 | $die->('%OSVERSION% is not defined') if (!defined(env('OSVERSION'))); |
68 | $die->('%PLATFORM% is not defined') if (!defined(env('PLATFORM'))); | |
69 | $die->('%TARGETCPU% is not defined') if (!defined(env('TARGETCPU'))); | |
2fe73036 RL |
70 | |
71 | # | |
72 | # Idea behind this is to mimic flags set by eVC++ IDE... | |
73 | # | |
17f16617 | 74 | my $wcevers = env('OSVERSION'); # WCENNN |
d63c12c6 RL |
75 | my $wcevernum; |
76 | my $wceverdotnum; | |
77 | if ($wcevers =~ /^WCE([1-9])([0-9]{2})$/) { | |
78 | $wcevernum = "$1$2"; | |
79 | $wceverdotnum = "$1.$2"; | |
80 | } else { | |
81 | $die->('%OSVERSION% value is insane'); | |
82 | $wcevernum = "{unknown}"; | |
83 | $wceverdotnum = "{unknown}"; | |
84 | } | |
85 | my $wcecdefs = "-D_WIN32_WCE=$wcevernum -DUNDER_CE=$wcevernum"; # -D_WIN32_WCE=NNN | |
86 | my $wcelflag = "/subsystem:windowsce,$wceverdotnum"; # ...,N.NN | |
2fe73036 | 87 | |
17f16617 | 88 | my $wceplatf = env('PLATFORM'); |
01d99976 RL |
89 | |
90 | $wceplatf =~ tr/a-z0-9 /A-Z0-9_/; | |
91 | $wcecdefs .= " -DWCE_PLATFORM_$wceplatf"; | |
2fe73036 | 92 | |
17f16617 | 93 | my $wcetgt = env('TARGETCPU'); # just shorter name... |
2fe73036 RL |
94 | SWITCH: for($wcetgt) { |
95 | /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_"; | |
96 | $wcelflag.=" /machine:X86"; last; }; | |
97 | /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; | |
98 | $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/); | |
99 | $wcecdefs.=" -QRarch4T -QRinterwork-return"; | |
100 | $wcelflag.=" /machine:THUMB"; last; }; | |
101 | /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; | |
102 | $wcelflag.=" /machine:ARM"; last; }; | |
103 | /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | |
104 | $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32"; | |
105 | $wcelflag.=" /machine:MIPSFPU"; last; }; | |
106 | /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | |
107 | $wcecdefs.=" -DMIPSII -QMmips16"; | |
108 | $wcelflag.=" /machine:MIPS16"; last; }; | |
109 | /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | |
110 | $wcecdefs.=" -QMmips2"; | |
111 | $wcelflag.=" /machine:MIPS"; last; }; | |
112 | /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000"; | |
113 | $wcelflag.=" /machine:MIPS"; last; }; | |
114 | /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx"; | |
115 | $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/); | |
116 | $wcelflag.=" /machine:$wcetgt"; last; }; | |
117 | { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_"; | |
118 | $wcelflag.=" /machine:$wcetgt"; last; }; | |
119 | } | |
120 | ||
8c3bc594 | 121 | $vc_wince_info = { cppflags => $wcecdefs, |
2fe73036 RL |
122 | lflags => $wcelflag }; |
123 | } | |
124 | return $vc_wince_info; | |
125 | } | |
126 | ||
5fe5bc30 RL |
127 | # Helper functions for the VMS configs |
128 | my $vms_info = {}; | |
129 | sub vms_info { | |
ab907189 RL |
130 | my $pointer_size_str = $config{target} =~ m|-p(\d+)$| ? $1 : ""; |
131 | ||
132 | # For the case where Configure iterate through all config targets, such | |
133 | # as when listing them and their details, we reset info if the pointer | |
134 | # size changes. | |
135 | if (%$vms_info && $vms_info->{pointer_size} ne $pointer_size_str) { | |
136 | $vms_info = {}; | |
137 | } | |
0c9b1534 | 138 | |
ab907189 | 139 | unless (%$vms_info) { |
58ad786a RL |
140 | $vms_info->{disable_warns} = [ |
141 | "CXXPRAGMANA", # Shut up about unknown / unsupported pragmas | |
142 | ]; | |
7878e536 | 143 | $vms_info->{pointer_size} = $pointer_size_str; |
ab907189 | 144 | if ($pointer_size_str eq "64") { |
0c9b1534 RL |
145 | `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`; |
146 | if ($? == 0) { | |
147 | push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3"; | |
148 | } | |
149 | } | |
62890f47 RL |
150 | |
151 | unless ($disabled{zlib}) { | |
0c9b1534 | 152 | my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str; |
62890f47 | 153 | if (defined($disabled{"zlib-dynamic"})) { |
0c9b1534 | 154 | $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE"; |
62890f47 | 155 | } else { |
0c9b1534 RL |
156 | $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib; |
157 | # In case the --with-zlib-lib value contains something like | |
158 | # /SHARE or /LIB or so at the end, remove it. | |
159 | $vms_info->{def_zlib} =~ s|/.*$||g; | |
62890f47 RL |
160 | } |
161 | } | |
ab7134ef RL |
162 | |
163 | if ($config{target} =~ /-ia64/) { | |
164 | `PIPE ias -H 2> NL:`; | |
165 | if ($? == 0) { | |
abe256e7 RL |
166 | $vms_info->{AS} = "ias"; |
167 | $vms_info->{ASFLAGS} = '-d debug'; | |
168 | $vms_info->{asflags} = '"-N" vms_upcase'; | |
b6954f3b | 169 | $vms_info->{asoutflag} = "-o "; |
ab7134ef RL |
170 | $vms_info->{perlasm_scheme} = "ias"; |
171 | } | |
172 | } | |
5fe5bc30 RL |
173 | } |
174 | return $vms_info; | |
175 | } | |
2fe73036 | 176 | |
3b6c4b07 | 177 | my %targets = ( |
f09e7ca9 | 178 | |
7ead0c89 | 179 | #### Basic configs that should work on any 32-bit box |
5e1b2353 | 180 | "gcc" => { |
d76117b9 | 181 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
182 | CC => "gcc", |
183 | CFLAGS => picker(debug => "-O0 -g", | |
8864f0de | 184 | release => "-O3"), |
9c62a279 | 185 | thread_scheme => "(unknown)", |
5e1b2353 RL |
186 | bn_ops => "BN_LLONG", |
187 | }, | |
188 | "cc" => { | |
d76117b9 | 189 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
190 | CC => "cc", |
191 | CFLAGS => "-O", | |
9c62a279 | 192 | thread_scheme => "(unknown)", |
5e1b2353 | 193 | }, |
f09e7ca9 | 194 | |
7ead0c89 | 195 | #### VOS Configurations |
5e1b2353 | 196 | "vos-gcc" => { |
d2b2221a | 197 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
198 | CC => "gcc", |
199 | CFLAGS => picker(default => "-Wall", | |
463a7b8c | 200 | debug => "-O0 -g", |
8864f0de | 201 | release => "-O3"), |
68b8bcf4 RL |
202 | cppflags => "-D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES", |
203 | lib_cppflags => "-DB_ENDIAN", | |
9c62a279 | 204 | thread_scheme => "(unknown)", |
5e1b2353 | 205 | sys_id => "VOS", |
47eeaf45 | 206 | lflags => add("-Wl,-map"), |
5e1b2353 RL |
207 | bn_ops => "BN_LLONG", |
208 | shared_extension => ".so", | |
209 | }, | |
f09e7ca9 | 210 | |
29d09327 | 211 | #### Solaris configurations |
f6739c3d | 212 | "solaris-common" => { |
d2b2221a | 213 | inherit_from => [ "BASE_unix" ], |
f6739c3d | 214 | template => 1, |
68b8bcf4 | 215 | lib_cppflags => "-DFILIO_H", |
8cfc21f5 | 216 | ex_libs => add("-lsocket -lnsl -ldl"), |
f6739c3d | 217 | dso_scheme => "dlfcn", |
9c62a279 | 218 | thread_scheme => "pthreads", |
7b97581b RL |
219 | }, |
220 | #### Solaris common with Sun C setups | |
221 | "solaris-common-cc" => { | |
222 | inherit_from => [ "solaris-common" ], | |
223 | template => 1, | |
ef2dfc99 | 224 | shared_target => "solaris", |
dbb85890 AP |
225 | shared_ldflag => "-Wl,-Bsymbolic", |
226 | shared_defflag => "-Wl,-M,", | |
227 | shared_sonameflag=> "-Wl,-h,", | |
f6739c3d | 228 | }, |
7b97581b RL |
229 | #### Solaris common with GNU C setups |
230 | "solaris-common-gcc" => { | |
231 | inherit_from => [ "solaris-common" ], | |
232 | template => 1, | |
3a19f1a9 | 233 | shared_target => "solaris-gcc-shared", # The rest is on shared_info.pl |
7b97581b | 234 | }, |
f09e7ca9 | 235 | #### Solaris x86 with GNU C setups |
5e1b2353 | 236 | "solaris-x86-gcc" => { |
fe9e5b9c AP |
237 | # NB. GNU C has to be configured to use GNU assembler, and not |
238 | # /usr/ccs/bin/as. Failure to comply will result in compile | |
239 | # failures [at least] in 32-bit build. | |
7b97581b | 240 | inherit_from => [ "solaris-common-gcc" ], |
abe256e7 RL |
241 | CC => "gcc", |
242 | CFLAGS => add_before(picker(default => "-Wall", | |
8864f0de | 243 | debug => "-O0 -g", |
abe256e7 | 244 | release => "-O3 -fomit-frame-pointer")), |
68b8bcf4 | 245 | lib_cppflags => add("-DL_ENDIAN"), |
a01dab94 | 246 | bn_ops => "BN_LLONG", |
5e1b2353 | 247 | shared_cflag => "-fPIC", |
82b6b084 | 248 | shared_ldflag => add_before("-shared -static-libgcc"), |
e6f98ae4 RL |
249 | asm_arch => 'x86', |
250 | perlasm_scheme => 'elf', | |
5e1b2353 | 251 | }, |
5e1b2353 | 252 | "solaris64-x86_64-gcc" => { |
7ead0c89 AP |
253 | # -shared -static-libgcc might appear controversial, but modules |
254 | # taken from static libgcc do not have relocations and linking | |
255 | # them into our shared objects doesn't have any negative side | |
256 | # effects. On the contrary, doing so makes it possible to use | |
257 | # gcc shared build with Sun C. Given that gcc generates faster | |
258 | # code [thanks to inline assembler], I would actually recommend | |
259 | # to consider using gcc shared build even with vendor compiler:-) | |
e3713c36 | 260 | # -- <appro@openssl.org> |
7b97581b | 261 | inherit_from => [ "solaris-common-gcc" ], |
abe256e7 RL |
262 | CC => "gcc", |
263 | CFLAGS => add_before(picker(default => "-Wall", | |
8864f0de | 264 | debug => "-O0 -g", |
abe256e7 | 265 | release => "-O3")), |
f5b06306 | 266 | cflags => add("-m64"), |
68b8bcf4 | 267 | lib_cppflags => add("-DL_ENDIAN"), |
3e9e810f | 268 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 | 269 | asm_arch => 'x86_64', |
5e1b2353 | 270 | perlasm_scheme => "elf", |
5e1b2353 | 271 | shared_cflag => "-fPIC", |
82b6b084 | 272 | shared_ldflag => add_before("-shared -static-libgcc"), |
5e1b2353 RL |
273 | multilib => "/64", |
274 | }, | |
f09e7ca9 RS |
275 | |
276 | #### Solaris x86 with Sun C setups | |
216a0cc4 AP |
277 | # There used to be solaris-x86-cc target, but it was removed, |
278 | # primarily because vendor assembler can't assemble our modules | |
279 | # with -KPIC flag. As result it, assembly support, was not even | |
280 | # available as option. But its lack means lack of side-channel | |
79c44b4e | 281 | # resistant code, which is incompatible with security by today's |
216a0cc4 AP |
282 | # standards. Fortunately gcc is readily available prepackaged |
283 | # option, which we can firmly point at... | |
284 | # | |
285 | # On related note, solaris64-x86_64-cc target won't compile code | |
286 | # paths utilizing AVX and post-Haswell instruction extensions. | |
287 | # Consider switching to solaris64-x86_64-gcc even here... | |
288 | # | |
5e1b2353 | 289 | "solaris64-x86_64-cc" => { |
7b97581b | 290 | inherit_from => [ "solaris-common-cc" ], |
abe256e7 RL |
291 | CC => "cc", |
292 | CFLAGS => add_before(picker(debug => "-g", | |
8c3bc594 | 293 | release => "-xO5 -xdepend -xbuiltin")), |
abe256e7 | 294 | cflags => add_before("-xarch=generic64 -xstrconst -Xa"), |
68b8bcf4 RL |
295 | cppflags => add(threads("-D_REENTRANT")), |
296 | lib_cppflags => add("-DL_ENDIAN"), | |
9c62a279 | 297 | thread_scheme => "pthreads", |
8dd0ff1c | 298 | lflags => add(threads("-mt")), |
3e9e810f | 299 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 | 300 | asm_arch => 'x86_64', |
5e1b2353 | 301 | perlasm_scheme => "elf", |
5e1b2353 | 302 | shared_cflag => "-KPIC", |
82b6b084 | 303 | shared_ldflag => add_before("-G -dy -z text"), |
5e1b2353 RL |
304 | multilib => "/64", |
305 | }, | |
f09e7ca9 RS |
306 | |
307 | #### SPARC Solaris with GNU C setups | |
5e1b2353 | 308 | "solaris-sparcv7-gcc" => { |
7b97581b | 309 | inherit_from => [ "solaris-common-gcc" ], |
abe256e7 RL |
310 | CC => "gcc", |
311 | CFLAGS => add_before(picker(default => "-Wall", | |
8864f0de | 312 | debug => "-O0 -g", |
abe256e7 | 313 | release => "-O3")), |
68b8bcf4 | 314 | lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"), |
3e9e810f | 315 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 | 316 | shared_cflag => "-fPIC", |
1c529128 | 317 | shared_ldflag => add_before("-shared -static-libgcc"), |
5e1b2353 | 318 | }, |
5e1b2353 | 319 | "solaris-sparcv8-gcc" => { |
30478c97 | 320 | inherit_from => [ "solaris-sparcv7-gcc" ], |
bdcd83e1 | 321 | cflags => add_before("-mcpu=v8"), |
e6f98ae4 RL |
322 | asm_arch => 'sparcv8', |
323 | perlasm_scheme => 'void', | |
5e1b2353 | 324 | }, |
5e1b2353 | 325 | "solaris-sparcv9-gcc" => { |
7ead0c89 | 326 | # -m32 should be safe to add as long as driver recognizes |
f6739c3d | 327 | # -mcpu=ultrasparc |
30478c97 | 328 | inherit_from => [ "solaris-sparcv7-gcc" ], |
463a7b8c | 329 | cflags => add_before("-m32 -mcpu=ultrasparc"), |
e6f98ae4 RL |
330 | asm_arch => 'sparcv9', |
331 | perlasm_scheme => 'void', | |
5e1b2353 RL |
332 | }, |
333 | "solaris64-sparcv9-gcc" => { | |
7ead0c89 | 334 | inherit_from => [ "solaris-sparcv9-gcc" ], |
f6739c3d | 335 | cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; }, |
3e9e810f | 336 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 RL |
337 | multilib => "/64", |
338 | }, | |
f09e7ca9 RS |
339 | |
340 | #### SPARC Solaris with Sun C setups | |
341 | # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2. | |
342 | # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8 | |
343 | # SC5.0 note: Compiler common patch 107357-01 or later is required! | |
5e1b2353 | 344 | "solaris-sparcv7-cc" => { |
7b97581b | 345 | inherit_from => [ "solaris-common-cc" ], |
abe256e7 RL |
346 | CC => "cc", |
347 | CFLAGS => add_before(picker(debug => "-g", | |
8c3bc594 | 348 | release => "-xO5 -xdepend")), |
abe256e7 | 349 | cflags => add_before("-xstrconst -Xa"), |
68b8bcf4 RL |
350 | cppflags => add(threads("-D_REENTRANT")), |
351 | lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"), | |
9c62a279 | 352 | lflags => add(threads("-mt")), |
3e9e810f | 353 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 | 354 | shared_cflag => "-KPIC", |
82b6b084 | 355 | shared_ldflag => add_before("-G -dy -z text"), |
5e1b2353 | 356 | }, |
f09e7ca9 | 357 | #### |
5e1b2353 | 358 | "solaris-sparcv8-cc" => { |
30478c97 | 359 | inherit_from => [ "solaris-sparcv7-cc" ], |
bdcd83e1 | 360 | cflags => add_before("-xarch=v8"), |
e6f98ae4 RL |
361 | asm_arch => 'sparcv8', |
362 | perlasm_scheme => 'void', | |
5e1b2353 RL |
363 | }, |
364 | "solaris-sparcv9-cc" => { | |
30478c97 | 365 | inherit_from => [ "solaris-sparcv7-cc" ], |
fa4618a2 | 366 | cflags => add_before("-xarch=v8plus"), |
e6f98ae4 RL |
367 | asm_arch => 'sparcv9', |
368 | perlasm_scheme => 'void', | |
5e1b2353 RL |
369 | }, |
370 | "solaris64-sparcv9-cc" => { | |
30478c97 | 371 | inherit_from => [ "solaris-sparcv7-cc" ], |
691e2efa | 372 | cflags => add_before("-m64 -xarch=sparc"), |
3e9e810f | 373 | bn_ops => "BN_LLONG RC4_CHAR", |
e6f98ae4 RL |
374 | asm_arch => 'sparcv9', |
375 | perlasm_scheme => 'void', | |
5e1b2353 RL |
376 | multilib => "/64", |
377 | }, | |
f09e7ca9 | 378 | |
f09e7ca9 | 379 | #### IRIX 6.x configs |
c21c7830 | 380 | # Only N32 and N64 ABIs are supported. |
1b712f3f AP |
381 | "irix-common" => { |
382 | inherit_from => [ "BASE_unix" ], | |
383 | template => 1, | |
384 | cppflags => threads("-D_SGI_MP_SOURCE"), | |
b34446cc | 385 | lib_cppflags => "-DB_ENDIAN", |
1b712f3f AP |
386 | ex_libs => add(threads("-lpthread")), |
387 | thread_scheme => "pthreads", | |
388 | dso_scheme => "dlfcn", | |
389 | shared_target => "self", | |
1b712f3f AP |
390 | shared_ldflag => "-shared -Wl,-Bsymbolic", |
391 | shared_sonameflag=> "-Wl,-soname,", | |
392 | }, | |
5e1b2353 | 393 | "irix-mips3-gcc" => { |
30478c97 | 394 | inherit_from => [ "irix-common" ], |
abe256e7 RL |
395 | CC => "gcc", |
396 | CFLAGS => picker(debug => "-g -O0", | |
397 | release => "-O3"), | |
1b712f3f | 398 | LDFLAGS => "-static-libgcc", |
abe256e7 | 399 | cflags => "-mabi=n32", |
3e9e810f | 400 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT", |
e6f98ae4 | 401 | asm_arch => 'mips64', |
5e1b2353 | 402 | perlasm_scheme => "n32", |
5e1b2353 RL |
403 | multilib => "32", |
404 | }, | |
405 | "irix-mips3-cc" => { | |
30478c97 | 406 | inherit_from => [ "irix-common" ], |
abe256e7 RL |
407 | CC => "cc", |
408 | CFLAGS => picker(debug => "-g -O0", | |
409 | release => "-O2"), | |
410 | cflags => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared", | |
3e9e810f | 411 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT", |
e6f98ae4 | 412 | asm_arch => 'mips64', |
5e1b2353 | 413 | perlasm_scheme => "n32", |
5e1b2353 RL |
414 | multilib => "32", |
415 | }, | |
7ead0c89 | 416 | # N64 ABI builds. |
5e1b2353 | 417 | "irix64-mips4-gcc" => { |
30478c97 | 418 | inherit_from => [ "irix-common" ], |
abe256e7 RL |
419 | CC => "gcc", |
420 | CFLAGS => picker(debug => "-g -O0", | |
421 | release => "-O3"), | |
1b712f3f | 422 | LDFLAGS => "-static-libgcc", |
abe256e7 | 423 | cflags => "-mabi=64 -mips4", |
3e9e810f | 424 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG", |
e6f98ae4 | 425 | asm_arch => 'mips64', |
5e1b2353 | 426 | perlasm_scheme => "64", |
5e1b2353 RL |
427 | multilib => "64", |
428 | }, | |
429 | "irix64-mips4-cc" => { | |
30478c97 | 430 | inherit_from => [ "irix-common" ], |
abe256e7 RL |
431 | CC => "cc", |
432 | CFLAGS => picker(debug => "-g -O0", | |
433 | release => "-O2"), | |
abe256e7 | 434 | cflags => "-64 -mips4 -use_readonly_const -G0 -rdata_shared", |
3e9e810f | 435 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG", |
e6f98ae4 | 436 | asm_arch => 'mips64', |
5e1b2353 | 437 | perlasm_scheme => "64", |
5e1b2353 RL |
438 | multilib => "64", |
439 | }, | |
f09e7ca9 RS |
440 | |
441 | #### Unified HP-UX ANSI C configs. | |
442 | # Special notes: | |
443 | # - Originally we were optimizing at +O4 level. It should be noted | |
444 | # that the only difference between +O3 and +O4 is global inter- | |
445 | # procedural analysis. As it has to be performed during the link | |
446 | # stage the compiler leaves behind certain pseudo-code in lib*.a | |
447 | # which might be release or even patch level specific. Generating | |
448 | # the machine code for and analyzing the *whole* program appears | |
449 | # to be *extremely* memory demanding while the performance gain is | |
450 | # actually questionable. The situation is intensified by the default | |
451 | # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB | |
452 | # which is way too low for +O4. In other words, doesn't +O3 make | |
453 | # more sense? | |
454 | # - Keep in mind that the HP compiler by default generates code | |
455 | # suitable for execution on the host you're currently compiling at. | |
b6453a68 | 456 | # If the toolkit is meant to be used on various PA-RISC processors |
7ead0c89 | 457 | # consider './Configure hpux-parisc-[g]cc +DAportable'. |
f09e7ca9 RS |
458 | # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in |
459 | # 32-bit message digests. (For the moment of this writing) HP C | |
460 | # doesn't seem to "digest" too many local variables (they make "him" | |
461 | # chew forever:-). For more details look-up MD32_XARRAY comment in | |
706457b7 | 462 | # crypto/sha/sha_local.h. |
7ead0c89 | 463 | # - originally there were 32-bit hpux-parisc2-* targets. They were |
b6453a68 | 464 | # scrapped, because a) they were not interchangeable with other 32-bit |
0b919cc5 AP |
465 | # targets; b) performance-critical 32-bit assembly modules implement |
466 | # even PA-RISC 2.0-specific code paths, which are chosen at run-time, | |
467 | # thus adequate performance is provided even with PA-RISC 1.1 build. | |
3c3badcf AP |
468 | "hpux-common" => { |
469 | inherit_from => [ "BASE_unix" ], | |
6e301900 AP |
470 | template => 1, |
471 | defines => add("_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED", | |
472 | "_HPUX_ALT_XOPEN_SOCKET_API"), | |
3c3badcf AP |
473 | lib_cppflags => "-DB_ENDIAN", |
474 | thread_scheme => "pthreads", | |
475 | dso_scheme => "dlfcn", # overridden in 32-bit PA-RISC builds | |
0ef40b76 AP |
476 | shared_target => "self", |
477 | bin_lflags => "-Wl,+s,+cdp,../:,+cdp,./:", | |
478 | shared_ldflag => "-Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:", | |
479 | shared_sonameflag=> "-Wl,+h,", | |
6e301900 | 480 | }, |
5e1b2353 | 481 | "hpux-parisc-gcc" => { |
3c3badcf | 482 | inherit_from => [ "hpux-common" ], |
abe256e7 RL |
483 | CC => "gcc", |
484 | CFLAGS => picker(debug => "-O0 -g", | |
485 | release => "-O3"), | |
486 | cflags => add(threads("-pthread")), | |
3c3badcf | 487 | lib_cppflags => add("-DBN_DIV2W"), |
6e301900 | 488 | ex_libs => add("-ldld", threads("-pthread")), |
3c3badcf | 489 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 | 490 | dso_scheme => "dl", |
5e1b2353 | 491 | shared_cflag => "-fPIC", |
0ef40b76 | 492 | shared_ldflag => add_before("-shared"), |
d4453024 | 493 | shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
494 | }, |
495 | "hpux-parisc1_1-gcc" => { | |
30478c97 | 496 | inherit_from => [ "hpux-parisc-gcc" ], |
e6f98ae4 RL |
497 | asm_arch => 'parisc11', |
498 | perlasm_scheme => "32", | |
5e1b2353 RL |
499 | multilib => "/pa1.1", |
500 | }, | |
5e1b2353 | 501 | "hpux64-parisc2-gcc" => { |
30478c97 | 502 | inherit_from => [ "hpux-common" ], |
abe256e7 RL |
503 | CC => "gcc", |
504 | CFLAGS => combine(picker(debug => "-O0 -g", | |
8c3bc594 | 505 | release => "-O3")), |
6e301900 | 506 | cflags => add(threads("-pthread")), |
6e301900 | 507 | ex_libs => add("-ldl", threads("-pthread")), |
3e9e810f | 508 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
e6f98ae4 RL |
509 | asm_arch => 'parisc20_64', |
510 | perlasm_scheme => "64", | |
5e1b2353 | 511 | shared_cflag => "-fpic", |
0ef40b76 | 512 | shared_ldflag => add_before("-shared"), |
d4453024 | 513 | shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
514 | multilib => "/pa20_64", |
515 | }, | |
f09e7ca9 | 516 | |
7ead0c89 | 517 | # More attempts at unified 10.X and 11.X targets for HP C compiler. |
5e1b2353 | 518 | "hpux-parisc-cc" => { |
3c3badcf | 519 | inherit_from => [ "hpux-common" ], |
abe256e7 RL |
520 | CC => "cc", |
521 | CFLAGS => picker(debug => "+O0 +d -g", | |
522 | release => "+O3"), | |
523 | cflags => "+Optrs_strongly_typed -Ae +ESlit", | |
68b8bcf4 | 524 | cppflags => threads("-D_REENTRANT"), |
3c3badcf | 525 | lib_cppflags => add("-DBN_DIV2W -DMD32_XARRAY"), |
6e301900 | 526 | ex_libs => add("-ldld", threads("-lpthread")), |
3e9e810f | 527 | bn_ops => "RC4_CHAR", |
5e1b2353 | 528 | dso_scheme => "dl", |
5e1b2353 | 529 | shared_cflag => "+Z", |
0ef40b76 | 530 | shared_ldflag => add_before("-b"), |
d4453024 | 531 | shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
532 | }, |
533 | "hpux-parisc1_1-cc" => { | |
30478c97 | 534 | inherit_from => [ "hpux-parisc-cc" ], |
bdcd83e1 | 535 | cflags => add_before("+DA1.1"), |
e6f98ae4 RL |
536 | asm_arch => 'parisc11', |
537 | perlasm_scheme => "32", | |
5e1b2353 RL |
538 | multilib => "/pa1.1", |
539 | }, | |
5e1b2353 | 540 | "hpux64-parisc2-cc" => { |
30478c97 | 541 | inherit_from => [ "hpux-common" ], |
abe256e7 RL |
542 | CC => "cc", |
543 | CFLAGS => picker(debug => "+O0 +d -g", | |
544 | release => "+O3") , | |
545 | cflags => "+DD64 +Optrs_strongly_typed -Ae +ESlit", | |
68b8bcf4 | 546 | cppflags => threads("-D_REENTRANT") , |
3c3badcf | 547 | lib_cppflags => add("-DMD32_XARRAY"), |
6e301900 | 548 | ex_libs => add("-ldl", threads("-lpthread")), |
3e9e810f | 549 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
e6f98ae4 RL |
550 | asm_arch => 'parisc20_64', |
551 | perlasm_scheme => "64", | |
5e1b2353 | 552 | shared_cflag => "+Z", |
0ef40b76 | 553 | shared_ldflag => add_before("-b"), |
d4453024 | 554 | shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
555 | multilib => "/pa20_64", |
556 | }, | |
f09e7ca9 | 557 | |
7ead0c89 | 558 | # HP/UX IA-64 targets |
5e1b2353 | 559 | "hpux-ia64-cc" => { |
30478c97 | 560 | inherit_from => [ "hpux-common" ], |
abe256e7 RL |
561 | CC => "cc", |
562 | CFLAGS => picker(debug => "+O0 +d -g", | |
563 | release => "+O2"), | |
564 | cflags => "-Ae +DD32 +Olit=all -z", | |
68b8bcf4 | 565 | cppflags => add(threads("-D_REENTRANT")), |
6e301900 | 566 | ex_libs => add("-ldl", threads("-lpthread")), |
3e9e810f | 567 | bn_ops => "SIXTY_FOUR_BIT", |
e6f98ae4 RL |
568 | asm_arch => 'ia64', |
569 | perlasm_scheme => 'void', | |
5e1b2353 | 570 | shared_cflag => "+Z", |
0ef40b76 | 571 | shared_ldflag => add_before("-b"), |
5e1b2353 RL |
572 | multilib => "/hpux32", |
573 | }, | |
5e1b2353 | 574 | "hpux64-ia64-cc" => { |
30478c97 | 575 | inherit_from => [ "hpux-common" ], |
abe256e7 RL |
576 | CC => "cc", |
577 | CFLAGS => picker(debug => "+O0 +d -g", | |
578 | release => "+O3"), | |
579 | cflags => "-Ae +DD64 +Olit=all -z", | |
68b8bcf4 | 580 | cppflags => threads("-D_REENTRANT"), |
9c62a279 | 581 | ex_libs => add("-ldl", threads("-lpthread")), |
3e9e810f | 582 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 RL |
583 | asm_arch => 'ia64', |
584 | perlasm_scheme => 'void', | |
5e1b2353 | 585 | shared_cflag => "+Z", |
0ef40b76 | 586 | shared_ldflag => add_before("-b"), |
5e1b2353 RL |
587 | multilib => "/hpux64", |
588 | }, | |
7ead0c89 | 589 | # GCC builds... |
5e1b2353 | 590 | "hpux-ia64-gcc" => { |
30478c97 | 591 | inherit_from => [ "hpux-common" ], |
abe256e7 RL |
592 | CC => "gcc", |
593 | CFLAGS => picker(debug => "-O0 -g", | |
594 | release => "-O3"), | |
595 | cflags => add(threads("-pthread")), | |
fcd2ac80 | 596 | ex_libs => add("-ldl", threads("-pthread")), |
3e9e810f | 597 | bn_ops => "SIXTY_FOUR_BIT", |
e6f98ae4 RL |
598 | asm_arch => 'ia64', |
599 | perlasm_scheme => 'void', | |
5e1b2353 | 600 | shared_cflag => "-fpic", |
0ef40b76 | 601 | shared_ldflag => add_before("-shared"), |
5e1b2353 RL |
602 | multilib => "/hpux32", |
603 | }, | |
604 | "hpux64-ia64-gcc" => { | |
30478c97 | 605 | inherit_from => [ "hpux-common" ], |
abe256e7 RL |
606 | CC => "gcc", |
607 | CFLAGS => picker(debug => "-O0 -g", | |
608 | release => "-O3"), | |
609 | cflags => combine("-mlp64", threads("-pthread")), | |
fcd2ac80 | 610 | ex_libs => add("-ldl", threads("-pthread")), |
3e9e810f | 611 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 RL |
612 | asm_arch => 'ia64', |
613 | perlasm_scheme => 'void', | |
5e1b2353 | 614 | shared_cflag => "-fpic", |
0ef40b76 | 615 | shared_ldflag => add_before("-shared"), |
5e1b2353 RL |
616 | multilib => "/hpux64", |
617 | }, | |
f09e7ca9 | 618 | |
f09e7ca9 | 619 | #### HP MPE/iX http://jazz.external.hp.com/src/openssl/ |
5e1b2353 | 620 | "MPE/iX-gcc" => { |
d2b2221a | 621 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
622 | CC => "gcc", |
623 | CFLAGS => "-O3", | |
68b8bcf4 RL |
624 | cppflags => "-D_POSIX_SOURCE -D_SOCKET_SOURCE", |
625 | includes => [ "/SYSLOG/PUB" ], | |
626 | lib_cppflags => "-DBN_DIV2W", | |
5e1b2353 | 627 | sys_id => "MPE", |
47eeaf45 RL |
628 | lflags => add("-L/SYSLOG/PUB"), |
629 | ex_libs => add("-lsyslog -lsocket -lcurses"), | |
9c62a279 | 630 | thread_scheme => "(unknown)", |
3e9e810f | 631 | bn_ops => "BN_LLONG", |
5e1b2353 | 632 | }, |
f09e7ca9 | 633 | |
b4de72bf AP |
634 | #### DEC Alpha Tru64 targets. Tru64 is marketing name for OSF/1 version 4 |
635 | #### and forward. In reality 'uname -s' still returns "OSF1". Originally | |
636 | #### there were even osf1-* configs targeting prior versions provided, | |
637 | #### but not anymore... | |
638 | "tru64-alpha-gcc" => { | |
30478c97 | 639 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
640 | CC => "gcc", |
641 | CFLAGS => "-O3", | |
642 | cflags => add("-std=c9x", threads("-pthread")), | |
8c3bc594 | 643 | cppflags => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE", |
fcd2ac80 | 644 | ex_libs => add("-lrt", threads("-pthread")), # for mlock(2) |
3e9e810f | 645 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 RL |
646 | asm_arch => 'alpha', |
647 | perlasm_scheme => "void", | |
b4de72bf | 648 | thread_scheme => "pthreads", |
5e1b2353 RL |
649 | dso_scheme => "dlfcn", |
650 | shared_target => "alpha-osf1-shared", | |
651 | shared_extension => ".so", | |
652 | }, | |
653 | "tru64-alpha-cc" => { | |
30478c97 | 654 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
655 | CC => "cc", |
656 | CFLAGS => "-tune host -fast", | |
657 | cflags => add("-std1 -readonly_strings", | |
658 | threads("-pthread")), | |
8c3bc594 | 659 | cppflags => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE", |
fcd2ac80 | 660 | ex_libs => add("-lrt", threads("-pthread")), # for mlock(2) |
3e9e810f | 661 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 RL |
662 | asm_arch => 'alpha', |
663 | perlasm_scheme => "void", | |
9c62a279 | 664 | thread_scheme => "pthreads", |
5e1b2353 RL |
665 | dso_scheme => "dlfcn", |
666 | shared_target => "alpha-osf1-shared", | |
667 | shared_ldflag => "-msym", | |
668 | shared_extension => ".so", | |
669 | }, | |
f09e7ca9 RS |
670 | |
671 | #### | |
672 | #### Variety of LINUX:-) | |
673 | #### | |
674 | # *-generic* is endian-neutral target, but ./config is free to | |
675 | # throw in -D[BL]_ENDIAN, whichever appropriate... | |
cdf2986a | 676 | "linux-generic32" => { |
d2b2221a | 677 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
678 | CC => "gcc", |
679 | CXX => "g++", | |
680 | CFLAGS => picker(default => "-Wall", | |
681 | debug => "-O0 -g", | |
682 | release => "-O3"), | |
683 | CXXFLAGS => picker(default => "-Wall", | |
684 | debug => "-O0 -g", | |
685 | release => "-O3"), | |
686 | cflags => threads("-pthread"), | |
687 | cxxflags => combine("-std=c++11", threads("-pthread")), | |
68b8bcf4 | 688 | lib_cppflags => "-DOPENSSL_USE_NODELETE", |
fcd2ac80 | 689 | ex_libs => add("-ldl", threads("-pthread")), |
3e9e810f | 690 | bn_ops => "BN_LLONG RC4_CHAR", |
9c62a279 | 691 | thread_scheme => "pthreads", |
5e1b2353 RL |
692 | dso_scheme => "dlfcn", |
693 | shared_target => "linux-shared", | |
8c3bc594 | 694 | shared_cflag => "-fPIC", |
41999e7d | 695 | shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" }, |
9e381e8a | 696 | enable => [ "afalgeng" ], |
5e1b2353 | 697 | }, |
cdf2986a TM |
698 | "linux-latomic" => { |
699 | inherit_from => [ "linux-generic32" ], | |
535130c3 | 700 | ex_libs => add(threads("-latomic")), |
535130c3 | 701 | }, |
7ead0c89 | 702 | "linux-generic64" => { |
cdf2986a | 703 | inherit_from => [ "linux-generic32" ], |
3e9e810f | 704 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
7ead0c89 AP |
705 | }, |
706 | ||
5e1b2353 | 707 | "linux-ppc" => { |
cdf2986a | 708 | inherit_from => [ "linux-latomic" ], |
e6f98ae4 | 709 | asm_arch => 'ppc32', |
5e1b2353 | 710 | perlasm_scheme => "linux32", |
52c6c12c | 711 | lib_cppflags => add("-DB_ENDIAN"), |
7ead0c89 AP |
712 | }, |
713 | "linux-ppc64" => { | |
30478c97 | 714 | inherit_from => [ "linux-generic64" ], |
8c3bc594 | 715 | cflags => add("-m64"), |
72d7f221 | 716 | cxxflags => add("-m64"), |
68b8bcf4 | 717 | lib_cppflags => add("-DB_ENDIAN"), |
e6f98ae4 | 718 | asm_arch => 'ppc64', |
7ead0c89 | 719 | perlasm_scheme => "linux64", |
7ead0c89 AP |
720 | multilib => "64", |
721 | }, | |
722 | "linux-ppc64le" => { | |
30478c97 | 723 | inherit_from => [ "linux-generic64" ], |
8c3bc594 | 724 | cflags => add("-m64"), |
72d7f221 | 725 | cxxflags => add("-m64"), |
68b8bcf4 | 726 | lib_cppflags => add("-DL_ENDIAN"), |
e6f98ae4 | 727 | asm_arch => 'ppc64', |
7ead0c89 | 728 | perlasm_scheme => "linux64le", |
5e1b2353 | 729 | }, |
f09e7ca9 | 730 | |
5e1b2353 | 731 | "linux-armv4" => { |
7ead0c89 AP |
732 | ################################################################ |
733 | # Note that -march is not among compiler options in linux-armv4 | |
734 | # target description. Not specifying one is intentional to give | |
735 | # you choice to: | |
736 | # | |
737 | # a) rely on your compiler default by not specifying one; | |
738 | # b) specify your target platform explicitly for optimal | |
739 | # performance, e.g. -march=armv6 or -march=armv7-a; | |
740 | # c) build "universal" binary that targets *range* of platforms | |
741 | # by specifying minimum and maximum supported architecture; | |
742 | # | |
743 | # As for c) option. It actually makes no sense to specify | |
744 | # maximum to be less than ARMv7, because it's the least | |
745 | # requirement for run-time switch between platform-specific | |
746 | # code paths. And without run-time switch performance would be | |
747 | # equivalent to one for minimum. Secondly, there are some | |
748 | # natural limitations that you'd have to accept and respect. | |
749 | # Most notably you can *not* build "universal" binary for | |
750 | # big-endian platform. This is because ARMv7 processor always | |
751 | # picks instructions in little-endian order. Another similar | |
752 | # limitation is that -mthumb can't "cross" -march=armv6t2 | |
753 | # boundary, because that's where it became Thumb-2. Well, this | |
754 | # limitation is a bit artificial, because it's not really | |
755 | # impossible, but it's deemed too tricky to support. And of | |
756 | # course you have to be sure that your binutils are actually | |
757 | # up to the task of handling maximum target platform. With all | |
758 | # this in mind here is an example of how to configure | |
759 | # "universal" build: | |
760 | # | |
761 | # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8 | |
762 | # | |
cdf2986a | 763 | inherit_from => [ "linux-latomic" ], |
e6f98ae4 | 764 | asm_arch => 'armv4', |
7ead0c89 | 765 | perlasm_scheme => "linux32", |
5e1b2353 RL |
766 | }, |
767 | "linux-aarch64" => { | |
30478c97 | 768 | inherit_from => [ "linux-generic64" ], |
e6f98ae4 | 769 | asm_arch => 'aarch64', |
5e1b2353 | 770 | perlasm_scheme => "linux64", |
5e1b2353 | 771 | }, |
a93d3e06 | 772 | "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32 |
30478c97 | 773 | inherit_from => [ "linux-generic32" ], |
8864f0de | 774 | cflags => add("-mabi=ilp32"), |
72d7f221 | 775 | cxxflags => add("-mabi=ilp32"), |
3e9e810f | 776 | bn_ops => "SIXTY_FOUR_BIT RC4_CHAR", |
e6f98ae4 | 777 | asm_arch => 'aarch64', |
a93d3e06 | 778 | perlasm_scheme => "linux64", |
a93d3e06 | 779 | }, |
7ead0c89 | 780 | |
5e1b2353 | 781 | "linux-mips32" => { |
7ead0c89 AP |
782 | # Configure script adds minimally required -march for assembly |
783 | # support, if no -march was specified at command line. | |
cdf2986a | 784 | inherit_from => [ "linux-latomic" ], |
8c3bc594 | 785 | cflags => add("-mabi=32"), |
72d7f221 | 786 | cxxflags => add("-mabi=32"), |
e6f98ae4 | 787 | asm_arch => 'mips32', |
5e1b2353 | 788 | perlasm_scheme => "o32", |
5e1b2353 | 789 | }, |
7ead0c89 AP |
790 | # mips32 and mips64 below refer to contemporary MIPS Architecture |
791 | # specifications, MIPS32 and MIPS64, rather than to kernel bitness. | |
5e1b2353 | 792 | "linux-mips64" => { |
cdf2986a | 793 | inherit_from => [ "linux-latomic" ], |
8c3bc594 | 794 | cflags => add("-mabi=n32"), |
72d7f221 | 795 | cxxflags => add("-mabi=n32"), |
d250e856 | 796 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT", |
e6f98ae4 | 797 | asm_arch => 'mips64', |
5e1b2353 | 798 | perlasm_scheme => "n32", |
5e1b2353 RL |
799 | multilib => "32", |
800 | }, | |
801 | "linux64-mips64" => { | |
30478c97 | 802 | inherit_from => [ "linux-generic64" ], |
8c3bc594 | 803 | cflags => add("-mabi=64"), |
72d7f221 | 804 | cxxflags => add("-mabi=64"), |
e6f98ae4 | 805 | asm_arch => 'mips64', |
5e1b2353 | 806 | perlasm_scheme => "64", |
5e1b2353 RL |
807 | multilib => "64", |
808 | }, | |
7ead0c89 | 809 | |
42ee6e7b | 810 | # riscv below refers to contemporary RISCV Architecture |
c2955424 | 811 | # specifications, |
812 | "linux64-riscv64" => { | |
813 | inherit_from => [ "linux-generic64"], | |
814 | perlasm_scheme => "linux64", | |
cb2764f2 | 815 | asm_arch => 'riscv64', |
c2955424 | 816 | }, |
817 | ||
42ee6e7b HZZ |
818 | "linux32-riscv32" => { |
819 | inherit_from => [ "linux-generic32"], | |
820 | perlasm_scheme => "linux32", | |
821 | asm_arch => 'riscv32', | |
822 | }, | |
823 | ||
b625e21e SP |
824 | # loongarch64 below refers to contemporary LOONGARCH Architecture |
825 | # specifications, | |
826 | "linux64-loongarch64" => { | |
827 | inherit_from => [ "linux-generic64"], | |
828 | perlasm_scheme => "linux64", | |
7f2d6188 | 829 | asm_arch => 'loongarch64', |
b625e21e SP |
830 | }, |
831 | ||
7ead0c89 | 832 | #### IA-32 targets... |
7fbc0bfd RL |
833 | #### These two targets are a bit aged and are to be used on older Linux |
834 | #### machines where gcc doesn't understand -m32 and -m64 | |
5e1b2353 | 835 | "linux-elf" => { |
30478c97 | 836 | inherit_from => [ "linux-generic32" ], |
abe256e7 | 837 | CFLAGS => add(picker(release => "-fomit-frame-pointer")), |
68b8bcf4 | 838 | lib_cppflags => add("-DL_ENDIAN"), |
a01dab94 | 839 | bn_ops => "BN_LLONG", |
e6f98ae4 RL |
840 | asm_arch => 'x86', |
841 | perlasm_scheme => "elf", | |
5e1b2353 RL |
842 | }, |
843 | "linux-aout" => { | |
30478c97 | 844 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
845 | CC => "gcc", |
846 | CFLAGS => add(picker(default => "-Wall", | |
8864f0de RL |
847 | debug => "-O0 -g", |
848 | release => "-O3 -fomit-frame-pointer")), | |
68b8bcf4 | 849 | lib_cppflags => add("-DL_ENDIAN"), |
a01dab94 | 850 | bn_ops => "BN_LLONG", |
9c62a279 | 851 | thread_scheme => "(unknown)", |
e6f98ae4 | 852 | asm_arch => 'x86', |
5e1b2353 RL |
853 | perlasm_scheme => "a.out", |
854 | }, | |
7ead0c89 | 855 | |
7fbc0bfd RL |
856 | #### X86 / X86_64 targets |
857 | "linux-x86" => { | |
30478c97 | 858 | inherit_from => [ "linux-generic32" ], |
abe256e7 RL |
859 | CFLAGS => add(picker(release => "-fomit-frame-pointer")), |
860 | cflags => add("-m32"), | |
72d7f221 | 861 | cxxflags => add("-m32"), |
68b8bcf4 | 862 | lib_cppflags => add("-DL_ENDIAN"), |
7fbc0bfd | 863 | bn_ops => "BN_LLONG", |
e6f98ae4 | 864 | asm_arch => 'x86', |
7fbc0bfd | 865 | perlasm_scheme => "elf", |
7fbc0bfd | 866 | }, |
e1b6ecba BK |
867 | "linux-x86-latomic" => { |
868 | inherit_from => [ "linux-x86" ], | |
869 | ex_libs => add(threads("-latomic")), | |
870 | }, | |
7fbc0bfd RL |
871 | "linux-x86-clang" => { |
872 | inherit_from => [ "linux-x86" ], | |
abe256e7 RL |
873 | CC => "clang", |
874 | CXX => "clang++", | |
7ea01f52 | 875 | ex_libs => add(threads("-latomic")), |
7fbc0bfd | 876 | }, |
5e1b2353 | 877 | "linux-x86_64" => { |
30478c97 | 878 | inherit_from => [ "linux-generic64" ], |
8c3bc594 | 879 | cflags => add("-m64"), |
72d7f221 | 880 | cxxflags => add("-m64"), |
68b8bcf4 | 881 | lib_cppflags => add("-DL_ENDIAN"), |
3e9e810f | 882 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 | 883 | asm_arch => 'x86_64', |
5e1b2353 | 884 | perlasm_scheme => "elf", |
5e1b2353 RL |
885 | multilib => "64", |
886 | }, | |
7ead0c89 AP |
887 | "linux-x86_64-clang" => { |
888 | inherit_from => [ "linux-x86_64" ], | |
abe256e7 RL |
889 | CC => "clang", |
890 | CXX => "clang++", | |
7ead0c89 | 891 | }, |
5e1b2353 | 892 | "linux-x32" => { |
30478c97 | 893 | inherit_from => [ "linux-generic32" ], |
8c3bc594 | 894 | cflags => add("-mx32"), |
72d7f221 | 895 | cxxflags => add("-mx32"), |
68b8bcf4 | 896 | lib_cppflags => add("-DL_ENDIAN"), |
3e9e810f | 897 | bn_ops => "SIXTY_FOUR_BIT", |
e6f98ae4 | 898 | asm_arch => 'x86_64', |
2460c7f1 | 899 | perlasm_scheme => "elf32", |
5e1b2353 RL |
900 | multilib => "x32", |
901 | }, | |
7ead0c89 AP |
902 | |
903 | "linux-ia64" => { | |
30478c97 | 904 | inherit_from => [ "linux-generic64" ], |
3e9e810f | 905 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 RL |
906 | asm_arch => 'ia64', |
907 | perlasm_scheme => 'void', | |
7ead0c89 AP |
908 | }, |
909 | ||
5e1b2353 | 910 | "linux64-s390x" => { |
30478c97 | 911 | inherit_from => [ "linux-generic64" ], |
8c3bc594 | 912 | cflags => add("-m64"), |
72d7f221 | 913 | cxxflags => add("-m64"), |
68b8bcf4 | 914 | lib_cppflags => add("-DB_ENDIAN"), |
e6f98ae4 | 915 | asm_arch => 's390x', |
5e1b2353 | 916 | perlasm_scheme => "64", |
5e1b2353 RL |
917 | multilib => "64", |
918 | }, | |
5e1b2353 | 919 | "linux32-s390x" => { |
7ead0c89 AP |
920 | #### So called "highgprs" target for z/Architecture CPUs |
921 | # "Highgprs" is kernel feature first implemented in Linux | |
922 | # 2.6.32, see /proc/cpuinfo. The idea is to preserve most | |
923 | # significant bits of general purpose registers not only | |
924 | # upon 32-bit process context switch, but even on | |
925 | # asynchronous signal delivery to such process. This makes | |
926 | # it possible to deploy 64-bit instructions even in legacy | |
927 | # application context and achieve better [or should we say | |
928 | # adequate] performance. The build is binary compatible with | |
929 | # linux-generic32, and the idea is to be able to install the | |
930 | # resulting libcrypto.so alongside generic one, e.g. as | |
931 | # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time | |
932 | # linker to autodiscover. Unfortunately it doesn't work just | |
933 | # yet, because of couple of bugs in glibc | |
934 | # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1... | |
935 | # | |
30478c97 | 936 | inherit_from => [ "linux-generic32" ], |
8c3bc594 | 937 | cflags => add("-m31 -Wa,-mzarch"), |
72d7f221 | 938 | cxxflags => add("-m31 -Wa,-mzarch"), |
68b8bcf4 | 939 | lib_cppflags => add("-DB_ENDIAN"), |
e6f98ae4 | 940 | asm_arch => 's390x', |
5e1b2353 | 941 | perlasm_scheme => "31", |
5e1b2353 RL |
942 | multilib => "/highgprs", |
943 | }, | |
7ead0c89 AP |
944 | |
945 | #### SPARC Linux setups | |
5e1b2353 | 946 | "linux-sparcv8" => { |
cdf2986a | 947 | inherit_from => [ "linux-latomic" ], |
8c3bc594 | 948 | cflags => add("-mcpu=v8"), |
72d7f221 | 949 | cxxflags => add("-mcpu=v8"), |
abe256e7 | 950 | lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"), |
e6f98ae4 RL |
951 | asm_arch => 'sparcv8', |
952 | perlasm_scheme => 'void', | |
5e1b2353 | 953 | }, |
5e1b2353 | 954 | "linux-sparcv9" => { |
7ead0c89 AP |
955 | # it's a real mess with -mcpu=ultrasparc option under Linux, |
956 | # but -Wa,-Av8plus should do the trick no matter what. | |
cdf2986a | 957 | inherit_from => [ "linux-latomic" ], |
8c3bc594 | 958 | cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"), |
72d7f221 | 959 | cxxflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"), |
abe256e7 | 960 | lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"), |
e6f98ae4 RL |
961 | asm_arch => 'sparcv9', |
962 | perlasm_scheme => 'void', | |
5e1b2353 | 963 | }, |
5e1b2353 | 964 | "linux64-sparcv9" => { |
7ead0c89 | 965 | # GCC 3.1 is a requirement |
30478c97 | 966 | inherit_from => [ "linux-generic64" ], |
8c3bc594 | 967 | cflags => add("-m64 -mcpu=ultrasparc"), |
72d7f221 | 968 | cxxflags => add("-m64 -mcpu=ultrasparc"), |
abe256e7 | 969 | lib_cppflags => add("-DB_ENDIAN"), |
535130c3 | 970 | ex_libs => add(threads("-latomic")), |
3e9e810f | 971 | bn_ops => "BN_LLONG RC4_CHAR", |
e6f98ae4 RL |
972 | asm_arch => 'sparcv9', |
973 | perlasm_scheme => 'void', | |
5e1b2353 RL |
974 | multilib => "64", |
975 | }, | |
7ead0c89 | 976 | |
5e1b2353 | 977 | "linux-alpha-gcc" => { |
30478c97 | 978 | inherit_from => [ "linux-generic64" ], |
abe256e7 | 979 | lib_cppflags => add("-DL_ENDIAN"), |
3e9e810f | 980 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 RL |
981 | asm_arch => 'alpha', |
982 | perlasm_scheme => "void", | |
5e1b2353 | 983 | }, |
5e1b2353 | 984 | "linux-c64xplus" => { |
d2b2221a | 985 | inherit_from => [ "BASE_unix" ], |
7ead0c89 | 986 | # TI_CGT_C6000_7.3.x is a requirement |
abe256e7 RL |
987 | CC => "cl6x", |
988 | CFLAGS => "-o2 -ox -ms", | |
989 | cflags => "--linux -ea=.s -eo=.o -mv6400+ -pden", | |
72d7f221 | 990 | cxxflags => "--linux -ea=.s -eo=.o -mv6400+ -pden", |
8c3bc594 | 991 | cppflags => combine("-DOPENSSL_SMALL_FOOTPRINT", |
9c62a279 | 992 | threads("-D_REENTRANT")), |
5e1b2353 | 993 | bn_ops => "BN_LLONG", |
9c62a279 | 994 | thread_scheme => "pthreads", |
e6f98ae4 | 995 | asm_arch => 'c64xplus', |
5e1b2353 RL |
996 | perlasm_scheme => "void", |
997 | dso_scheme => "dlfcn", | |
998 | shared_target => "linux-shared", | |
999 | shared_cflag => "--pic", | |
b6d5ba1a | 1000 | shared_ldflag => add("-z --sysv --shared"), |
5e1b2353 RL |
1001 | ranlib => "true", |
1002 | }, | |
f09e7ca9 | 1003 | |
1818572d | 1004 | #### *BSD |
5e1b2353 | 1005 | "BSD-generic32" => { |
9c62a279 | 1006 | # As for thread cflag. Idea is to maintain "collective" set of |
1818572d AP |
1007 | # flags, which would cover all BSD flavors. -pthread applies |
1008 | # to them all, but is treated differently. OpenBSD expands is | |
1009 | # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x | |
1010 | # expands it as -lc_r, which has to be accompanied by explicit | |
1011 | # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x | |
1012 | # expands it as -lc_r, which seems to be sufficient? | |
d2b2221a | 1013 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1014 | CC => "cc", |
1015 | CFLAGS => picker(default => "-Wall", | |
1016 | debug => "-O0 -g", | |
1017 | release => "-O3"), | |
1018 | cflags => threads("-pthread"), | |
8c3bc594 | 1019 | cppflags => threads("-D_THREAD_SAFE -D_REENTRANT"), |
fcd2ac80 | 1020 | ex_libs => add(threads("-pthread")), |
619eb33a | 1021 | enable => add("devcryptoeng"), |
3e9e810f | 1022 | bn_ops => "BN_LLONG", |
9c62a279 | 1023 | thread_scheme => "pthreads", |
5e1b2353 RL |
1024 | dso_scheme => "dlfcn", |
1025 | shared_target => "bsd-gcc-shared", | |
1026 | shared_cflag => "-fPIC", | |
5e1b2353 | 1027 | }, |
7ead0c89 AP |
1028 | "BSD-generic64" => { |
1029 | inherit_from => [ "BSD-generic32" ], | |
3e9e810f | 1030 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 1031 | }, |
7ead0c89 AP |
1032 | |
1033 | "BSD-x86" => { | |
30478c97 | 1034 | inherit_from => [ "BSD-generic32" ], |
abe256e7 | 1035 | CFLAGS => add(picker(release => "-fomit-frame-pointer")), |
68b8bcf4 | 1036 | lib_cppflags => add("-DL_ENDIAN"), |
a01dab94 | 1037 | bn_ops => "BN_LLONG", |
e6f98ae4 | 1038 | asm_arch => 'x86', |
7ead0c89 | 1039 | perlasm_scheme => "a.out", |
5e1b2353 | 1040 | }, |
7ead0c89 AP |
1041 | "BSD-x86-elf" => { |
1042 | inherit_from => [ "BSD-x86" ], | |
1043 | perlasm_scheme => "elf", | |
5e1b2353 | 1044 | }, |
f09e7ca9 | 1045 | |
7ead0c89 | 1046 | "BSD-sparcv8" => { |
30478c97 | 1047 | inherit_from => [ "BSD-generic32" ], |
8c3bc594 | 1048 | cflags => add("-mcpu=v8"), |
68b8bcf4 | 1049 | lib_cppflags => add("-DB_ENDIAN"), |
e6f98ae4 RL |
1050 | asm_arch => 'sparcv8', |
1051 | perlasm_scheme => 'void', | |
5e1b2353 | 1052 | }, |
5e1b2353 | 1053 | "BSD-sparc64" => { |
7ead0c89 AP |
1054 | # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it |
1055 | # simply *happens* to work around a compiler bug in gcc 3.3.3, | |
1056 | # triggered by RIPEMD160 code. | |
30478c97 | 1057 | inherit_from => [ "BSD-generic64" ], |
68b8bcf4 | 1058 | lib_cppflags => add("-DB_ENDIAN -DMD32_REG_T=int"), |
3e9e810f | 1059 | bn_ops => "BN_LLONG", |
e6f98ae4 RL |
1060 | asm_arch => 'sparcv9', |
1061 | perlasm_scheme => 'void', | |
5e1b2353 | 1062 | }, |
7ead0c89 | 1063 | |
5e1b2353 | 1064 | "BSD-ia64" => { |
30478c97 | 1065 | inherit_from => [ "BSD-generic64" ], |
68b8bcf4 | 1066 | lib_cppflags => add("-DL_ENDIAN"), |
3e9e810f | 1067 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 RL |
1068 | asm_arch => 'ia64', |
1069 | perlasm_scheme => 'void', | |
5e1b2353 | 1070 | }, |
7ead0c89 | 1071 | |
5e1b2353 | 1072 | "BSD-x86_64" => { |
30478c97 | 1073 | inherit_from => [ "BSD-generic64" ], |
68b8bcf4 | 1074 | lib_cppflags => add("-DL_ENDIAN"), |
3e9e810f | 1075 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 | 1076 | asm_arch => 'x86_64', |
5e1b2353 | 1077 | perlasm_scheme => "elf", |
5e1b2353 | 1078 | }, |
f09e7ca9 | 1079 | |
8e22f9d6 AJ |
1080 | "BSD-aarch64" => { |
1081 | inherit_from => [ "BSD-generic64" ], | |
1082 | lib_cppflags => add("-DL_ENDIAN"), | |
1083 | bn_ops => "SIXTY_FOUR_BIT_LONG", | |
1084 | asm_arch => 'aarch64', | |
1085 | perlasm_scheme => "linux64", | |
1086 | }, | |
1087 | ||
f5485b97 | 1088 | "BSD-ppc" => { |
1089 | inherit_from => [ "BSD-generic32" ], | |
1090 | asm_arch => 'ppc32', | |
1091 | perlasm_scheme => "linux32", | |
1092 | lib_cppflags => add("-DB_ENDIAN"), | |
1093 | }, | |
1094 | ||
1095 | "BSD-ppc64" => { | |
1096 | inherit_from => [ "BSD-generic64" ], | |
1097 | cflags => add("-m64"), | |
1098 | cxxflags => add("-m64"), | |
1099 | lib_cppflags => add("-DB_ENDIAN"), | |
1100 | asm_arch => 'ppc64', | |
1101 | perlasm_scheme => "linux64", | |
1102 | }, | |
1103 | ||
1104 | "BSD-ppc64le" => { | |
1105 | inherit_from => [ "BSD-generic64" ], | |
1106 | cflags => add("-m64"), | |
1107 | cxxflags => add("-m64"), | |
1108 | lib_cppflags => add("-DL_ENDIAN"), | |
1109 | asm_arch => 'ppc64', | |
1110 | perlasm_scheme => "linux64le", | |
1111 | }, | |
1112 | ||
42ee6e7b | 1113 | # riscv below refers to contemporary RISCV Architecture |
c2d1ad0e PK |
1114 | # specifications, |
1115 | "BSD-riscv64" => { | |
1116 | inherit_from => [ "BSD-generic64"], | |
1117 | perlasm_scheme => "linux64", | |
d1460afd | 1118 | asm_arch => 'riscv64', |
c2d1ad0e PK |
1119 | }, |
1120 | ||
42ee6e7b HZZ |
1121 | "BSD-riscv32" => { |
1122 | inherit_from => [ "BSD-generic32"], | |
1123 | perlasm_scheme => "linux32", | |
1124 | asm_arch => 'riscv32', | |
1125 | }, | |
1126 | ||
a9389c0b PK |
1127 | "BSD-armv4" => { |
1128 | ################################################################ | |
1129 | # Note that -march is not among compiler options in linux-armv4 | |
1130 | # target description. Not specifying one is intentional to give | |
1131 | # you choice to: | |
1132 | # | |
1133 | # a) rely on your compiler default by not specifying one; | |
1134 | # b) specify your target platform explicitly for optimal | |
1135 | # performance, e.g. -march=armv6 or -march=armv7-a; | |
1136 | # c) build "universal" binary that targets *range* of platforms | |
1137 | # by specifying minimum and maximum supported architecture; | |
1138 | # | |
1139 | # As for c) option. It actually makes no sense to specify | |
1140 | # maximum to be less than ARMv7, because it's the least | |
1141 | # requirement for run-time switch between platform-specific | |
1142 | # code paths. And without run-time switch performance would be | |
1143 | # equivalent to one for minimum. Secondly, there are some | |
1144 | # natural limitations that you'd have to accept and respect. | |
1145 | # Most notably you can *not* build "universal" binary for | |
1146 | # big-endian platform. This is because ARMv7 processor always | |
1147 | # picks instructions in little-endian order. Another similar | |
1148 | # limitation is that -mthumb can't "cross" -march=armv6t2 | |
1149 | # boundary, because that's where it became Thumb-2. Well, this | |
1150 | # limitation is a bit artificial, because it's not really | |
1151 | # impossible, but it's deemed too tricky to support. And of | |
1152 | # course you have to be sure that your binutils are actually | |
1153 | # up to the task of handling maximum target platform. With all | |
1154 | # this in mind here is an example of how to configure | |
1155 | # "universal" build: | |
1156 | # | |
1157 | # ./Configure BSD-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8 | |
1158 | # | |
1159 | inherit_from => [ "BSD-generic32" ], | |
1160 | asm_arch => 'armv4', | |
1161 | perlasm_scheme => "linux32", | |
1162 | }, | |
1163 | ||
5e1b2353 | 1164 | "bsdi-elf-gcc" => { |
30478c97 | 1165 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1166 | CC => "gcc", |
1167 | CFLAGS => "-fomit-frame-pointer -O3 -Wall", | |
68b8bcf4 | 1168 | lib_cppflags => "-DPERL5 -DL_ENDIAN", |
98fdbce0 | 1169 | ex_libs => add("-ldl"), |
a01dab94 | 1170 | bn_ops => "BN_LLONG", |
e6f98ae4 RL |
1171 | asm_arch => 'x86', |
1172 | perlasm_scheme => "elf", | |
9c62a279 | 1173 | thread_scheme => "(unknown)", |
5e1b2353 RL |
1174 | dso_scheme => "dlfcn", |
1175 | shared_target => "bsd-gcc-shared", | |
1176 | shared_cflag => "-fPIC", | |
5e1b2353 | 1177 | }, |
c3bd630d DC |
1178 | #### *BSD-nodef |
1179 | "BSD-nodef-generic32" => { | |
1180 | # As for thread cflag. Idea is to maintain "collective" set of | |
1181 | # flags, which would cover all BSD flavors. -pthread applies | |
1182 | # to them all, but is treated differently. OpenBSD expands is | |
1183 | # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x | |
1184 | # expands it as -lc_r, which has to be accompanied by explicit | |
1185 | # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x | |
1186 | # expands it as -lc_r, which seems to be sufficient? | |
1187 | inherit_from => [ "BASE_unix" ], | |
1188 | CC => "cc", | |
1189 | CFLAGS => picker(default => "-Wall", | |
1190 | debug => "-O0 -g", | |
1191 | release => "-O3"), | |
1192 | cflags => threads("-pthread"), | |
1193 | cppflags => threads("-D_THREAD_SAFE -D_REENTRANT"), | |
1194 | ex_libs => add(threads("-pthread")), | |
1195 | enable => add("devcryptoeng"), | |
1196 | bn_ops => "BN_LLONG", | |
1197 | thread_scheme => "pthreads", | |
1198 | dso_scheme => "dlfcn", | |
1199 | shared_target => "bsd-gcc-nodef-shared", | |
1200 | shared_cflag => "-fPIC", | |
1201 | }, | |
1202 | "BSD-nodef-generic64" => { | |
1203 | inherit_from => [ "BSD-nodef-generic32" ], | |
1204 | bn_ops => "SIXTY_FOUR_BIT_LONG", | |
1205 | }, | |
1206 | ||
1207 | "BSD-nodef-x86" => { | |
1208 | inherit_from => [ "BSD-nodef-generic32" ], | |
1209 | CFLAGS => add(picker(release => "-fomit-frame-pointer")), | |
1210 | lib_cppflags => add("-DL_ENDIAN"), | |
1211 | bn_ops => "BN_LLONG", | |
1212 | asm_arch => 'x86', | |
1213 | perlasm_scheme => "a.out", | |
1214 | }, | |
1215 | "BSD-nodef-x86-elf" => { | |
1216 | inherit_from => [ "BSD-nodef-x86" ], | |
1217 | perlasm_scheme => "elf", | |
1218 | }, | |
1219 | ||
1220 | "BSD-nodef-sparcv8" => { | |
1221 | inherit_from => [ "BSD-nodef-generic32" ], | |
1222 | cflags => add("-mcpu=v8"), | |
1223 | lib_cppflags => add("-DB_ENDIAN"), | |
1224 | asm_arch => 'sparcv8', | |
1225 | perlasm_scheme => 'void', | |
1226 | }, | |
1227 | "BSD-nodef-sparc64" => { | |
1228 | # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it | |
1229 | # simply *happens* to work around a compiler bug in gcc 3.3.3, | |
1230 | # triggered by RIPEMD160 code. | |
1231 | inherit_from => [ "BSD-nodef-generic64" ], | |
1232 | lib_cppflags => add("-DB_ENDIAN -DMD32_REG_T=int"), | |
1233 | bn_ops => "BN_LLONG", | |
1234 | asm_arch => 'sparcv9', | |
1235 | perlasm_scheme => 'void', | |
1236 | }, | |
1237 | ||
1238 | "BSD-nodef-ia64" => { | |
1239 | inherit_from => [ "BSD-nodef-generic64" ], | |
1240 | lib_cppflags => add("-DL_ENDIAN"), | |
1241 | bn_ops => "SIXTY_FOUR_BIT_LONG", | |
1242 | asm_arch => 'ia64', | |
1243 | perlasm_scheme => 'void', | |
1244 | }, | |
1245 | ||
1246 | "BSD-nodef-x86_64" => { | |
1247 | inherit_from => [ "BSD-nodef-generic64" ], | |
1248 | lib_cppflags => add("-DL_ENDIAN"), | |
1249 | bn_ops => "SIXTY_FOUR_BIT_LONG", | |
1250 | asm_arch => 'x86_64', | |
1251 | perlasm_scheme => "elf", | |
1252 | }, | |
f09e7ca9 | 1253 | |
f09e7ca9 RS |
1254 | #### SCO/Caldera targets. |
1255 | # | |
1256 | # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc. | |
1257 | # Now we only have blended unixware-* as it's the only one used by ./config. | |
1258 | # If you want to optimize for particular microarchitecture, bypass ./config | |
1259 | # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate. | |
1260 | # Note that not all targets include assembler support. Mostly because of | |
1261 | # lack of motivation to support out-of-date platforms with out-of-date | |
e3713c36 | 1262 | # compiler drivers and assemblers. |
f09e7ca9 RS |
1263 | # |
1264 | # UnixWare 2.0x fails destest with -O. | |
5e1b2353 | 1265 | "unixware-2.0" => { |
d2b2221a | 1266 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1267 | CC => "cc", |
1268 | cflags => threads("-Kthread"), | |
68b8bcf4 | 1269 | lib_cppflags => "-DFILIO_H -DNO_STRINGS_H", |
98fdbce0 | 1270 | ex_libs => add("-lsocket -lnsl -lresolv -lx"), |
9c62a279 | 1271 | thread_scheme => "uithreads", |
5e1b2353 RL |
1272 | }, |
1273 | "unixware-2.1" => { | |
d2b2221a | 1274 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1275 | CC => "cc", |
1276 | CFLAGS => "-O", | |
1277 | cflags => threads("-Kthread"), | |
68b8bcf4 | 1278 | lib_cppflags => "-DFILIO_H", |
98fdbce0 | 1279 | ex_libs => add("-lsocket -lnsl -lresolv -lx"), |
9c62a279 | 1280 | thread_scheme => "uithreads", |
5e1b2353 RL |
1281 | }, |
1282 | "unixware-7" => { | |
30478c97 | 1283 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1284 | CC => "cc", |
1285 | CFLAGS => "-O", | |
1286 | cflags => combine("-Kalloca", threads("-Kthread")), | |
68b8bcf4 | 1287 | lib_cppflags => "-DFILIO_H", |
98fdbce0 | 1288 | ex_libs => add("-lsocket -lnsl"), |
9c62a279 | 1289 | thread_scheme => "uithreads", |
a01dab94 | 1290 | bn_ops => "BN_LLONG", |
e6f98ae4 | 1291 | asm_arch => 'x86', |
5e1b2353 RL |
1292 | perlasm_scheme => "elf-1", |
1293 | dso_scheme => "dlfcn", | |
1294 | shared_target => "svr5-shared", | |
1295 | shared_cflag => "-Kpic", | |
5e1b2353 RL |
1296 | }, |
1297 | "unixware-7-gcc" => { | |
30478c97 | 1298 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1299 | CC => "gcc", |
1300 | CFLAGS => "-O3 -fomit-frame-pointer -Wall", | |
68b8bcf4 RL |
1301 | cppflags => add(threads("-D_REENTRANT")), |
1302 | lib_cppflags => add("-DL_ENDIAN -DFILIO_H"), | |
98fdbce0 | 1303 | ex_libs => add("-lsocket -lnsl"), |
a01dab94 | 1304 | bn_ops => "BN_LLONG", |
9c62a279 | 1305 | thread_scheme => "pthreads", |
e6f98ae4 | 1306 | asm_arch => 'x86', |
5e1b2353 RL |
1307 | perlasm_scheme => "elf-1", |
1308 | dso_scheme => "dlfcn", | |
1309 | shared_target => "gnu-shared", | |
1310 | shared_cflag => "-fPIC", | |
5e1b2353 | 1311 | }, |
e3713c36 | 1312 | # SCO 5 - Ben Laurie says the -O breaks the SCO cc. |
5e1b2353 | 1313 | "sco5-cc" => { |
30478c97 | 1314 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1315 | cc => "cc", |
1316 | cflags => "-belf", | |
98fdbce0 | 1317 | ex_libs => add("-lsocket -lnsl"), |
9c62a279 | 1318 | thread_scheme => "(unknown)", |
e6f98ae4 | 1319 | asm_arch => 'x86', |
5e1b2353 RL |
1320 | perlasm_scheme => "elf-1", |
1321 | dso_scheme => "dlfcn", | |
1322 | shared_target => "svr3-shared", | |
1323 | shared_cflag => "-Kpic", | |
5e1b2353 RL |
1324 | }, |
1325 | "sco5-gcc" => { | |
30478c97 | 1326 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1327 | cc => "gcc", |
1328 | cflags => "-O3 -fomit-frame-pointer", | |
98fdbce0 | 1329 | ex_libs => add("-lsocket -lnsl"), |
a01dab94 | 1330 | bn_ops => "BN_LLONG", |
9c62a279 | 1331 | thread_scheme => "(unknown)", |
e6f98ae4 | 1332 | asm_arch => 'x86', |
5e1b2353 RL |
1333 | perlasm_scheme => "elf-1", |
1334 | dso_scheme => "dlfcn", | |
1335 | shared_target => "svr3-shared", | |
1336 | shared_cflag => "-fPIC", | |
5e1b2353 | 1337 | }, |
f09e7ca9 RS |
1338 | |
1339 | #### IBM's AIX. | |
f780eaad AP |
1340 | # Below targets assume AIX >=5. Caveat lector. If you are accustomed |
1341 | # to control compilation "bitness" by setting $OBJECT_MODE environment | |
1342 | # variable, then you should know that in OpenSSL case it's considered | |
1343 | # only in ./config. Once configured, build procedure remains "deaf" to | |
1344 | # current value of $OBJECT_MODE. | |
10aafed3 AP |
1345 | "aix-common" => { |
1346 | inherit_from => [ "BASE_unix" ], | |
1347 | template => 1, | |
1348 | sys_id => "AIX", | |
1349 | lib_cppflags => "-DB_ENDIAN", | |
8f29569e | 1350 | lflags => "-Wl,-bsvr4", |
10aafed3 AP |
1351 | thread_scheme => "pthreads", |
1352 | dso_scheme => "dlfcn", | |
ef2dfc99 | 1353 | shared_target => "aix", |
f3d6a364 | 1354 | module_ldflags => "-Wl,-G,-bsymbolic,-bnoentry", |
c1b38462 | 1355 | shared_ldflag => "-Wl,-G,-bsymbolic,-bnoentry", |
d3273ef6 | 1356 | shared_defflag => "-Wl,-bE:", |
69e0f8cc | 1357 | shared_fipsflag => "-Wl,-binitfini:_init:_cleanup", |
fb82cbfe | 1358 | perl_platform => 'AIX', |
10aafed3 | 1359 | }, |
5e1b2353 | 1360 | "aix-gcc" => { |
30478c97 | 1361 | inherit_from => [ "aix-common" ], |
abe256e7 RL |
1362 | CC => "gcc", |
1363 | CFLAGS => picker(debug => "-O0 -g", | |
1364 | release => "-O"), | |
1365 | cflags => add(threads("-pthread")), | |
b1f9db69 | 1366 | ex_libs => add(threads("-pthread")), |
5e1b2353 | 1367 | bn_ops => "BN_LLONG RC4_CHAR", |
e6f98ae4 | 1368 | asm_arch => 'ppc32', |
5e1b2353 | 1369 | perlasm_scheme => "aix32", |
82b6b084 | 1370 | shared_ldflag => add_before("-shared -static-libgcc"), |
2a23cd7f AP |
1371 | AR => add("-X32"), |
1372 | RANLIB => add("-X32"), | |
5e1b2353 RL |
1373 | }, |
1374 | "aix64-gcc" => { | |
30478c97 | 1375 | inherit_from => [ "aix-common" ], |
abe256e7 RL |
1376 | CC => "gcc", |
1377 | CFLAGS => picker(debug => "-O0 -g", | |
1378 | release => "-O"), | |
1379 | cflags => combine("-maix64", threads("-pthread")), | |
b1f9db69 | 1380 | ex_libs => add(threads("-pthread")), |
5e1b2353 | 1381 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
e6f98ae4 | 1382 | asm_arch => 'ppc64', |
5e1b2353 | 1383 | perlasm_scheme => "aix64", |
82b6b084 | 1384 | shared_ldflag => add_before("-shared -static-libgcc"), |
cff89b17 | 1385 | shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)", |
2a23cd7f AP |
1386 | AR => add("-X64"), |
1387 | RANLIB => add("-X64"), | |
5e1b2353 | 1388 | }, |
178fa72e DB |
1389 | "aix64-gcc-as" => { |
1390 | inherit_from => [ "aix64-gcc" ], | |
1391 | perlasm_scheme => "aix64-as", | |
1392 | }, | |
5e1b2353 | 1393 | "aix-cc" => { |
30478c97 | 1394 | inherit_from => [ "aix-common" ], |
abe256e7 RL |
1395 | CC => "cc", |
1396 | CFLAGS => picker(debug => "-O0 -g", | |
1397 | release => "-O"), | |
1398 | cflags => combine("-q32 -qmaxmem=16384 -qro -qroconst", | |
8c3bc594 | 1399 | threads("-qthreaded")), |
68b8bcf4 | 1400 | cppflags => threads("-D_THREAD_SAFE"), |
b1f9db69 | 1401 | ex_libs => add(threads("-lpthreads")), |
10aafed3 | 1402 | bn_ops => "BN_LLONG RC4_CHAR", |
e6f98ae4 | 1403 | asm_arch => 'ppc32', |
5e1b2353 | 1404 | perlasm_scheme => "aix32", |
4af14b7b | 1405 | shared_cflag => "-qpic", |
2a23cd7f AP |
1406 | AR => add("-X32"), |
1407 | RANLIB => add("-X32"), | |
5e1b2353 RL |
1408 | }, |
1409 | "aix64-cc" => { | |
30478c97 | 1410 | inherit_from => [ "aix-common" ], |
abe256e7 RL |
1411 | CC => "cc", |
1412 | CFLAGS => picker(debug => "-O0 -g", | |
1413 | release => "-O"), | |
1414 | cflags => combine("-q64 -qmaxmem=16384 -qro -qroconst", | |
8c3bc594 | 1415 | threads("-qthreaded")), |
68b8bcf4 | 1416 | cppflags => threads("-D_THREAD_SAFE"), |
b1f9db69 | 1417 | ex_libs => add(threads("-lpthreads")), |
10aafed3 | 1418 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
e6f98ae4 | 1419 | asm_arch => 'ppc64', |
5e1b2353 RL |
1420 | perlasm_scheme => "aix64", |
1421 | dso_scheme => "dlfcn", | |
4af14b7b | 1422 | shared_cflag => "-qpic", |
cff89b17 | 1423 | shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)", |
2a23cd7f AP |
1424 | AR => add("-X64"), |
1425 | RANLIB => add("-X64"), | |
5e1b2353 | 1426 | }, |
f09e7ca9 RS |
1427 | |
1428 | # SIEMENS BS2000/OSD: an EBCDIC-based mainframe | |
5e1b2353 | 1429 | "BS2000-OSD" => { |
d2b2221a | 1430 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1431 | CC => "c89", |
1432 | CFLAGS => "-O", | |
1433 | cflags => "-XLLML -XLLMK -XL", | |
68b8bcf4 RL |
1434 | cppflags => "-DCHARSET_EBCDIC", |
1435 | lib_cppflags => "-DB_ENDIAN", | |
98fdbce0 | 1436 | ex_libs => add("-lsocket -lnsl"), |
3e9e810f | 1437 | bn_ops => "THIRTY_TWO_BIT RC4_CHAR", |
9c62a279 | 1438 | thread_scheme => "(unknown)", |
5e1b2353 | 1439 | }, |
f09e7ca9 | 1440 | |
7ead0c89 | 1441 | #### Visual C targets |
f09e7ca9 | 1442 | # |
78a50c75 | 1443 | # Win64 targets, WIN64I denotes IA-64/Itanium and WIN64A - AMD64 |
f09e7ca9 | 1444 | # |
78a50c75 | 1445 | # Note about /wd4090, disable warning C4090. This warning returns false |
f09e7ca9 RS |
1446 | # positives in some situations. Disabling it altogether masks both |
1447 | # legitimate and false cases, but as we compile on multiple platforms, | |
1448 | # we rely on other compilers to catch legitimate cases. | |
2fe73036 RL |
1449 | # |
1450 | # Also note that we force threads no matter what. Configuring "no-threads" | |
1451 | # is ignored. | |
78a50c75 AP |
1452 | # |
1453 | # UNICODE is defined in VC-common and applies to all targets. It used to | |
1454 | # be an opt-in option for VC-WIN32, but not anymore. The original reason | |
1455 | # was because ANSI API was *native* system interface for no longer | |
1456 | # supported Windows 9x. Keep in mind that UNICODE only affects how | |
1457 | # OpenSSL libraries interact with underlying OS, it doesn't affect API | |
1458 | # that OpenSSL presents to application. | |
1459 | ||
7ead0c89 | 1460 | "VC-common" => { |
d2b2221a | 1461 | inherit_from => [ "BASE_Windows" ], |
7ead0c89 | 1462 | template => 1, |
abe256e7 | 1463 | CC => "cl", |
9c90a073 | 1464 | CPP => '$(CC) /EP /C', |
78a50c75 | 1465 | CFLAGS => "/W3 /wd4090 /nologo", |
abe256e7 | 1466 | coutflag => "/Fo", |
23f3242f TI |
1467 | LD => "link", |
1468 | LDFLAGS => "/nologo /debug", | |
1469 | ldoutflag => "/out:", | |
a75a8756 TI |
1470 | ldpostoutflag => "", |
1471 | ld_resp_delim => "\n", | |
d5a6b54b | 1472 | bin_lflags => "setargv.obj", |
9c90a073 | 1473 | makedepcmd => '$(CC) /Zs /showIncludes', |
2e535eb5 | 1474 | makedep_scheme => 'VC', |
23f3242f TI |
1475 | AR => "lib", |
1476 | ARFLAGS => "/nologo", | |
1477 | aroutflag => "/out:", | |
e15eff3a | 1478 | ar_resp_delim => "\n", |
6afb3634 TI |
1479 | RC => "rc", |
1480 | rcoutflag => "/fo", | |
8c3bc594 | 1481 | defines => add("OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN", |
78a50c75 | 1482 | "UNICODE", "_UNICODE", |
68b8bcf4 RL |
1483 | "_CRT_SECURE_NO_DEPRECATE", |
1484 | "_WINSOCK_DEPRECATED_NO_WARNINGS"), | |
d748a1c6 | 1485 | lib_cflags => add("/Zi /Fdossl_static.pdb"), |
78a50c75 | 1486 | lib_defines => add("L_ENDIAN"), |
d748a1c6 MB |
1487 | dso_cflags => "/Zi /Fddso.pdb", |
1488 | bin_cflags => "/Zi /Fdapp.pdb", | |
ef2dfc99 RL |
1489 | # def_flag made to empty string so a .def file gets generated |
1490 | shared_defflag => '', | |
2fe73036 | 1491 | shared_ldflag => "/dll", |
e9abfc3a | 1492 | shared_target => "win-shared", # meaningless except it gives Configure a hint |
5fee3fe2 | 1493 | lddefflag => "/def:", |
6afb3634 | 1494 | ldresflag => " ", |
5fee3fe2 | 1495 | ld_implib_flag => "/implib:", |
2fe73036 | 1496 | thread_scheme => "winthreads", |
5e1b2353 | 1497 | dso_scheme => "win32", |
95768961 | 1498 | perl_platform => 'Windows::MSVC', |
6a145a32 AP |
1499 | # additional parameter to build_scheme denotes install-path "flavour" |
1500 | build_scheme => add("VC-common", { separator => undef }), | |
5e1b2353 | 1501 | }, |
2fe73036 | 1502 | "VC-noCE-common" => { |
acf15259 | 1503 | inherit_from => [ "VC-common" ], |
be1f4812 | 1504 | template => 1, |
abe256e7 RL |
1505 | CFLAGS => add(picker(debug => '/Od', |
1506 | release => '/O2')), | |
78a50c75 AP |
1507 | cflags => add(picker(default => '/Gs0 /GF /Gy', |
1508 | debug => | |
2fe73036 | 1509 | sub { |
abe256e7 | 1510 | ($disabled{shared} ? "" : "/MDd"); |
2fe73036 RL |
1511 | }, |
1512 | release => | |
1513 | sub { | |
abe256e7 | 1514 | ($disabled{shared} ? "" : "/MD"); |
2fe73036 | 1515 | })), |
fffb1c54 AP |
1516 | defines => add(picker(default => [], # works as type cast |
1517 | debug => [ "DEBUG", "_DEBUG" ])), | |
c32cbe97 AP |
1518 | lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }), |
1519 | # Following might/should appears controversial, i.e. defining | |
1520 | # /MDd without evaluating $disabled{shared}. It works in | |
1521 | # non-shared build because static library is compiled with /Zl | |
1522 | # and bares no reference to specific RTL. And it works in | |
1523 | # shared build because multiple /MDd options are not prohibited. | |
1524 | # But why /MDd in static build? Well, basically this is just a | |
1525 | # reference point, which allows to catch eventual errors that | |
1526 | # would prevent those who want to wrap OpenSSL into own .DLL. | |
1527 | # Why not /MD in release build then? Well, some are likely to | |
1528 | # prefer [non-debug] openssl.exe to be free from Micorosoft RTL | |
1529 | # redistributable. | |
1530 | bin_cflags => add(picker(debug => "/MDd", | |
1531 | release => sub { $disabled{shared} ? "/MT" : () }, | |
1532 | )), | |
2fe73036 | 1533 | bin_lflags => add("/subsystem:console /opt:ref"), |
ef5b8296 | 1534 | ex_libs => add(sub { |
2fe73036 RL |
1535 | my @ex_libs = (); |
1536 | push @ex_libs, 'ws2_32.lib' unless $disabled{sock}; | |
1537 | push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib'; | |
1538 | return join(" ", @ex_libs); | |
ef5b8296 | 1539 | }), |
2fe73036 RL |
1540 | }, |
1541 | "VC-WIN64-common" => { | |
1542 | inherit_from => [ "VC-noCE-common" ], | |
be1f4812 | 1543 | template => 1, |
ef5b8296 | 1544 | ex_libs => add(sub { |
2fe73036 RL |
1545 | my @ex_libs = (); |
1546 | push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./); | |
1547 | return join(" ", @_, @ex_libs); | |
ef5b8296 | 1548 | }), |
78a50c75 | 1549 | bn_ops => add("SIXTY_FOUR_BIT"), |
2fe73036 | 1550 | }, |
7ead0c89 | 1551 | "VC-WIN64I" => { |
30478c97 | 1552 | inherit_from => [ "VC-WIN64-common" ], |
abe256e7 RL |
1553 | AS => "ias", |
1554 | ASFLAGS => "-d debug", | |
78a50c75 | 1555 | asoutflag => "-o ", |
5e1b2353 | 1556 | sys_id => "WIN64I", |
b19fe714 | 1557 | uplink_arch => 'ia64', |
e6f98ae4 | 1558 | asm_arch => 'ia64', |
5e1b2353 | 1559 | perlasm_scheme => "ias", |
6ddb62a5 | 1560 | multilib => "-ia64", |
5e1b2353 RL |
1561 | }, |
1562 | "VC-WIN64A" => { | |
30478c97 | 1563 | inherit_from => [ "VC-WIN64-common" ], |
abe256e7 RL |
1564 | AS => sub { vc_win64a_info()->{AS} }, |
1565 | ASFLAGS => sub { vc_win64a_info()->{ASFLAGS} }, | |
2fe73036 | 1566 | asoutflag => sub { vc_win64a_info()->{asoutflag} }, |
abe256e7 | 1567 | asflags => sub { vc_win64a_info()->{asflags} }, |
5e1b2353 | 1568 | sys_id => "WIN64A", |
b19fe714 | 1569 | uplink_arch => 'x86_64', |
e6f98ae4 | 1570 | asm_arch => 'x86_64', |
a2608e4b | 1571 | perlasm_scheme => sub { vc_win64a_info()->{perlasm_scheme} }, |
6ddb62a5 | 1572 | multilib => "-x64", |
5e1b2353 | 1573 | }, |
5e1b2353 | 1574 | "VC-WIN32" => { |
30478c97 | 1575 | inherit_from => [ "VC-noCE-common" ], |
abe256e7 RL |
1576 | AS => sub { vc_win32_info()->{AS} }, |
1577 | ASFLAGS => sub { vc_win32_info()->{ASFLAGS} }, | |
43800958 | 1578 | asoutflag => sub { vc_win32_info()->{asoutflag} }, |
abe256e7 | 1579 | asflags => sub { vc_win32_info()->{asflags} }, |
5e1b2353 | 1580 | sys_id => "WIN32", |
78a50c75 | 1581 | bn_ops => add("BN_LLONG"), |
989b2ad7 | 1582 | uplink_arch => 'common', |
e6f98ae4 | 1583 | asm_arch => 'x86', |
f0d484fc | 1584 | perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} }, |
6a145a32 AP |
1585 | # "WOW" stands for "Windows on Windows", and "VC-WOW" engages |
1586 | # some installation path heuristics in windows-makefile.tmpl... | |
1587 | build_scheme => add("VC-WOW", { separator => undef }), | |
5e1b2353 | 1588 | }, |
5e1b2353 | 1589 | "VC-CE" => { |
2fe73036 | 1590 | inherit_from => [ "VC-common" ], |
78a50c75 AP |
1591 | CFLAGS => add(picker(debug => "/Od", |
1592 | release => "/O1i")), | |
abe256e7 RL |
1593 | CPPDEFINES => picker(debug => [ "DEBUG", "_DEBUG" ]), |
1594 | LDFLAGS => add("/nologo /opt:ref"), | |
2fe73036 | 1595 | cflags => |
abe256e7 RL |
1596 | combine('/GF /Gy', |
1597 | sub { vc_wince_info()->{cflags}; }, | |
1598 | sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14 | |
1599 | ? ($disabled{shared} ? " /MT" : " /MD") | |
1600 | : " /MC"; }), | |
e548c1fe | 1601 | cppflags => sub { vc_wince_info()->{cppflags}; }, |
78a50c75 | 1602 | lib_defines => add("NO_CHMOD", "OPENSSL_SMALL_FOOTPRINT"), |
68b8bcf4 | 1603 | lib_cppflags => sub { vc_wince_info()->{cppflags}; }, |
8c3bc594 | 1604 | includes => |
368297d1 RL |
1605 | add(combine(sub { defined(env('WCECOMPAT')) |
1606 | ? '$(WCECOMPAT)/include' : (); }, | |
1607 | sub { defined(env('PORTSDK_LIBPATH')) | |
1608 | ? '$(PORTSDK_LIBPATH)/../../include' | |
1609 | : (); })), | |
abe256e7 | 1610 | lflags => add(combine(sub { vc_wince_info()->{lflags}; }, |
47eeaf45 RL |
1611 | sub { defined(env('PORTSDK_LIBPATH')) |
1612 | ? "/entry:mainCRTstartup" : (); })), | |
5e1b2353 | 1613 | sys_id => "WINCE", |
78a50c75 | 1614 | bn_ops => add("BN_LLONG"), |
ef5b8296 | 1615 | ex_libs => add(sub { |
2fe73036 RL |
1616 | my @ex_libs = (); |
1617 | push @ex_libs, 'ws2.lib' unless $disabled{sock}; | |
1618 | push @ex_libs, 'crypt32.lib'; | |
17f16617 | 1619 | if (defined(env('WCECOMPAT'))) { |
2fe73036 | 1620 | my $x = '$(WCECOMPAT)/lib'; |
17f16617 | 1621 | if (-f "$x/env('TARGETCPU')/wcecompatex.lib") { |
2fe73036 RL |
1622 | $x .= '/$(TARGETCPU)/wcecompatex.lib'; |
1623 | } else { | |
1624 | $x .= '/wcecompatex.lib'; | |
1625 | } | |
1626 | push @ex_libs, $x; | |
1627 | } | |
1628 | push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib' | |
17f16617 | 1629 | if (defined(env('PORTSDK_LIBPATH'))); |
a1736f37 | 1630 | push @ex_libs, '/nodefaultlib coredll.lib corelibc.lib' |
1631 | if (env('TARGETCPU') =~ /^X86|^ARMV4[IT]/); | |
1632 | return join(" ", @ex_libs); | |
ef5b8296 | 1633 | }), |
5e1b2353 | 1634 | }, |
f09e7ca9 | 1635 | |
7ead0c89 | 1636 | #### MinGW |
9dd4ed28 RL |
1637 | "mingw-common" => { |
1638 | inherit_from => [ 'BASE_unix' ], | |
1639 | template => 1, | |
abe256e7 RL |
1640 | CC => "gcc", |
1641 | CFLAGS => picker(default => "-Wall", | |
8c3bc594 | 1642 | debug => "-g -O0", |
9dd4ed28 | 1643 | release => "-O3"), |
68b8bcf4 | 1644 | cppflags => combine("-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN", |
abe256e7 | 1645 | threads("-D_MT")), |
68b8bcf4 | 1646 | lib_cppflags => "-DL_ENDIAN", |
98fdbce0 | 1647 | ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"), |
9c62a279 | 1648 | thread_scheme => "winthreads", |
5e1b2353 | 1649 | dso_scheme => "win32", |
520f434b | 1650 | shared_target => "mingw-shared", |
8c3bc594 | 1651 | shared_cppflags => add("_WINDLL"), |
68ab559a | 1652 | shared_ldflag => "-static-libgcc", |
9dd4ed28 RL |
1653 | |
1654 | perl_platform => 'mingw', | |
1655 | }, | |
1656 | "mingw" => { | |
30478c97 | 1657 | inherit_from => [ "mingw-common" ], |
9dd4ed28 RL |
1658 | CFLAGS => add(picker(release => "-fomit-frame-pointer")), |
1659 | cflags => "-m32", | |
1660 | sys_id => "MINGW32", | |
1661 | bn_ops => add("BN_LLONG"), | |
e6f98ae4 | 1662 | asm_arch => 'x86', |
b19fe714 | 1663 | uplink_arch => 'x86', |
9dd4ed28 | 1664 | perlasm_scheme => "coff", |
64c443e3 | 1665 | shared_rcflag => "--target=pe-i386", |
520f434b | 1666 | multilib => "", |
5e1b2353 | 1667 | }, |
5e1b2353 | 1668 | "mingw64" => { |
b19fe714 | 1669 | # As for uplink_arch. Applink makes it possible to use |
7ead0c89 AP |
1670 | # .dll compiled with one compiler with application compiled with |
1671 | # another compiler. It's possible to engage Applink support in | |
b19fe714 | 1672 | # mingw64 build, but it's not done, because until mingw64 |
7ead0c89 AP |
1673 | # supports structured exception handling, one can't seriously |
1674 | # consider its binaries for using with non-mingw64 run-time | |
1675 | # environment. And as mingw64 is always consistent with itself, | |
1676 | # Applink is never engaged and can as well be omitted. | |
30478c97 | 1677 | inherit_from => [ "mingw-common" ], |
abe256e7 | 1678 | cflags => "-m64", |
5e1b2353 | 1679 | sys_id => "MINGW64", |
9dd4ed28 | 1680 | bn_ops => add("SIXTY_FOUR_BIT"), |
e6f98ae4 | 1681 | asm_arch => 'x86_64', |
b19fe714 | 1682 | uplink_arch => undef, |
5e1b2353 | 1683 | perlasm_scheme => "mingw64", |
64c443e3 | 1684 | shared_rcflag => "--target=pe-x86-64", |
520f434b | 1685 | multilib => "64", |
5e1b2353 | 1686 | }, |
f09e7ca9 | 1687 | |
4d60c7e1 DW |
1688 | #### UEFI |
1689 | "UEFI" => { | |
d2b2221a | 1690 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1691 | CC => "cc", |
1692 | CFLAGS => "-O", | |
68b8bcf4 | 1693 | lib_cppflags => "-DL_ENDIAN", |
4d60c7e1 DW |
1694 | sys_id => "UEFI", |
1695 | }, | |
1b721050 CZ |
1696 | "UEFI-x86" => { |
1697 | inherit_from => [ "UEFI" ], | |
1698 | asm_arch => 'x86', | |
1699 | perlasm_scheme => "win32n", | |
1700 | }, | |
1701 | "UEFI-x86_64" => { | |
1702 | inherit_from => [ "UEFI" ], | |
1703 | asm_arch => 'x86_64', | |
1704 | perlasm_scheme => "nasm", | |
1705 | }, | |
4d60c7e1 | 1706 | |
7ead0c89 | 1707 | #### UWIN |
5e1b2353 | 1708 | "UWIN" => { |
d2b2221a | 1709 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1710 | CC => "cc", |
1711 | CFLAGS => "-O -Wall", | |
1712 | lib_cppflags => "-DTERMIOS -DL_ENDIAN", | |
5e1b2353 | 1713 | sys_id => "UWIN", |
a01dab94 | 1714 | bn_ops => "BN_LLONG", |
5e1b2353 RL |
1715 | dso_scheme => "win32", |
1716 | }, | |
f09e7ca9 | 1717 | |
7ead0c89 | 1718 | #### Cygwin |
9dd4ed28 | 1719 | "Cygwin-common" => { |
68ca1737 | 1720 | inherit_from => [ "BASE_unix" ], |
9dd4ed28 RL |
1721 | template => 1, |
1722 | ||
abe256e7 RL |
1723 | CC => "gcc", |
1724 | CFLAGS => picker(default => "-Wall", | |
8864f0de | 1725 | debug => "-g -O0", |
9dd4ed28 | 1726 | release => "-O3"), |
9b9c42db | 1727 | ex_libs => add("-lcrypt32"), |
68b8bcf4 | 1728 | lib_cppflags => "-DTERMIOS -DL_ENDIAN", |
5e1b2353 | 1729 | sys_id => "CYGWIN", |
e58d9102 | 1730 | thread_scheme => "pthread", |
5e1b2353 RL |
1731 | dso_scheme => "dlfcn", |
1732 | shared_target => "cygwin-shared", | |
8c3bc594 | 1733 | shared_cppflags => "-D_WINDLL", |
9dd4ed28 RL |
1734 | |
1735 | perl_platform => 'Cygwin', | |
1736 | }, | |
1737 | "Cygwin-x86" => { | |
30478c97 | 1738 | inherit_from => [ "Cygwin-common" ], |
9dd4ed28 RL |
1739 | CFLAGS => add(picker(release => "-O3 -fomit-frame-pointer")), |
1740 | bn_ops => "BN_LLONG", | |
e6f98ae4 | 1741 | asm_arch => 'x86', |
9dd4ed28 | 1742 | perlasm_scheme => "coff", |
5e1b2353 RL |
1743 | }, |
1744 | "Cygwin-x86_64" => { | |
30478c97 | 1745 | inherit_from => [ "Cygwin-common" ], |
abe256e7 | 1746 | CC => "gcc", |
3e9e810f | 1747 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 | 1748 | asm_arch => 'x86_64', |
5e1b2353 | 1749 | perlasm_scheme => "mingw64", |
5e1b2353 | 1750 | }, |
b9ee2dac RL |
1751 | # Backward compatibility for those using this target |
1752 | "Cygwin" => { | |
1753 | inherit_from => [ "Cygwin-x86" ] | |
1754 | }, | |
1755 | # In case someone constructs the Cygwin target name themself | |
1756 | "Cygwin-i386" => { | |
1757 | inherit_from => [ "Cygwin-x86" ] | |
1758 | }, | |
1759 | "Cygwin-i486" => { | |
1760 | inherit_from => [ "Cygwin-x86" ] | |
1761 | }, | |
1762 | "Cygwin-i586" => { | |
1763 | inherit_from => [ "Cygwin-x86" ] | |
1764 | }, | |
1765 | "Cygwin-i686" => { | |
1766 | inherit_from => [ "Cygwin-x86" ] | |
1767 | }, | |
f09e7ca9 | 1768 | |
f09e7ca9 | 1769 | ##### MacOS X (a.k.a. Darwin) setup |
7ead0c89 | 1770 | "darwin-common" => { |
d2b2221a | 1771 | inherit_from => [ "BASE_unix" ], |
7ead0c89 | 1772 | template => 1, |
abe256e7 RL |
1773 | CC => "cc", |
1774 | CFLAGS => picker(debug => "-g -O0", | |
8c3bc594 RL |
1775 | release => "-O3"), |
1776 | cppflags => threads("-D_REENTRANT"), | |
53043311 | 1777 | lflags => add("-Wl,-search_paths_first"), |
5e1b2353 | 1778 | sys_id => "MACOSX", |
3e9e810f | 1779 | bn_ops => "BN_LLONG RC4_CHAR", |
9c62a279 | 1780 | thread_scheme => "pthreads", |
5e1b2353 RL |
1781 | perlasm_scheme => "osx32", |
1782 | dso_scheme => "dlfcn", | |
0c873419 | 1783 | ranlib => "ranlib -c", |
5e1b2353 | 1784 | shared_target => "darwin-shared", |
0c873419 | 1785 | shared_cflag => "-fPIC", |
d4453024 | 1786 | shared_extension => ".\$(SHLIB_VERSION_NUMBER).dylib", |
5e1b2353 | 1787 | }, |
c75065e1 AP |
1788 | # Option "freeze" such as -std=gnu9x can't negatively interfere |
1789 | # with future defaults for below two targets, because MacOS X | |
1790 | # for PPC has no future, it was discontinued by vendor in 2009. | |
c9741726 RL |
1791 | "darwin-ppc-cc" => { inherit_from => [ "darwin-ppc" ] }, # Historic alias |
1792 | "darwin-ppc" => { | |
30478c97 | 1793 | inherit_from => [ "darwin-common" ], |
8c3bc594 | 1794 | cflags => add("-arch ppc -std=gnu9x -Wa,-force_cpusubtype_ALL"), |
68b8bcf4 | 1795 | lib_cppflags => add("-DB_ENDIAN"), |
107783d9 | 1796 | shared_cflag => add("-fno-common"), |
e6f98ae4 | 1797 | asm_arch => 'ppc32', |
7ead0c89 | 1798 | perlasm_scheme => "osx32", |
7ead0c89 | 1799 | }, |
c9741726 RL |
1800 | "darwin64-ppc-cc" => { inherit_from => [ "darwin64-ppc" ] }, # Historic alias |
1801 | "darwin64-ppc" => { | |
30478c97 | 1802 | inherit_from => [ "darwin-common" ], |
8c3bc594 | 1803 | cflags => add("-arch ppc64 -std=gnu9x"), |
68b8bcf4 | 1804 | lib_cppflags => add("-DB_ENDIAN"), |
3e9e810f | 1805 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
e6f98ae4 | 1806 | asm_arch => 'ppc64', |
5e1b2353 | 1807 | perlasm_scheme => "osx64", |
5e1b2353 | 1808 | }, |
c9741726 RL |
1809 | "darwin-i386-cc" => { inherit_from => [ "darwin-i386" ] }, # Historic alias |
1810 | "darwin-i386" => { | |
30478c97 | 1811 | inherit_from => [ "darwin-common" ], |
abe256e7 RL |
1812 | CFLAGS => add(picker(release => "-fomit-frame-pointer")), |
1813 | cflags => add("-arch i386"), | |
68b8bcf4 | 1814 | lib_cppflags => add("-DL_ENDIAN"), |
3e9e810f | 1815 | bn_ops => "BN_LLONG RC4_INT", |
e6f98ae4 | 1816 | asm_arch => 'x86', |
5e1b2353 | 1817 | perlasm_scheme => "macosx", |
5e1b2353 | 1818 | }, |
c9741726 RL |
1819 | "darwin64-x86_64-cc" => { inherit_from => [ "darwin64-x86_64" ] }, # Historic alias |
1820 | "darwin64-x86_64" => { | |
30478c97 | 1821 | inherit_from => [ "darwin-common" ], |
abe256e7 RL |
1822 | CFLAGS => add("-Wall"), |
1823 | cflags => add("-arch x86_64"), | |
68b8bcf4 | 1824 | lib_cppflags => add("-DL_ENDIAN"), |
3e9e810f | 1825 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e6f98ae4 | 1826 | asm_arch => 'x86_64', |
5e1b2353 | 1827 | perlasm_scheme => "macosx", |
5e1b2353 | 1828 | }, |
23f04372 B |
1829 | "darwin64-arm64-cc" => { inherit_from => [ "darwin64-arm64" ] }, # "Historic" alias |
1830 | "darwin64-arm64" => { | |
1831 | inherit_from => [ "darwin-common" ], | |
1832 | CFLAGS => add("-Wall"), | |
1833 | cflags => add("-arch arm64"), | |
1834 | lib_cppflags => add("-DL_ENDIAN"), | |
1835 | bn_ops => "SIXTY_FOUR_BIT_LONG", | |
7c0e98a5 | 1836 | asm_arch => 'aarch64', |
23f04372 B |
1837 | perlasm_scheme => "ios64", |
1838 | }, | |
7ead0c89 | 1839 | |
f09e7ca9 | 1840 | ##### GNU Hurd |
7c729851 | 1841 | "hurd-generic32" => { |
d2b2221a | 1842 | inherit_from => [ "BASE_unix" ], |
abe256e7 | 1843 | CC => "gcc", |
7c729851 ST |
1844 | CXX => "g++", |
1845 | CFLAGS => picker(default => "-Wall", | |
1846 | debug => "-O0 -g", | |
1847 | release => "-O3"), | |
1848 | CXXFLAGS => picker(default => "-Wall", | |
1849 | debug => "-O0 -g", | |
1850 | release => "-O3"), | |
abe256e7 | 1851 | cflags => threads("-pthread"), |
7c729851 | 1852 | cxxflags => combine("-std=c++11", threads("-pthread")), |
fcd2ac80 | 1853 | ex_libs => add("-ldl", threads("-pthread")), |
7c729851 | 1854 | bn_ops => "BN_LLONG RC4_CHAR", |
9c62a279 | 1855 | thread_scheme => "pthreads", |
5e1b2353 RL |
1856 | dso_scheme => "dlfcn", |
1857 | shared_target => "linux-shared", | |
1858 | shared_cflag => "-fPIC", | |
7c729851 ST |
1859 | shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" }, |
1860 | }, | |
1861 | ||
1862 | "hurd-generic64" => { | |
1863 | inherit_from => [ "hurd-generic32" ], | |
1864 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", | |
1865 | }, | |
1866 | ||
1867 | #### X86 / X86_64 targets | |
1868 | "hurd-x86" => { | |
1869 | inherit_from => [ "hurd-generic32" ], | |
1870 | CFLAGS => add(picker(release => "-fomit-frame-pointer")), | |
1871 | cflags => add("-m32"), | |
1872 | cxxflags => add("-m32"), | |
1873 | lib_cppflags => add("-DL_ENDIAN"), | |
1874 | bn_ops => "BN_LLONG", | |
1875 | asm_arch => 'x86', | |
1876 | perlasm_scheme => 'elf', | |
1877 | }, | |
1878 | ||
1879 | "hurd-x86_64" => { | |
1880 | inherit_from => [ "hurd-generic64" ], | |
1881 | cflags => add("-m64"), | |
1882 | cxxflags => add("-m64"), | |
1883 | lib_cppflags => add("-DL_ENDIAN"), | |
1884 | bn_ops => "SIXTY_FOUR_BIT_LONG", | |
1885 | asm_arch => 'x86_64', | |
1886 | perlasm_scheme => 'elf', | |
1887 | multilib => "64", | |
5e1b2353 | 1888 | }, |
f09e7ca9 | 1889 | |
f09e7ca9 | 1890 | ##### VxWorks for various targets |
5e1b2353 | 1891 | "vxworks-ppc60x" => { |
d2b2221a | 1892 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1893 | CC => "ccppc", |
1894 | CFLAGS => "-O2 -Wall -fstrength-reduce", | |
1895 | cflags => "-mrtp -mhard-float -mstrict-align -fno-implicit-fp -fno-builtin -fno-strict-aliasing", | |
8c3bc594 RL |
1896 | cppflags => combine("-D_REENTRANT -DPPC32_fp60x -DCPU=PPC32", |
1897 | "_DTOOL_FAMILY=gnu -DTOOL=gnu", | |
1898 | "-I\$(WIND_BASE)/target/usr/h", | |
1899 | "-I\$(WIND_BASE)/target/usr/h/wrn/coreip"), | |
5e1b2353 | 1900 | sys_id => "VXWORKS", |
47eeaf45 RL |
1901 | lflags => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"), |
1902 | ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"), | |
5e1b2353 RL |
1903 | }, |
1904 | "vxworks-ppcgen" => { | |
d2b2221a | 1905 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1906 | CC => "ccppc", |
1907 | CFLAGS => "-O1 -Wall", | |
1908 | cflags => "-mrtp -msoft-float -mstrict-align -fno-builtin -fno-strict-aliasing", | |
8c3bc594 RL |
1909 | cppflags => combine("-D_REENTRANT -DPPC32 -DCPU=PPC32", |
1910 | "-DTOOL_FAMILY=gnu -DTOOL=gnu", | |
1911 | "-I\$(WIND_BASE)/target/usr/h", | |
1912 | "-I\$(WIND_BASE)/target/usr/h/wrn/coreip"), | |
5e1b2353 | 1913 | sys_id => "VXWORKS", |
47eeaf45 RL |
1914 | lflags => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"), |
1915 | ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"), | |
5e1b2353 RL |
1916 | }, |
1917 | "vxworks-ppc405" => { | |
d2b2221a | 1918 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1919 | CC => "ccppc", |
1920 | CFLAGS => "-g", | |
1921 | cflags => "-msoft-float -mlongcall", | |
8c3bc594 RL |
1922 | cppflags => combine("-D_REENTRANT -DPPC32 -DCPU=PPC405", |
1923 | "-DTOOL_FAMILY=gnu -DTOOL=gnu", | |
1924 | "-I\$(WIND_BASE)/target/h"), | |
5e1b2353 | 1925 | sys_id => "VXWORKS", |
47eeaf45 | 1926 | lflags => add("-r"), |
5e1b2353 RL |
1927 | }, |
1928 | "vxworks-ppc750" => { | |
d2b2221a | 1929 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1930 | CC => "ccppc", |
1931 | CFLAGS => "-ansi -fvolatile -Wall \$(DEBUG_FLAG)", | |
1932 | cflags => "-nostdinc -fno-builtin -fno-for-scope -fsigned-char -msoft-float -mlongcall", | |
8c3bc594 RL |
1933 | cppflags => combine("-DPPC750 -D_REENTRANT -DCPU=PPC604", |
1934 | "-I\$(WIND_BASE)/target/h"), | |
5e1b2353 | 1935 | sys_id => "VXWORKS", |
47eeaf45 | 1936 | lflags => add("-r"), |
5e1b2353 RL |
1937 | }, |
1938 | "vxworks-ppc750-debug" => { | |
d2b2221a | 1939 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1940 | CC => "ccppc", |
1941 | CFLAGS => "-ansi -fvolatile -Wall -g", | |
1942 | cflags => "-nostdinc -fno-builtin -fno-for-scope -fsigned-char -msoft-float -mlongcall", | |
8c3bc594 RL |
1943 | cppflags => combine("-DPPC750 -D_REENTRANT -DCPU=PPC604", |
1944 | "-DPEDANTIC -DDEBUG", | |
1945 | "-I\$(WIND_BASE)/target/h"), | |
5e1b2353 | 1946 | sys_id => "VXWORKS", |
47eeaf45 | 1947 | lflags => add("-r"), |
5e1b2353 RL |
1948 | }, |
1949 | "vxworks-ppc860" => { | |
d2b2221a | 1950 | inherit_from => [ "BASE_unix" ], |
abe256e7 | 1951 | CC => "ccppc", |
8c3bc594 RL |
1952 | cflags => "-nostdinc -msoft-float", |
1953 | cppflags => combine("-DCPU=PPC860 -DNO_STRINGS_H", | |
1954 | "-I\$(WIND_BASE)/target/h"), | |
5e1b2353 | 1955 | sys_id => "VXWORKS", |
47eeaf45 | 1956 | lflags => add("-r"), |
5e1b2353 RL |
1957 | }, |
1958 | "vxworks-simlinux" => { | |
d2b2221a | 1959 | inherit_from => [ "BASE_unix" ], |
abe256e7 | 1960 | CC => "ccpentium", |
8c3bc594 RL |
1961 | cflags => "-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -fno-builtin -fno-defer-pop", |
1962 | cppflags => combine("-D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\"", | |
1963 | "-DL_ENDIAN -DCPU=SIMLINUX -DNO_STRINGS_H", | |
1964 | "-DTOOL_FAMILY=gnu -DTOOL=gnu", | |
1965 | "-DOPENSSL_NO_HW_PADLOCK", | |
1966 | "-I\$(WIND_BASE)/target/h", | |
1967 | "-I\$(WIND_BASE)/target/h/wrn/coreip"), | |
5e1b2353 | 1968 | sys_id => "VXWORKS", |
47eeaf45 | 1969 | lflags => add("-r"), |
5e1b2353 RL |
1970 | ranlib => "ranlibpentium", |
1971 | }, | |
1972 | "vxworks-mips" => { | |
30478c97 | 1973 | inherit_from => [ "BASE_unix" ], |
abe256e7 RL |
1974 | CC => "ccmips", |
1975 | CFLAGS => "-O -G 0", | |
1976 | cflags => "-mrtp -mips2 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -msoft-float -mno-branch-likely -fno-builtin -fno-defer-pop", | |
8c3bc594 RL |
1977 | cppflags => combine("-D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\"", |
1978 | "-DCPU=MIPS32 -DNO_STRINGS_H", | |
1979 | "-DTOOL_FAMILY=gnu -DTOOL=gnu", | |
1980 | "-DOPENSSL_NO_HW_PADLOCK", | |
1981 | threads("-D_REENTRANT"), | |
1982 | "-I\$(WIND_BASE)/target/h", | |
1983 | "-I\$(WIND_BASE)/target/h/wrn/coreip"), | |
5e1b2353 | 1984 | sys_id => "VXWORKS", |
47eeaf45 RL |
1985 | lflags => add("-L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"), |
1986 | ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"), | |
9c62a279 | 1987 | thread_scheme => "pthreads", |
e6f98ae4 | 1988 | asm_arch => 'mips32', |
5e1b2353 RL |
1989 | perlasm_scheme => "o32", |
1990 | ranlib => "ranlibmips", | |
1991 | }, | |
f09e7ca9 | 1992 | |
7ead0c89 | 1993 | #### uClinux |
5e1b2353 | 1994 | "uClinux-dist" => { |
d2b2221a | 1995 | inherit_from => [ "BASE_unix" ], |
abe256e7 | 1996 | CC => sub { env('CC') }, |
8c3bc594 | 1997 | cppflags => threads("-D_REENTRANT"), |
98fdbce0 | 1998 | ex_libs => add("\$(LDLIBS)"), |
5e1b2353 | 1999 | bn_ops => "BN_LLONG", |
9c62a279 | 2000 | thread_scheme => "pthreads", |
17f16617 | 2001 | dso_scheme => sub { env('LIBSSL_dlfcn') }, |
5e1b2353 RL |
2002 | shared_target => "linux-shared", |
2003 | shared_cflag => "-fPIC", | |
17f16617 | 2004 | ranlib => sub { env('RANLIB') }, |
5e1b2353 RL |
2005 | }, |
2006 | "uClinux-dist64" => { | |
d2b2221a | 2007 | inherit_from => [ "BASE_unix" ], |
abe256e7 | 2008 | CC => sub { env('CC') }, |
8c3bc594 | 2009 | cppflags => threads("-D_REENTRANT"), |
98fdbce0 | 2010 | ex_libs => add("\$(LDLIBS)"), |
5e1b2353 | 2011 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
9c62a279 | 2012 | thread_scheme => "pthreads", |
17f16617 | 2013 | dso_scheme => sub { env('LIBSSL_dlfcn') }, |
5e1b2353 RL |
2014 | shared_target => "linux-shared", |
2015 | shared_cflag => "-fPIC", | |
17f16617 | 2016 | ranlib => sub { env('RANLIB') }, |
5e1b2353 | 2017 | }, |
f09e7ca9 | 2018 | |
e84193e4 | 2019 | ##### VMS |
ab907189 RL |
2020 | # Most things happen in vms-generic. |
2021 | # Note that vms_info extracts the pointer size from the end of | |
2022 | # the target name, and will assume that anything matching /-p\d+$/ | |
2023 | # indicates the pointer size setting for the desired target. | |
e84193e4 | 2024 | "vms-generic" => { |
d2b2221a | 2025 | inherit_from => [ "BASE_VMS" ], |
e84193e4 | 2026 | template => 1, |
abe256e7 RL |
2027 | CC => "CC/DECC", |
2028 | CPP => '$(CC)/PREPROCESS_ONLY=SYS$OUTPUT:', | |
2029 | CFLAGS => | |
ab907189 RL |
2030 | combine(picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL", |
2031 | debug => "/NOOPTIMIZE/DEBUG", | |
2032 | release => "/OPTIMIZE/NODEBUG"), | |
2033 | sub { my @warnings = | |
2034 | @{vms_info()->{disable_warns}}; | |
2035 | @warnings | |
2036 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), | |
0cbb6f6a | 2037 | cflag_incfirst => '/FIRST_INCLUDE=', |
68b8bcf4 | 2038 | lib_defines => |
ab907189 RL |
2039 | add("OPENSSL_USE_NODELETE", |
2040 | sub { | |
2041 | return vms_info()->{def_zlib} | |
2042 | ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : (); | |
2043 | }), | |
2de2df7f | 2044 | lflags => picker(default => "/MAP='F\$PARSE(\".MAP\",\"\$\@\")'", |
1ae4c07e | 2045 | debug => "/DEBUG/TRACEBACK", |
8864f0de | 2046 | release => "/NODEBUG/NOTRACEBACK"), |
2935f624 | 2047 | # Because of dso_cflags below, we can't set the generic |cflags| here, |
79c44b4e | 2048 | # as it can't be overridden, so we set separate C flags for libraries |
2935f624 RL |
2049 | # and binaries instead. |
2050 | bin_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"), | |
68a39960 | 2051 | lib_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"), |
31be74d3 RL |
2052 | # Strictly speaking, DSOs should not need to have name shortening, |
2053 | # as all their exported symbols should be short enough to fit the | |
2054 | # linker's 31 character per symbol name limit. However, providers | |
2055 | # may be composed of more than one object file, and internal symbols | |
2056 | # may and do surpass the 31 character limit. | |
2057 | dso_cflags => add("/NAMES=(SHORTENED)"), | |
ab907189 | 2058 | ex_libs => add(sub { return vms_info()->{zlib} || (); }), |
e84193e4 | 2059 | shared_target => "vms-shared", |
ef2dfc99 RL |
2060 | # def_flag made to empty string so a .opt file gets generated |
2061 | shared_defflag => '', | |
ac722c9a | 2062 | dso_scheme => "vms", |
9c62a279 | 2063 | thread_scheme => "pthreads", |
e84193e4 | 2064 | |
2e535eb5 | 2065 | makedep_scheme => 'VMS C', |
abe256e7 RL |
2066 | AS => sub { vms_info()->{AS} }, |
2067 | ASFLAGS => sub { vms_info()->{ASFLAGS} }, | |
ab7134ef | 2068 | asoutflag => sub { vms_info()->{asoutflag} }, |
abe256e7 | 2069 | asflags => sub { vms_info()->{asflags} }, |
ab7134ef RL |
2070 | perlasm_scheme => sub { vms_info()->{perlasm_scheme} }, |
2071 | ||
d0ccefdb | 2072 | disable => add('pinshared', 'loadereng'), |
d1dd5d6f | 2073 | |
e84193e4 RL |
2074 | }, |
2075 | ||
ab907189 RL |
2076 | # From HELP CC/POINTER_SIZE: |
2077 | # | |
2078 | # ---------- | |
2079 | # LONG[=ARGV] The compiler assumes 64-bit pointers. If the ARGV option to | |
2080 | # LONG or 64 is present, the main argument argv will be an | |
2081 | # array of long pointers instead of an array of short pointers. | |
2082 | # | |
2083 | # 64[=ARGV] Same as LONG. | |
2084 | # ---------- | |
2085 | # | |
2086 | # We don't want the hassle of dealing with 32-bit pointers with argv, so | |
2087 | # we force it to have 64-bit pointers, see the added cflags in the -p64 | |
2088 | # config targets below. | |
2089 | ||
e84193e4 RL |
2090 | "vms-alpha" => { |
2091 | inherit_from => [ "vms-generic" ], | |
ab907189 RL |
2092 | bn_ops => "SIXTY_FOUR_BIT RC4_INT", |
2093 | pointer_size => "", | |
e84193e4 | 2094 | }, |
52d86d9b | 2095 | "vms-alpha-p32" => { |
ab907189 RL |
2096 | inherit_from => [ "vms-alpha" ], |
2097 | cflags => add("/POINTER_SIZE=32"), | |
2098 | pointer_size => "32", | |
e84193e4 | 2099 | }, |
52d86d9b | 2100 | "vms-alpha-p64" => { |
ab907189 RL |
2101 | inherit_from => [ "vms-alpha" ], |
2102 | cflags => add("/POINTER_SIZE=64=ARGV"), | |
2103 | pointer_size => "64", | |
e84193e4 RL |
2104 | }, |
2105 | "vms-ia64" => { | |
30478c97 | 2106 | inherit_from => [ "vms-generic" ], |
ab907189 | 2107 | bn_ops => "SIXTY_FOUR_BIT RC4_INT", |
e6f98ae4 RL |
2108 | asm_arch => sub { vms_info()->{AS} ? 'ia64' : undef }, |
2109 | perlasm_scheme => 'ias', | |
ab907189 | 2110 | pointer_size => "", |
0f4844a9 | 2111 | |
e84193e4 | 2112 | }, |
52d86d9b | 2113 | "vms-ia64-p32" => { |
ab907189 RL |
2114 | inherit_from => [ "vms-ia64" ], |
2115 | cflags => add("/POINTER_SIZE=32"), | |
2116 | pointer_size => "32", | |
e84193e4 | 2117 | }, |
52d86d9b | 2118 | "vms-ia64-p64" => { |
ab907189 RL |
2119 | inherit_from => [ "vms-ia64" ], |
2120 | cflags => add("/POINTER_SIZE=64=ARGV"), | |
2121 | pointer_size => "64", | |
e84193e4 | 2122 | }, |
d6175dcc RL |
2123 | "vms-x86_64" => { |
2124 | inherit_from => [ "vms-generic" ], | |
2125 | bn_ops => "SIXTY_FOUR_BIT", | |
2126 | pointer_size => "", | |
2127 | } | |
f09e7ca9 | 2128 | ); |