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