2 ## Standard openssl configuration targets.
4 # Helper functions for the Windows configs
5 my $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",
11 asflags => "-Ox -f win64 -DNEAR",
13 } elsif ($disabled{asm}) {
14 # assembler is still used to compile uplink shim
15 $vc_win64a_info = { AS => "ml64",
16 ASFLAGS => "/nologo /Zi",
17 asflags => "/c /Cp /Cx",
20 $die->("NASM not found - make sure it's installed and available on %PATH%\n");
21 $vc_win64a_info = { AS => "{unknown}",
27 return $vc_win64a_info;
30 my $vc_win32_info = {};
32 unless (%$vc_win32_info) {
33 my $ver=`nasm -v 2>NUL`;
34 my $vew=`nasmw -v 2>NUL`;
35 if ($ver ne "" || $vew ne "") {
36 $vc_win32_info = { AS => $ver ge $vew ? "nasm" : "nasmw",
38 asflags => "-f win32",
40 perlasm_scheme => "win32n" };
41 } elsif ($disabled{asm}) {
42 # not actually used, uplink shim is inlined into C code
43 $vc_win32_info = { AS => "ml",
44 ASFLAGS => "/nologo /Zi",
45 asflags => "/Cp /coff /c /Cx",
47 perlasm_scheme => "win32" };
49 $die->("NASM not found - make sure it's installed and available on %PATH%\n");
50 $vc_win32_info = { AS => "{unknown}",
54 perlasm_scheme => "win32" };
57 return $vc_win32_info;
60 my $vc_wince_info = {};
62 unless (%$vc_wince_info) {
64 $die->('%OSVERSION% is not defined') if (!defined(env('OSVERSION')));
65 $die->('%PLATFORM% is not defined') if (!defined(env('PLATFORM')));
66 $die->('%TARGETCPU% is not defined') if (!defined(env('TARGETCPU')));
69 # Idea behind this is to mimic flags set by eVC++ IDE...
71 my $wcevers = env('OSVERSION'); # WCENNN
74 if ($wcevers =~ /^WCE([1-9])([0-9]{2})$/) {
76 $wceverdotnum = "$1.$2";
78 $die->('%OSVERSION% value is insane');
79 $wcevernum = "{unknown}";
80 $wceverdotnum = "{unknown}";
82 my $wcecdefs = "-D_WIN32_WCE=$wcevernum -DUNDER_CE=$wcevernum"; # -D_WIN32_WCE=NNN
83 my $wcelflag = "/subsystem:windowsce,$wceverdotnum"; # ...,N.NN
85 my $wceplatf = env('PLATFORM');
87 $wceplatf =~ tr/a-z0-9 /A-Z0-9_/;
88 $wcecdefs .= " -DWCE_PLATFORM_$wceplatf";
90 my $wcetgt = env('TARGETCPU'); # just shorter name...
91 SWITCH: for($wcetgt) {
92 /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_";
93 $wcelflag.=" /machine:X86"; last; };
94 /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
95 $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/);
96 $wcecdefs.=" -QRarch4T -QRinterwork-return";
97 $wcelflag.=" /machine:THUMB"; last; };
98 /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
99 $wcelflag.=" /machine:ARM"; last; };
100 /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
101 $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32";
102 $wcelflag.=" /machine:MIPSFPU"; last; };
103 /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
104 $wcecdefs.=" -DMIPSII -QMmips16";
105 $wcelflag.=" /machine:MIPS16"; last; };
106 /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
107 $wcecdefs.=" -QMmips2";
108 $wcelflag.=" /machine:MIPS"; last; };
109 /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000";
110 $wcelflag.=" /machine:MIPS"; last; };
111 /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx";
112 $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/);
113 $wcelflag.=" /machine:$wcetgt"; last; };
114 { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_";
115 $wcelflag.=" /machine:$wcetgt"; last; };
118 $vc_wince_info = { cppflags => $wcecdefs,
119 lflags => $wcelflag };
121 return $vc_wince_info;
124 # Helper functions for the VMS configs
127 my $pointer_size_str = $config{target} =~ m|-p(\d+)$| ? $1 : "";
129 # For the case where Configure iterate through all config targets, such
130 # as when listing them and their details, we reset info if the pointer
132 if (%$vms_info && $vms_info->{pointer_size} ne $pointer_size_str) {
136 unless (%$vms_info) {
137 $vms_info->{disable_warns} = [ ];
138 $vms_info->{pointer_size} = $pointer_size_str;
139 if ($pointer_size_str eq "64") {
140 `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;
142 push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3";
146 unless ($disabled{zlib}) {
147 my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str;
148 if (defined($disabled{"zlib-dynamic"})) {
149 $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE";
151 $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib;
152 # In case the --with-zlib-lib value contains something like
153 # /SHARE or /LIB or so at the end, remove it.
154 $vms_info->{def_zlib} =~ s|/.*$||g;
158 if ($config{target} =~ /-ia64/) {
159 `PIPE ias -H 2> NL:`;
161 $vms_info->{AS} = "ias";
162 $vms_info->{ASFLAGS} = '-d debug';
163 $vms_info->{asflags} = '"-N" vms_upcase';
164 $vms_info->{asoutflag} = "-o ";
165 $vms_info->{perlasm_scheme} = "ias";
174 #### Basic configs that should work on any 32-bit box
176 inherit_from => [ "BASE_unix" ],
178 CFLAGS => picker(debug => "-O0 -g",
180 thread_scheme => "(unknown)",
181 bn_ops => "BN_LLONG",
184 inherit_from => [ "BASE_unix" ],
187 thread_scheme => "(unknown)",
190 #### VOS Configurations
192 inherit_from => [ "BASE_unix" ],
194 CFLAGS => picker(default => "-Wall",
197 cppflags => "-D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES",
198 lib_cppflags => "-DB_ENDIAN",
199 thread_scheme => "(unknown)",
201 lflags => add("-Wl,-map"),
202 bn_ops => "BN_LLONG",
203 shared_extension => ".so",
206 #### Solaris configurations
207 "solaris-common" => {
208 inherit_from => [ "BASE_unix" ],
210 lib_cppflags => "-DFILIO_H",
211 ex_libs => add("-lsocket -lnsl -ldl"),
212 dso_scheme => "dlfcn",
213 thread_scheme => "pthreads",
214 shared_target => "self",
215 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
216 shared_ldflag => "-Wl,-Bsymbolic",
217 shared_defflag => "-Wl,-M,",
218 shared_sonameflag=> "-Wl,-h,",
220 #### Solaris x86 with GNU C setups
221 "solaris-x86-gcc" => {
222 # NB. GNU C has to be configured to use GNU assembler, and not
223 # /usr/ccs/bin/as. Failure to comply will result in compile
224 # failures [at least] in 32-bit build.
225 inherit_from => [ "solaris-common", asm("x86_elf_asm") ],
227 CFLAGS => add_before(picker(default => "-Wall",
229 release => "-O3 -fomit-frame-pointer")),
230 cflags => add(threads("-pthread")),
231 lib_cppflags => add("-DL_ENDIAN"),
232 ex_libs => add(threads("-pthread")),
233 bn_ops => "BN_LLONG",
234 shared_cflag => "-fPIC",
235 shared_ldflag => add_before("-shared -static-libgcc"),
237 "solaris64-x86_64-gcc" => {
238 # -shared -static-libgcc might appear controversial, but modules
239 # taken from static libgcc do not have relocations and linking
240 # them into our shared objects doesn't have any negative side
241 # effects. On the contrary, doing so makes it possible to use
242 # gcc shared build with Sun C. Given that gcc generates faster
243 # code [thanks to inline assembler], I would actually recommend
244 # to consider using gcc shared build even with vendor compiler:-)
245 # -- <appro@openssl.org>
246 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
248 CFLAGS => add_before(picker(default => "-Wall",
251 cflags => add_before("-m64", threads("-pthread")),
252 lib_cppflags => add("-DL_ENDIAN"),
253 ex_libs => add(threads("-pthread")),
254 bn_ops => "SIXTY_FOUR_BIT_LONG",
255 perlasm_scheme => "elf",
256 shared_cflag => "-fPIC",
257 shared_ldflag => add_before("-shared -static-libgcc"),
261 #### Solaris x86 with Sun C setups
262 # There used to be solaris-x86-cc target, but it was removed,
263 # primarily because vendor assembler can't assemble our modules
264 # with -KPIC flag. As result it, assembly support, was not even
265 # available as option. But its lack means lack of side-channel
266 # resistant code, which is incompatible with security by todays
267 # standards. Fortunately gcc is readily available prepackaged
268 # option, which we can firmly point at...
270 # On related note, solaris64-x86_64-cc target won't compile code
271 # paths utilizing AVX and post-Haswell instruction extensions.
272 # Consider switching to solaris64-x86_64-gcc even here...
274 "solaris64-x86_64-cc" => {
275 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
277 CFLAGS => add_before(picker(debug => "-g",
278 release => "-xO5 -xdepend -xbuiltin")),
279 cflags => add_before("-xarch=generic64 -xstrconst -Xa"),
280 cppflags => add(threads("-D_REENTRANT")),
281 lib_cppflags => add("-DL_ENDIAN"),
282 thread_scheme => "pthreads",
283 lflags => add(threads("-mt")),
284 ex_libs => add(threads("-lpthread")),
285 bn_ops => "SIXTY_FOUR_BIT_LONG",
286 perlasm_scheme => "elf",
287 shared_cflag => "-KPIC",
288 shared_ldflag => add_before("-G -dy -z text"),
292 #### SPARC Solaris with GNU C setups
293 "solaris-sparcv7-gcc" => {
294 inherit_from => [ "solaris-common" ],
296 CFLAGS => add_before(picker(default => "-Wall",
299 cflags => add(threads("-pthread")),
300 lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
301 ex_libs => add(threads("-pthread")),
302 bn_ops => "BN_LLONG RC4_CHAR",
303 shared_cflag => "-fPIC",
304 shared_ldflag => add_before("-shared"),
306 "solaris-sparcv8-gcc" => {
307 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
308 cflags => add_before("-mcpu=v8"),
310 "solaris-sparcv9-gcc" => {
311 # -m32 should be safe to add as long as driver recognizes
313 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
314 cflags => add_before("-m32 -mcpu=ultrasparc"),
316 "solaris64-sparcv9-gcc" => {
317 inherit_from => [ "solaris-sparcv9-gcc" ],
318 cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
319 bn_ops => "BN_LLONG RC4_CHAR",
323 #### SPARC Solaris with Sun C setups
324 # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
325 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
326 # SC5.0 note: Compiler common patch 107357-01 or later is required!
327 "solaris-sparcv7-cc" => {
328 inherit_from => [ "solaris-common" ],
330 CFLAGS => add_before(picker(debug => "-g",
331 release => "-xO5 -xdepend")),
332 cflags => add_before("-xstrconst -Xa"),
333 cppflags => add(threads("-D_REENTRANT")),
334 lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
335 lflags => add(threads("-mt")),
336 ex_libs => add(threads("-lpthread")),
337 bn_ops => "BN_LLONG RC4_CHAR",
338 shared_cflag => "-KPIC",
339 shared_ldflag => add_before("-G -dy -z text"),
342 "solaris-sparcv8-cc" => {
343 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
344 cflags => add_before("-xarch=v8"),
346 "solaris-sparcv9-cc" => {
347 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
348 cflags => add_before("-xarch=v8plus"),
350 "solaris64-sparcv9-cc" => {
351 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
352 cflags => add_before("-xarch=v9"),
353 bn_ops => "BN_LLONG RC4_CHAR",
357 #### IRIX 6.x configs
358 # Only N32 and N64 ABIs are supported.
360 inherit_from => [ "BASE_unix" ],
362 cppflags => threads("-D_SGI_MP_SOURCE"),
363 lib_cppflags => "-DB_ENDIAN",
364 ex_libs => add(threads("-lpthread")),
365 thread_scheme => "pthreads",
366 dso_scheme => "dlfcn",
367 shared_target => "self",
368 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
369 shared_ldflag => "-shared -Wl,-Bsymbolic",
370 shared_sonameflag=> "-Wl,-soname,",
372 "irix-mips3-gcc" => {
373 inherit_from => [ "irix-common", asm("mips64_asm") ],
375 CFLAGS => picker(debug => "-g -O0",
377 LDFLAGS => "-static-libgcc",
378 cflags => "-mabi=n32",
379 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
380 perlasm_scheme => "n32",
384 inherit_from => [ "irix-common", asm("mips64_asm") ],
386 CFLAGS => picker(debug => "-g -O0",
388 cflags => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared",
389 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
390 perlasm_scheme => "n32",
394 "irix64-mips4-gcc" => {
395 inherit_from => [ "irix-common", asm("mips64_asm") ],
397 CFLAGS => picker(debug => "-g -O0",
399 LDFLAGS => "-static-libgcc",
400 cflags => "-mabi=64 -mips4",
401 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
402 perlasm_scheme => "64",
405 "irix64-mips4-cc" => {
406 inherit_from => [ "irix-common", asm("mips64_asm") ],
408 CFLAGS => picker(debug => "-g -O0",
410 cflags => "-64 -mips4 -use_readonly_const -G0 -rdata_shared",
411 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
412 perlasm_scheme => "64",
416 #### Unified HP-UX ANSI C configs.
418 # - Originally we were optimizing at +O4 level. It should be noted
419 # that the only difference between +O3 and +O4 is global inter-
420 # procedural analysis. As it has to be performed during the link
421 # stage the compiler leaves behind certain pseudo-code in lib*.a
422 # which might be release or even patch level specific. Generating
423 # the machine code for and analyzing the *whole* program appears
424 # to be *extremely* memory demanding while the performance gain is
425 # actually questionable. The situation is intensified by the default
426 # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
427 # which is way too low for +O4. In other words, doesn't +O3 make
429 # - Keep in mind that the HP compiler by default generates code
430 # suitable for execution on the host you're currently compiling at.
431 # If the toolkit is meant to be used on various PA-RISC processors
432 # consider './Configure hpux-parisc-[g]cc +DAportable'.
433 # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
434 # 32-bit message digests. (For the moment of this writing) HP C
435 # doesn't seem to "digest" too many local variables (they make "him"
436 # chew forever:-). For more details look-up MD32_XARRAY comment in
437 # crypto/sha/sha_lcl.h.
438 # - originally there were 32-bit hpux-parisc2-* targets. They were
439 # scrapped, because a) they were not interchangeable with other 32-bit
440 # targets; b) performance-critical 32-bit assembly modules implement
441 # even PA-RISC 2.0-specific code paths, which are chosen at run-time,
442 # thus adequate performance is provided even with PA-RISC 1.1 build.
444 inherit_from => [ "BASE_unix" ],
446 defines => add("_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED",
447 "_HPUX_ALT_XOPEN_SOCKET_API"),
448 lib_cppflags => "-DB_ENDIAN",
449 thread_scheme => "pthreads",
450 dso_scheme => "dlfcn", # overridden in 32-bit PA-RISC builds
451 shared_target => "self",
452 bin_lflags => "-Wl,+s,+cdp,../:,+cdp,./:",
453 shared_ldflag => "-Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:",
454 shared_sonameflag=> "-Wl,+h,",
456 "hpux-parisc-gcc" => {
457 inherit_from => [ "hpux-common" ],
459 CFLAGS => picker(debug => "-O0 -g",
461 cflags => add(threads("-pthread")),
462 lib_cppflags => add("-DBN_DIV2W"),
463 ex_libs => add("-ldld", threads("-pthread")),
464 bn_ops => "BN_LLONG RC4_CHAR",
466 shared_cflag => "-fPIC",
467 shared_ldflag => add_before("-shared"),
468 shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
470 "hpux-parisc1_1-gcc" => {
471 inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ],
472 multilib => "/pa1.1",
474 "hpux64-parisc2-gcc" => {
475 inherit_from => [ "hpux-common", asm("parisc20_64_asm") ],
477 CFLAGS => combine(picker(debug => "-O0 -g",
479 cflags => add(threads("-pthread")),
480 ex_libs => add("-ldl", threads("-pthread")),
481 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
482 shared_cflag => "-fpic",
483 shared_ldflag => add_before("-shared"),
484 shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
485 multilib => "/pa20_64",
488 # More attempts at unified 10.X and 11.X targets for HP C compiler.
489 "hpux-parisc-cc" => {
490 inherit_from => [ "hpux-common" ],
492 CFLAGS => picker(debug => "+O0 +d -g",
494 cflags => "+Optrs_strongly_typed -Ae +ESlit",
495 cppflags => threads("-D_REENTRANT"),
496 lib_cppflags => add("-DBN_DIV2W -DMD32_XARRAY"),
497 ex_libs => add("-ldld", threads("-lpthread")),
498 bn_ops => "RC4_CHAR",
500 shared_cflag => "+Z",
501 shared_ldflag => add_before("-b"),
502 shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
504 "hpux-parisc1_1-cc" => {
505 inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ],
506 cflags => add_before("+DA1.1"),
507 multilib => "/pa1.1",
509 "hpux64-parisc2-cc" => {
510 inherit_from => [ "hpux-common", asm("parisc20_64_asm") ],
512 CFLAGS => picker(debug => "+O0 +d -g",
514 cflags => "+DD64 +Optrs_strongly_typed -Ae +ESlit",
515 cppflags => threads("-D_REENTRANT") ,
516 lib_cppflags => add("-DMD32_XARRAY"),
517 ex_libs => add("-ldl", threads("-lpthread")),
518 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
519 shared_cflag => "+Z",
520 shared_ldflag => add_before("-b"),
521 shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
522 multilib => "/pa20_64",
525 # HP/UX IA-64 targets
527 inherit_from => [ "hpux-common", asm("ia64_asm") ],
529 CFLAGS => picker(debug => "+O0 +d -g",
531 cflags => "-Ae +DD32 +Olit=all -z",
532 cppflags => add(threads("-D_REENTRANT")),
533 ex_libs => add("-ldl", threads("-lpthread")),
534 bn_ops => "SIXTY_FOUR_BIT",
535 shared_cflag => "+Z",
536 shared_ldflag => add_before("-b"),
537 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
538 multilib => "/hpux32",
540 "hpux64-ia64-cc" => {
541 inherit_from => [ "hpux-common", asm("ia64_asm") ],
543 CFLAGS => picker(debug => "+O0 +d -g",
545 cflags => "-Ae +DD64 +Olit=all -z",
546 cppflags => threads("-D_REENTRANT"),
547 ex_libs => add("-ldl", threads("-lpthread")),
548 bn_ops => "SIXTY_FOUR_BIT_LONG",
549 shared_cflag => "+Z",
550 shared_ldflag => add_before("-b"),
551 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
552 multilib => "/hpux64",
556 inherit_from => [ "hpux-common", asm("ia64_asm") ],
558 CFLAGS => picker(debug => "-O0 -g",
560 cflags => add(threads("-pthread")),
561 ex_libs => add("-ldl", threads("-pthread")),
562 bn_ops => "SIXTY_FOUR_BIT",
563 shared_cflag => "-fpic",
564 shared_ldflag => add_before("-shared"),
565 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
566 multilib => "/hpux32",
568 "hpux64-ia64-gcc" => {
569 inherit_from => [ "hpux-common", asm("ia64_asm") ],
571 CFLAGS => picker(debug => "-O0 -g",
573 cflags => combine("-mlp64", threads("-pthread")),
574 ex_libs => add("-ldl", threads("-pthread")),
575 bn_ops => "SIXTY_FOUR_BIT_LONG",
576 shared_cflag => "-fpic",
577 shared_ldflag => add_before("-shared"),
578 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
579 multilib => "/hpux64",
582 #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
584 inherit_from => [ "BASE_unix" ],
587 cppflags => "-D_POSIX_SOURCE -D_SOCKET_SOURCE",
588 includes => [ "/SYSLOG/PUB" ],
589 lib_cppflags => "-DBN_DIV2W",
591 lflags => add("-L/SYSLOG/PUB"),
592 ex_libs => add("-lsyslog -lsocket -lcurses"),
593 thread_scheme => "(unknown)",
594 bn_ops => "BN_LLONG",
597 #### DEC Alpha Tru64 targets. Tru64 is marketing name for OSF/1 version 4
598 #### and forward. In reality 'uname -s' still returns "OSF1". Originally
599 #### there were even osf1-* configs targeting prior versions provided,
600 #### but not anymore...
601 "tru64-alpha-gcc" => {
602 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
605 cflags => add("-std=c9x", threads("-pthread")),
606 cppflags => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE",
607 ex_libs => add("-lrt", threads("-pthread")), # for mlock(2)
608 bn_ops => "SIXTY_FOUR_BIT_LONG",
609 thread_scheme => "pthreads",
610 dso_scheme => "dlfcn",
611 shared_target => "alpha-osf1-shared",
612 shared_extension => ".so",
614 "tru64-alpha-cc" => {
615 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
617 CFLAGS => "-tune host -fast",
618 cflags => add("-std1 -readonly_strings",
619 threads("-pthread")),
620 cppflags => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE",
621 ex_libs => add("-lrt", threads("-pthread")), # for mlock(2)
622 bn_ops => "SIXTY_FOUR_BIT_LONG",
623 thread_scheme => "pthreads",
624 dso_scheme => "dlfcn",
625 shared_target => "alpha-osf1-shared",
626 shared_ldflag => "-msym",
627 shared_extension => ".so",
631 #### Variety of LINUX:-)
633 # *-generic* is endian-neutral target, but ./config is free to
634 # throw in -D[BL]_ENDIAN, whichever appropriate...
635 "linux-generic32" => {
636 inherit_from => [ "BASE_unix" ],
639 CFLAGS => picker(default => "-Wall",
642 CXXFLAGS => picker(default => "-Wall",
645 cflags => threads("-pthread"),
646 cxxflags => combine("-std=c++11", threads("-pthread")),
647 lib_cppflags => "-DOPENSSL_USE_NODELETE",
648 ex_libs => add("-ldl", threads("-pthread")),
649 bn_ops => "BN_LLONG RC4_CHAR",
650 thread_scheme => "pthreads",
651 dso_scheme => "dlfcn",
652 shared_target => "linux-shared",
653 shared_cflag => "-fPIC",
654 shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" },
655 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
656 enable => [ "afalgeng" ],
658 "linux-generic64" => {
659 inherit_from => [ "linux-generic32" ],
660 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
664 inherit_from => [ "linux-generic32", asm("ppc32_asm") ],
665 perlasm_scheme => "linux32",
668 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
669 cflags => add("-m64"),
670 cxxflags => add("-m64"),
671 lib_cppflags => add("-DB_ENDIAN"),
672 perlasm_scheme => "linux64",
676 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
677 cflags => add("-m64"),
678 cxxflags => add("-m64"),
679 lib_cppflags => add("-DL_ENDIAN"),
680 perlasm_scheme => "linux64le",
684 ################################################################
685 # Note that -march is not among compiler options in linux-armv4
686 # target description. Not specifying one is intentional to give
689 # a) rely on your compiler default by not specifying one;
690 # b) specify your target platform explicitly for optimal
691 # performance, e.g. -march=armv6 or -march=armv7-a;
692 # c) build "universal" binary that targets *range* of platforms
693 # by specifying minimum and maximum supported architecture;
695 # As for c) option. It actually makes no sense to specify
696 # maximum to be less than ARMv7, because it's the least
697 # requirement for run-time switch between platform-specific
698 # code paths. And without run-time switch performance would be
699 # equivalent to one for minimum. Secondly, there are some
700 # natural limitations that you'd have to accept and respect.
701 # Most notably you can *not* build "universal" binary for
702 # big-endian platform. This is because ARMv7 processor always
703 # picks instructions in little-endian order. Another similar
704 # limitation is that -mthumb can't "cross" -march=armv6t2
705 # boundary, because that's where it became Thumb-2. Well, this
706 # limitation is a bit artificial, because it's not really
707 # impossible, but it's deemed too tricky to support. And of
708 # course you have to be sure that your binutils are actually
709 # up to the task of handling maximum target platform. With all
710 # this in mind here is an example of how to configure
713 # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
715 inherit_from => [ "linux-generic32", asm("armv4_asm") ],
716 perlasm_scheme => "linux32",
719 inherit_from => [ "linux-generic64", asm("aarch64_asm") ],
720 perlasm_scheme => "linux64",
722 "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32
723 inherit_from => [ "linux-generic32", asm("aarch64_asm") ],
724 cflags => add("-mabi=ilp32"),
725 cxxflags => add("-mabi=ilp32"),
726 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
727 perlasm_scheme => "linux64",
731 # Configure script adds minimally required -march for assembly
732 # support, if no -march was specified at command line.
733 inherit_from => [ "linux-generic32", asm("mips32_asm") ],
734 cflags => add("-mabi=32"),
735 cxxflags => add("-mabi=32"),
736 perlasm_scheme => "o32",
738 # mips32 and mips64 below refer to contemporary MIPS Architecture
739 # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
741 inherit_from => [ "linux-generic32", asm("mips64_asm") ],
742 cflags => add("-mabi=n32"),
743 cxxflags => add("-mabi=n32"),
744 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
745 perlasm_scheme => "n32",
748 "linux64-mips64" => {
749 inherit_from => [ "linux-generic64", asm("mips64_asm") ],
750 cflags => add("-mabi=64"),
751 cxxflags => add("-mabi=64"),
752 perlasm_scheme => "64",
756 #### IA-32 targets...
757 #### These two targets are a bit aged and are to be used on older Linux
758 #### machines where gcc doesn't understand -m32 and -m64
760 inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
761 CFLAGS => add(picker(release => "-fomit-frame-pointer")),
762 lib_cppflags => add("-DL_ENDIAN"),
763 bn_ops => "BN_LLONG",
766 inherit_from => [ "BASE_unix", asm("x86_asm") ],
768 CFLAGS => add(picker(default => "-Wall",
770 release => "-O3 -fomit-frame-pointer")),
771 lib_cppflags => add("-DL_ENDIAN"),
772 bn_ops => "BN_LLONG",
773 thread_scheme => "(unknown)",
774 perlasm_scheme => "a.out",
777 #### X86 / X86_64 targets
779 inherit_from => [ "linux-generic32", asm("x86_asm") ],
780 CFLAGS => add(picker(release => "-fomit-frame-pointer")),
781 cflags => add("-m32"),
782 cxxflags => add("-m32"),
783 lib_cppflags => add("-DL_ENDIAN"),
784 bn_ops => "BN_LLONG",
785 perlasm_scheme => "elf",
787 "linux-x86-clang" => {
788 inherit_from => [ "linux-x86" ],
793 inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
794 cflags => add("-m64"),
795 cxxflags => add("-m64"),
796 lib_cppflags => add("-DL_ENDIAN"),
797 bn_ops => "SIXTY_FOUR_BIT_LONG",
798 perlasm_scheme => "elf",
801 "linux-x86_64-clang" => {
802 inherit_from => [ "linux-x86_64" ],
807 inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
808 cflags => add("-mx32"),
809 cxxflags => add("-mx32"),
810 lib_cppflags => add("-DL_ENDIAN"),
811 bn_ops => "SIXTY_FOUR_BIT",
812 perlasm_scheme => "elf32",
817 inherit_from => [ "linux-generic64", asm("ia64_asm") ],
818 bn_ops => "SIXTY_FOUR_BIT_LONG",
822 inherit_from => [ "linux-generic64", asm("s390x_asm") ],
823 cflags => add("-m64"),
824 cxxflags => add("-m64"),
825 lib_cppflags => add("-DB_ENDIAN"),
826 perlasm_scheme => "64",
830 #### So called "highgprs" target for z/Architecture CPUs
831 # "Highgprs" is kernel feature first implemented in Linux
832 # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
833 # significant bits of general purpose registers not only
834 # upon 32-bit process context switch, but even on
835 # asynchronous signal delivery to such process. This makes
836 # it possible to deploy 64-bit instructions even in legacy
837 # application context and achieve better [or should we say
838 # adequate] performance. The build is binary compatible with
839 # linux-generic32, and the idea is to be able to install the
840 # resulting libcrypto.so alongside generic one, e.g. as
841 # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
842 # linker to autodiscover. Unfortunately it doesn't work just
843 # yet, because of couple of bugs in glibc
844 # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
846 inherit_from => [ "linux-generic32", asm("s390x_asm") ],
847 cflags => add("-m31 -Wa,-mzarch"),
848 cxxflags => add("-m31 -Wa,-mzarch"),
849 lib_cppflags => add("-DB_ENDIAN"),
850 bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; },
851 perlasm_scheme => "31",
852 multilib => "/highgprs",
855 #### SPARC Linux setups
857 inherit_from => [ "linux-generic32", asm("sparcv8_asm") ],
858 cflags => add("-mcpu=v8"),
859 cxxflags => add("-mcpu=v8"),
860 lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
863 # it's a real mess with -mcpu=ultrasparc option under Linux,
864 # but -Wa,-Av8plus should do the trick no matter what.
865 inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
866 cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"),
867 cxxflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"),
868 lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
870 "linux64-sparcv9" => {
871 # GCC 3.1 is a requirement
872 inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
873 cflags => add("-m64 -mcpu=ultrasparc"),
874 cxxflags => add("-m64 -mcpu=ultrasparc"),
875 lib_cppflags => add("-DB_ENDIAN"),
876 bn_ops => "BN_LLONG RC4_CHAR",
880 "linux-alpha-gcc" => {
881 inherit_from => [ "linux-generic64", asm("alpha_asm") ],
882 lib_cppflags => add("-DL_ENDIAN"),
883 bn_ops => "SIXTY_FOUR_BIT_LONG",
885 "linux-c64xplus" => {
886 inherit_from => [ "BASE_unix" ],
887 # TI_CGT_C6000_7.3.x is a requirement
889 CFLAGS => "-o2 -ox -ms",
890 cflags => "--linux -ea=.s -eo=.o -mv6400+ -pden",
891 cxxflags => "--linux -ea=.s -eo=.o -mv6400+ -pden",
892 cppflags => combine("-DOPENSSL_SMALL_FOOTPRINT",
893 threads("-D_REENTRANT")),
894 bn_ops => "BN_LLONG",
895 cpuid_asm_src => "c64xpluscpuid.s",
896 bn_asm_src => "asm/bn-c64xplus.asm c64xplus-gf2m.s",
897 aes_asm_src => "aes-c64xplus.s aes_cbc.c aes-ctr.fake",
898 sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s",
899 rc4_asm_src => "rc4-c64xplus.s",
900 modes_asm_src => "ghash-c64xplus.s",
901 chacha_asm_src => "chacha-c64xplus.s",
902 poly1305_asm_src => "poly1305-c64xplus.s",
903 thread_scheme => "pthreads",
904 perlasm_scheme => "void",
905 dso_scheme => "dlfcn",
906 shared_target => "linux-shared",
907 shared_cflag => "--pic",
908 shared_ldflag => add("-z --sysv --shared"),
909 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
915 # As for thread cflag. Idea is to maintain "collective" set of
916 # flags, which would cover all BSD flavors. -pthread applies
917 # to them all, but is treated differently. OpenBSD expands is
918 # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
919 # expands it as -lc_r, which has to be accompanied by explicit
920 # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
921 # expands it as -lc_r, which seems to be sufficient?
922 inherit_from => [ "BASE_unix" ],
924 CFLAGS => picker(default => "-Wall",
927 cflags => threads("-pthread"),
928 cppflags => threads("-D_THREAD_SAFE -D_REENTRANT"),
929 ex_libs => add(threads("-pthread")),
930 enable => add("devcryptoeng"),
931 bn_ops => "BN_LLONG",
932 thread_scheme => "pthreads",
933 dso_scheme => "dlfcn",
934 shared_target => "bsd-gcc-shared",
935 shared_cflag => "-fPIC",
936 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
939 inherit_from => [ "BSD-generic32" ],
940 bn_ops => "SIXTY_FOUR_BIT_LONG",
944 inherit_from => [ "BSD-generic32", asm("x86_asm") ],
945 CFLAGS => add(picker(release => "-fomit-frame-pointer")),
946 lib_cppflags => add("-DL_ENDIAN"),
947 bn_ops => "BN_LLONG",
948 shared_target => "bsd-shared",
949 perlasm_scheme => "a.out",
952 inherit_from => [ "BSD-x86" ],
953 perlasm_scheme => "elf",
957 inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ],
958 cflags => add("-mcpu=v8"),
959 lib_cppflags => add("-DB_ENDIAN"),
962 # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
963 # simply *happens* to work around a compiler bug in gcc 3.3.3,
964 # triggered by RIPEMD160 code.
965 inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ],
966 lib_cppflags => add("-DB_ENDIAN -DMD32_REG_T=int"),
967 bn_ops => "BN_LLONG",
971 inherit_from => [ "BSD-generic64", asm("ia64_asm") ],
972 lib_cppflags => add("-DL_ENDIAN"),
973 bn_ops => "SIXTY_FOUR_BIT_LONG",
977 inherit_from => [ "BSD-generic64", asm("x86_64_asm") ],
978 lib_cppflags => add("-DL_ENDIAN"),
979 bn_ops => "SIXTY_FOUR_BIT_LONG",
980 perlasm_scheme => "elf",
984 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
986 CFLAGS => "-fomit-frame-pointer -O3 -Wall",
987 lib_cppflags => "-DPERL5 -DL_ENDIAN",
988 ex_libs => add("-ldl"),
989 bn_ops => "BN_LLONG",
990 thread_scheme => "(unknown)",
991 dso_scheme => "dlfcn",
992 shared_target => "bsd-gcc-shared",
993 shared_cflag => "-fPIC",
994 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
998 inherit_from => [ "BASE_unix" ],
1000 CFLAGS => "-O -Wall",
1001 unistd => "<libc.h>",
1002 bn_ops => "BN_LLONG",
1003 thread_scheme => "(unknown)",
1006 inherit_from => [ "BASE_unix" ],
1008 CFLAGS => "-O3 -Wall",
1009 unistd => "<libc.h>",
1010 bn_ops => "BN_LLONG",
1011 thread_scheme => "(unknown)",
1014 #### SCO/Caldera targets.
1016 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
1017 # Now we only have blended unixware-* as it's the only one used by ./config.
1018 # If you want to optimize for particular microarchitecture, bypass ./config
1019 # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
1020 # Note that not all targets include assembler support. Mostly because of
1021 # lack of motivation to support out-of-date platforms with out-of-date
1022 # compiler drivers and assemblers.
1024 # UnixWare 2.0x fails destest with -O.
1026 inherit_from => [ "BASE_unix" ],
1028 cflags => threads("-Kthread"),
1029 lib_cppflags => "-DFILIO_H -DNO_STRINGS_H",
1030 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1031 thread_scheme => "uithreads",
1034 inherit_from => [ "BASE_unix" ],
1037 cflags => threads("-Kthread"),
1038 lib_cppflags => "-DFILIO_H",
1039 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1040 thread_scheme => "uithreads",
1043 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1046 cflags => combine("-Kalloca", threads("-Kthread")),
1047 lib_cppflags => "-DFILIO_H",
1048 ex_libs => add("-lsocket -lnsl"),
1049 thread_scheme => "uithreads",
1050 bn_ops => "BN_LLONG",
1051 perlasm_scheme => "elf-1",
1052 dso_scheme => "dlfcn",
1053 shared_target => "svr5-shared",
1054 shared_cflag => "-Kpic",
1055 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1057 "unixware-7-gcc" => {
1058 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1060 CFLAGS => "-O3 -fomit-frame-pointer -Wall",
1061 cppflags => add(threads("-D_REENTRANT")),
1062 lib_cppflags => add("-DL_ENDIAN -DFILIO_H"),
1063 ex_libs => add("-lsocket -lnsl"),
1064 bn_ops => "BN_LLONG",
1065 thread_scheme => "pthreads",
1066 perlasm_scheme => "elf-1",
1067 dso_scheme => "dlfcn",
1068 shared_target => "gnu-shared",
1069 shared_cflag => "-fPIC",
1070 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1072 # SCO 5 - Ben Laurie says the -O breaks the SCO cc.
1074 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1077 ex_libs => add("-lsocket -lnsl"),
1078 thread_scheme => "(unknown)",
1079 perlasm_scheme => "elf-1",
1080 dso_scheme => "dlfcn",
1081 shared_target => "svr3-shared",
1082 shared_cflag => "-Kpic",
1083 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1086 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1088 cflags => "-O3 -fomit-frame-pointer",
1089 ex_libs => add("-lsocket -lnsl"),
1090 bn_ops => "BN_LLONG",
1091 thread_scheme => "(unknown)",
1092 perlasm_scheme => "elf-1",
1093 dso_scheme => "dlfcn",
1094 shared_target => "svr3-shared",
1095 shared_cflag => "-fPIC",
1096 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1100 # Below targets assume AIX >=5. Caveat lector. If you are accustomed
1101 # to control compilation "bitness" by setting $OBJECT_MODE environment
1102 # variable, then you should know that in OpenSSL case it's considered
1103 # only in ./config. Once configured, build procedure remains "deaf" to
1104 # current value of $OBJECT_MODE.
1106 inherit_from => [ "BASE_unix" ],
1109 lib_cppflags => "-DB_ENDIAN",
1110 lflags => "-Wl,-bsvr4",
1111 thread_scheme => "pthreads",
1112 dso_scheme => "dlfcn",
1113 shared_target => "self",
1114 module_ldflags => "-Wl,-G,-bsymbolic,-bnoentry",
1115 shared_ldflag => "-Wl,-G,-bsymbolic,-bnoentry",
1116 shared_defflag => "-Wl,-bE:",
1117 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1118 dso_extension => ".so",
1119 lib_extension => shared("_a.a"),
1120 shared_extension_simple => shared(".a"),
1123 inherit_from => [ "aix-common", asm("ppc32_asm") ],
1125 CFLAGS => picker(debug => "-O0 -g",
1127 cflags => add(threads("-pthread")),
1128 ex_libs => threads("-pthread"),
1129 bn_ops => "BN_LLONG RC4_CHAR",
1130 perlasm_scheme => "aix32",
1131 shared_ldflag => add_before("-shared -static-libgcc"),
1133 RANLIB => add("-X32"),
1136 inherit_from => [ "aix-common", asm("ppc64_asm") ],
1138 CFLAGS => picker(debug => "-O0 -g",
1140 cflags => combine("-maix64", threads("-pthread")),
1141 ex_libs => threads("-pthread"),
1142 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1143 perlasm_scheme => "aix64",
1144 shared_ldflag => add_before("-shared -static-libgcc"),
1145 shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)",
1147 RANLIB => add("-X64"),
1150 inherit_from => [ "aix-common", asm("ppc32_asm") ],
1152 CFLAGS => picker(debug => "-O0 -g",
1154 cflags => combine("-q32 -qmaxmem=16384 -qro -qroconst",
1155 threads("-qthreaded")),
1156 cppflags => threads("-D_THREAD_SAFE"),
1157 ex_libs => threads("-lpthreads"),
1158 bn_ops => "BN_LLONG RC4_CHAR",
1159 perlasm_scheme => "aix32",
1160 shared_cflag => "-qpic",
1162 RANLIB => add("-X32"),
1165 inherit_from => [ "aix-common", asm("ppc64_asm") ],
1167 CFLAGS => picker(debug => "-O0 -g",
1169 cflags => combine("-q64 -qmaxmem=16384 -qro -qroconst",
1170 threads("-qthreaded")),
1171 cppflags => threads("-D_THREAD_SAFE"),
1172 ex_libs => threads("-lpthreads"),
1173 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1174 perlasm_scheme => "aix64",
1175 dso_scheme => "dlfcn",
1176 shared_cflag => "-qpic",
1177 shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)",
1179 RANLIB => add("-X64"),
1182 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
1184 inherit_from => [ "BASE_unix" ],
1187 cflags => "-XLLML -XLLMK -XL",
1188 cppflags => "-DCHARSET_EBCDIC",
1189 lib_cppflags => "-DB_ENDIAN",
1190 ex_libs => add("-lsocket -lnsl"),
1191 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1192 thread_scheme => "(unknown)",
1195 #### Visual C targets
1197 # Win64 targets, WIN64I denotes IA-64/Itanium and WIN64A - AMD64
1199 # Note about /wd4090, disable warning C4090. This warning returns false
1200 # positives in some situations. Disabling it altogether masks both
1201 # legitimate and false cases, but as we compile on multiple platforms,
1202 # we rely on other compilers to catch legitimate cases.
1204 # Also note that we force threads no matter what. Configuring "no-threads"
1207 # UNICODE is defined in VC-common and applies to all targets. It used to
1208 # be an opt-in option for VC-WIN32, but not anymore. The original reason
1209 # was because ANSI API was *native* system interface for no longer
1210 # supported Windows 9x. Keep in mind that UNICODE only affects how
1211 # OpenSSL libraries interact with underlying OS, it doesn't affect API
1212 # that OpenSSL presents to application.
1215 inherit_from => [ "BASE_Windows" ],
1218 CPP => '$(CC) /EP /C',
1219 CFLAGS => "/W3 /wd4090 /nologo",
1220 LDFLAGS => add("/debug"),
1222 defines => add("OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN",
1223 "UNICODE", "_UNICODE",
1224 "_CRT_SECURE_NO_DEPRECATE",
1225 "_WINSOCK_DEPRECATED_NO_WARNINGS"),
1226 lib_cflags => add("/Zi /Fdossl_static.pdb"),
1227 lib_defines => add("L_ENDIAN"),
1228 dso_cflags => "/Zi /Fddso.pdb",
1229 bin_cflags => "/Zi /Fdapp.pdb",
1230 shared_ldflag => "/dll",
1231 shared_target => "win-shared", # meaningless except it gives Configure a hint
1232 thread_scheme => "winthreads",
1233 dso_scheme => "win32",
1234 apps_aux_src => add("win32_init.c"),
1235 bn_ops => "EXPORT_VAR_AS_FN",
1236 # additional parameter to build_scheme denotes install-path "flavour"
1237 build_scheme => add("VC-common", { separator => undef }),
1239 "VC-noCE-common" => {
1240 inherit_from => [ "VC-common" ],
1242 CFLAGS => add(picker(debug => '/Od',
1244 cflags => add(picker(default => '/Gs0 /GF /Gy',
1247 ($disabled{shared} ? "" : "/MDd");
1251 ($disabled{shared} ? "" : "/MD");
1253 defines => add(picker(default => [], # works as type cast
1254 debug => [ "DEBUG", "_DEBUG" ])),
1255 lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }),
1256 # Following might/should appears controversial, i.e. defining
1257 # /MDd without evaluating $disabled{shared}. It works in
1258 # non-shared build because static library is compiled with /Zl
1259 # and bares no reference to specific RTL. And it works in
1260 # shared build because multiple /MDd options are not prohibited.
1261 # But why /MDd in static build? Well, basically this is just a
1262 # reference point, which allows to catch eventual errors that
1263 # would prevent those who want to wrap OpenSSL into own .DLL.
1264 # Why not /MD in release build then? Well, some are likely to
1265 # prefer [non-debug] openssl.exe to be free from Micorosoft RTL
1267 bin_cflags => add(picker(debug => "/MDd",
1268 release => sub { $disabled{shared} ? "/MT" : () },
1270 bin_lflags => add("/subsystem:console /opt:ref"),
1271 ex_libs => add(sub {
1273 push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
1274 push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
1275 return join(" ", @ex_libs);
1278 "VC-WIN64-common" => {
1279 inherit_from => [ "VC-noCE-common" ],
1281 ex_libs => add(sub {
1283 push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
1284 return join(" ", @_, @ex_libs);
1286 bn_ops => add("SIXTY_FOUR_BIT"),
1289 inherit_from => [ "VC-WIN64-common", asm("ia64_asm"),
1290 sub { $disabled{shared} ? () : "ia64_uplink" } ],
1292 ASFLAGS => "-d debug",
1295 bn_asm_src => sub { return undef unless @_;
1296 my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; },
1297 perlasm_scheme => "ias",
1298 multilib => "-ia64",
1301 inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"),
1302 sub { $disabled{shared} ? () : "x86_64_uplink" } ],
1303 AS => sub { vc_win64a_info()->{AS} },
1304 ASFLAGS => sub { vc_win64a_info()->{ASFLAGS} },
1305 asoutflag => sub { vc_win64a_info()->{asoutflag} },
1306 asflags => sub { vc_win64a_info()->{asflags} },
1308 bn_asm_src => sub { return undef unless @_;
1309 my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
1310 perlasm_scheme => "auto",
1314 inherit_from => [ "VC-noCE-common", asm("x86_asm"),
1315 sub { $disabled{shared} ? () : "uplink_common" } ],
1316 CFLAGS => add("/WX"),
1317 AS => sub { vc_win32_info()->{AS} },
1318 ASFLAGS => sub { vc_win32_info()->{ASFLAGS} },
1319 asoutflag => sub { vc_win32_info()->{asoutflag} },
1320 asflags => sub { vc_win32_info()->{asflags} },
1322 bn_ops => add("BN_LLONG"),
1323 perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} },
1324 # "WOW" stands for "Windows on Windows", and "VC-WOW" engages
1325 # some installation path heuristics in windows-makefile.tmpl...
1326 build_scheme => add("VC-WOW", { separator => undef }),
1329 inherit_from => [ "VC-common" ],
1330 CFLAGS => add(picker(debug => "/Od",
1331 release => "/O1i")),
1332 CPPDEFINES => picker(debug => [ "DEBUG", "_DEBUG" ]),
1333 LDFLAGS => add("/nologo /opt:ref"),
1336 sub { vc_wince_info()->{cflags}; },
1337 sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14
1338 ? ($disabled{shared} ? " /MT" : " /MD")
1340 cppflags => sub { vc_wince_info()->{cppflags}; },
1341 lib_defines => add("NO_CHMOD", "OPENSSL_SMALL_FOOTPRINT"),
1342 lib_cppflags => sub { vc_wince_info()->{cppflags}; },
1344 add(combine(sub { defined(env('WCECOMPAT'))
1345 ? '$(WCECOMPAT)/include' : (); },
1346 sub { defined(env('PORTSDK_LIBPATH'))
1347 ? '$(PORTSDK_LIBPATH)/../../include'
1349 lflags => add(combine(sub { vc_wince_info()->{lflags}; },
1350 sub { defined(env('PORTSDK_LIBPATH'))
1351 ? "/entry:mainCRTstartup" : (); })),
1353 bn_ops => add("BN_LLONG"),
1354 ex_libs => add(sub {
1356 push @ex_libs, 'ws2.lib' unless $disabled{sock};
1357 push @ex_libs, 'crypt32.lib';
1358 if (defined(env('WCECOMPAT'))) {
1359 my $x = '$(WCECOMPAT)/lib';
1360 if (-f "$x/env('TARGETCPU')/wcecompatex.lib") {
1361 $x .= '/$(TARGETCPU)/wcecompatex.lib';
1363 $x .= '/wcecompatex.lib';
1367 push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
1368 if (defined(env('PORTSDK_LIBPATH')));
1369 push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
1370 if (env('TARGETCPU') eq "X86");
1377 inherit_from => [ "BASE_unix", asm("x86_asm"),
1378 sub { $disabled{shared} ? () : "x86_uplink" } ],
1380 CFLAGS => picker(default => "-Wall",
1382 release => "-O3 -fomit-frame-pointer"),
1384 cppflags => combine("-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN",
1386 lib_cppflags => "-DL_ENDIAN",
1387 sys_id => "MINGW32",
1388 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1389 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1390 thread_scheme => "winthreads",
1391 perlasm_scheme => "coff",
1392 dso_scheme => "win32",
1393 shared_target => "mingw-shared",
1394 shared_cppflags => add("_WINDLL"),
1395 shared_ldflag => "-static-libgcc",
1396 shared_rcflag => "--target=pe-i386",
1397 shared_extension => ".dll",
1399 apps_aux_src => add("win32_init.c"),
1402 # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1403 # .dll compiled with one compiler with application compiled with
1404 # another compiler. It's possible to engage Applink support in
1405 # mingw64 build, but it's not done, because till mingw64
1406 # supports structured exception handling, one can't seriously
1407 # consider its binaries for using with non-mingw64 run-time
1408 # environment. And as mingw64 is always consistent with itself,
1409 # Applink is never engaged and can as well be omitted.
1410 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1412 CFLAGS => picker(default => "-Wall",
1416 cppflags => combine("-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN",
1418 lib_cppflags => "-DL_ENDIAN",
1419 sys_id => "MINGW64",
1420 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1421 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1422 thread_scheme => "winthreads",
1423 perlasm_scheme => "mingw64",
1424 dso_scheme => "win32",
1425 shared_target => "mingw-shared",
1426 shared_cppflags => add("_WINDLL"),
1427 shared_ldflag => "-static-libgcc",
1428 shared_rcflag => "--target=pe-x86-64",
1429 shared_extension => ".dll",
1431 apps_aux_src => add("win32_init.c"),
1436 inherit_from => [ "BASE_unix" ],
1439 lib_cppflags => "-DL_ENDIAN",
1445 inherit_from => [ "BASE_unix" ],
1447 CFLAGS => "-O -Wall",
1448 lib_cppflags => "-DTERMIOS -DL_ENDIAN",
1450 bn_ops => "BN_LLONG",
1451 dso_scheme => "win32",
1456 inherit_from => [ "BASE_unix", asm("x86_asm") ],
1458 CFLAGS => picker(default => "-Wall",
1460 release => "-O3 -fomit-frame-pointer"),
1461 lib_cppflags => "-DTERMIOS -DL_ENDIAN",
1463 bn_ops => "BN_LLONG",
1464 thread_scheme => "pthread",
1465 perlasm_scheme => "coff",
1466 dso_scheme => "dlfcn",
1467 shared_target => "cygwin-shared",
1468 shared_cppflags => "-D_WINDLL",
1469 shared_extension => ".dll",
1471 "Cygwin-x86_64" => {
1472 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1474 CFLAGS => picker(default => "-Wall",
1477 lib_cppflags => "-DTERMIOS -DL_ENDIAN",
1479 bn_ops => "SIXTY_FOUR_BIT_LONG",
1480 thread_scheme => "pthread",
1481 perlasm_scheme => "mingw64",
1482 dso_scheme => "dlfcn",
1483 shared_target => "cygwin-shared",
1484 shared_cppflags => "-D_WINDLL",
1485 shared_extension => ".dll",
1487 # Backward compatibility for those using this target
1489 inherit_from => [ "Cygwin-x86" ]
1491 # In case someone constructs the Cygwin target name themself
1493 inherit_from => [ "Cygwin-x86" ]
1496 inherit_from => [ "Cygwin-x86" ]
1499 inherit_from => [ "Cygwin-x86" ]
1502 inherit_from => [ "Cygwin-x86" ]
1505 ##### MacOS X (a.k.a. Darwin) setup
1506 "darwin-common" => {
1507 inherit_from => [ "BASE_unix" ],
1510 CFLAGS => picker(debug => "-g -O0",
1512 cppflags => threads("-D_REENTRANT"),
1513 lflags => "-Wl,-search_paths_first",
1515 bn_ops => "BN_LLONG RC4_CHAR",
1516 thread_scheme => "pthreads",
1517 perlasm_scheme => "osx32",
1518 dso_scheme => "dlfcn",
1519 ranlib => "ranlib -c",
1520 shared_target => "darwin-shared",
1521 shared_cflag => "-fPIC",
1522 shared_extension => ".\$(SHLIB_VERSION_NUMBER).dylib",
1524 # Option "freeze" such as -std=gnu9x can't negatively interfere
1525 # with future defaults for below two targets, because MacOS X
1526 # for PPC has no future, it was discontinued by vendor in 2009.
1527 "darwin-ppc-cc" => {
1528 inherit_from => [ "darwin-common", asm("ppc32_asm") ],
1529 cflags => add("-arch ppc -std=gnu9x -Wa,-force_cpusubtype_ALL"),
1530 lib_cppflags => add("-DB_ENDIAN"),
1531 shared_cflag => add("-fno-common"),
1532 perlasm_scheme => "osx32",
1534 "darwin64-ppc-cc" => {
1535 inherit_from => [ "darwin-common", asm("ppc64_asm") ],
1536 cflags => add("-arch ppc64 -std=gnu9x"),
1537 lib_cppflags => add("-DB_ENDIAN"),
1538 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1539 perlasm_scheme => "osx64",
1541 "darwin-i386-cc" => {
1542 inherit_from => [ "darwin-common", asm("x86_asm") ],
1543 CFLAGS => add(picker(release => "-fomit-frame-pointer")),
1544 cflags => add("-arch i386"),
1545 lib_cppflags => add("-DL_ENDIAN"),
1546 bn_ops => "BN_LLONG RC4_INT",
1547 perlasm_scheme => "macosx",
1549 "darwin64-x86_64-cc" => {
1550 inherit_from => [ "darwin-common", asm("x86_64_asm") ],
1551 CFLAGS => add("-Wall"),
1552 cflags => add("-arch x86_64"),
1553 lib_cppflags => add("-DL_ENDIAN"),
1554 bn_ops => "SIXTY_FOUR_BIT_LONG",
1555 perlasm_scheme => "macosx",
1560 inherit_from => [ "BASE_unix" ],
1561 inherit_from => [ asm("x86_elf_asm") ],
1563 CFLAGS => "-O3 -fomit-frame-pointer -Wall",
1564 cflags => threads("-pthread"),
1565 lib_cppflags => "-DL_ENDIAN",
1566 ex_libs => add("-ldl", threads("-pthread")),
1567 bn_ops => "BN_LLONG",
1568 thread_scheme => "pthreads",
1569 dso_scheme => "dlfcn",
1570 shared_target => "linux-shared",
1571 shared_cflag => "-fPIC",
1572 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1575 ##### VxWorks for various targets
1576 "vxworks-ppc60x" => {
1577 inherit_from => [ "BASE_unix" ],
1579 CFLAGS => "-O2 -Wall -fstrength-reduce",
1580 cflags => "-mrtp -mhard-float -mstrict-align -fno-implicit-fp -fno-builtin -fno-strict-aliasing",
1581 cppflags => combine("-D_REENTRANT -DPPC32_fp60x -DCPU=PPC32",
1582 "_DTOOL_FAMILY=gnu -DTOOL=gnu",
1583 "-I\$(WIND_BASE)/target/usr/h",
1584 "-I\$(WIND_BASE)/target/usr/h/wrn/coreip"),
1585 sys_id => "VXWORKS",
1586 lflags => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),
1587 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),
1589 "vxworks-ppcgen" => {
1590 inherit_from => [ "BASE_unix" ],
1592 CFLAGS => "-O1 -Wall",
1593 cflags => "-mrtp -msoft-float -mstrict-align -fno-builtin -fno-strict-aliasing",
1594 cppflags => combine("-D_REENTRANT -DPPC32 -DCPU=PPC32",
1595 "-DTOOL_FAMILY=gnu -DTOOL=gnu",
1596 "-I\$(WIND_BASE)/target/usr/h",
1597 "-I\$(WIND_BASE)/target/usr/h/wrn/coreip"),
1598 sys_id => "VXWORKS",
1599 lflags => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),
1600 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),
1602 "vxworks-ppc405" => {
1603 inherit_from => [ "BASE_unix" ],
1606 cflags => "-msoft-float -mlongcall",
1607 cppflags => combine("-D_REENTRANT -DPPC32 -DCPU=PPC405",
1608 "-DTOOL_FAMILY=gnu -DTOOL=gnu",
1609 "-I\$(WIND_BASE)/target/h"),
1610 sys_id => "VXWORKS",
1611 lflags => add("-r"),
1613 "vxworks-ppc750" => {
1614 inherit_from => [ "BASE_unix" ],
1616 CFLAGS => "-ansi -fvolatile -Wall \$(DEBUG_FLAG)",
1617 cflags => "-nostdinc -fno-builtin -fno-for-scope -fsigned-char -msoft-float -mlongcall",
1618 cppflags => combine("-DPPC750 -D_REENTRANT -DCPU=PPC604",
1619 "-I\$(WIND_BASE)/target/h"),
1620 sys_id => "VXWORKS",
1621 lflags => add("-r"),
1623 "vxworks-ppc750-debug" => {
1624 inherit_from => [ "BASE_unix" ],
1626 CFLAGS => "-ansi -fvolatile -Wall -g",
1627 cflags => "-nostdinc -fno-builtin -fno-for-scope -fsigned-char -msoft-float -mlongcall",
1628 cppflags => combine("-DPPC750 -D_REENTRANT -DCPU=PPC604",
1629 "-DPEDANTIC -DDEBUG",
1630 "-I\$(WIND_BASE)/target/h"),
1631 sys_id => "VXWORKS",
1632 lflags => add("-r"),
1634 "vxworks-ppc860" => {
1635 inherit_from => [ "BASE_unix" ],
1637 cflags => "-nostdinc -msoft-float",
1638 cppflags => combine("-DCPU=PPC860 -DNO_STRINGS_H",
1639 "-I\$(WIND_BASE)/target/h"),
1640 sys_id => "VXWORKS",
1641 lflags => add("-r"),
1643 "vxworks-simlinux" => {
1644 inherit_from => [ "BASE_unix" ],
1646 cflags => "-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -fno-builtin -fno-defer-pop",
1647 cppflags => combine("-D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\"",
1648 "-DL_ENDIAN -DCPU=SIMLINUX -DNO_STRINGS_H",
1649 "-DTOOL_FAMILY=gnu -DTOOL=gnu",
1650 "-DOPENSSL_NO_HW_PADLOCK",
1651 "-I\$(WIND_BASE)/target/h",
1652 "-I\$(WIND_BASE)/target/h/wrn/coreip"),
1653 sys_id => "VXWORKS",
1654 lflags => add("-r"),
1655 ranlib => "ranlibpentium",
1658 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
1660 CFLAGS => "-O -G 0",
1661 cflags => "-mrtp -mips2 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -msoft-float -mno-branch-likely -fno-builtin -fno-defer-pop",
1662 cppflags => combine("-D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\"",
1663 "-DCPU=MIPS32 -DNO_STRINGS_H",
1664 "-DTOOL_FAMILY=gnu -DTOOL=gnu",
1665 "-DOPENSSL_NO_HW_PADLOCK",
1666 threads("-D_REENTRANT"),
1667 "-I\$(WIND_BASE)/target/h",
1668 "-I\$(WIND_BASE)/target/h/wrn/coreip"),
1669 sys_id => "VXWORKS",
1670 lflags => add("-L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),
1671 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),
1672 thread_scheme => "pthreads",
1673 perlasm_scheme => "o32",
1674 ranlib => "ranlibmips",
1679 inherit_from => [ "BASE_unix" ],
1680 CC => sub { env('CC') },
1681 cppflags => threads("-D_REENTRANT"),
1682 ex_libs => add("\$(LDLIBS)"),
1683 bn_ops => "BN_LLONG",
1684 thread_scheme => "pthreads",
1685 dso_scheme => sub { env('LIBSSL_dlfcn') },
1686 shared_target => "linux-shared",
1687 shared_cflag => "-fPIC",
1688 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1689 ranlib => sub { env('RANLIB') },
1691 "uClinux-dist64" => {
1692 inherit_from => [ "BASE_unix" ],
1693 CC => sub { env('CC') },
1694 cppflags => threads("-D_REENTRANT"),
1695 ex_libs => add("\$(LDLIBS)"),
1696 bn_ops => "SIXTY_FOUR_BIT_LONG",
1697 thread_scheme => "pthreads",
1698 dso_scheme => sub { env('LIBSSL_dlfcn') },
1699 shared_target => "linux-shared",
1700 shared_cflag => "-fPIC",
1701 shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1702 ranlib => sub { env('RANLIB') },
1706 # Most things happen in vms-generic.
1707 # Note that vms_info extracts the pointer size from the end of
1708 # the target name, and will assume that anything matching /-p\d+$/
1709 # indicates the pointer size setting for the desired target.
1711 inherit_from => [ "BASE_VMS" ],
1714 CPP => '$(CC)/PREPROCESS_ONLY=SYS$OUTPUT:',
1716 combine(picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL",
1717 debug => "/NOOPTIMIZE/DEBUG",
1718 release => "/OPTIMIZE/NODEBUG"),
1719 sub { my @warnings =
1720 @{vms_info()->{disable_warns}};
1722 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1724 add("OPENSSL_USE_NODELETE",
1726 return vms_info()->{def_zlib}
1727 ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : ();
1729 lflags => picker(default => "/MAP='F\$PARSE(\".MAP\",\"\$\@\")'",
1730 debug => "/DEBUG/TRACEBACK",
1731 release => "/NODEBUG/NOTRACEBACK"),
1732 lib_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
1733 # no_inst_lib_cflags is used instead of lib_cflags by descrip.mms.tmpl
1734 # for object files belonging to selected internal libraries
1735 no_inst_lib_cflags => "",
1736 ex_libs => add(sub { return vms_info()->{zlib} || (); }),
1737 shared_target => "vms-shared",
1738 dso_scheme => "vms",
1739 thread_scheme => "pthreads",
1741 AS => sub { vms_info()->{AS} },
1742 ASFLAGS => sub { vms_info()->{ASFLAGS} },
1743 asoutflag => sub { vms_info()->{asoutflag} },
1744 asflags => sub { vms_info()->{asflags} },
1745 perlasm_scheme => sub { vms_info()->{perlasm_scheme} },
1747 disable => add('pinshared'),
1749 apps_aux_src => "vms_term_sock.c",
1750 apps_init_src => "vms_decc_init.c",
1753 # From HELP CC/POINTER_SIZE:
1756 # LONG[=ARGV] The compiler assumes 64-bit pointers. If the ARGV option to
1757 # LONG or 64 is present, the main argument argv will be an
1758 # array of long pointers instead of an array of short pointers.
1760 # 64[=ARGV] Same as LONG.
1763 # We don't want the hassle of dealing with 32-bit pointers with argv, so
1764 # we force it to have 64-bit pointers, see the added cflags in the -p64
1765 # config targets below.
1768 inherit_from => [ "vms-generic" ],
1769 bn_ops => "SIXTY_FOUR_BIT RC4_INT",
1772 "vms-alpha-p32" => {
1773 inherit_from => [ "vms-alpha" ],
1774 cflags => add("/POINTER_SIZE=32"),
1775 pointer_size => "32",
1777 "vms-alpha-p64" => {
1778 inherit_from => [ "vms-alpha" ],
1779 cflags => add("/POINTER_SIZE=64=ARGV"),
1780 pointer_size => "64",
1783 inherit_from => [ "vms-generic",
1784 sub { vms_info()->{AS}
1785 ? asm("ia64_asm")->() : () } ],
1786 bn_ops => "SIXTY_FOUR_BIT RC4_INT",
1789 modes_asm_src => "", # Because ghash-ia64.s doesn't work on VMS
1792 inherit_from => [ "vms-ia64" ],
1793 cflags => add("/POINTER_SIZE=32"),
1794 pointer_size => "32",
1797 inherit_from => [ "vms-ia64" ],
1798 cflags => add("/POINTER_SIZE=64=ARGV"),
1799 pointer_size => "64",