]>
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) { | |
9 | $vc_win64a_info = { as => "nasm", | |
10 | asflags => "-f win64 -DNEAR -Ox -g", | |
11 | asoutflag => "-o" }; | |
43800958 | 12 | } elsif ($disabled{asm}) { |
2fe73036 RL |
13 | $vc_win64a_info = { as => "ml64", |
14 | asflags => "/c /Cp /Cx /Zi", | |
15 | asoutflag => "/Fo" }; | |
43800958 | 16 | } else { |
d63c12c6 RL |
17 | $die->("NASM not found - please read INSTALL and NOTES.WIN for further details\n"); |
18 | $vc_win64a_info = { as => "{unknown}", | |
19 | asflags => "", | |
20 | asoutflag => "" }; | |
2fe73036 RL |
21 | } |
22 | } | |
23 | return $vc_win64a_info; | |
24 | } | |
25 | ||
43800958 RL |
26 | my $vc_win32_info = {}; |
27 | sub vc_win32_info { | |
28 | unless (%$vc_win32_info) { | |
29 | my $ver=`nasm -v 2>NUL`; | |
30 | my $vew=`nasmw -v 2>NUL`; | |
31 | if ($ver ne "" || $vew ne "") { | |
32 | $vc_win32_info = { as => $ver ge $vew ? "nasm" : "nasmw", | |
33 | asflags => "-f win32", | |
34 | asoutflag => "-o", | |
35 | perlasm_scheme => "win32n" }; | |
36 | } elsif ($disabled{asm}) { | |
37 | $vc_win32_info = { as => "ml", | |
38 | asflags => "/nologo /Cp /coff /c /Cx /Zi", | |
39 | asoutflag => "/Fo", | |
40 | perlasm_scheme => "win32" }; | |
41 | } else { | |
d63c12c6 RL |
42 | $die->("NASM not found - please read INSTALL and NOTES.WIN for further details\n"); |
43 | $vc_win32_info = { as => "{unknown}", | |
44 | asflags => "", | |
45 | asoutflag => "", | |
46 | perlasm_scheme => "win32" }; | |
43800958 RL |
47 | } |
48 | } | |
49 | return $vc_win32_info; | |
50 | } | |
51 | ||
2fe73036 RL |
52 | my $vc_wince_info = {}; |
53 | sub vc_wince_info { | |
54 | unless (%$vc_wince_info) { | |
55 | # sanity check | |
17f16617 RL |
56 | $die->('%OSVERSION% is not defined') if (!defined(env('OSVERSION'))); |
57 | $die->('%PLATFORM% is not defined') if (!defined(env('PLATFORM'))); | |
58 | $die->('%TARGETCPU% is not defined') if (!defined(env('TARGETCPU'))); | |
2fe73036 RL |
59 | |
60 | # | |
61 | # Idea behind this is to mimic flags set by eVC++ IDE... | |
62 | # | |
17f16617 | 63 | my $wcevers = env('OSVERSION'); # WCENNN |
d63c12c6 RL |
64 | my $wcevernum; |
65 | my $wceverdotnum; | |
66 | if ($wcevers =~ /^WCE([1-9])([0-9]{2})$/) { | |
67 | $wcevernum = "$1$2"; | |
68 | $wceverdotnum = "$1.$2"; | |
69 | } else { | |
70 | $die->('%OSVERSION% value is insane'); | |
71 | $wcevernum = "{unknown}"; | |
72 | $wceverdotnum = "{unknown}"; | |
73 | } | |
74 | my $wcecdefs = "-D_WIN32_WCE=$wcevernum -DUNDER_CE=$wcevernum"; # -D_WIN32_WCE=NNN | |
75 | my $wcelflag = "/subsystem:windowsce,$wceverdotnum"; # ...,N.NN | |
2fe73036 | 76 | |
17f16617 | 77 | my $wceplatf = env('PLATFORM'); |
01d99976 RL |
78 | |
79 | $wceplatf =~ tr/a-z0-9 /A-Z0-9_/; | |
80 | $wcecdefs .= " -DWCE_PLATFORM_$wceplatf"; | |
2fe73036 | 81 | |
17f16617 | 82 | my $wcetgt = env('TARGETCPU'); # just shorter name... |
2fe73036 RL |
83 | SWITCH: for($wcetgt) { |
84 | /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_"; | |
85 | $wcelflag.=" /machine:X86"; last; }; | |
86 | /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; | |
87 | $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/); | |
88 | $wcecdefs.=" -QRarch4T -QRinterwork-return"; | |
89 | $wcelflag.=" /machine:THUMB"; last; }; | |
90 | /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; | |
91 | $wcelflag.=" /machine:ARM"; last; }; | |
92 | /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | |
93 | $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32"; | |
94 | $wcelflag.=" /machine:MIPSFPU"; last; }; | |
95 | /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | |
96 | $wcecdefs.=" -DMIPSII -QMmips16"; | |
97 | $wcelflag.=" /machine:MIPS16"; last; }; | |
98 | /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | |
99 | $wcecdefs.=" -QMmips2"; | |
100 | $wcelflag.=" /machine:MIPS"; last; }; | |
101 | /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000"; | |
102 | $wcelflag.=" /machine:MIPS"; last; }; | |
103 | /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx"; | |
104 | $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/); | |
105 | $wcelflag.=" /machine:$wcetgt"; last; }; | |
106 | { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_"; | |
107 | $wcelflag.=" /machine:$wcetgt"; last; }; | |
108 | } | |
109 | ||
110 | $vc_wince_info = { cflags => $wcecdefs, | |
111 | lflags => $wcelflag }; | |
112 | } | |
113 | return $vc_wince_info; | |
114 | } | |
115 | ||
5fe5bc30 RL |
116 | # Helper functions for the VMS configs |
117 | my $vms_info = {}; | |
118 | sub vms_info { | |
119 | unless (%$vms_info) { | |
0c9b1534 RL |
120 | my $pointer_size = shift; |
121 | my $pointer_size_str = $pointer_size == 0 ? "" : "$pointer_size"; | |
122 | ||
123 | $vms_info->{disable_warns} = [ ]; | |
7878e536 | 124 | $vms_info->{pointer_size} = $pointer_size_str; |
0c9b1534 RL |
125 | if ($pointer_size == 64) { |
126 | `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`; | |
127 | if ($? == 0) { | |
128 | push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3"; | |
129 | } | |
130 | } | |
62890f47 RL |
131 | |
132 | unless ($disabled{zlib}) { | |
0c9b1534 | 133 | my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str; |
62890f47 | 134 | if (defined($disabled{"zlib-dynamic"})) { |
0c9b1534 | 135 | $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE"; |
62890f47 | 136 | } else { |
0c9b1534 RL |
137 | $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib; |
138 | # In case the --with-zlib-lib value contains something like | |
139 | # /SHARE or /LIB or so at the end, remove it. | |
140 | $vms_info->{def_zlib} =~ s|/.*$||g; | |
62890f47 RL |
141 | } |
142 | } | |
5fe5bc30 RL |
143 | } |
144 | return $vms_info; | |
145 | } | |
2fe73036 | 146 | |
3b6c4b07 | 147 | my %targets = ( |
f09e7ca9 | 148 | |
7ead0c89 | 149 | #### Basic configs that should work on any 32-bit box |
5e1b2353 RL |
150 | "gcc" => { |
151 | cc => "gcc", | |
8864f0de RL |
152 | cflags => picker(debug => "-O0 -g", |
153 | release => "-O3"), | |
9c62a279 | 154 | thread_scheme => "(unknown)", |
5e1b2353 RL |
155 | bn_ops => "BN_LLONG", |
156 | }, | |
157 | "cc" => { | |
158 | cc => "cc", | |
159 | cflags => "-O", | |
9c62a279 | 160 | thread_scheme => "(unknown)", |
5e1b2353 | 161 | }, |
f09e7ca9 | 162 | |
7ead0c89 | 163 | #### VOS Configurations |
5e1b2353 | 164 | "vos-gcc" => { |
d2b2221a | 165 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 166 | cc => "gcc", |
8864f0de | 167 | cflags => picker(default => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN", |
463a7b8c | 168 | debug => "-O0 -g", |
8864f0de | 169 | release => "-O3"), |
9c62a279 | 170 | thread_scheme => "(unknown)", |
5e1b2353 | 171 | sys_id => "VOS", |
47eeaf45 | 172 | lflags => add("-Wl,-map"), |
5e1b2353 RL |
173 | bn_ops => "BN_LLONG", |
174 | shared_extension => ".so", | |
175 | }, | |
f09e7ca9 | 176 | |
29d09327 | 177 | #### Solaris configurations |
f6739c3d | 178 | "solaris-common" => { |
d2b2221a | 179 | inherit_from => [ "BASE_unix" ], |
f6739c3d AP |
180 | template => 1, |
181 | cflags => "-DFILIO_H", | |
8cfc21f5 | 182 | ex_libs => add("-lsocket -lnsl -ldl"), |
f6739c3d | 183 | dso_scheme => "dlfcn", |
9c62a279 | 184 | thread_scheme => "pthreads", |
f6739c3d | 185 | shared_target => "solaris-shared", |
d4453024 | 186 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
f6739c3d | 187 | }, |
f09e7ca9 | 188 | #### Solaris x86 with GNU C setups |
5e1b2353 | 189 | "solaris-x86-gcc" => { |
fe9e5b9c AP |
190 | # NB. GNU C has to be configured to use GNU assembler, and not |
191 | # /usr/ccs/bin/as. Failure to comply will result in compile | |
192 | # failures [at least] in 32-bit build. | |
f6739c3d | 193 | inherit_from => [ "solaris-common", asm("x86_elf_asm") ], |
7ead0c89 | 194 | cc => "gcc", |
1e19eacd | 195 | cflags => add_before(picker(default => "-Wall -DL_ENDIAN", |
8864f0de | 196 | debug => "-O0 -g", |
9c62a279 RL |
197 | release => "-O3 -fomit-frame-pointer"), |
198 | threads("-pthread")), | |
fcd2ac80 | 199 | ex_libs => add(threads("-pthread")), |
a01dab94 | 200 | bn_ops => "BN_LLONG", |
5e1b2353 | 201 | shared_cflag => "-fPIC", |
216a0cc4 | 202 | shared_ldflag => "-shared -static-libgcc", |
5e1b2353 | 203 | }, |
5e1b2353 | 204 | "solaris64-x86_64-gcc" => { |
7ead0c89 AP |
205 | # -shared -static-libgcc might appear controversial, but modules |
206 | # taken from static libgcc do not have relocations and linking | |
207 | # them into our shared objects doesn't have any negative side | |
208 | # effects. On the contrary, doing so makes it possible to use | |
209 | # gcc shared build with Sun C. Given that gcc generates faster | |
210 | # code [thanks to inline assembler], I would actually recommend | |
211 | # to consider using gcc shared build even with vendor compiler:-) | |
e3713c36 | 212 | # -- <appro@openssl.org> |
f6739c3d | 213 | inherit_from => [ "solaris-common", asm("x86_64_asm") ], |
7ead0c89 | 214 | cc => "gcc", |
8864f0de RL |
215 | cflags => add_before(picker(default => "-m64 -Wall -DL_ENDIAN", |
216 | debug => "-O0 -g", | |
9c62a279 RL |
217 | release => "-O3"), |
218 | threads("-pthread")), | |
fcd2ac80 | 219 | ex_libs => add(threads("-pthread")), |
3e9e810f | 220 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 221 | perlasm_scheme => "elf", |
5e1b2353 | 222 | shared_cflag => "-fPIC", |
8dd0ff1c | 223 | shared_ldflag => "-shared -static-libgcc", |
5e1b2353 RL |
224 | multilib => "/64", |
225 | }, | |
f09e7ca9 RS |
226 | |
227 | #### Solaris x86 with Sun C setups | |
216a0cc4 AP |
228 | # There used to be solaris-x86-cc target, but it was removed, |
229 | # primarily because vendor assembler can't assemble our modules | |
230 | # with -KPIC flag. As result it, assembly support, was not even | |
231 | # available as option. But its lack means lack of side-channel | |
232 | # resistant code, which is incompatible with security by todays | |
233 | # standards. Fortunately gcc is readily available prepackaged | |
234 | # option, which we can firmly point at... | |
235 | # | |
236 | # On related note, solaris64-x86_64-cc target won't compile code | |
237 | # paths utilizing AVX and post-Haswell instruction extensions. | |
238 | # Consider switching to solaris64-x86_64-gcc even here... | |
239 | # | |
5e1b2353 | 240 | "solaris64-x86_64-cc" => { |
f6739c3d | 241 | inherit_from => [ "solaris-common", asm("x86_64_asm") ], |
5e1b2353 | 242 | cc => "cc", |
8864f0de RL |
243 | cflags => add_before(picker(default => "-xarch=generic64 -xstrconst -Xa -DL_ENDIAN", |
244 | debug => "-g", | |
9c62a279 RL |
245 | release => "-xO5 -xdepend -xbuiltin"), |
246 | threads("-D_REENTRANT")), | |
247 | thread_scheme => "pthreads", | |
8dd0ff1c | 248 | lflags => add(threads("-mt")), |
9c62a279 | 249 | ex_libs => add(threads("-lpthread")), |
3e9e810f | 250 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 251 | perlasm_scheme => "elf", |
5e1b2353 | 252 | shared_cflag => "-KPIC", |
8dd0ff1c | 253 | shared_ldflag => "-G -dy -z text", |
5e1b2353 RL |
254 | multilib => "/64", |
255 | }, | |
f09e7ca9 RS |
256 | |
257 | #### SPARC Solaris with GNU C setups | |
5e1b2353 | 258 | "solaris-sparcv7-gcc" => { |
f6739c3d | 259 | inherit_from => [ "solaris-common" ], |
5e1b2353 | 260 | cc => "gcc", |
8864f0de RL |
261 | cflags => add_before(picker(default => "-Wall -DB_ENDIAN -DBN_DIV2W", |
262 | debug => "-O0 -g", | |
9c62a279 RL |
263 | release => "-O3"), |
264 | threads("-pthread")), | |
fcd2ac80 | 265 | ex_libs => add(threads("-pthread")), |
3e9e810f | 266 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 RL |
267 | shared_cflag => "-fPIC", |
268 | shared_ldflag => "-shared", | |
5e1b2353 | 269 | }, |
5e1b2353 | 270 | "solaris-sparcv8-gcc" => { |
7ead0c89 | 271 | inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ], |
bdcd83e1 | 272 | cflags => add_before("-mcpu=v8"), |
5e1b2353 | 273 | }, |
5e1b2353 | 274 | "solaris-sparcv9-gcc" => { |
7ead0c89 | 275 | # -m32 should be safe to add as long as driver recognizes |
f6739c3d | 276 | # -mcpu=ultrasparc |
7ead0c89 | 277 | inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ], |
463a7b8c | 278 | cflags => add_before("-m32 -mcpu=ultrasparc"), |
5e1b2353 RL |
279 | }, |
280 | "solaris64-sparcv9-gcc" => { | |
7ead0c89 | 281 | inherit_from => [ "solaris-sparcv9-gcc" ], |
f6739c3d | 282 | cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; }, |
3e9e810f | 283 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 RL |
284 | multilib => "/64", |
285 | }, | |
f09e7ca9 RS |
286 | |
287 | #### SPARC Solaris with Sun C setups | |
288 | # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2. | |
289 | # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8 | |
290 | # SC5.0 note: Compiler common patch 107357-01 or later is required! | |
5e1b2353 | 291 | "solaris-sparcv7-cc" => { |
f6739c3d | 292 | inherit_from => [ "solaris-common" ], |
5e1b2353 | 293 | cc => "cc", |
8864f0de | 294 | cflags => add_before(picker(default => "-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W", |
463a7b8c | 295 | debug => "-g", |
9c62a279 RL |
296 | release => "-xO5 -xdepend"), |
297 | threads("-D_REENTRANT")), | |
298 | lflags => add(threads("-mt")), | |
299 | ex_libs => add(threads("-lpthread")), | |
3e9e810f | 300 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 RL |
301 | shared_cflag => "-KPIC", |
302 | shared_ldflag => "-G -dy -z text", | |
5e1b2353 | 303 | }, |
f09e7ca9 | 304 | #### |
5e1b2353 | 305 | "solaris-sparcv8-cc" => { |
7ead0c89 | 306 | inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ], |
bdcd83e1 | 307 | cflags => add_before("-xarch=v8"), |
5e1b2353 RL |
308 | }, |
309 | "solaris-sparcv9-cc" => { | |
7ead0c89 | 310 | inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ], |
fa4618a2 | 311 | cflags => add_before("-xarch=v8plus"), |
5e1b2353 RL |
312 | }, |
313 | "solaris64-sparcv9-cc" => { | |
7ead0c89 | 314 | inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ], |
fa4618a2 | 315 | cflags => add_before("-xarch=v9"), |
3e9e810f | 316 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 RL |
317 | multilib => "/64", |
318 | }, | |
f09e7ca9 | 319 | |
f09e7ca9 | 320 | #### IRIX 6.x configs |
c21c7830 | 321 | # Only N32 and N64 ABIs are supported. |
5e1b2353 | 322 | "irix-mips3-gcc" => { |
d2b2221a | 323 | inherit_from => [ "BASE_unix", asm("mips64_asm") ], |
5e1b2353 | 324 | cc => "gcc", |
9c62a279 RL |
325 | cflags => combine(picker(default => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W", |
326 | debug => "-g -O0", | |
327 | release => "-O3"), | |
c21c7830 AP |
328 | threads("-D_SGI_MP_SOURCE")), |
329 | ex_libs => add(threads("-lpthread")), | |
3e9e810f | 330 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT", |
9c62a279 | 331 | thread_scheme => "pthreads", |
5e1b2353 RL |
332 | perlasm_scheme => "n32", |
333 | dso_scheme => "dlfcn", | |
334 | shared_target => "irix-shared", | |
d4453024 | 335 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
336 | multilib => "32", |
337 | }, | |
338 | "irix-mips3-cc" => { | |
d2b2221a | 339 | inherit_from => [ "BASE_unix", asm("mips64_asm") ], |
5e1b2353 | 340 | cc => "cc", |
9c62a279 RL |
341 | cflags => combine(picker(default => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W", |
342 | debug => "-g -O0", | |
343 | release => "-O2"), | |
344 | threads("-D_SGI_MP_SOURCE")), | |
345 | ex_libs => add(threads("-lpthread")), | |
3e9e810f | 346 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT", |
9c62a279 | 347 | thread_scheme => "pthreads", |
5e1b2353 RL |
348 | perlasm_scheme => "n32", |
349 | dso_scheme => "dlfcn", | |
350 | shared_target => "irix-shared", | |
d4453024 | 351 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
352 | multilib => "32", |
353 | }, | |
7ead0c89 | 354 | # N64 ABI builds. |
5e1b2353 | 355 | "irix64-mips4-gcc" => { |
d2b2221a | 356 | inherit_from => [ "BASE_unix", asm("mips64_asm") ], |
5e1b2353 | 357 | cc => "gcc", |
9c62a279 RL |
358 | cflags => combine(picker(default => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W", |
359 | debug => "-g -O0", | |
360 | release => "-O3"), | |
361 | threads("-D_SGI_MP_SOURCE")), | |
c21c7830 | 362 | ex_libs => add(threads("-lpthread")), |
3e9e810f | 363 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG", |
9c62a279 | 364 | thread_scheme => "pthreads", |
5e1b2353 RL |
365 | perlasm_scheme => "64", |
366 | dso_scheme => "dlfcn", | |
367 | shared_target => "irix-shared", | |
d4453024 | 368 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
369 | multilib => "64", |
370 | }, | |
371 | "irix64-mips4-cc" => { | |
d2b2221a | 372 | inherit_from => [ "BASE_unix", asm("mips64_asm") ], |
5e1b2353 | 373 | cc => "cc", |
9c62a279 RL |
374 | cflags => combine(picker(default => "-64 -mips4 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W", |
375 | debug => "-g -O0", | |
376 | release => "-O2"), | |
377 | threads("-D_SGI_MP_SOURCE")), | |
378 | ex_libs => add(threads("-lpthread")), | |
3e9e810f | 379 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG", |
9c62a279 | 380 | thread_scheme => "pthreads", |
5e1b2353 RL |
381 | perlasm_scheme => "64", |
382 | dso_scheme => "dlfcn", | |
383 | shared_target => "irix-shared", | |
d4453024 | 384 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
385 | multilib => "64", |
386 | }, | |
f09e7ca9 RS |
387 | |
388 | #### Unified HP-UX ANSI C configs. | |
389 | # Special notes: | |
390 | # - Originally we were optimizing at +O4 level. It should be noted | |
391 | # that the only difference between +O3 and +O4 is global inter- | |
392 | # procedural analysis. As it has to be performed during the link | |
393 | # stage the compiler leaves behind certain pseudo-code in lib*.a | |
394 | # which might be release or even patch level specific. Generating | |
395 | # the machine code for and analyzing the *whole* program appears | |
396 | # to be *extremely* memory demanding while the performance gain is | |
397 | # actually questionable. The situation is intensified by the default | |
398 | # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB | |
399 | # which is way too low for +O4. In other words, doesn't +O3 make | |
400 | # more sense? | |
401 | # - Keep in mind that the HP compiler by default generates code | |
402 | # suitable for execution on the host you're currently compiling at. | |
b6453a68 | 403 | # If the toolkit is meant to be used on various PA-RISC processors |
7ead0c89 | 404 | # consider './Configure hpux-parisc-[g]cc +DAportable'. |
f09e7ca9 RS |
405 | # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in |
406 | # 32-bit message digests. (For the moment of this writing) HP C | |
407 | # doesn't seem to "digest" too many local variables (they make "him" | |
408 | # chew forever:-). For more details look-up MD32_XARRAY comment in | |
409 | # crypto/sha/sha_lcl.h. | |
7ead0c89 | 410 | # - originally there were 32-bit hpux-parisc2-* targets. They were |
b6453a68 | 411 | # scrapped, because a) they were not interchangeable with other 32-bit |
0b919cc5 AP |
412 | # targets; b) performance-critical 32-bit assembly modules implement |
413 | # even PA-RISC 2.0-specific code paths, which are chosen at run-time, | |
414 | # thus adequate performance is provided even with PA-RISC 1.1 build. | |
5e1b2353 | 415 | "hpux-parisc-gcc" => { |
d2b2221a | 416 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 417 | cc => "gcc", |
9c62a279 RL |
418 | cflags => combine(picker(default => "-DB_ENDIAN -DBN_DIV2W", |
419 | debug => "-O0 -g", | |
420 | release => "-O3"), | |
421 | threads("-pthread")), | |
fcd2ac80 | 422 | ex_libs => add("-Wl,+s -ldld", threads("-pthread")), |
3e9e810f | 423 | bn_ops => "BN_LLONG", |
9c62a279 | 424 | thread_scheme => "pthreads", |
5e1b2353 RL |
425 | dso_scheme => "dl", |
426 | shared_target => "hpux-shared", | |
427 | shared_cflag => "-fPIC", | |
428 | shared_ldflag => "-shared", | |
d4453024 | 429 | shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
430 | }, |
431 | "hpux-parisc1_1-gcc" => { | |
7ead0c89 | 432 | inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ], |
5e1b2353 RL |
433 | multilib => "/pa1.1", |
434 | }, | |
5e1b2353 | 435 | "hpux64-parisc2-gcc" => { |
d2b2221a | 436 | inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ], |
5e1b2353 | 437 | cc => "gcc", |
9c62a279 RL |
438 | cflags => combine(picker(default => "-DB_ENDIAN", |
439 | debug => "-O0 -g", | |
440 | release => "-O3"), | |
441 | threads("-D_REENTRANT")), | |
98fdbce0 | 442 | ex_libs => add("-ldl"), |
3e9e810f | 443 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
9c62a279 | 444 | thread_scheme => "pthreads", |
5e1b2353 RL |
445 | dso_scheme => "dlfcn", |
446 | shared_target => "hpux-shared", | |
447 | shared_cflag => "-fpic", | |
448 | shared_ldflag => "-shared", | |
d4453024 | 449 | shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
450 | multilib => "/pa20_64", |
451 | }, | |
f09e7ca9 | 452 | |
7ead0c89 | 453 | # More attempts at unified 10.X and 11.X targets for HP C compiler. |
5e1b2353 | 454 | "hpux-parisc-cc" => { |
d2b2221a | 455 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 456 | cc => "cc", |
9c62a279 RL |
457 | cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY", |
458 | debug => "+O0 +d -g", | |
459 | release => "+O3"), | |
460 | threads("-D_REENTRANT")), | |
461 | ex_libs => add("-Wl,+s -ldld",threads("-lpthread")), | |
3e9e810f | 462 | bn_ops => "RC4_CHAR", |
9c62a279 | 463 | thread_scheme => "pthreads", |
5e1b2353 RL |
464 | dso_scheme => "dl", |
465 | shared_target => "hpux-shared", | |
466 | shared_cflag => "+Z", | |
467 | shared_ldflag => "-b", | |
d4453024 | 468 | shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
469 | }, |
470 | "hpux-parisc1_1-cc" => { | |
7ead0c89 | 471 | inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ], |
bdcd83e1 | 472 | cflags => add_before("+DA1.1"), |
5e1b2353 RL |
473 | multilib => "/pa1.1", |
474 | }, | |
5e1b2353 | 475 | "hpux64-parisc2-cc" => { |
d2b2221a | 476 | inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ], |
5e1b2353 | 477 | cc => "cc", |
9c62a279 RL |
478 | cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY", |
479 | debug => "+O0 +d -g", | |
480 | release => "+O3"), | |
481 | threads("-D_REENTRANT")), | |
482 | ex_libs => add("-ldl",threads("-lpthread")), | |
3e9e810f | 483 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
9c62a279 | 484 | thread_scheme => "pthreads", |
5e1b2353 RL |
485 | dso_scheme => "dlfcn", |
486 | shared_target => "hpux-shared", | |
487 | shared_cflag => "+Z", | |
8dd0ff1c | 488 | shared_ldflag => "-b", |
d4453024 | 489 | shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
490 | multilib => "/pa20_64", |
491 | }, | |
f09e7ca9 | 492 | |
7ead0c89 | 493 | # HP/UX IA-64 targets |
5e1b2353 | 494 | "hpux-ia64-cc" => { |
d2b2221a | 495 | inherit_from => [ "BASE_unix", asm("ia64_asm") ], |
5e1b2353 | 496 | cc => "cc", |
9c62a279 RL |
497 | cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z -DB_ENDIAN", |
498 | debug => "+O0 +d -g", | |
499 | release => "+O2"), | |
500 | threads("-D_REENTRANT")), | |
501 | ex_libs => add("-ldl",threads("-lpthread")), | |
3e9e810f | 502 | bn_ops => "SIXTY_FOUR_BIT", |
9c62a279 | 503 | thread_scheme => "pthreads", |
5e1b2353 RL |
504 | dso_scheme => "dlfcn", |
505 | shared_target => "hpux-shared", | |
506 | shared_cflag => "+Z", | |
8dd0ff1c | 507 | shared_ldflag => "-b", |
d4453024 | 508 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
509 | multilib => "/hpux32", |
510 | }, | |
5e1b2353 | 511 | "hpux64-ia64-cc" => { |
d2b2221a | 512 | inherit_from => [ "BASE_unix", asm("ia64_asm") ], |
5e1b2353 | 513 | cc => "cc", |
9c62a279 RL |
514 | cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z -DB_ENDIAN", |
515 | debug => "+O0 +d -g", | |
516 | release => "+O3"), | |
517 | threads("-D_REENTRANT")), | |
518 | ex_libs => add("-ldl", threads("-lpthread")), | |
3e9e810f | 519 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
9c62a279 | 520 | thread_scheme => "pthreads", |
5e1b2353 RL |
521 | dso_scheme => "dlfcn", |
522 | shared_target => "hpux-shared", | |
523 | shared_cflag => "+Z", | |
8dd0ff1c | 524 | shared_ldflag => "-b", |
d4453024 | 525 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
526 | multilib => "/hpux64", |
527 | }, | |
7ead0c89 | 528 | # GCC builds... |
5e1b2353 | 529 | "hpux-ia64-gcc" => { |
d2b2221a | 530 | inherit_from => [ "BASE_unix", asm("ia64_asm") ], |
5e1b2353 | 531 | cc => "gcc", |
9c62a279 RL |
532 | cflags => combine(picker(default => "-DB_ENDIAN", |
533 | debug => "-O0 -g", | |
534 | release => "-O3"), | |
535 | threads("-pthread")), | |
fcd2ac80 | 536 | ex_libs => add("-ldl", threads("-pthread")), |
3e9e810f | 537 | bn_ops => "SIXTY_FOUR_BIT", |
9c62a279 | 538 | thread_scheme => "pthreads", |
5e1b2353 RL |
539 | dso_scheme => "dlfcn", |
540 | shared_target => "hpux-shared", | |
541 | shared_cflag => "-fpic", | |
542 | shared_ldflag => "-shared", | |
d4453024 | 543 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
544 | multilib => "/hpux32", |
545 | }, | |
546 | "hpux64-ia64-gcc" => { | |
d2b2221a | 547 | inherit_from => [ "BASE_unix", asm("ia64_asm") ], |
5e1b2353 | 548 | cc => "gcc", |
01d99976 RL |
549 | cflags => combine(picker(default => "-mlp64 -DB_ENDIAN", |
550 | debug => "-O0 -g", | |
551 | release => "-O3"), | |
552 | threads("-pthread")), | |
fcd2ac80 | 553 | ex_libs => add("-ldl", threads("-pthread")), |
3e9e810f | 554 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
9c62a279 | 555 | thread_scheme => "pthreads", |
5e1b2353 RL |
556 | dso_scheme => "dlfcn", |
557 | shared_target => "hpux-shared", | |
558 | shared_cflag => "-fpic", | |
8dd0ff1c | 559 | shared_ldflag => "-shared", |
d4453024 | 560 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
561 | multilib => "/hpux64", |
562 | }, | |
f09e7ca9 | 563 | |
f09e7ca9 | 564 | #### HP MPE/iX http://jazz.external.hp.com/src/openssl/ |
5e1b2353 | 565 | "MPE/iX-gcc" => { |
d2b2221a | 566 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
567 | cc => "gcc", |
568 | cflags => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB", | |
5e1b2353 | 569 | sys_id => "MPE", |
47eeaf45 RL |
570 | lflags => add("-L/SYSLOG/PUB"), |
571 | ex_libs => add("-lsyslog -lsocket -lcurses"), | |
9c62a279 | 572 | thread_scheme => "(unknown)", |
3e9e810f | 573 | bn_ops => "BN_LLONG", |
5e1b2353 | 574 | }, |
f09e7ca9 | 575 | |
b4de72bf AP |
576 | #### DEC Alpha Tru64 targets. Tru64 is marketing name for OSF/1 version 4 |
577 | #### and forward. In reality 'uname -s' still returns "OSF1". Originally | |
578 | #### there were even osf1-* configs targeting prior versions provided, | |
579 | #### but not anymore... | |
580 | "tru64-alpha-gcc" => { | |
d2b2221a | 581 | inherit_from => [ "BASE_unix", asm("alpha_asm") ], |
5e1b2353 | 582 | cc => "gcc", |
b4de72bf AP |
583 | cflags => combine("-std=c9x -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -O3", |
584 | threads("-pthread")), | |
fcd2ac80 | 585 | ex_libs => add("-lrt", threads("-pthread")), # for mlock(2) |
3e9e810f | 586 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
b4de72bf | 587 | thread_scheme => "pthreads", |
5e1b2353 RL |
588 | dso_scheme => "dlfcn", |
589 | shared_target => "alpha-osf1-shared", | |
590 | shared_extension => ".so", | |
591 | }, | |
592 | "tru64-alpha-cc" => { | |
d2b2221a | 593 | inherit_from => [ "BASE_unix", asm("alpha_asm") ], |
5e1b2353 | 594 | cc => "cc", |
b4de72bf | 595 | cflags => combine("-std1 -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -tune host -fast -readonly_strings", |
9c62a279 | 596 | threads("-pthread")), |
fcd2ac80 | 597 | ex_libs => add("-lrt", threads("-pthread")), # for mlock(2) |
3e9e810f | 598 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
9c62a279 | 599 | thread_scheme => "pthreads", |
5e1b2353 RL |
600 | dso_scheme => "dlfcn", |
601 | shared_target => "alpha-osf1-shared", | |
602 | shared_ldflag => "-msym", | |
603 | shared_extension => ".so", | |
604 | }, | |
f09e7ca9 RS |
605 | |
606 | #### | |
607 | #### Variety of LINUX:-) | |
608 | #### | |
609 | # *-generic* is endian-neutral target, but ./config is free to | |
610 | # throw in -D[BL]_ENDIAN, whichever appropriate... | |
5e1b2353 | 611 | "linux-generic32" => { |
d2b2221a | 612 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 613 | cc => "gcc", |
16b42d4d | 614 | cxx => "g++", |
9c62a279 | 615 | cflags => combine(picker(default => "-Wall", |
463a7b8c | 616 | debug => "-O0 -g", |
9c62a279 RL |
617 | release => "-O3"), |
618 | threads("-pthread")), | |
fcd2ac80 | 619 | ex_libs => add("-ldl", threads("-pthread")), |
3e9e810f | 620 | bn_ops => "BN_LLONG RC4_CHAR", |
9c62a279 | 621 | thread_scheme => "pthreads", |
5e1b2353 RL |
622 | dso_scheme => "dlfcn", |
623 | shared_target => "linux-shared", | |
b6d5ba1a | 624 | shared_cflag => "-fPIC -DOPENSSL_USE_NODELETE", |
075e9da0 | 625 | shared_ldflag => "-Wl,-znodelete", |
d4453024 | 626 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 | 627 | }, |
7ead0c89 AP |
628 | "linux-generic64" => { |
629 | inherit_from => [ "linux-generic32" ], | |
3e9e810f | 630 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
7ead0c89 AP |
631 | }, |
632 | ||
5e1b2353 | 633 | "linux-ppc" => { |
7ead0c89 | 634 | inherit_from => [ "linux-generic32", asm("ppc32_asm") ], |
5e1b2353 | 635 | perlasm_scheme => "linux32", |
7ead0c89 AP |
636 | }, |
637 | "linux-ppc64" => { | |
638 | inherit_from => [ "linux-generic64", asm("ppc64_asm") ], | |
8864f0de | 639 | cflags => add("-m64 -DB_ENDIAN"), |
7ead0c89 | 640 | perlasm_scheme => "linux64", |
7ead0c89 AP |
641 | multilib => "64", |
642 | }, | |
643 | "linux-ppc64le" => { | |
644 | inherit_from => [ "linux-generic64", asm("ppc64_asm") ], | |
8864f0de | 645 | cflags => add("-m64 -DL_ENDIAN"), |
7ead0c89 | 646 | perlasm_scheme => "linux64le", |
5e1b2353 | 647 | }, |
f09e7ca9 | 648 | |
5e1b2353 | 649 | "linux-armv4" => { |
7ead0c89 AP |
650 | ################################################################ |
651 | # Note that -march is not among compiler options in linux-armv4 | |
652 | # target description. Not specifying one is intentional to give | |
653 | # you choice to: | |
654 | # | |
655 | # a) rely on your compiler default by not specifying one; | |
656 | # b) specify your target platform explicitly for optimal | |
657 | # performance, e.g. -march=armv6 or -march=armv7-a; | |
658 | # c) build "universal" binary that targets *range* of platforms | |
659 | # by specifying minimum and maximum supported architecture; | |
660 | # | |
661 | # As for c) option. It actually makes no sense to specify | |
662 | # maximum to be less than ARMv7, because it's the least | |
663 | # requirement for run-time switch between platform-specific | |
664 | # code paths. And without run-time switch performance would be | |
665 | # equivalent to one for minimum. Secondly, there are some | |
666 | # natural limitations that you'd have to accept and respect. | |
667 | # Most notably you can *not* build "universal" binary for | |
668 | # big-endian platform. This is because ARMv7 processor always | |
669 | # picks instructions in little-endian order. Another similar | |
670 | # limitation is that -mthumb can't "cross" -march=armv6t2 | |
671 | # boundary, because that's where it became Thumb-2. Well, this | |
672 | # limitation is a bit artificial, because it's not really | |
673 | # impossible, but it's deemed too tricky to support. And of | |
674 | # course you have to be sure that your binutils are actually | |
675 | # up to the task of handling maximum target platform. With all | |
676 | # this in mind here is an example of how to configure | |
677 | # "universal" build: | |
678 | # | |
679 | # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8 | |
680 | # | |
681 | inherit_from => [ "linux-generic32", asm("armv4_asm") ], | |
682 | perlasm_scheme => "linux32", | |
5e1b2353 RL |
683 | }, |
684 | "linux-aarch64" => { | |
7ead0c89 | 685 | inherit_from => [ "linux-generic64", asm("aarch64_asm") ], |
5e1b2353 | 686 | perlasm_scheme => "linux64", |
5e1b2353 | 687 | }, |
a93d3e06 AP |
688 | "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32 |
689 | inherit_from => [ "linux-generic32", asm("aarch64_asm") ], | |
8864f0de | 690 | cflags => add("-mabi=ilp32"), |
3e9e810f | 691 | bn_ops => "SIXTY_FOUR_BIT RC4_CHAR", |
a93d3e06 | 692 | perlasm_scheme => "linux64", |
a93d3e06 | 693 | }, |
7ead0c89 | 694 | |
5e1b2353 | 695 | "linux-mips32" => { |
7ead0c89 AP |
696 | # Configure script adds minimally required -march for assembly |
697 | # support, if no -march was specified at command line. | |
698 | inherit_from => [ "linux-generic32", asm("mips32_asm") ], | |
8864f0de | 699 | cflags => add("-mabi=32 -DBN_DIV3W"), |
5e1b2353 | 700 | perlasm_scheme => "o32", |
5e1b2353 | 701 | }, |
7ead0c89 AP |
702 | # mips32 and mips64 below refer to contemporary MIPS Architecture |
703 | # specifications, MIPS32 and MIPS64, rather than to kernel bitness. | |
5e1b2353 | 704 | "linux-mips64" => { |
7ead0c89 | 705 | inherit_from => [ "linux-generic32", asm("mips64_asm") ], |
8864f0de | 706 | cflags => add("-mabi=n32 -DBN_DIV3W"), |
3e9e810f | 707 | bn_ops => "SIXTY_FOUR_BIT RC4_CHAR", |
5e1b2353 | 708 | perlasm_scheme => "n32", |
5e1b2353 RL |
709 | multilib => "32", |
710 | }, | |
711 | "linux64-mips64" => { | |
7ead0c89 | 712 | inherit_from => [ "linux-generic64", asm("mips64_asm") ], |
8864f0de | 713 | cflags => add("-mabi=64 -DBN_DIV3W"), |
5e1b2353 | 714 | perlasm_scheme => "64", |
5e1b2353 RL |
715 | multilib => "64", |
716 | }, | |
7ead0c89 AP |
717 | |
718 | #### IA-32 targets... | |
7fbc0bfd RL |
719 | #### These two targets are a bit aged and are to be used on older Linux |
720 | #### machines where gcc doesn't understand -m32 and -m64 | |
5e1b2353 | 721 | "linux-elf" => { |
7ead0c89 | 722 | inherit_from => [ "linux-generic32", asm("x86_elf_asm") ], |
8864f0de RL |
723 | cflags => add(picker(default => "-DL_ENDIAN", |
724 | release => "-fomit-frame-pointer")), | |
a01dab94 | 725 | bn_ops => "BN_LLONG", |
5e1b2353 RL |
726 | }, |
727 | "linux-aout" => { | |
d2b2221a | 728 | inherit_from => [ "BASE_unix", asm("x86_asm") ], |
5e1b2353 | 729 | cc => "gcc", |
8864f0de RL |
730 | cflags => add(picker(default => "-DL_ENDIAN -Wall", |
731 | debug => "-O0 -g", | |
732 | release => "-O3 -fomit-frame-pointer")), | |
a01dab94 | 733 | bn_ops => "BN_LLONG", |
9c62a279 | 734 | thread_scheme => "(unknown)", |
5e1b2353 RL |
735 | perlasm_scheme => "a.out", |
736 | }, | |
7ead0c89 | 737 | |
7fbc0bfd RL |
738 | #### X86 / X86_64 targets |
739 | "linux-x86" => { | |
740 | inherit_from => [ "linux-generic32", asm("x86_asm") ], | |
741 | cflags => add(picker(default => "-m32 -DL_ENDIAN", | |
742 | release => "-fomit-frame-pointer")), | |
743 | bn_ops => "BN_LLONG", | |
744 | perlasm_scheme => "elf", | |
7fbc0bfd RL |
745 | }, |
746 | "linux-x86-clang" => { | |
747 | inherit_from => [ "linux-x86" ], | |
748 | cc => "clang", | |
749 | cxx => "clang++", | |
3a154864 | 750 | cflags => add("-Wextra"), |
7fbc0bfd | 751 | }, |
5e1b2353 | 752 | "linux-x86_64" => { |
7ead0c89 | 753 | inherit_from => [ "linux-generic64", asm("x86_64_asm") ], |
8864f0de | 754 | cflags => add("-m64 -DL_ENDIAN"), |
3e9e810f | 755 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 756 | perlasm_scheme => "elf", |
5e1b2353 RL |
757 | multilib => "64", |
758 | }, | |
7ead0c89 AP |
759 | "linux-x86_64-clang" => { |
760 | inherit_from => [ "linux-x86_64" ], | |
761 | cc => "clang", | |
3ff3ee7a | 762 | cxx => "clang++", |
3a154864 | 763 | cflags => add("-Wextra"), |
7ead0c89 | 764 | }, |
5e1b2353 | 765 | "linux-x32" => { |
7ead0c89 | 766 | inherit_from => [ "linux-generic32", asm("x86_64_asm") ], |
8864f0de | 767 | cflags => add("-mx32 -DL_ENDIAN"), |
3e9e810f | 768 | bn_ops => "SIXTY_FOUR_BIT", |
2460c7f1 | 769 | perlasm_scheme => "elf32", |
5e1b2353 RL |
770 | multilib => "x32", |
771 | }, | |
7ead0c89 AP |
772 | |
773 | "linux-ia64" => { | |
774 | inherit_from => [ "linux-generic64", asm("ia64_asm") ], | |
3e9e810f | 775 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
7ead0c89 AP |
776 | }, |
777 | ||
5e1b2353 | 778 | "linux64-s390x" => { |
7ead0c89 | 779 | inherit_from => [ "linux-generic64", asm("s390x_asm") ], |
8864f0de | 780 | cflags => add("-m64 -DB_ENDIAN"), |
5e1b2353 | 781 | perlasm_scheme => "64", |
5e1b2353 RL |
782 | multilib => "64", |
783 | }, | |
5e1b2353 | 784 | "linux32-s390x" => { |
7ead0c89 AP |
785 | #### So called "highgprs" target for z/Architecture CPUs |
786 | # "Highgprs" is kernel feature first implemented in Linux | |
787 | # 2.6.32, see /proc/cpuinfo. The idea is to preserve most | |
788 | # significant bits of general purpose registers not only | |
789 | # upon 32-bit process context switch, but even on | |
790 | # asynchronous signal delivery to such process. This makes | |
791 | # it possible to deploy 64-bit instructions even in legacy | |
792 | # application context and achieve better [or should we say | |
793 | # adequate] performance. The build is binary compatible with | |
794 | # linux-generic32, and the idea is to be able to install the | |
795 | # resulting libcrypto.so alongside generic one, e.g. as | |
796 | # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time | |
797 | # linker to autodiscover. Unfortunately it doesn't work just | |
798 | # yet, because of couple of bugs in glibc | |
799 | # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1... | |
800 | # | |
801 | inherit_from => [ "linux-generic32", asm("s390x_asm") ], | |
8864f0de | 802 | cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"), |
8d51db86 | 803 | bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; }, |
5e1b2353 | 804 | perlasm_scheme => "31", |
5e1b2353 RL |
805 | multilib => "/highgprs", |
806 | }, | |
7ead0c89 AP |
807 | |
808 | #### SPARC Linux setups | |
5e1b2353 | 809 | "linux-sparcv8" => { |
7ead0c89 | 810 | inherit_from => [ "linux-generic32", asm("sparcv8_asm") ], |
8864f0de | 811 | cflags => add("-mcpu=v8 -DB_ENDIAN -DBN_DIV2W"), |
5e1b2353 | 812 | }, |
5e1b2353 | 813 | "linux-sparcv9" => { |
7ead0c89 AP |
814 | # it's a real mess with -mcpu=ultrasparc option under Linux, |
815 | # but -Wa,-Av8plus should do the trick no matter what. | |
816 | inherit_from => [ "linux-generic32", asm("sparcv9_asm") ], | |
8864f0de | 817 | cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W"), |
5e1b2353 | 818 | }, |
5e1b2353 | 819 | "linux64-sparcv9" => { |
7ead0c89 AP |
820 | # GCC 3.1 is a requirement |
821 | inherit_from => [ "linux-generic64", asm("sparcv9_asm") ], | |
8864f0de | 822 | cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"), |
3e9e810f | 823 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 RL |
824 | multilib => "64", |
825 | }, | |
7ead0c89 | 826 | |
5e1b2353 | 827 | "linux-alpha-gcc" => { |
7ead0c89 | 828 | inherit_from => [ "linux-generic64", asm("alpha_asm") ], |
8864f0de | 829 | cflags => add("-DL_ENDIAN"), |
3e9e810f | 830 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 831 | }, |
5e1b2353 | 832 | "linux-c64xplus" => { |
d2b2221a | 833 | inherit_from => [ "BASE_unix" ], |
7ead0c89 | 834 | # TI_CGT_C6000_7.3.x is a requirement |
5e1b2353 | 835 | cc => "cl6x", |
9c62a279 RL |
836 | cflags => combine("--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT", |
837 | threads("-D_REENTRANT")), | |
5e1b2353 | 838 | bn_ops => "BN_LLONG", |
f4e175e4 AP |
839 | cpuid_asm_src => "c64xpluscpuid.s", |
840 | bn_asm_src => "asm/bn-c64xplus.asm c64xplus-gf2m.s", | |
841 | aes_asm_src => "aes-c64xplus.s aes_cbc.c aes-ctr.fake", | |
842 | sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s", | |
843 | rc4_asm_src => "rc4-c64xplus.s", | |
844 | modes_asm_src => "ghash-c64xplus.s", | |
845 | chacha_asm_src => "chacha-c64xplus.s", | |
846 | poly1305_asm_src => "poly1305-c64xplus.s", | |
9c62a279 | 847 | thread_scheme => "pthreads", |
5e1b2353 RL |
848 | perlasm_scheme => "void", |
849 | dso_scheme => "dlfcn", | |
850 | shared_target => "linux-shared", | |
851 | shared_cflag => "--pic", | |
b6d5ba1a | 852 | shared_ldflag => add("-z --sysv --shared"), |
d4453024 | 853 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
854 | ranlib => "true", |
855 | }, | |
f09e7ca9 | 856 | |
7ead0c89 | 857 | #### Android: linux-* but without pointers to headers and libs. |
449e3f26 AP |
858 | # |
859 | # It takes pair of prior-set environment variables to make it work: | |
860 | # | |
d5a39c12 | 861 | # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<arch> |
449e3f26 AP |
862 | # CROSS_COMPILE=<prefix> |
863 | # | |
864 | # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company. | |
865 | # For example to compile for ICS and ARM with NDK 10d, you'd: | |
866 | # | |
867 | # ANDROID_NDK=/some/where/android-ndk-10d | |
868 | # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm | |
bebef673 | 869 | # CROSS_COMPILE=arm-linux-androideabi- |
d5a39c12 | 870 | # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/bin |
449e3f26 | 871 | # |
5e1b2353 | 872 | "android" => { |
7ead0c89 | 873 | inherit_from => [ "linux-generic32" ], |
449e3f26 AP |
874 | # Special note about unconditional -fPIC and -pie. The underlying |
875 | # reason is that Lollipop refuses to run non-PIE. But what about | |
876 | # older systems and NDKs? -fPIC was never problem, so the only | |
cba792a1 | 877 | # concern is -pie. Older toolchains, e.g. r4, appear to handle it |
449e3f26 AP |
878 | # and binaries turn mostly functional. "Mostly" means that oldest |
879 | # Androids, such as Froyo, fail to handle executable, but newer | |
880 | # systems are perfectly capable of executing binaries targeting | |
881 | # Froyo. Keep in mind that in the nutshell Android builds are | |
882 | # about JNI, i.e. shared libraries, not applications. | |
cba792a1 AP |
883 | cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")), |
884 | bin_cflags => "-pie", | |
5e1b2353 RL |
885 | }, |
886 | "android-x86" => { | |
7ead0c89 | 887 | inherit_from => [ "android", asm("x86_asm") ], |
8864f0de | 888 | cflags => add(picker(release => "-fomit-frame-pointer")), |
a01dab94 | 889 | bn_ops => "BN_LLONG", |
7ead0c89 | 890 | perlasm_scheme => "android", |
5e1b2353 | 891 | }, |
449e3f26 AP |
892 | ################################################################ |
893 | # Contemporary Android applications can provide multiple JNI | |
894 | # providers in .apk, targeting multiple architectures. Among | |
895 | # them there is "place" for two ARM flavours: generic eabi and | |
896 | # armv7-a/hard-float. However, it should be noted that OpenSSL's | |
897 | # ability to engage NEON is not constrained by ABI choice, nor | |
898 | # is your ability to call OpenSSL from your application code | |
899 | # compiled with floating-point ABI other than default 'soft'. | |
900 | # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.] | |
901 | # This means that choice of ARM libraries you provide in .apk | |
902 | # is driven by application needs. For example if application | |
903 | # itself benefits from NEON or is floating-point intensive, then | |
904 | # it might be appropriate to provide both libraries. Otherwise | |
905 | # just generic eabi would do. But in latter case it would be | |
906 | # appropriate to | |
907 | # | |
908 | # ./Configure android-armeabi -D__ARM_MAX_ARCH__=8 | |
909 | # | |
910 | # in order to build "universal" binary and allow OpenSSL take | |
911 | # advantage of NEON when it's available. | |
912 | # | |
913 | "android-armeabi" => { | |
7ead0c89 | 914 | inherit_from => [ "android", asm("armv4_asm") ], |
449e3f26 | 915 | }, |
5e1b2353 | 916 | "android-mips" => { |
7ead0c89 | 917 | inherit_from => [ "android", asm("mips32_asm") ], |
5e1b2353 | 918 | perlasm_scheme => "o32", |
5e1b2353 | 919 | }, |
f09e7ca9 | 920 | |
5a3d915d AP |
921 | "android64" => { |
922 | inherit_from => [ "linux-generic64" ], | |
cba792a1 AP |
923 | cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")), |
924 | bin_cflags => "-pie", | |
5a3d915d AP |
925 | }, |
926 | "android64-aarch64" => { | |
927 | inherit_from => [ "android64", asm("aarch64_asm") ], | |
928 | perlasm_scheme => "linux64", | |
a4324912 AP |
929 | }, |
930 | "android64-x86_64" => { | |
931 | inherit_from => [ "android64", asm("x86_64_asm") ], | |
932 | perlasm_scheme => "elf", | |
c1ec40ef AP |
933 | }, |
934 | "android64-mips64" => { | |
935 | ############################################################ | |
936 | # You are more than likely have to specify target processor | |
937 | # on ./Configure command line. Trouble is that toolchain's | |
938 | # default is MIPS64r6 (at least in r10d), but there are no | |
939 | # such processors around (or they are too rare to spot one). | |
940 | # Actual problem is that MIPS64r6 is binary incompatible | |
941 | # with previous MIPS ISA versions, in sense that unlike | |
942 | # prior versions original MIPS binary code will fail. | |
943 | # | |
944 | inherit_from => [ "android64", asm("mips64_asm") ], | |
945 | perlasm_scheme => "64", | |
5a3d915d AP |
946 | }, |
947 | ||
1818572d | 948 | #### *BSD |
5e1b2353 | 949 | "BSD-generic32" => { |
9c62a279 | 950 | # As for thread cflag. Idea is to maintain "collective" set of |
1818572d AP |
951 | # flags, which would cover all BSD flavors. -pthread applies |
952 | # to them all, but is treated differently. OpenBSD expands is | |
953 | # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x | |
954 | # expands it as -lc_r, which has to be accompanied by explicit | |
955 | # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x | |
956 | # expands it as -lc_r, which seems to be sufficient? | |
d2b2221a | 957 | inherit_from => [ "BASE_unix" ], |
d237a273 | 958 | cc => "cc", |
9c62a279 RL |
959 | cflags => combine(picker(default => "-Wall", |
960 | debug => "-O0 -g", | |
961 | release => "-O3"), | |
962 | threads("-pthread -D_THREAD_SAFE -D_REENTRANT")), | |
fcd2ac80 | 963 | ex_libs => add(threads("-pthread")), |
619eb33a | 964 | enable => add("devcryptoeng"), |
3e9e810f | 965 | bn_ops => "BN_LLONG", |
9c62a279 | 966 | thread_scheme => "pthreads", |
5e1b2353 RL |
967 | dso_scheme => "dlfcn", |
968 | shared_target => "bsd-gcc-shared", | |
969 | shared_cflag => "-fPIC", | |
d4453024 | 970 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 | 971 | }, |
7ead0c89 AP |
972 | "BSD-generic64" => { |
973 | inherit_from => [ "BSD-generic32" ], | |
3e9e810f | 974 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 975 | }, |
7ead0c89 AP |
976 | |
977 | "BSD-x86" => { | |
978 | inherit_from => [ "BSD-generic32", asm("x86_asm") ], | |
8864f0de RL |
979 | cflags => add(picker(default => "-DL_ENDIAN", |
980 | release => "-fomit-frame-pointer")), | |
a01dab94 | 981 | bn_ops => "BN_LLONG", |
5e1b2353 | 982 | shared_target => "bsd-shared", |
7ead0c89 | 983 | perlasm_scheme => "a.out", |
5e1b2353 | 984 | }, |
7ead0c89 AP |
985 | "BSD-x86-elf" => { |
986 | inherit_from => [ "BSD-x86" ], | |
987 | perlasm_scheme => "elf", | |
5e1b2353 | 988 | }, |
f09e7ca9 | 989 | |
7ead0c89 AP |
990 | "BSD-sparcv8" => { |
991 | inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ], | |
8864f0de | 992 | cflags => add("-mcpu=v8 -DB_ENDIAN"), |
5e1b2353 | 993 | }, |
5e1b2353 | 994 | "BSD-sparc64" => { |
7ead0c89 AP |
995 | # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it |
996 | # simply *happens* to work around a compiler bug in gcc 3.3.3, | |
997 | # triggered by RIPEMD160 code. | |
998 | inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ], | |
8864f0de | 999 | cflags => add("-DB_ENDIAN -DMD32_REG_T=int"), |
3e9e810f | 1000 | bn_ops => "BN_LLONG", |
5e1b2353 | 1001 | }, |
7ead0c89 | 1002 | |
5e1b2353 | 1003 | "BSD-ia64" => { |
7ead0c89 | 1004 | inherit_from => [ "BSD-generic64", asm("ia64_asm") ], |
8864f0de | 1005 | cflags => add_before("-DL_ENDIAN"), |
3e9e810f | 1006 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 1007 | }, |
7ead0c89 | 1008 | |
5e1b2353 | 1009 | "BSD-x86_64" => { |
7ead0c89 | 1010 | inherit_from => [ "BSD-generic64", asm("x86_64_asm") ], |
8864f0de | 1011 | cflags => add_before("-DL_ENDIAN"), |
3e9e810f | 1012 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 1013 | perlasm_scheme => "elf", |
5e1b2353 | 1014 | }, |
f09e7ca9 | 1015 | |
5e1b2353 | 1016 | "bsdi-elf-gcc" => { |
d2b2221a | 1017 | inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], |
5e1b2353 | 1018 | cc => "gcc", |
893fe73a | 1019 | cflags => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -Wall", |
98fdbce0 | 1020 | ex_libs => add("-ldl"), |
a01dab94 | 1021 | bn_ops => "BN_LLONG", |
9c62a279 | 1022 | thread_scheme => "(unknown)", |
5e1b2353 RL |
1023 | dso_scheme => "dlfcn", |
1024 | shared_target => "bsd-gcc-shared", | |
1025 | shared_cflag => "-fPIC", | |
d4453024 | 1026 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 | 1027 | }, |
f09e7ca9 | 1028 | |
5e1b2353 | 1029 | "nextstep" => { |
d2b2221a | 1030 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1031 | cc => "cc", |
1032 | cflags => "-O -Wall", | |
1033 | unistd => "<libc.h>", | |
a01dab94 | 1034 | bn_ops => "BN_LLONG", |
9c62a279 | 1035 | thread_scheme => "(unknown)", |
5e1b2353 RL |
1036 | }, |
1037 | "nextstep3.3" => { | |
d2b2221a | 1038 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1039 | cc => "cc", |
1040 | cflags => "-O3 -Wall", | |
1041 | unistd => "<libc.h>", | |
a01dab94 | 1042 | bn_ops => "BN_LLONG", |
9c62a279 | 1043 | thread_scheme => "(unknown)", |
5e1b2353 | 1044 | }, |
f09e7ca9 RS |
1045 | |
1046 | # QNX | |
5e1b2353 | 1047 | "qnx4" => { |
d2b2221a | 1048 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1049 | cc => "cc", |
1050 | cflags => "-DL_ENDIAN -DTERMIO", | |
9c62a279 | 1051 | thread_scheme => "(unknown)", |
5e1b2353 RL |
1052 | }, |
1053 | "QNX6" => { | |
d2b2221a | 1054 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 1055 | cc => "gcc", |
98fdbce0 | 1056 | ex_libs => add("-lsocket"), |
5e1b2353 RL |
1057 | dso_scheme => "dlfcn", |
1058 | shared_target => "bsd-gcc-shared", | |
1059 | shared_cflag => "-fPIC", | |
d4453024 | 1060 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
1061 | }, |
1062 | "QNX6-i386" => { | |
d2b2221a | 1063 | inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], |
5e1b2353 RL |
1064 | cc => "gcc", |
1065 | cflags => "-DL_ENDIAN -O2 -Wall", | |
98fdbce0 | 1066 | ex_libs => add("-lsocket"), |
5e1b2353 RL |
1067 | dso_scheme => "dlfcn", |
1068 | shared_target => "bsd-gcc-shared", | |
1069 | shared_cflag => "-fPIC", | |
d4453024 | 1070 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 | 1071 | }, |
f09e7ca9 RS |
1072 | |
1073 | #### SCO/Caldera targets. | |
1074 | # | |
1075 | # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc. | |
1076 | # Now we only have blended unixware-* as it's the only one used by ./config. | |
1077 | # If you want to optimize for particular microarchitecture, bypass ./config | |
1078 | # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate. | |
1079 | # Note that not all targets include assembler support. Mostly because of | |
1080 | # lack of motivation to support out-of-date platforms with out-of-date | |
e3713c36 | 1081 | # compiler drivers and assemblers. |
f09e7ca9 RS |
1082 | # |
1083 | # UnixWare 2.0x fails destest with -O. | |
5e1b2353 | 1084 | "unixware-2.0" => { |
d2b2221a | 1085 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 1086 | cc => "cc", |
9c62a279 RL |
1087 | cflags => combine("-DFILIO_H -DNO_STRINGS_H", |
1088 | threads("-Kthread")), | |
98fdbce0 | 1089 | ex_libs => add("-lsocket -lnsl -lresolv -lx"), |
9c62a279 | 1090 | thread_scheme => "uithreads", |
5e1b2353 RL |
1091 | }, |
1092 | "unixware-2.1" => { | |
d2b2221a | 1093 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 1094 | cc => "cc", |
9c62a279 RL |
1095 | cflags => combine("-O -DFILIO_H", |
1096 | threads("-Kthread")), | |
98fdbce0 | 1097 | ex_libs => add("-lsocket -lnsl -lresolv -lx"), |
9c62a279 | 1098 | thread_scheme => "uithreads", |
5e1b2353 RL |
1099 | }, |
1100 | "unixware-7" => { | |
d2b2221a | 1101 | inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], |
5e1b2353 | 1102 | cc => "cc", |
9c62a279 RL |
1103 | cflags => combine("-O -DFILIO_H -Kalloca", |
1104 | threads("-Kthread")), | |
98fdbce0 | 1105 | ex_libs => add("-lsocket -lnsl"), |
9c62a279 | 1106 | thread_scheme => "uithreads", |
a01dab94 | 1107 | bn_ops => "BN_LLONG", |
5e1b2353 RL |
1108 | perlasm_scheme => "elf-1", |
1109 | dso_scheme => "dlfcn", | |
1110 | shared_target => "svr5-shared", | |
1111 | shared_cflag => "-Kpic", | |
d4453024 | 1112 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
1113 | }, |
1114 | "unixware-7-gcc" => { | |
d2b2221a | 1115 | inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], |
5e1b2353 | 1116 | cc => "gcc", |
9c62a279 RL |
1117 | cflags => combine("-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -Wall", |
1118 | threads("-D_REENTRANT")), | |
98fdbce0 | 1119 | ex_libs => add("-lsocket -lnsl"), |
a01dab94 | 1120 | bn_ops => "BN_LLONG", |
9c62a279 | 1121 | thread_scheme => "pthreads", |
5e1b2353 RL |
1122 | perlasm_scheme => "elf-1", |
1123 | dso_scheme => "dlfcn", | |
1124 | shared_target => "gnu-shared", | |
1125 | shared_cflag => "-fPIC", | |
d4453024 | 1126 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 | 1127 | }, |
e3713c36 | 1128 | # SCO 5 - Ben Laurie says the -O breaks the SCO cc. |
5e1b2353 | 1129 | "sco5-cc" => { |
d2b2221a | 1130 | inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], |
5e1b2353 RL |
1131 | cc => "cc", |
1132 | cflags => "-belf", | |
98fdbce0 | 1133 | ex_libs => add("-lsocket -lnsl"), |
9c62a279 | 1134 | thread_scheme => "(unknown)", |
5e1b2353 RL |
1135 | perlasm_scheme => "elf-1", |
1136 | dso_scheme => "dlfcn", | |
1137 | shared_target => "svr3-shared", | |
1138 | shared_cflag => "-Kpic", | |
d4453024 | 1139 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
1140 | }, |
1141 | "sco5-gcc" => { | |
d2b2221a | 1142 | inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], |
5e1b2353 RL |
1143 | cc => "gcc", |
1144 | cflags => "-O3 -fomit-frame-pointer", | |
98fdbce0 | 1145 | ex_libs => add("-lsocket -lnsl"), |
a01dab94 | 1146 | bn_ops => "BN_LLONG", |
9c62a279 | 1147 | thread_scheme => "(unknown)", |
5e1b2353 RL |
1148 | perlasm_scheme => "elf-1", |
1149 | dso_scheme => "dlfcn", | |
1150 | shared_target => "svr3-shared", | |
1151 | shared_cflag => "-fPIC", | |
d4453024 | 1152 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 | 1153 | }, |
f09e7ca9 RS |
1154 | |
1155 | #### IBM's AIX. | |
f780eaad AP |
1156 | # Below targets assume AIX >=5. Caveat lector. If you are accustomed |
1157 | # to control compilation "bitness" by setting $OBJECT_MODE environment | |
1158 | # variable, then you should know that in OpenSSL case it's considered | |
1159 | # only in ./config. Once configured, build procedure remains "deaf" to | |
1160 | # current value of $OBJECT_MODE. | |
5e1b2353 | 1161 | "aix-gcc" => { |
d2b2221a | 1162 | inherit_from => [ "BASE_unix", asm("ppc32_asm") ], |
5e1b2353 | 1163 | cc => "gcc", |
9c62a279 RL |
1164 | cflags => combine(picker(default => "-DB_ENDIAN", |
1165 | debug => "-O0 -g", | |
1166 | release => "-O"), | |
1167 | threads("-pthread")), | |
fcd2ac80 | 1168 | ex_libs => add(threads("-pthread")), |
5e1b2353 RL |
1169 | sys_id => "AIX", |
1170 | bn_ops => "BN_LLONG RC4_CHAR", | |
9c62a279 | 1171 | thread_scheme => "pthreads", |
5e1b2353 RL |
1172 | perlasm_scheme => "aix32", |
1173 | dso_scheme => "dlfcn", | |
1174 | shared_target => "aix-shared", | |
f780eaad | 1175 | shared_ldflag => "-shared -static-libgcc -Wl,-G", |
d4453024 | 1176 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
1177 | arflags => "-X32", |
1178 | }, | |
1179 | "aix64-gcc" => { | |
d2b2221a | 1180 | inherit_from => [ "BASE_unix", asm("ppc64_asm") ], |
5e1b2353 | 1181 | cc => "gcc", |
9c62a279 RL |
1182 | cflags => combine(picker(default => "-maix64 -DB_ENDIAN", |
1183 | debug => "-O0 -g", | |
1184 | release => "-O"), | |
1185 | threads("-pthread")), | |
fcd2ac80 | 1186 | ex_libs => add(threads("-pthread")), |
5e1b2353 RL |
1187 | sys_id => "AIX", |
1188 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", | |
9c62a279 | 1189 | thread_scheme => "pthreads", |
5e1b2353 RL |
1190 | perlasm_scheme => "aix64", |
1191 | dso_scheme => "dlfcn", | |
1192 | shared_target => "aix-shared", | |
8dd0ff1c | 1193 | shared_ldflag => "-shared -static-libgcc -Wl,-G", |
d4453024 | 1194 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
1195 | arflags => "-X64", |
1196 | }, | |
5e1b2353 | 1197 | "aix-cc" => { |
d2b2221a | 1198 | inherit_from => [ "BASE_unix", asm("ppc32_asm") ], |
5e1b2353 | 1199 | cc => "cc", |
9c62a279 RL |
1200 | cflags => combine(picker(default => "-q32 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst", |
1201 | debug => "-O0 -g", | |
1202 | release => "-O"), | |
1203 | threads("-qthreaded -D_THREAD_SAFE")), | |
5e1b2353 RL |
1204 | sys_id => "AIX", |
1205 | bn_ops => "BN_LLONG RC4_CHAR", | |
9c62a279 | 1206 | thread_scheme => "pthreads", |
f780eaad | 1207 | ex_libs => threads("-lpthreads"), |
5e1b2353 RL |
1208 | perlasm_scheme => "aix32", |
1209 | dso_scheme => "dlfcn", | |
1210 | shared_target => "aix-shared", | |
8dd0ff1c | 1211 | shared_ldflag => "-G", |
d4453024 | 1212 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
1213 | arflags => "-X 32", |
1214 | }, | |
1215 | "aix64-cc" => { | |
d2b2221a | 1216 | inherit_from => [ "BASE_unix", asm("ppc64_asm") ], |
5e1b2353 | 1217 | cc => "cc", |
9c62a279 RL |
1218 | cflags => combine(picker(default => "-q64 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst", |
1219 | debug => "-O0 -g", | |
1220 | release => "-O"), | |
1221 | threads("-qthreaded -D_THREAD_SAFE")), | |
5e1b2353 RL |
1222 | sys_id => "AIX", |
1223 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", | |
9c62a279 | 1224 | thread_scheme => "pthreads", |
f780eaad | 1225 | ex_libs => threads("-lpthreads"), |
5e1b2353 RL |
1226 | perlasm_scheme => "aix64", |
1227 | dso_scheme => "dlfcn", | |
1228 | shared_target => "aix-shared", | |
8dd0ff1c | 1229 | shared_ldflag => "-G", |
d4453024 | 1230 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 RL |
1231 | arflags => "-X 64", |
1232 | }, | |
f09e7ca9 RS |
1233 | |
1234 | # SIEMENS BS2000/OSD: an EBCDIC-based mainframe | |
5e1b2353 | 1235 | "BS2000-OSD" => { |
d2b2221a | 1236 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1237 | cc => "c89", |
1238 | cflags => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC", | |
98fdbce0 | 1239 | ex_libs => add("-lsocket -lnsl"), |
3e9e810f | 1240 | bn_ops => "THIRTY_TWO_BIT RC4_CHAR", |
9c62a279 | 1241 | thread_scheme => "(unknown)", |
5e1b2353 | 1242 | }, |
f09e7ca9 | 1243 | |
7ead0c89 | 1244 | #### Visual C targets |
f09e7ca9 RS |
1245 | # |
1246 | # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64 | |
1247 | # | |
1248 | # Note about -wd4090, disable warning C4090. This warning returns false | |
1249 | # positives in some situations. Disabling it altogether masks both | |
1250 | # legitimate and false cases, but as we compile on multiple platforms, | |
1251 | # we rely on other compilers to catch legitimate cases. | |
2fe73036 RL |
1252 | # |
1253 | # Also note that we force threads no matter what. Configuring "no-threads" | |
1254 | # is ignored. | |
7ead0c89 | 1255 | "VC-common" => { |
d2b2221a | 1256 | inherit_from => [ "BASE_Windows" ], |
7ead0c89 | 1257 | template => 1, |
5e1b2353 | 1258 | cc => "cl", |
0d2394a8 | 1259 | cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS", |
5a5c0b95 RL |
1260 | defines => add(sub { my @defs = (); |
1261 | unless ($disabled{"zlib-dynamic"}) { | |
111b234c RL |
1262 | my $zlib = |
1263 | $withargs{zlib_lib} // "ZLIB1"; | |
5a5c0b95 RL |
1264 | push @defs, |
1265 | quotify("perl", | |
111b234c | 1266 | 'LIBZ="' . $zlib . '"'); |
5a5c0b95 RL |
1267 | } |
1268 | return [ @defs ]; | |
1269 | }), | |
2fe73036 | 1270 | coutflag => "/Fo", |
3ec8a1cf RL |
1271 | lib_cflags => add("/Zi /Fdossl_static"), |
1272 | dso_cflags => "/Zi /Fddso", | |
2fe73036 RL |
1273 | bin_cflags => "/Zi /Fdapp", |
1274 | lflags => add("/debug"), | |
2fe73036 | 1275 | shared_ldflag => "/dll", |
e9abfc3a | 1276 | shared_target => "win-shared", # meaningless except it gives Configure a hint |
2fe73036 | 1277 | thread_scheme => "winthreads", |
5e1b2353 | 1278 | dso_scheme => "win32", |
4e155ec4 | 1279 | apps_aux_src => add("win32_init.c"), |
5e1b2353 | 1280 | }, |
2fe73036 | 1281 | "VC-noCE-common" => { |
acf15259 | 1282 | inherit_from => [ "VC-common" ], |
be1f4812 | 1283 | template => 1, |
2fe73036 RL |
1284 | cflags => add(picker(default => "-DUNICODE -D_UNICODE", |
1285 | debug => | |
1286 | sub { | |
c32cbe97 AP |
1287 | ($disabled{shared} ? "" : "/MDd") |
1288 | ." /Od -DDEBUG -D_DEBUG"; | |
2fe73036 RL |
1289 | }, |
1290 | release => | |
1291 | sub { | |
c32cbe97 | 1292 | ($disabled{shared} ? "" : "/MD") |
592b6fb4 | 1293 | ." /O2"; |
2fe73036 | 1294 | })), |
c32cbe97 AP |
1295 | lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }), |
1296 | # Following might/should appears controversial, i.e. defining | |
1297 | # /MDd without evaluating $disabled{shared}. It works in | |
1298 | # non-shared build because static library is compiled with /Zl | |
1299 | # and bares no reference to specific RTL. And it works in | |
1300 | # shared build because multiple /MDd options are not prohibited. | |
1301 | # But why /MDd in static build? Well, basically this is just a | |
1302 | # reference point, which allows to catch eventual errors that | |
1303 | # would prevent those who want to wrap OpenSSL into own .DLL. | |
1304 | # Why not /MD in release build then? Well, some are likely to | |
1305 | # prefer [non-debug] openssl.exe to be free from Micorosoft RTL | |
1306 | # redistributable. | |
1307 | bin_cflags => add(picker(debug => "/MDd", | |
1308 | release => sub { $disabled{shared} ? "/MT" : () }, | |
1309 | )), | |
2fe73036 | 1310 | bin_lflags => add("/subsystem:console /opt:ref"), |
ef5b8296 | 1311 | ex_libs => add(sub { |
2fe73036 RL |
1312 | my @ex_libs = (); |
1313 | push @ex_libs, 'ws2_32.lib' unless $disabled{sock}; | |
1314 | push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib'; | |
1315 | return join(" ", @ex_libs); | |
ef5b8296 | 1316 | }), |
2fe73036 RL |
1317 | }, |
1318 | "VC-WIN64-common" => { | |
1319 | inherit_from => [ "VC-noCE-common" ], | |
be1f4812 | 1320 | template => 1, |
ef5b8296 | 1321 | ex_libs => add(sub { |
2fe73036 RL |
1322 | my @ex_libs = (); |
1323 | push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./); | |
1324 | return join(" ", @_, @ex_libs); | |
ef5b8296 | 1325 | }), |
2fe73036 RL |
1326 | bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN", |
1327 | build_scheme => add("VC-W64", { separator => undef }), | |
1328 | }, | |
7ead0c89 | 1329 | "VC-WIN64I" => { |
acf15259 AP |
1330 | inherit_from => [ "VC-WIN64-common", asm("ia64_asm"), |
1331 | sub { $disabled{shared} ? () : "ia64_uplink" } ], | |
2fe73036 RL |
1332 | as => "ias", |
1333 | asflags => "-d debug", | |
1334 | asoutflag => "-o", | |
5e1b2353 | 1335 | sys_id => "WIN64I", |
6ddb62a5 AP |
1336 | bn_asm_src => sub { return undef unless @_; |
1337 | my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; }, | |
5e1b2353 | 1338 | perlasm_scheme => "ias", |
6ddb62a5 | 1339 | multilib => "-ia64", |
5e1b2353 RL |
1340 | }, |
1341 | "VC-WIN64A" => { | |
acf15259 AP |
1342 | inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"), |
1343 | sub { $disabled{shared} ? () : "x86_64_uplink" } ], | |
2fe73036 RL |
1344 | as => sub { vc_win64a_info()->{as} }, |
1345 | asflags => sub { vc_win64a_info()->{asflags} }, | |
1346 | asoutflag => sub { vc_win64a_info()->{asoutflag} }, | |
5e1b2353 | 1347 | sys_id => "WIN64A", |
2fe73036 RL |
1348 | bn_asm_src => sub { return undef unless @_; |
1349 | my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; }, | |
5e1b2353 | 1350 | perlasm_scheme => "auto", |
6ddb62a5 | 1351 | multilib => "-x64", |
5e1b2353 | 1352 | }, |
5e1b2353 | 1353 | "VC-WIN32" => { |
7ead0c89 AP |
1354 | # x86 Win32 target defaults to ANSI API, if you want UNICODE, |
1355 | # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE' | |
acf15259 | 1356 | inherit_from => [ "VC-noCE-common", asm("x86_asm"), |
fdf6f73e | 1357 | sub { $disabled{shared} ? () : "uplink_common" } ], |
0d2394a8 | 1358 | cflags => add("-WX"), |
43800958 RL |
1359 | as => sub { vc_win32_info()->{as} }, |
1360 | asflags => sub { vc_win32_info()->{asflags} }, | |
1361 | asoutflag => sub { vc_win32_info()->{asoutflag} }, | |
ef5b8296 | 1362 | ex_libs => add(sub { |
2fe73036 RL |
1363 | my @ex_libs = (); |
1364 | # WIN32 UNICODE build gets linked with unicows.lib for | |
1365 | # backward compatibility with Win9x. | |
1366 | push @ex_libs, 'unicows.lib' | |
1367 | if (grep { $_ eq "UNICODE" } @user_defines); | |
1368 | return join(" ", @ex_libs, @_); | |
ef5b8296 | 1369 | }), |
5e1b2353 | 1370 | sys_id => "WIN32", |
a01dab94 | 1371 | bn_ops => "BN_LLONG EXPORT_VAR_AS_FN", |
f0d484fc | 1372 | perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} }, |
d2b2221a | 1373 | build_scheme => add("VC-W32", { separator => undef }), |
5e1b2353 | 1374 | }, |
5e1b2353 | 1375 | "VC-CE" => { |
2fe73036 RL |
1376 | inherit_from => [ "VC-common" ], |
1377 | as => "ml", | |
1378 | asflags => "/nologo /Cp /coff /c /Cx /Zi", | |
1379 | asoutflag => "/Fo", | |
5e1b2353 | 1380 | cc => "cl", |
2fe73036 RL |
1381 | cflags => |
1382 | picker(default => | |
1383 | combine('/W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYS_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT', | |
1384 | sub { vc_wince_info()->{cflags}; }, | |
17f16617 | 1385 | sub { defined(env('WCECOMPAT')) |
2fe73036 | 1386 | ? '-I$(WCECOMPAT)/include' : (); }, |
17f16617 | 1387 | sub { defined(env('PORTSDK_LIBPATH')) |
2fe73036 RL |
1388 | ? '-I$(PORTSDK_LIBPATH)/../../include' : (); }, |
1389 | sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14 | |
1390 | ? ($disabled{shared} ? " /MT" : " /MD") | |
1391 | : " /MC"; }), | |
1392 | debug => "/Od -DDEBUG -D_DEBUG", | |
1393 | release => "/O1i"), | |
47eeaf45 RL |
1394 | lflags => add(combine("/nologo /opt:ref", |
1395 | sub { vc_wince_info()->{lflags}; }, | |
1396 | sub { defined(env('PORTSDK_LIBPATH')) | |
1397 | ? "/entry:mainCRTstartup" : (); })), | |
5e1b2353 | 1398 | sys_id => "WINCE", |
a01dab94 | 1399 | bn_ops => "BN_LLONG EXPORT_VAR_AS_FN", |
ef5b8296 | 1400 | ex_libs => add(sub { |
2fe73036 RL |
1401 | my @ex_libs = (); |
1402 | push @ex_libs, 'ws2.lib' unless $disabled{sock}; | |
1403 | push @ex_libs, 'crypt32.lib'; | |
17f16617 | 1404 | if (defined(env('WCECOMPAT'))) { |
2fe73036 | 1405 | my $x = '$(WCECOMPAT)/lib'; |
17f16617 | 1406 | if (-f "$x/env('TARGETCPU')/wcecompatex.lib") { |
2fe73036 RL |
1407 | $x .= '/$(TARGETCPU)/wcecompatex.lib'; |
1408 | } else { | |
1409 | $x .= '/wcecompatex.lib'; | |
1410 | } | |
1411 | push @ex_libs, $x; | |
1412 | } | |
1413 | push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib' | |
17f16617 | 1414 | if (defined(env('PORTSDK_LIBPATH'))); |
2fe73036 | 1415 | push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib' |
17f16617 | 1416 | if (env('TARGETCPU') eq "X86"); |
2fe73036 | 1417 | return @ex_libs; |
ef5b8296 | 1418 | }), |
d2b2221a | 1419 | build_scheme => add("VC-WCE", { separator => undef }), |
5e1b2353 | 1420 | }, |
f09e7ca9 | 1421 | |
7ead0c89 | 1422 | #### MinGW |
5e1b2353 | 1423 | "mingw" => { |
d2b2221a | 1424 | inherit_from => [ "BASE_unix", asm("x86_asm"), |
84af1bae | 1425 | sub { $disabled{shared} ? () : "x86_uplink" } ], |
5e1b2353 | 1426 | cc => "gcc", |
9c62a279 RL |
1427 | cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall", |
1428 | debug => "-g -O0", | |
1429 | release => "-O3 -fomit-frame-pointer"), | |
1430 | threads("-D_MT")), | |
5e1b2353 | 1431 | sys_id => "MINGW32", |
98fdbce0 | 1432 | ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"), |
a01dab94 | 1433 | bn_ops => "BN_LLONG EXPORT_VAR_AS_FN", |
9c62a279 | 1434 | thread_scheme => "winthreads", |
5e1b2353 RL |
1435 | perlasm_scheme => "coff", |
1436 | dso_scheme => "win32", | |
520f434b | 1437 | shared_target => "mingw-shared", |
bdcd83e1 | 1438 | shared_cflag => add("-D_WINDLL"), |
68ab559a | 1439 | shared_ldflag => "-static-libgcc", |
64c443e3 | 1440 | shared_rcflag => "--target=pe-i386", |
fcf80c46 | 1441 | shared_extension => ".dll", |
520f434b | 1442 | multilib => "", |
4e155ec4 | 1443 | apps_aux_src => add("win32_init.c"), |
5e1b2353 | 1444 | }, |
5e1b2353 | 1445 | "mingw64" => { |
7ead0c89 AP |
1446 | # As for OPENSSL_USE_APPLINK. Applink makes it possible to use |
1447 | # .dll compiled with one compiler with application compiled with | |
1448 | # another compiler. It's possible to engage Applink support in | |
1449 | # mingw64 build, but it's not done, because till mingw64 | |
1450 | # supports structured exception handling, one can't seriously | |
1451 | # consider its binaries for using with non-mingw64 run-time | |
1452 | # environment. And as mingw64 is always consistent with itself, | |
1453 | # Applink is never engaged and can as well be omitted. | |
d2b2221a | 1454 | inherit_from => [ "BASE_unix", asm("x86_64_asm") ], |
7ead0c89 | 1455 | cc => "gcc", |
9c62a279 RL |
1456 | cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall", |
1457 | debug => "-g -O0", | |
1458 | release => "-O3"), | |
1459 | threads("-D_MT")), | |
5e1b2353 | 1460 | sys_id => "MINGW64", |
98fdbce0 | 1461 | ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"), |
3e9e810f | 1462 | bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN", |
9c62a279 | 1463 | thread_scheme => "winthreads", |
5e1b2353 RL |
1464 | perlasm_scheme => "mingw64", |
1465 | dso_scheme => "win32", | |
520f434b | 1466 | shared_target => "mingw-shared", |
bdcd83e1 | 1467 | shared_cflag => add("-D_WINDLL"), |
68ab559a | 1468 | shared_ldflag => "-static-libgcc", |
64c443e3 | 1469 | shared_rcflag => "--target=pe-x86-64", |
fcf80c46 | 1470 | shared_extension => ".dll", |
520f434b | 1471 | multilib => "64", |
4e155ec4 | 1472 | apps_aux_src => add("win32_init.c"), |
5e1b2353 | 1473 | }, |
f09e7ca9 | 1474 | |
4d60c7e1 DW |
1475 | #### UEFI |
1476 | "UEFI" => { | |
d2b2221a | 1477 | inherit_from => [ "BASE_unix" ], |
4d60c7e1 DW |
1478 | cc => "cc", |
1479 | cflags => "-DL_ENDIAN -O", | |
1480 | sys_id => "UEFI", | |
1481 | }, | |
1482 | ||
7ead0c89 | 1483 | #### UWIN |
5e1b2353 | 1484 | "UWIN" => { |
d2b2221a | 1485 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1486 | cc => "cc", |
1487 | cflags => "-DTERMIOS -DL_ENDIAN -O -Wall", | |
1488 | sys_id => "UWIN", | |
a01dab94 | 1489 | bn_ops => "BN_LLONG", |
5e1b2353 RL |
1490 | dso_scheme => "win32", |
1491 | }, | |
f09e7ca9 | 1492 | |
7ead0c89 | 1493 | #### Cygwin |
3f542969 | 1494 | "Cygwin-x86" => { |
d2b2221a | 1495 | inherit_from => [ "BASE_unix", asm("x86_asm") ], |
5e1b2353 | 1496 | cc => "gcc", |
8864f0de RL |
1497 | cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall", |
1498 | debug => "-g -O0", | |
1499 | release => "-O3 -fomit-frame-pointer"), | |
5e1b2353 | 1500 | sys_id => "CYGWIN", |
a01dab94 | 1501 | bn_ops => "BN_LLONG", |
e58d9102 | 1502 | thread_scheme => "pthread", |
5e1b2353 RL |
1503 | perlasm_scheme => "coff", |
1504 | dso_scheme => "dlfcn", | |
1505 | shared_target => "cygwin-shared", | |
1506 | shared_cflag => "-D_WINDLL", | |
fcf80c46 | 1507 | shared_extension => ".dll", |
5e1b2353 RL |
1508 | }, |
1509 | "Cygwin-x86_64" => { | |
d2b2221a | 1510 | inherit_from => [ "BASE_unix", asm("x86_64_asm") ], |
5e1b2353 | 1511 | cc => "gcc", |
8864f0de RL |
1512 | cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall", |
1513 | debug => "-g -O0", | |
1514 | release => "-O3"), | |
5e1b2353 | 1515 | sys_id => "CYGWIN", |
3e9e810f | 1516 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e58d9102 | 1517 | thread_scheme => "pthread", |
5e1b2353 RL |
1518 | perlasm_scheme => "mingw64", |
1519 | dso_scheme => "dlfcn", | |
1520 | shared_target => "cygwin-shared", | |
1521 | shared_cflag => "-D_WINDLL", | |
fcf80c46 | 1522 | shared_extension => ".dll", |
5e1b2353 | 1523 | }, |
b9ee2dac RL |
1524 | # Backward compatibility for those using this target |
1525 | "Cygwin" => { | |
1526 | inherit_from => [ "Cygwin-x86" ] | |
1527 | }, | |
1528 | # In case someone constructs the Cygwin target name themself | |
1529 | "Cygwin-i386" => { | |
1530 | inherit_from => [ "Cygwin-x86" ] | |
1531 | }, | |
1532 | "Cygwin-i486" => { | |
1533 | inherit_from => [ "Cygwin-x86" ] | |
1534 | }, | |
1535 | "Cygwin-i586" => { | |
1536 | inherit_from => [ "Cygwin-x86" ] | |
1537 | }, | |
1538 | "Cygwin-i686" => { | |
1539 | inherit_from => [ "Cygwin-x86" ] | |
1540 | }, | |
f09e7ca9 | 1541 | |
f09e7ca9 | 1542 | ##### MacOS X (a.k.a. Darwin) setup |
7ead0c89 | 1543 | "darwin-common" => { |
d2b2221a | 1544 | inherit_from => [ "BASE_unix" ], |
7ead0c89 | 1545 | template => 1, |
5e1b2353 | 1546 | cc => "cc", |
9c62a279 RL |
1547 | cflags => combine(picker(default => "", |
1548 | debug => "-g -O0", | |
1549 | release => "-O3"), | |
1550 | threads("-D_REENTRANT")), | |
5e1b2353 | 1551 | sys_id => "MACOSX", |
c86ddbe6 | 1552 | plib_lflags => "-Wl,-search_paths_first", |
3e9e810f | 1553 | bn_ops => "BN_LLONG RC4_CHAR", |
9c62a279 | 1554 | thread_scheme => "pthreads", |
5e1b2353 RL |
1555 | perlasm_scheme => "osx32", |
1556 | dso_scheme => "dlfcn", | |
0c873419 | 1557 | ranlib => "ranlib -c", |
5e1b2353 | 1558 | shared_target => "darwin-shared", |
0c873419 | 1559 | shared_cflag => "-fPIC", |
d4453024 | 1560 | shared_extension => ".\$(SHLIB_VERSION_NUMBER).dylib", |
5e1b2353 | 1561 | }, |
c75065e1 AP |
1562 | # Option "freeze" such as -std=gnu9x can't negatively interfere |
1563 | # with future defaults for below two targets, because MacOS X | |
1564 | # for PPC has no future, it was discontinued by vendor in 2009. | |
7ead0c89 AP |
1565 | "darwin-ppc-cc" => { |
1566 | inherit_from => [ "darwin-common", asm("ppc32_asm") ], | |
c75065e1 | 1567 | cflags => add("-arch ppc -std=gnu9x -DB_ENDIAN -Wa,-force_cpusubtype_ALL"), |
7ead0c89 | 1568 | perlasm_scheme => "osx32", |
7ead0c89 | 1569 | }, |
5e1b2353 | 1570 | "darwin64-ppc-cc" => { |
7ead0c89 | 1571 | inherit_from => [ "darwin-common", asm("ppc64_asm") ], |
c75065e1 | 1572 | cflags => add("-arch ppc64 -std=gnu9x -DB_ENDIAN"), |
3e9e810f | 1573 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
5e1b2353 | 1574 | perlasm_scheme => "osx64", |
5e1b2353 RL |
1575 | }, |
1576 | "darwin-i386-cc" => { | |
7ead0c89 | 1577 | inherit_from => [ "darwin-common", asm("x86_asm") ], |
8864f0de RL |
1578 | cflags => add(picker(default => "-arch i386 -DL_ENDIAN", |
1579 | release => "-fomit-frame-pointer")), | |
3e9e810f | 1580 | bn_ops => "BN_LLONG RC4_INT", |
5e1b2353 | 1581 | perlasm_scheme => "macosx", |
5e1b2353 RL |
1582 | }, |
1583 | "darwin64-x86_64-cc" => { | |
7ead0c89 | 1584 | inherit_from => [ "darwin-common", asm("x86_64_asm") ], |
8864f0de | 1585 | cflags => add("-arch x86_64 -DL_ENDIAN -Wall"), |
3e9e810f | 1586 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 1587 | perlasm_scheme => "macosx", |
5e1b2353 | 1588 | }, |
7ead0c89 AP |
1589 | |
1590 | #### iPhoneOS/iOS | |
f09e7ca9 RS |
1591 | # |
1592 | # It takes three prior-set environment variables to make it work: | |
1593 | # | |
1594 | # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash] | |
1595 | # CROSS_TOP=/where/SDKs/are | |
1596 | # CROSS_SDK=iPhoneOSx.y.sdk | |
1597 | # | |
1598 | # Exact paths vary with Xcode releases, but for couple of last ones | |
1599 | # they would look like this: | |
1600 | # | |
1601 | # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/ | |
1602 | # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer | |
7ead0c89 | 1603 | # CROSS_SDK=iPhoneOS.sdk |
f09e7ca9 | 1604 | # |
5e1b2353 | 1605 | "iphoneos-cross" => { |
7ead0c89 | 1606 | inherit_from => [ "darwin-common" ], |
8864f0de | 1607 | cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"), |
5e1b2353 | 1608 | sys_id => "iOS", |
5e1b2353 | 1609 | }, |
313e6ec1 AP |
1610 | "ios-cross" => { |
1611 | inherit_from => [ "darwin-common", asm("armv4_asm") ], | |
1612 | # It should be possible to go below iOS 6 and even add -arch armv6, | |
1613 | # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant | |
d11582f1 | 1614 | # at this point. |
8864f0de | 1615 | cflags => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"), |
313e6ec1 AP |
1616 | sys_id => "iOS", |
1617 | perlasm_scheme => "ios32", | |
1618 | }, | |
5e1b2353 | 1619 | "ios64-cross" => { |
7ead0c89 | 1620 | inherit_from => [ "darwin-common", asm("aarch64_asm") ], |
8864f0de | 1621 | cflags => add("-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"), |
5e1b2353 | 1622 | sys_id => "iOS", |
3e9e810f | 1623 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
5e1b2353 | 1624 | perlasm_scheme => "ios64", |
5e1b2353 | 1625 | }, |
f09e7ca9 RS |
1626 | |
1627 | ##### GNU Hurd | |
5e1b2353 | 1628 | "hurd-x86" => { |
d2b2221a | 1629 | inherit_from => [ "BASE_unix" ], |
7ead0c89 | 1630 | inherit_from => [ asm("x86_elf_asm") ], |
5e1b2353 | 1631 | cc => "gcc", |
9c62a279 RL |
1632 | cflags => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall", |
1633 | threads("-pthread")), | |
fcd2ac80 | 1634 | ex_libs => add("-ldl", threads("-pthread")), |
a01dab94 | 1635 | bn_ops => "BN_LLONG", |
9c62a279 | 1636 | thread_scheme => "pthreads", |
5e1b2353 RL |
1637 | dso_scheme => "dlfcn", |
1638 | shared_target => "linux-shared", | |
1639 | shared_cflag => "-fPIC", | |
d4453024 | 1640 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
5e1b2353 | 1641 | }, |
f09e7ca9 | 1642 | |
f09e7ca9 | 1643 | ##### VxWorks for various targets |
5e1b2353 | 1644 | "vxworks-ppc60x" => { |
d2b2221a | 1645 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1646 | cc => "ccppc", |
1647 | cflags => "-D_REENTRANT -mrtp -mhard-float -mstrict-align -fno-implicit-fp -DPPC32_fp60x -O2 -fstrength-reduce -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip", | |
1648 | sys_id => "VXWORKS", | |
47eeaf45 RL |
1649 | lflags => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"), |
1650 | ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"), | |
5e1b2353 RL |
1651 | }, |
1652 | "vxworks-ppcgen" => { | |
d2b2221a | 1653 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1654 | cc => "ccppc", |
1655 | cflags => "-D_REENTRANT -mrtp -msoft-float -mstrict-align -O1 -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip", | |
1656 | sys_id => "VXWORKS", | |
47eeaf45 RL |
1657 | lflags => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"), |
1658 | ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"), | |
5e1b2353 RL |
1659 | }, |
1660 | "vxworks-ppc405" => { | |
d2b2221a | 1661 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1662 | cc => "ccppc", |
1663 | cflags => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h", | |
1664 | sys_id => "VXWORKS", | |
47eeaf45 | 1665 | lflags => add("-r"), |
5e1b2353 RL |
1666 | }, |
1667 | "vxworks-ppc750" => { | |
d2b2221a | 1668 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1669 | cc => "ccppc", |
1670 | cflags => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG)", | |
1671 | sys_id => "VXWORKS", | |
47eeaf45 | 1672 | lflags => add("-r"), |
5e1b2353 RL |
1673 | }, |
1674 | "vxworks-ppc750-debug" => { | |
d2b2221a | 1675 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 1676 | cc => "ccppc", |
463a7b8c | 1677 | cflags => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DPEDANTIC -DDEBUG -g", |
5e1b2353 | 1678 | sys_id => "VXWORKS", |
47eeaf45 | 1679 | lflags => add("-r"), |
5e1b2353 RL |
1680 | }, |
1681 | "vxworks-ppc860" => { | |
d2b2221a | 1682 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1683 | cc => "ccppc", |
1684 | cflags => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h", | |
1685 | sys_id => "VXWORKS", | |
47eeaf45 | 1686 | lflags => add("-r"), |
5e1b2353 RL |
1687 | }, |
1688 | "vxworks-simlinux" => { | |
d2b2221a | 1689 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1690 | cc => "ccpentium", |
1691 | cflags => "-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DL_ENDIAN -DCPU=SIMLINUX -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/h -I\$(WIND_BASE)/target/h/wrn/coreip -DOPENSSL_NO_HW_PADLOCK", | |
1692 | sys_id => "VXWORKS", | |
47eeaf45 | 1693 | lflags => add("-r"), |
5e1b2353 RL |
1694 | ranlib => "ranlibpentium", |
1695 | }, | |
1696 | "vxworks-mips" => { | |
d2b2221a | 1697 | inherit_from => [ "BASE_unix", asm("mips32_asm") ], |
5e1b2353 | 1698 | cc => "ccmips", |
9c62a279 RL |
1699 | cflags => combine("-mrtp -mips2 -O -G 0 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DCPU=MIPS32 -msoft-float -mno-branch-likely -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/h/wrn/coreip", |
1700 | threads("-D_REENTRANT")), | |
5e1b2353 | 1701 | sys_id => "VXWORKS", |
47eeaf45 RL |
1702 | lflags => add("-L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"), |
1703 | ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"), | |
9c62a279 | 1704 | thread_scheme => "pthreads", |
5e1b2353 RL |
1705 | perlasm_scheme => "o32", |
1706 | ranlib => "ranlibmips", | |
1707 | }, | |
f09e7ca9 | 1708 | |
7ead0c89 | 1709 | #### uClinux |
5e1b2353 | 1710 | "uClinux-dist" => { |
d2b2221a | 1711 | inherit_from => [ "BASE_unix" ], |
17f16617 | 1712 | cc => sub { env('CC') }, |
f720194c | 1713 | cflags => combine(threads("-D_REENTRANT")), |
98fdbce0 | 1714 | ex_libs => add("\$(LDLIBS)"), |
5e1b2353 | 1715 | bn_ops => "BN_LLONG", |
9c62a279 | 1716 | thread_scheme => "pthreads", |
17f16617 | 1717 | dso_scheme => sub { env('LIBSSL_dlfcn') }, |
5e1b2353 RL |
1718 | shared_target => "linux-shared", |
1719 | shared_cflag => "-fPIC", | |
d4453024 | 1720 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
17f16617 | 1721 | ranlib => sub { env('RANLIB') }, |
5e1b2353 RL |
1722 | }, |
1723 | "uClinux-dist64" => { | |
d2b2221a | 1724 | inherit_from => [ "BASE_unix" ], |
17f16617 | 1725 | cc => sub { env('CC') }, |
f720194c | 1726 | cflags => combine(threads("-D_REENTRANT")), |
98fdbce0 | 1727 | ex_libs => add("\$(LDLIBS)"), |
5e1b2353 | 1728 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
9c62a279 | 1729 | thread_scheme => "pthreads", |
17f16617 | 1730 | dso_scheme => sub { env('LIBSSL_dlfcn') }, |
5e1b2353 RL |
1731 | shared_target => "linux-shared", |
1732 | shared_cflag => "-fPIC", | |
d4453024 | 1733 | shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", |
17f16617 | 1734 | ranlib => sub { env('RANLIB') }, |
5e1b2353 | 1735 | }, |
f09e7ca9 | 1736 | |
e84193e4 RL |
1737 | ##### VMS |
1738 | "vms-generic" => { | |
d2b2221a | 1739 | inherit_from => [ "BASE_VMS" ], |
e84193e4 RL |
1740 | template => 1, |
1741 | cc => "CC/DECC", | |
4f3015bb | 1742 | cflags => picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL", |
8864f0de RL |
1743 | debug => "/NOOPTIMIZE/DEBUG", |
1744 | release => "/OPTIMIZE/NODEBUG"), | |
1186a2b3 | 1745 | defines => add("OPENSSL_USE_NODELETE"), |
2de2df7f | 1746 | lflags => picker(default => "/MAP='F\$PARSE(\".MAP\",\"\$\@\")'", |
1ae4c07e | 1747 | debug => "/DEBUG/TRACEBACK", |
8864f0de | 1748 | release => "/NODEBUG/NOTRACEBACK"), |
68a39960 | 1749 | lib_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"), |
19eaee74 RL |
1750 | # no_inst_lib_cflags is used instead of lib_cflags by descrip.mms.tmpl |
1751 | # for object files belonging to selected internal libraries | |
1752 | no_inst_lib_cflags => "", | |
e84193e4 | 1753 | shared_target => "vms-shared", |
ac722c9a | 1754 | dso_scheme => "vms", |
9c62a279 | 1755 | thread_scheme => "pthreads", |
e84193e4 | 1756 | |
d602c2b6 | 1757 | apps_aux_src => "vms_decc_init.c vms_term_sock.c", |
e84193e4 RL |
1758 | }, |
1759 | ||
e84193e4 RL |
1760 | "vms-alpha" => { |
1761 | inherit_from => [ "vms-generic" ], | |
0a2629b3 | 1762 | cflags => add(sub { my @warnings = |
0c9b1534 | 1763 | @{vms_info(0)->{disable_warns}}; |
0a2629b3 RL |
1764 | @warnings |
1765 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), | |
62890f47 RL |
1766 | defines => |
1767 | add(sub { | |
0c9b1534 RL |
1768 | return vms_info(0)->{def_zlib} |
1769 | ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : (); | |
62890f47 | 1770 | }), |
0c9b1534 | 1771 | ex_libs => add(sub { return vms_info(0)->{zlib} || (); }), |
7878e536 | 1772 | pointer_size => sub { return vms_info(0)->{pointer_size} }, |
e84193e4 RL |
1773 | #as => "???", |
1774 | #debug_aflags => "/NOOPTIMIZE/DEBUG", | |
1775 | #release_aflags => "/OPTIMIZE/NODEBUG", | |
2b58c83e | 1776 | bn_opts => "SIXTY_FOUR_BIT RC4_INT", |
e84193e4 | 1777 | }, |
52d86d9b | 1778 | "vms-alpha-p32" => { |
0c9b1534 | 1779 | inherit_from => [ "vms-generic" ], |
5fe5bc30 RL |
1780 | cflags => |
1781 | add("/POINTER_SIZE=32", | |
1782 | sub { my @warnings = | |
0c9b1534 | 1783 | @{vms_info(32)->{disable_warns}}; |
5fe5bc30 RL |
1784 | @warnings |
1785 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); | |
1786 | } ), | |
62890f47 RL |
1787 | defines => |
1788 | add(sub { | |
0c9b1534 RL |
1789 | return vms_info(32)->{def_zlib} |
1790 | ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : (); | |
62890f47 | 1791 | }), |
0c9b1534 | 1792 | ex_libs => add(sub { return vms_info(32)->{zlib} || (); }), |
7878e536 | 1793 | pointer_size => sub { return vms_info(32)->{pointer_size} }, |
e84193e4 | 1794 | }, |
52d86d9b | 1795 | "vms-alpha-p64" => { |
0c9b1534 | 1796 | inherit_from => [ "vms-generic" ], |
5fe5bc30 | 1797 | cflags => |
368058d0 | 1798 | add("/POINTER_SIZE=64=ARGV", |
5fe5bc30 | 1799 | sub { my @warnings = |
0c9b1534 | 1800 | @{vms_info(64)->{disable_warns}}; |
5fe5bc30 RL |
1801 | @warnings |
1802 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); | |
1803 | } ), | |
62890f47 RL |
1804 | defines => |
1805 | add(sub { | |
0c9b1534 RL |
1806 | return vms_info(64)->{def_zlib} |
1807 | ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : (); | |
62890f47 | 1808 | }), |
0c9b1534 | 1809 | ex_libs => add(sub { return vms_info(64)->{zlib} || (); }), |
7878e536 | 1810 | pointer_size => sub { return vms_info(64)->{pointer_size} }, |
e84193e4 RL |
1811 | }, |
1812 | "vms-ia64" => { | |
1813 | inherit_from => [ "vms-generic" ], | |
0a2629b3 | 1814 | cflags => add(sub { my @warnings = |
0c9b1534 | 1815 | @{vms_info(0)->{disable_warns}}; |
0a2629b3 RL |
1816 | @warnings |
1817 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), | |
62890f47 RL |
1818 | defines => |
1819 | add(sub { | |
0c9b1534 RL |
1820 | return vms_info(0)->{def_zlib} |
1821 | ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : (); | |
62890f47 | 1822 | }), |
0c9b1534 | 1823 | ex_libs => add(sub { return vms_info(0)->{zlib} || (); }), |
7878e536 | 1824 | pointer_size => sub { return vms_info(0)->{pointer_size} }, |
e84193e4 RL |
1825 | #as => "I4S", |
1826 | #debug_aflags => "/NOOPTIMIZE/DEBUG", | |
1827 | #release_aflags => "/OPTIMIZE/NODEBUG", | |
2b58c83e | 1828 | bn_opts => "SIXTY_FOUR_BIT RC4_INT", |
e84193e4 | 1829 | }, |
52d86d9b | 1830 | "vms-ia64-p32" => { |
0c9b1534 | 1831 | inherit_from => [ "vms-generic" ], |
5fe5bc30 RL |
1832 | cflags => |
1833 | add("/POINTER_SIZE=32", | |
1834 | sub { my @warnings = | |
0c9b1534 | 1835 | @{vms_info(32)->{disable_warns}}; |
5fe5bc30 RL |
1836 | @warnings |
1837 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); | |
1838 | } ), | |
62890f47 RL |
1839 | defines => |
1840 | add(sub { | |
0c9b1534 RL |
1841 | return vms_info(32)->{def_zlib} |
1842 | ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : (); | |
62890f47 | 1843 | }), |
0c9b1534 | 1844 | ex_libs => add(sub { return vms_info(32)->{zlib} || (); }), |
7878e536 | 1845 | pointer_size => sub { return vms_info(32)->{pointer_size} }, |
e84193e4 | 1846 | }, |
52d86d9b | 1847 | "vms-ia64-p64" => { |
0c9b1534 | 1848 | inherit_from => [ "vms-generic" ], |
5fe5bc30 | 1849 | cflags => |
368058d0 | 1850 | add("/POINTER_SIZE=64=ARGV", |
5fe5bc30 | 1851 | sub { my @warnings = |
0c9b1534 | 1852 | @{vms_info(64)->{disable_warns}}; |
5fe5bc30 RL |
1853 | @warnings |
1854 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); | |
1855 | } ), | |
62890f47 RL |
1856 | defines => |
1857 | add(sub { | |
0c9b1534 RL |
1858 | return vms_info(64)->{def_zlib} |
1859 | ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : (); | |
62890f47 | 1860 | }), |
0c9b1534 | 1861 | ex_libs => add(sub { return vms_info(64)->{zlib} || (); }), |
7878e536 | 1862 | pointer_size => sub { return vms_info(64)->{pointer_size} }, |
e84193e4 RL |
1863 | }, |
1864 | ||
f09e7ca9 | 1865 | ); |