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",
10 asflags => "-f win64 -DNEAR -Ox -g",
12 } elsif ($disabled{asm}) {
13 $vc_win64a_info = { as => "ml64",
14 asflags => "/c /Cp /Cx /Zi",
17 die "NASM not found - please read INSTALL and NOTES.WIN for further details\n";
20 return $vc_win64a_info;
23 my $vc_win32_info = {};
25 unless (%$vc_win32_info) {
26 my $ver=`nasm -v 2>NUL`;
27 my $vew=`nasmw -v 2>NUL`;
28 if ($ver ne "" || $vew ne "") {
29 $vc_win32_info = { as => $ver ge $vew ? "nasm" : "nasmw",
30 asflags => "-f win32",
32 perlasm_scheme => "win32n" };
33 } elsif ($disabled{asm}) {
34 $vc_win32_info = { as => "ml",
35 asflags => "/nologo /Cp /coff /c /Cx /Zi",
37 perlasm_scheme => "win32" };
39 die "NASM not found - please read INSTALL and NOTES.WIN for further details\n";
42 return $vc_win32_info;
45 my $vc_wince_info = {};
47 unless (%$vc_wince_info) {
49 die '%OSVERSION% is not defined' if (!defined($ENV{'OSVERSION'}));
50 die '%PLATFORM% is not defined' if (!defined($ENV{'PLATFORM'}));
51 die '%TARGETCPU% is not defined' if (!defined($ENV{'TARGETCPU'}));
54 # Idea behind this is to mimic flags set by eVC++ IDE...
56 my $wcevers = $ENV{'OSVERSION'}; # WCENNN
57 die '%OSVERSION% value is insane'
58 if ($wcevers !~ /^WCE([1-9])([0-9]{2})$/);
59 my $wcecdefs = "-D_WIN32_WCE=$1$2 -DUNDER_CE=$1$2"; # -D_WIN32_WCE=NNN
60 my $wcelflag = "/subsystem:windowsce,$1.$2"; # ...,N.NN
62 my $wceplatf = $ENV{'PLATFORM'};
64 $wceplatf =~ tr/a-z0-9 /A-Z0-9_/;
65 $wcecdefs .= " -DWCE_PLATFORM_$wceplatf";
67 my $wcetgt = $ENV{'TARGETCPU'}; # just shorter name...
68 SWITCH: for($wcetgt) {
69 /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_";
70 $wcelflag.=" /machine:X86"; last; };
71 /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
72 $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/);
73 $wcecdefs.=" -QRarch4T -QRinterwork-return";
74 $wcelflag.=" /machine:THUMB"; last; };
75 /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
76 $wcelflag.=" /machine:ARM"; last; };
77 /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
78 $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32";
79 $wcelflag.=" /machine:MIPSFPU"; last; };
80 /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
81 $wcecdefs.=" -DMIPSII -QMmips16";
82 $wcelflag.=" /machine:MIPS16"; last; };
83 /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
84 $wcecdefs.=" -QMmips2";
85 $wcelflag.=" /machine:MIPS"; last; };
86 /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000";
87 $wcelflag.=" /machine:MIPS"; last; };
88 /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx";
89 $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/);
90 $wcelflag.=" /machine:$wcetgt"; last; };
91 { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_";
92 $wcelflag.=" /machine:$wcetgt"; last; };
95 $vc_wince_info = { cflags => $wcecdefs,
96 lflags => $wcelflag };
98 return $vc_wince_info;
101 # Helper functions for the VMS configs
104 unless (%$vms_info) {
105 my $pointer_size = shift;
106 my $pointer_size_str = $pointer_size == 0 ? "" : "$pointer_size";
108 $vms_info->{disable_warns} = [ ];
109 if ($pointer_size == 64) {
110 `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;
112 push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3";
116 unless ($disabled{zlib}) {
117 my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str;
118 if (defined($disabled{"zlib-dynamic"})) {
119 $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE";
121 $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib;
122 # In case the --with-zlib-lib value contains something like
123 # /SHARE or /LIB or so at the end, remove it.
124 $vms_info->{def_zlib} =~ s|/.*$||g;
133 #### Basic configs that should work on any 32-bit box
136 cflags => picker(debug => "-O0 -g",
138 thread_scheme => "(unknown)",
139 bn_ops => "BN_LLONG",
144 thread_scheme => "(unknown)",
147 #### VOS Configurations
149 inherit_from => [ "BASE_unix" ],
151 cflags => picker(default => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
154 thread_scheme => "(unknown)",
156 lflags => "-Wl,-map",
157 bn_ops => "BN_LLONG",
158 shared_extension => ".so",
161 #### Solaris configurations
162 "solaris-common" => {
163 inherit_from => [ "BASE_unix" ],
165 cflags => "-DFILIO_H",
166 ex_libs => add("-lresolv -lsocket -lnsl -ldl"),
167 dso_scheme => "dlfcn",
168 thread_scheme => "pthreads",
169 shared_target => "solaris-shared",
170 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
172 #### Solaris x86 with GNU C setups
173 "solaris-x86-gcc" => {
174 # -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have
175 # to do it here because whenever GNU C instantiates an assembler
176 # template it surrounds it with #APP #NO_APP comment pair which
177 # (at least Solaris 7_x86) /usr/ccs/bin/as fails to assemble
178 # with "Illegal mnemonic" error message.
179 inherit_from => [ "solaris-common", asm("x86_elf_asm") ],
181 cflags => add_before(picker(default => "-Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM",
183 release => "-O3 -fomit-frame-pointer"),
184 threads("-pthread")),
185 bn_ops => "BN_LLONG",
186 shared_cflag => "-fPIC",
187 shared_ldflag => "-shared",
189 "solaris64-x86_64-gcc" => {
190 # -shared -static-libgcc might appear controversial, but modules
191 # taken from static libgcc do not have relocations and linking
192 # them into our shared objects doesn't have any negative side
193 # effects. On the contrary, doing so makes it possible to use
194 # gcc shared build with Sun C. Given that gcc generates faster
195 # code [thanks to inline assembler], I would actually recommend
196 # to consider using gcc shared build even with vendor compiler:-)
197 # <appro@fy.chalmers.se>
198 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
200 cflags => add_before(picker(default => "-m64 -Wall -DL_ENDIAN",
203 threads("-pthread")),
204 bn_ops => "SIXTY_FOUR_BIT_LONG",
205 perlasm_scheme => "elf",
206 shared_cflag => "-fPIC",
207 shared_ldflag => "-m64 -shared -static-libgcc",
211 #### Solaris x86 with Sun C setups
212 "solaris-x86-cc" => {
213 inherit_from => [ "solaris-common" ],
215 cflags => add_before(picker(default => "-xarch=generic -xstrconst -Xa -DL_ENDIAN",
217 release => "-xO5 -xregs=frameptr -xdepend -xbuiltin"),
218 threads("-D_REENTRANT")),
219 lflags => add(threads("-mt")),
220 ex_libs => add(threads("-lpthread")),
221 bn_ops => "BN_LLONG RC4_CHAR",
222 shared_cflag => "-KPIC",
223 shared_ldflag => "-G -dy -z text",
225 "solaris64-x86_64-cc" => {
226 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
228 cflags => add_before(picker(default => "-xarch=generic64 -xstrconst -Xa -DL_ENDIAN",
230 release => "-xO5 -xdepend -xbuiltin"),
231 threads("-D_REENTRANT")),
232 thread_scheme => "pthreads",
233 lflags => add(threads("-mt")),
234 ex_libs => add(threads("-lpthread")),
235 bn_ops => "SIXTY_FOUR_BIT_LONG",
236 perlasm_scheme => "elf",
237 shared_cflag => "-KPIC",
238 shared_ldflag => "-xarch=generic64 -G -dy -z text",
242 #### SPARC Solaris with GNU C setups
243 "solaris-sparcv7-gcc" => {
244 inherit_from => [ "solaris-common" ],
246 cflags => add_before(picker(default => "-Wall -DB_ENDIAN -DBN_DIV2W",
249 threads("-pthread")),
250 bn_ops => "BN_LLONG RC4_CHAR",
251 shared_cflag => "-fPIC",
252 shared_ldflag => "-shared",
254 "solaris-sparcv8-gcc" => {
255 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
256 cflags => add_before("-mcpu=v8"),
258 "solaris-sparcv9-gcc" => {
259 # -m32 should be safe to add as long as driver recognizes
261 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
262 cflags => add_before("-m32 -mcpu=ultrasparc"),
264 "solaris64-sparcv9-gcc" => {
265 inherit_from => [ "solaris-sparcv9-gcc" ],
266 cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
267 bn_ops => "BN_LLONG RC4_CHAR",
268 shared_ldflag => "-m64 -shared",
272 #### SPARC Solaris with Sun C setups
273 # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
274 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
275 # SC5.0 note: Compiler common patch 107357-01 or later is required!
276 "solaris-sparcv7-cc" => {
277 inherit_from => [ "solaris-common" ],
279 cflags => add_before(picker(default => "-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W",
281 release => "-xO5 -xdepend"),
282 threads("-D_REENTRANT")),
283 lflags => add(threads("-mt")),
284 ex_libs => add(threads("-lpthread")),
285 bn_ops => "BN_LLONG RC4_CHAR",
286 shared_cflag => "-KPIC",
287 shared_ldflag => "-G -dy -z text",
290 "solaris-sparcv8-cc" => {
291 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
292 cflags => add_before("-xarch=v8"),
294 "solaris-sparcv9-cc" => {
295 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
296 cflags => add_before("-xarch=v8plus -xtarget=ultra"),
298 "solaris64-sparcv9-cc" => {
299 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
300 cflags => add_before("-xarch=v9 -xtarget=ultra"),
301 bn_ops => "BN_LLONG RC4_CHAR",
302 shared_ldflag => "-xarch=v9 -G -dy -z text",
306 #### IRIX 6.x configs
307 # Only N32 and N64 ABIs are supported.
308 "irix-mips3-gcc" => {
309 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
311 cflags => combine(picker(default => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W",
314 threads("-D_SGI_MP_SOURCE")),
315 ex_libs => add(threads("-lpthread")),
316 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
317 thread_scheme => "pthreads",
318 perlasm_scheme => "n32",
319 dso_scheme => "dlfcn",
320 shared_target => "irix-shared",
321 shared_ldflag => "-mabi=n32",
322 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
326 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
328 cflags => combine(picker(default => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
331 threads("-D_SGI_MP_SOURCE")),
332 ex_libs => add(threads("-lpthread")),
333 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
334 thread_scheme => "pthreads",
335 perlasm_scheme => "n32",
336 dso_scheme => "dlfcn",
337 shared_target => "irix-shared",
338 shared_ldflag => "-n32",
339 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
343 "irix64-mips4-gcc" => {
344 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
346 cflags => combine(picker(default => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W",
349 threads("-D_SGI_MP_SOURCE")),
350 ex_libs => add(threads("-lpthread")),
351 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
352 thread_scheme => "pthreads",
353 perlasm_scheme => "64",
354 dso_scheme => "dlfcn",
355 shared_target => "irix-shared",
356 shared_ldflag => "-mabi=64",
357 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
360 "irix64-mips4-cc" => {
361 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
363 cflags => combine(picker(default => "-64 -mips4 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
366 threads("-D_SGI_MP_SOURCE")),
367 ex_libs => add(threads("-lpthread")),
368 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
369 thread_scheme => "pthreads",
370 perlasm_scheme => "64",
371 dso_scheme => "dlfcn",
372 shared_target => "irix-shared",
373 shared_ldflag => "-64",
374 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
378 #### Unified HP-UX ANSI C configs.
380 # - Originally we were optimizing at +O4 level. It should be noted
381 # that the only difference between +O3 and +O4 is global inter-
382 # procedural analysis. As it has to be performed during the link
383 # stage the compiler leaves behind certain pseudo-code in lib*.a
384 # which might be release or even patch level specific. Generating
385 # the machine code for and analyzing the *whole* program appears
386 # to be *extremely* memory demanding while the performance gain is
387 # actually questionable. The situation is intensified by the default
388 # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
389 # which is way too low for +O4. In other words, doesn't +O3 make
391 # - Keep in mind that the HP compiler by default generates code
392 # suitable for execution on the host you're currently compiling at.
393 # If the toolkit is meant to be used on various PA-RISC processors
394 # consider './Configure hpux-parisc-[g]cc +DAportable'.
395 # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
396 # 32-bit message digests. (For the moment of this writing) HP C
397 # doesn't seem to "digest" too many local variables (they make "him"
398 # chew forever:-). For more details look-up MD32_XARRAY comment in
399 # crypto/sha/sha_lcl.h.
400 # - originally there were 32-bit hpux-parisc2-* targets. They were
401 # scrapped, because a) they were not interchangeable with other 32-bit
402 # targets; a) when critical 32-bit assembly modules detect if they
403 # are executed on PA-RISC 2.0 and thus adequate performance is
405 # <appro@fy.chalmers.se>
406 "hpux-parisc-gcc" => {
407 inherit_from => [ "BASE_unix" ],
409 cflags => combine(picker(default => "-DB_ENDIAN -DBN_DIV2W",
412 threads("-pthread")),
413 ex_libs => add("-Wl,+s -ldld"),
414 bn_ops => "BN_LLONG",
415 thread_scheme => "pthreads",
417 shared_target => "hpux-shared",
418 shared_cflag => "-fPIC",
419 shared_ldflag => "-shared",
420 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
422 "hpux-parisc1_1-gcc" => {
423 inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ],
424 multilib => "/pa1.1",
426 "hpux64-parisc2-gcc" => {
427 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
429 cflags => combine(picker(default => "-DB_ENDIAN",
432 threads("-D_REENTRANT")),
433 ex_libs => add("-ldl"),
434 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
435 thread_scheme => "pthreads",
436 dso_scheme => "dlfcn",
437 shared_target => "hpux-shared",
438 shared_cflag => "-fpic",
439 shared_ldflag => "-shared",
440 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
441 multilib => "/pa20_64",
444 # More attempts at unified 10.X and 11.X targets for HP C compiler.
446 # Chris Ruemmler <ruemmler@cup.hp.com>
447 # Kevin Steves <ks@hp.se>
448 "hpux-parisc-cc" => {
449 inherit_from => [ "BASE_unix" ],
451 cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
452 debug => "+O0 +d -g",
454 threads("-D_REENTRANT")),
455 ex_libs => add("-Wl,+s -ldld",threads("-lpthread")),
456 bn_ops => "RC4_CHAR",
457 thread_scheme => "pthreads",
459 shared_target => "hpux-shared",
460 shared_cflag => "+Z",
461 shared_ldflag => "-b",
462 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
464 "hpux-parisc1_1-cc" => {
465 inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ],
466 cflags => add_before("+DA1.1"),
467 multilib => "/pa1.1",
469 "hpux64-parisc2-cc" => {
470 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
472 cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY",
473 debug => "+O0 +d -g",
475 threads("-D_REENTRANT")),
476 ex_libs => add("-ldl",threads("-lpthread")),
477 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
478 thread_scheme => "pthreads",
479 dso_scheme => "dlfcn",
480 shared_target => "hpux-shared",
481 shared_cflag => "+Z",
482 shared_ldflag => "+DD64 -b",
483 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
484 multilib => "/pa20_64",
487 # HP/UX IA-64 targets
489 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
491 cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z -DB_ENDIAN",
492 debug => "+O0 +d -g",
494 threads("-D_REENTRANT")),
495 ex_libs => add("-ldl",threads("-lpthread")),
496 bn_ops => "SIXTY_FOUR_BIT",
497 thread_scheme => "pthreads",
498 dso_scheme => "dlfcn",
499 shared_target => "hpux-shared",
500 shared_cflag => "+Z",
501 shared_ldflag => "+DD32 -b",
502 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
503 multilib => "/hpux32",
505 # Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted
506 # with debugging of the following config.
507 "hpux64-ia64-cc" => {
508 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
510 cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z -DB_ENDIAN",
511 debug => "+O0 +d -g",
513 threads("-D_REENTRANT")),
514 ex_libs => add("-ldl", threads("-lpthread")),
515 bn_ops => "SIXTY_FOUR_BIT_LONG",
516 thread_scheme => "pthreads",
517 dso_scheme => "dlfcn",
518 shared_target => "hpux-shared",
519 shared_cflag => "+Z",
520 shared_ldflag => "+DD64 -b",
521 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
522 multilib => "/hpux64",
526 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
528 cflags => combine(picker(default => "-DB_ENDIAN",
531 threads("-pthread")),
532 ex_libs => add("-ldl"),
533 bn_ops => "SIXTY_FOUR_BIT",
534 thread_scheme => "pthreads",
535 dso_scheme => "dlfcn",
536 shared_target => "hpux-shared",
537 shared_cflag => "-fpic",
538 shared_ldflag => "-shared",
539 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
540 multilib => "/hpux32",
542 "hpux64-ia64-gcc" => {
543 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
545 cflags => combine(picker(default => "-mlp64 -DB_ENDIAN",
548 threads("-pthread")),
549 ex_libs => add("-ldl"),
550 bn_ops => "SIXTY_FOUR_BIT_LONG",
551 thread_scheme => "pthreads",
552 dso_scheme => "dlfcn",
553 shared_target => "hpux-shared",
554 shared_cflag => "-fpic",
555 shared_ldflag => "-mlp64 -shared",
556 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
557 multilib => "/hpux64",
560 #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
562 inherit_from => [ "BASE_unix" ],
564 cflags => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB",
566 ex_libs => add("-L/SYSLOG/PUB -lsyslog -lsocket -lcurses"),
567 thread_scheme => "(unknown)",
568 bn_ops => "BN_LLONG",
571 #### DEC Alpha Tru64 targets. Tru64 is marketing name for OSF/1 version 4
572 #### and forward. In reality 'uname -s' still returns "OSF1". Originally
573 #### there were even osf1-* configs targeting prior versions provided,
574 #### but not anymore...
575 "tru64-alpha-gcc" => {
576 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
578 cflags => combine("-std=c9x -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -O3",
579 threads("-pthread")),
580 ex_libs => "-lrt", # for mlock(2)
581 bn_ops => "SIXTY_FOUR_BIT_LONG",
582 thread_scheme => "pthreads",
583 dso_scheme => "dlfcn",
584 shared_target => "alpha-osf1-shared",
585 shared_extension => ".so",
587 "tru64-alpha-cc" => {
588 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
590 cflags => combine("-std1 -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -tune host -fast -readonly_strings",
591 threads("-pthread")),
592 ex_libs => "-lrt", # for mlock(2)
593 bn_ops => "SIXTY_FOUR_BIT_LONG",
594 thread_scheme => "pthreads",
595 dso_scheme => "dlfcn",
596 shared_target => "alpha-osf1-shared",
597 shared_ldflag => "-msym",
598 shared_extension => ".so",
602 #### Variety of LINUX:-)
604 # *-generic* is endian-neutral target, but ./config is free to
605 # throw in -D[BL]_ENDIAN, whichever appropriate...
606 "linux-generic32" => {
607 inherit_from => [ "BASE_unix" ],
609 cflags => combine(picker(default => "-Wall",
612 threads("-pthread")),
613 ex_libs => add("-ldl"),
614 bn_ops => "BN_LLONG RC4_CHAR",
615 thread_scheme => "pthreads",
616 dso_scheme => "dlfcn",
617 shared_target => "linux-shared",
618 shared_cflag => "-fPIC",
619 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
621 "linux-generic64" => {
622 inherit_from => [ "linux-generic32" ],
623 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
627 inherit_from => [ "linux-generic32", asm("ppc32_asm") ],
628 perlasm_scheme => "linux32",
631 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
632 cflags => add("-m64 -DB_ENDIAN"),
633 perlasm_scheme => "linux64",
634 shared_ldflag => "-m64",
638 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
639 cflags => add("-m64 -DL_ENDIAN"),
640 perlasm_scheme => "linux64le",
641 shared_ldflag => "-m64",
645 ################################################################
646 # Note that -march is not among compiler options in linux-armv4
647 # target description. Not specifying one is intentional to give
650 # a) rely on your compiler default by not specifying one;
651 # b) specify your target platform explicitly for optimal
652 # performance, e.g. -march=armv6 or -march=armv7-a;
653 # c) build "universal" binary that targets *range* of platforms
654 # by specifying minimum and maximum supported architecture;
656 # As for c) option. It actually makes no sense to specify
657 # maximum to be less than ARMv7, because it's the least
658 # requirement for run-time switch between platform-specific
659 # code paths. And without run-time switch performance would be
660 # equivalent to one for minimum. Secondly, there are some
661 # natural limitations that you'd have to accept and respect.
662 # Most notably you can *not* build "universal" binary for
663 # big-endian platform. This is because ARMv7 processor always
664 # picks instructions in little-endian order. Another similar
665 # limitation is that -mthumb can't "cross" -march=armv6t2
666 # boundary, because that's where it became Thumb-2. Well, this
667 # limitation is a bit artificial, because it's not really
668 # impossible, but it's deemed too tricky to support. And of
669 # course you have to be sure that your binutils are actually
670 # up to the task of handling maximum target platform. With all
671 # this in mind here is an example of how to configure
674 # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
676 inherit_from => [ "linux-generic32", asm("armv4_asm") ],
677 perlasm_scheme => "linux32",
680 inherit_from => [ "linux-generic64", asm("aarch64_asm") ],
681 perlasm_scheme => "linux64",
683 "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32
684 inherit_from => [ "linux-generic32", asm("aarch64_asm") ],
685 cflags => add("-mabi=ilp32"),
686 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
687 perlasm_scheme => "linux64",
688 shared_ldflag => "-mabi=ilp32",
692 # Configure script adds minimally required -march for assembly
693 # support, if no -march was specified at command line.
694 inherit_from => [ "linux-generic32", asm("mips32_asm") ],
695 cflags => add("-mabi=32 -DBN_DIV3W"),
696 perlasm_scheme => "o32",
697 shared_ldflag => "-mabi=32",
699 # mips32 and mips64 below refer to contemporary MIPS Architecture
700 # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
702 inherit_from => [ "linux-generic32", asm("mips64_asm") ],
703 cflags => add("-mabi=n32 -DBN_DIV3W"),
704 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
705 perlasm_scheme => "n32",
706 shared_ldflag => "-mabi=n32",
709 "linux64-mips64" => {
710 inherit_from => [ "linux-generic64", asm("mips64_asm") ],
711 cflags => add("-mabi=64 -DBN_DIV3W"),
712 perlasm_scheme => "64",
713 shared_ldflag => "-mabi=64",
717 #### IA-32 targets...
719 inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
720 cflags => add(picker(default => "-DL_ENDIAN",
721 release => "-fomit-frame-pointer")),
722 ex_libs => add(picker(debug => "-lefence")),
723 bn_ops => "BN_LLONG",
726 inherit_from => [ "BASE_unix", asm("x86_asm") ],
728 cflags => add(picker(default => "-DL_ENDIAN -Wall",
730 release => "-O3 -fomit-frame-pointer")),
731 bn_ops => "BN_LLONG",
732 thread_scheme => "(unknown)",
733 perlasm_scheme => "a.out",
737 inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
738 cflags => add("-m64 -DL_ENDIAN"),
739 bn_ops => "SIXTY_FOUR_BIT_LONG",
740 perlasm_scheme => "elf",
741 shared_ldflag => "-m64",
744 "linux-x86_64-clang" => {
745 inherit_from => [ "linux-x86_64" ],
747 cflags => add("-Wextra -Qunused-arguments"),
750 inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
751 cflags => add("-mx32 -DL_ENDIAN"),
752 bn_ops => "SIXTY_FOUR_BIT",
753 perlasm_scheme => "elf32",
754 shared_ldflag => "-mx32",
759 inherit_from => [ "linux-generic64", asm("ia64_asm") ],
760 bn_ops => "SIXTY_FOUR_BIT_LONG",
764 inherit_from => [ "linux-generic64", asm("s390x_asm") ],
765 cflags => add("-m64 -DB_ENDIAN"),
766 perlasm_scheme => "64",
767 shared_ldflag => "-m64",
771 #### So called "highgprs" target for z/Architecture CPUs
772 # "Highgprs" is kernel feature first implemented in Linux
773 # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
774 # significant bits of general purpose registers not only
775 # upon 32-bit process context switch, but even on
776 # asynchronous signal delivery to such process. This makes
777 # it possible to deploy 64-bit instructions even in legacy
778 # application context and achieve better [or should we say
779 # adequate] performance. The build is binary compatible with
780 # linux-generic32, and the idea is to be able to install the
781 # resulting libcrypto.so alongside generic one, e.g. as
782 # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
783 # linker to autodiscover. Unfortunately it doesn't work just
784 # yet, because of couple of bugs in glibc
785 # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
787 inherit_from => [ "linux-generic32", asm("s390x_asm") ],
788 cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"),
789 bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; },
790 perlasm_scheme => "31",
791 shared_ldflag => "-m31",
792 multilib => "/highgprs",
795 #### SPARC Linux setups
796 # Ray Miller <ray.miller@computing-services.oxford.ac.uk> has
797 # patiently assisted with debugging of following two configs.
799 inherit_from => [ "linux-generic32", asm("sparcv8_asm") ],
800 cflags => add("-mcpu=v8 -DB_ENDIAN -DBN_DIV2W"),
803 # it's a real mess with -mcpu=ultrasparc option under Linux,
804 # but -Wa,-Av8plus should do the trick no matter what.
805 inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
806 cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W"),
807 shared_ldflag => "-m32",
809 "linux64-sparcv9" => {
810 # GCC 3.1 is a requirement
811 inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
812 cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"),
813 bn_ops => "BN_LLONG RC4_CHAR",
814 shared_ldflag => "-m64",
818 "linux-alpha-gcc" => {
819 inherit_from => [ "linux-generic64", asm("alpha_asm") ],
820 cflags => add("-DL_ENDIAN"),
821 bn_ops => "SIXTY_FOUR_BIT_LONG",
823 "linux-c64xplus" => {
824 inherit_from => [ "BASE_unix" ],
825 # TI_CGT_C6000_7.3.x is a requirement
827 cflags => combine("--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT",
828 threads("-D_REENTRANT")),
829 bn_ops => "BN_LLONG",
830 cpuid_asm_src => "c64xpluscpuid.s",
831 bn_asm_src => "asm/bn-c64xplus.asm c64xplus-gf2m.s",
832 aes_asm_src => "aes-c64xplus.s aes_cbc.c aes-ctr.fake",
833 sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s",
834 rc4_asm_src => "rc4-c64xplus.s",
835 modes_asm_src => "ghash-c64xplus.s",
836 chacha_asm_src => "chacha-c64xplus.s",
837 poly1305_asm_src => "poly1305-c64xplus.s",
838 thread_scheme => "pthreads",
839 perlasm_scheme => "void",
840 dso_scheme => "dlfcn",
841 shared_target => "linux-shared",
842 shared_cflag => "--pic",
843 shared_ldflag => "-z --sysv --shared",
844 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
848 #### Android: linux-* but without pointers to headers and libs.
850 # It takes pair of prior-set environment variables to make it work:
852 # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<
853 # CROSS_COMPILE=<prefix>
855 # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
856 # For example to compile for ICS and ARM with NDK 10d, you'd:
858 # ANDROID_NDK=/some/where/android-ndk-10d
859 # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
860 # CROSS_COMPILE=arm-linux-adroideabi-
861 # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/
864 inherit_from => [ "linux-generic32" ],
865 # Special note about unconditional -fPIC and -pie. The underlying
866 # reason is that Lollipop refuses to run non-PIE. But what about
867 # older systems and NDKs? -fPIC was never problem, so the only
868 # concern is -pie. Older toolchains, e.g. r4, appear to handle it
869 # and binaries turn mostly functional. "Mostly" means that oldest
870 # Androids, such as Froyo, fail to handle executable, but newer
871 # systems are perfectly capable of executing binaries targeting
872 # Froyo. Keep in mind that in the nutshell Android builds are
873 # about JNI, i.e. shared libraries, not applications.
874 cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")),
875 bin_cflags => "-pie",
878 inherit_from => [ "android", asm("x86_asm") ],
879 cflags => add(picker(release => "-fomit-frame-pointer")),
880 bn_ops => "BN_LLONG",
881 perlasm_scheme => "android",
883 ################################################################
884 # Contemporary Android applications can provide multiple JNI
885 # providers in .apk, targeting multiple architectures. Among
886 # them there is "place" for two ARM flavours: generic eabi and
887 # armv7-a/hard-float. However, it should be noted that OpenSSL's
888 # ability to engage NEON is not constrained by ABI choice, nor
889 # is your ability to call OpenSSL from your application code
890 # compiled with floating-point ABI other than default 'soft'.
891 # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
892 # This means that choice of ARM libraries you provide in .apk
893 # is driven by application needs. For example if application
894 # itself benefits from NEON or is floating-point intensive, then
895 # it might be appropriate to provide both libraries. Otherwise
896 # just generic eabi would do. But in latter case it would be
899 # ./Configure android-armeabi -D__ARM_MAX_ARCH__=8
901 # in order to build "universal" binary and allow OpenSSL take
902 # advantage of NEON when it's available.
904 "android-armeabi" => {
905 inherit_from => [ "android", asm("armv4_asm") ],
908 inherit_from => [ "android", asm("mips32_asm") ],
909 perlasm_scheme => "o32",
913 inherit_from => [ "linux-generic64" ],
914 cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")),
915 bin_cflags => "-pie",
917 "android64-aarch64" => {
918 inherit_from => [ "android64", asm("aarch64_asm") ],
919 perlasm_scheme => "linux64",
924 # As for thread cflag. Idea is to maintain "collective" set of
925 # flags, which would cover all BSD flavors. -pthread applies
926 # to them all, but is treated differently. OpenBSD expands is
927 # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
928 # expands it as -lc_r, which has to be accompanied by explicit
929 # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
930 # expands it as -lc_r, which seems to be sufficient?
931 inherit_from => [ "BASE_unix" ],
933 cflags => combine(picker(default => "-Wall",
936 threads("-pthread -D_THREAD_SAFE -D_REENTRANT")),
937 bn_ops => "BN_LLONG",
938 thread_scheme => "pthreads",
939 dso_scheme => "dlfcn",
940 shared_target => "bsd-gcc-shared",
941 shared_cflag => "-fPIC",
942 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
945 inherit_from => [ "BSD-generic32" ],
946 bn_ops => "SIXTY_FOUR_BIT_LONG",
950 inherit_from => [ "BSD-generic32", asm("x86_asm") ],
951 cflags => add(picker(default => "-DL_ENDIAN",
952 release => "-fomit-frame-pointer")),
953 bn_ops => "BN_LLONG",
954 shared_target => "bsd-shared",
955 perlasm_scheme => "a.out",
958 inherit_from => [ "BSD-x86" ],
959 perlasm_scheme => "elf",
963 inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ],
964 cflags => add("-mcpu=v8 -DB_ENDIAN"),
967 # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
968 # simply *happens* to work around a compiler bug in gcc 3.3.3,
969 # triggered by RIPEMD160 code.
970 inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ],
971 cflags => add("-DB_ENDIAN -DMD32_REG_T=int"),
972 bn_ops => "BN_LLONG",
976 inherit_from => [ "BSD-generic64", asm("ia64_asm") ],
977 cflags => add_before("-DL_ENDIAN"),
978 bn_ops => "SIXTY_FOUR_BIT_LONG",
982 inherit_from => [ "BSD-generic64", asm("x86_64_asm") ],
983 cflags => add_before("-DL_ENDIAN"),
984 bn_ops => "SIXTY_FOUR_BIT_LONG",
985 perlasm_scheme => "elf",
989 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
991 cflags => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -Wall",
992 ex_libs => add("-ldl"),
993 bn_ops => "BN_LLONG",
994 thread_scheme => "(unknown)",
995 dso_scheme => "dlfcn",
996 shared_target => "bsd-gcc-shared",
997 shared_cflag => "-fPIC",
998 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1002 inherit_from => [ "BASE_unix" ],
1004 cflags => "-O -Wall",
1005 unistd => "<libc.h>",
1006 bn_ops => "BN_LLONG",
1007 thread_scheme => "(unknown)",
1010 inherit_from => [ "BASE_unix" ],
1012 cflags => "-O3 -Wall",
1013 unistd => "<libc.h>",
1014 bn_ops => "BN_LLONG",
1015 thread_scheme => "(unknown)",
1020 inherit_from => [ "BASE_unix" ],
1022 cflags => "-DL_ENDIAN -DTERMIO",
1023 thread_scheme => "(unknown)",
1026 inherit_from => [ "BASE_unix" ],
1028 ex_libs => add("-lsocket"),
1029 dso_scheme => "dlfcn",
1030 shared_target => "bsd-gcc-shared",
1031 shared_cflag => "-fPIC",
1032 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1035 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1037 cflags => "-DL_ENDIAN -O2 -Wall",
1038 ex_libs => add("-lsocket"),
1039 dso_scheme => "dlfcn",
1040 shared_target => "bsd-gcc-shared",
1041 shared_cflag => "-fPIC",
1042 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1045 #### SCO/Caldera targets.
1047 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
1048 # Now we only have blended unixware-* as it's the only one used by ./config.
1049 # If you want to optimize for particular microarchitecture, bypass ./config
1050 # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
1051 # Note that not all targets include assembler support. Mostly because of
1052 # lack of motivation to support out-of-date platforms with out-of-date
1053 # compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
1054 # patiently assisted to debug most of it.
1056 # UnixWare 2.0x fails destest with -O.
1058 inherit_from => [ "BASE_unix" ],
1060 cflags => combine("-DFILIO_H -DNO_STRINGS_H",
1061 threads("-Kthread")),
1062 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1063 thread_scheme => "uithreads",
1066 inherit_from => [ "BASE_unix" ],
1068 cflags => combine("-O -DFILIO_H",
1069 threads("-Kthread")),
1070 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1071 thread_scheme => "uithreads",
1074 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1076 cflags => combine("-O -DFILIO_H -Kalloca",
1077 threads("-Kthread")),
1078 ex_libs => add("-lsocket -lnsl"),
1079 thread_scheme => "uithreads",
1080 bn_ops => "BN_LLONG",
1081 perlasm_scheme => "elf-1",
1082 dso_scheme => "dlfcn",
1083 shared_target => "svr5-shared",
1084 shared_cflag => "-Kpic",
1085 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1087 "unixware-7-gcc" => {
1088 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1090 cflags => combine("-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -Wall",
1091 threads("-D_REENTRANT")),
1092 ex_libs => add("-lsocket -lnsl"),
1093 bn_ops => "BN_LLONG",
1094 thread_scheme => "pthreads",
1095 perlasm_scheme => "elf-1",
1096 dso_scheme => "dlfcn",
1097 shared_target => "gnu-shared",
1098 shared_cflag => "-fPIC",
1099 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1101 # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
1103 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1106 ex_libs => add("-lsocket -lnsl"),
1107 thread_scheme => "(unknown)",
1108 perlasm_scheme => "elf-1",
1109 dso_scheme => "dlfcn",
1110 shared_target => "svr3-shared",
1111 shared_cflag => "-Kpic",
1112 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1115 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1117 cflags => "-O3 -fomit-frame-pointer",
1118 ex_libs => add("-lsocket -lnsl"),
1119 bn_ops => "BN_LLONG",
1120 thread_scheme => "(unknown)",
1121 perlasm_scheme => "elf-1",
1122 dso_scheme => "dlfcn",
1123 shared_target => "svr3-shared",
1124 shared_cflag => "-fPIC",
1125 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1130 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1132 cflags => combine(picker(default => "-DB_ENDIAN",
1135 threads("-pthread")),
1137 bn_ops => "BN_LLONG RC4_CHAR",
1138 thread_scheme => "pthreads",
1139 perlasm_scheme => "aix32",
1140 dso_scheme => "dlfcn",
1141 shared_target => "aix-shared",
1142 shared_ldflag => "-shared -Wl,-G",
1143 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1147 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1149 cflags => combine(picker(default => "-maix64 -DB_ENDIAN",
1152 threads("-pthread")),
1154 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1155 thread_scheme => "pthreads",
1156 perlasm_scheme => "aix64",
1157 dso_scheme => "dlfcn",
1158 shared_target => "aix-shared",
1159 shared_ldflag => "-maix64 -shared -Wl,-G",
1160 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1163 # Below targets assume AIX 5. Idea is to effectively disregard
1164 # $OBJECT_MODE at build time. $OBJECT_MODE is respected at
1167 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1169 cflags => combine(picker(default => "-q32 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1172 threads("-qthreaded -D_THREAD_SAFE")),
1174 bn_ops => "BN_LLONG RC4_CHAR",
1175 thread_scheme => "pthreads",
1176 perlasm_scheme => "aix32",
1177 dso_scheme => "dlfcn",
1178 shared_target => "aix-shared",
1179 shared_ldflag => "-q32 -G",
1180 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1184 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1186 cflags => combine(picker(default => "-q64 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1189 threads("-qthreaded -D_THREAD_SAFE")),
1191 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1192 thread_scheme => "pthreads",
1193 perlasm_scheme => "aix64",
1194 dso_scheme => "dlfcn",
1195 shared_target => "aix-shared",
1196 shared_ldflag => "-q64 -G",
1197 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1201 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
1203 inherit_from => [ "BASE_unix" ],
1205 cflags => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC",
1206 ex_libs => add("-lsocket -lnsl"),
1207 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1208 thread_scheme => "(unknown)",
1211 # OS/390 Unix an EBCDIC-based Unix system on IBM mainframe
1212 # You need to compile using the c89.sh wrapper in the tools directory, because the
1213 # IBM compiler does not like the -L switch after any object modules.
1216 inherit_from => [ "BASE_unix" ],
1218 cflags => "-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE",
1219 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1220 thread_scheme => "(unknown)",
1223 #### Visual C targets
1225 # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
1227 # Note about -wd4090, disable warning C4090. This warning returns false
1228 # positives in some situations. Disabling it altogether masks both
1229 # legitimate and false cases, but as we compile on multiple platforms,
1230 # we rely on other compilers to catch legitimate cases.
1232 # Also note that we force threads no matter what. Configuring "no-threads"
1235 inherit_from => [ "BASE_Windows" ],
1238 cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
1239 defines => add(sub { my @defs = ();
1240 unless ($disabled{"zlib-dynamic"}) {
1243 'LIBZ="' . $withargs{zlib_lib} . '"');
1250 lib_cflags => add("/Zi /Fdossl_static"),
1251 dso_cflags => "/Zi /Fddso",
1252 bin_cflags => "/Zi /Fdapp",
1253 lflags => add("/debug"),
1254 shared_ldflag => "/dll",
1255 shared_target => "win-shared", # meaningless except it gives Configure a hint
1256 thread_scheme => "winthreads",
1257 dso_scheme => "win32",
1259 "VC-noCE-common" => {
1260 inherit_from => [ "VC-common" ],
1261 cflags => add(picker(default => "-DUNICODE -D_UNICODE",
1264 ($disabled{shared} ? "" : "/MDd")
1265 ." /Od -DDEBUG -D_DEBUG";
1269 ($disabled{shared} ? "" : "/MD")
1272 lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }),
1273 # Following might/should appears controversial, i.e. defining
1274 # /MDd without evaluating $disabled{shared}. It works in
1275 # non-shared build because static library is compiled with /Zl
1276 # and bares no reference to specific RTL. And it works in
1277 # shared build because multiple /MDd options are not prohibited.
1278 # But why /MDd in static build? Well, basically this is just a
1279 # reference point, which allows to catch eventual errors that
1280 # would prevent those who want to wrap OpenSSL into own .DLL.
1281 # Why not /MD in release build then? Well, some are likely to
1282 # prefer [non-debug] openssl.exe to be free from Micorosoft RTL
1284 bin_cflags => add(picker(debug => "/MDd",
1285 release => sub { $disabled{shared} ? "/MT" : () },
1287 bin_lflags => add("/subsystem:console /opt:ref"),
1288 ex_libs => add(sub {
1290 push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
1291 push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
1292 return join(" ", @ex_libs);
1295 "VC-WIN64-common" => {
1296 inherit_from => [ "VC-noCE-common" ],
1297 ex_libs => add(sub {
1299 push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
1300 return join(" ", @_, @ex_libs);
1302 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1303 build_scheme => add("VC-W64", { separator => undef }),
1306 inherit_from => [ "VC-WIN64-common", asm("ia64_asm"),
1307 sub { $disabled{shared} ? () : "ia64_uplink" } ],
1309 asflags => "-d debug",
1312 bn_asm_src => sub { return undef unless @_;
1313 my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; },
1314 perlasm_scheme => "ias",
1315 multilib => "-ia64",
1318 inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"),
1319 sub { $disabled{shared} ? () : "x86_64_uplink" } ],
1320 as => sub { vc_win64a_info()->{as} },
1321 asflags => sub { vc_win64a_info()->{asflags} },
1322 asoutflag => sub { vc_win64a_info()->{asoutflag} },
1324 bn_asm_src => sub { return undef unless @_;
1325 my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
1326 perlasm_scheme => "auto",
1330 # x86 Win32 target defaults to ANSI API, if you want UNICODE,
1331 # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
1332 inherit_from => [ "VC-noCE-common", asm("x86_asm"),
1333 sub { $disabled{shared} ? () : "uplink_common" } ],
1334 as => sub { vc_win32_info()->{as} },
1335 asflags => sub { vc_win32_info()->{asflags} },
1336 asoutflag => sub { vc_win32_info()->{asoutflag} },
1337 ex_libs => add(sub {
1339 # WIN32 UNICODE build gets linked with unicows.lib for
1340 # backward compatibility with Win9x.
1341 push @ex_libs, 'unicows.lib'
1342 if (grep { $_ eq "UNICODE" } @user_defines);
1343 return join(" ", @ex_libs, @_);
1346 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1347 perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} },
1348 build_scheme => add("VC-W32", { separator => undef }),
1351 inherit_from => [ "VC-common" ],
1353 asflags => "/nologo /Cp /coff /c /Cx /Zi",
1358 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',
1359 sub { vc_wince_info()->{cflags}; },
1360 sub { defined($ENV{'WCECOMPAT'})
1361 ? '-I$(WCECOMPAT)/include' : (); },
1362 sub { defined($ENV{'PORTSDK_LIBPATH'})
1363 ? '-I$(PORTSDK_LIBPATH)/../../include' : (); },
1364 sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14
1365 ? ($disabled{shared} ? " /MT" : " /MD")
1367 debug => "/Od -DDEBUG -D_DEBUG",
1369 lflags => combine("/nologo /opt:ref",
1370 sub { vc_wince_info()->{lflags}; },
1371 sub { defined($ENV{PORTSDK_LIBPATH})
1372 ? "/entry:mainCRTstartup" : (); }),
1374 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1375 ex_libs => add(sub {
1377 push @ex_libs, 'ws2.lib' unless $disabled{sock};
1378 push @ex_libs, 'crypt32.lib';
1379 if (defined($ENV{WCECOMPAT})) {
1380 my $x = '$(WCECOMPAT)/lib';
1381 if (-f "$x/$ENV{TARGETCPU}/wcecompatex.lib") {
1382 $x .= '/$(TARGETCPU)/wcecompatex.lib';
1384 $x .= '/wcecompatex.lib';
1388 push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
1389 if (defined($ENV{'PORTSDK_LIBPATH'}));
1390 push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
1391 if ($ENV{'TARGETCPU'} eq "X86");
1394 build_scheme => add("VC-WCE", { separator => undef }),
1399 inherit_from => [ "BASE_unix", asm("x86_asm"),
1400 sub { $disabled{shared} ? () : "x86_uplink" } ],
1402 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
1404 release => "-O3 -fomit-frame-pointer"),
1406 sys_id => "MINGW32",
1407 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1408 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1409 thread_scheme => "winthreads",
1410 perlasm_scheme => "coff",
1411 dso_scheme => "win32",
1412 shared_target => "mingw-shared",
1413 shared_cflag => add("-D_WINDLL"),
1414 shared_ldflag => "-static-libgcc",
1415 shared_rcflag => "--target=pe-i386",
1416 shared_extension => ".dll",
1420 # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1421 # .dll compiled with one compiler with application compiled with
1422 # another compiler. It's possible to engage Applink support in
1423 # mingw64 build, but it's not done, because till mingw64
1424 # supports structured exception handling, one can't seriously
1425 # consider its binaries for using with non-mingw64 run-time
1426 # environment. And as mingw64 is always consistent with itself,
1427 # Applink is never engaged and can as well be omitted.
1428 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1430 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall",
1434 sys_id => "MINGW64",
1435 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1436 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1437 thread_scheme => "winthreads",
1438 perlasm_scheme => "mingw64",
1439 dso_scheme => "win32",
1440 shared_target => "mingw-shared",
1441 shared_cflag => add("-D_WINDLL"),
1442 shared_ldflag => "-static-libgcc",
1443 shared_rcflag => "--target=pe-x86-64",
1444 shared_extension => ".dll",
1450 inherit_from => [ "BASE_unix" ],
1452 cflags => "-DL_ENDIAN -O",
1458 inherit_from => [ "BASE_unix" ],
1460 cflags => "-DTERMIOS -DL_ENDIAN -O -Wall",
1462 bn_ops => "BN_LLONG",
1463 dso_scheme => "win32",
1468 inherit_from => [ "BASE_unix", asm("x86_asm") ],
1470 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1472 release => "-O3 -fomit-frame-pointer"),
1474 bn_ops => "BN_LLONG",
1475 thread_scheme => "pthread",
1476 perlasm_scheme => "coff",
1477 dso_scheme => "dlfcn",
1478 shared_target => "cygwin-shared",
1479 shared_cflag => "-D_WINDLL",
1480 shared_ldflag => "-shared",
1481 shared_extension => ".dll",
1483 "Cygwin-x86_64" => {
1484 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1486 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1490 bn_ops => "SIXTY_FOUR_BIT_LONG",
1491 thread_scheme => "pthread",
1492 perlasm_scheme => "mingw64",
1493 dso_scheme => "dlfcn",
1494 shared_target => "cygwin-shared",
1495 shared_cflag => "-D_WINDLL",
1496 shared_ldflag => "-shared",
1497 shared_extension => ".dll",
1499 # Backward compatibility for those using this target
1501 inherit_from => [ "Cygwin-x86" ]
1503 # In case someone constructs the Cygwin target name themself
1505 inherit_from => [ "Cygwin-x86" ]
1508 inherit_from => [ "Cygwin-x86" ]
1511 inherit_from => [ "Cygwin-x86" ]
1514 inherit_from => [ "Cygwin-x86" ]
1517 ##### MacOS X (a.k.a. Darwin) setup
1518 "darwin-common" => {
1519 inherit_from => [ "BASE_unix" ],
1522 cflags => combine(picker(default => "",
1525 threads("-D_REENTRANT")),
1527 plib_lflags => "-Wl,-search_paths_first",
1528 bn_ops => "BN_LLONG RC4_CHAR",
1529 thread_scheme => "pthreads",
1530 perlasm_scheme => "osx32",
1531 dso_scheme => "dlfcn",
1532 ranlib => "ranlib -c",
1533 shared_target => "darwin-shared",
1534 shared_cflag => "-fPIC",
1535 shared_ldflag => "-dynamiclib",
1536 shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
1538 # Option "freeze" such as -std=gnu9x can't negatively interfere
1539 # with future defaults for below two targets, because MacOS X
1540 # for PPC has no future, it was discontinued by vendor in 2009.
1541 "darwin-ppc-cc" => {
1542 inherit_from => [ "darwin-common", asm("ppc32_asm") ],
1543 cflags => add("-arch ppc -std=gnu9x -DB_ENDIAN -Wa,-force_cpusubtype_ALL"),
1544 perlasm_scheme => "osx32",
1545 shared_ldflag => "-arch ppc -dynamiclib",
1547 "darwin64-ppc-cc" => {
1548 inherit_from => [ "darwin-common", asm("ppc64_asm") ],
1549 cflags => add("-arch ppc64 -std=gnu9x -DB_ENDIAN"),
1550 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1551 perlasm_scheme => "osx64",
1552 shared_ldflag => "-arch ppc64 -dynamiclib",
1554 "darwin-i386-cc" => {
1555 inherit_from => [ "darwin-common", asm("x86_asm") ],
1556 cflags => add(picker(default => "-arch i386 -DL_ENDIAN",
1557 release => "-fomit-frame-pointer")),
1558 bn_ops => "BN_LLONG RC4_INT",
1559 perlasm_scheme => "macosx",
1560 shared_ldflag => "-arch i386 -dynamiclib",
1562 "darwin64-x86_64-cc" => {
1563 inherit_from => [ "darwin-common", asm("x86_64_asm") ],
1564 cflags => add("-arch x86_64 -DL_ENDIAN -Wall"),
1565 bn_ops => "SIXTY_FOUR_BIT_LONG",
1566 perlasm_scheme => "macosx",
1567 shared_ldflag => "-arch x86_64 -dynamiclib",
1572 # It takes three prior-set environment variables to make it work:
1574 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
1575 # CROSS_TOP=/where/SDKs/are
1576 # CROSS_SDK=iPhoneOSx.y.sdk
1578 # Exact paths vary with Xcode releases, but for couple of last ones
1579 # they would look like this:
1581 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
1582 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
1583 # CROSS_SDK=iPhoneOS.sdk
1585 "iphoneos-cross" => {
1586 inherit_from => [ "darwin-common" ],
1587 cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1591 inherit_from => [ "darwin-common", asm("armv4_asm") ],
1592 # It should be possible to go below iOS 6 and even add -arch armv6,
1593 # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
1595 cflags => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1597 perlasm_scheme => "ios32",
1600 inherit_from => [ "darwin-common", asm("aarch64_asm") ],
1601 cflags => add("-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1603 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1604 perlasm_scheme => "ios64",
1609 inherit_from => [ "BASE_unix" ],
1610 inherit_from => [ asm("x86_elf_asm") ],
1612 cflags => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
1613 threads("-pthread")),
1614 ex_libs => add("-ldl"),
1615 bn_ops => "BN_LLONG",
1616 thread_scheme => "pthreads",
1617 dso_scheme => "dlfcn",
1618 shared_target => "linux-shared",
1619 shared_cflag => "-fPIC",
1622 ##### VxWorks for various targets
1623 "vxworks-ppc60x" => {
1624 inherit_from => [ "BASE_unix" ],
1626 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",
1627 sys_id => "VXWORKS",
1628 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),
1630 "vxworks-ppcgen" => {
1631 inherit_from => [ "BASE_unix" ],
1633 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",
1634 sys_id => "VXWORKS",
1635 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),
1637 "vxworks-ppc405" => {
1638 inherit_from => [ "BASE_unix" ],
1640 cflags => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h",
1641 sys_id => "VXWORKS",
1644 "vxworks-ppc750" => {
1645 inherit_from => [ "BASE_unix" ],
1647 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)",
1648 sys_id => "VXWORKS",
1651 "vxworks-ppc750-debug" => {
1652 inherit_from => [ "BASE_unix" ],
1654 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",
1655 sys_id => "VXWORKS",
1658 "vxworks-ppc860" => {
1659 inherit_from => [ "BASE_unix" ],
1661 cflags => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h",
1662 sys_id => "VXWORKS",
1665 "vxworks-simlinux" => {
1666 inherit_from => [ "BASE_unix" ],
1668 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",
1669 sys_id => "VXWORKS",
1671 ranlib => "ranlibpentium",
1674 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
1676 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",
1677 threads("-D_REENTRANT")),
1678 sys_id => "VXWORKS",
1679 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),
1680 thread_scheme => "pthreads",
1681 perlasm_scheme => "o32",
1682 ranlib => "ranlibmips",
1687 inherit_from => [ "BASE_unix" ],
1689 cflags => combine("\$(CFLAGS)",
1690 threads("-D_REENTRANT")),
1691 plib_lflags => "\$(LDFLAGS)",
1692 ex_libs => add("\$(LDLIBS)"),
1693 bn_ops => "BN_LLONG",
1694 thread_scheme => "pthreads",
1695 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1696 shared_target => "linux-shared",
1697 shared_cflag => "-fPIC",
1698 shared_ldflag => "-shared",
1699 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1700 ranlib => "$ENV{'RANLIB'}",
1702 "uClinux-dist64" => {
1703 inherit_from => [ "BASE_unix" ],
1705 cflags => combine("\$(CFLAGS)",
1706 threads("-D_REENTRANT")),
1707 plib_lflags => "\$(LDFLAGS)",
1708 ex_libs => add("\$(LDLIBS)"),
1709 bn_ops => "SIXTY_FOUR_BIT_LONG",
1710 thread_scheme => "pthreads",
1711 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1712 shared_target => "linux-shared",
1713 shared_cflag => "-fPIC",
1714 shared_ldflag => "-shared",
1715 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1716 ranlib => "$ENV{'RANLIB'}",
1721 inherit_from => [ "BASE_VMS" ],
1724 cflags => picker(default => "/STANDARD=RELAXED/NOLIST/PREFIX=ALL",
1725 debug => "/NOOPTIMIZE/DEBUG",
1726 release => "/OPTIMIZE/NODEBUG"),
1727 lflags => picker(default => "/MAP",
1728 debug => "/DEBUG/TRACEBACK",
1729 release => "/NODEBUG/NOTRACEBACK"),
1730 lib_cflags => add("/NAMES=(AS_IS,SHORTENED)"),
1731 dso_cflags => add("/NAMES=(AS_IS,SHORTENED)"),
1732 shared_target => "vms-shared",
1733 dso_scheme => "vms",
1734 thread_scheme => "pthreads",
1736 apps_aux_src => "vms_decc_init.c",
1739 # VMS on VAX is *unsupported*
1742 # bn_obj => "[.asm]vms.obj vms-helper.obj"
1745 # inherit_from => [ "vms-generic", asm("vms-asm") ],
1747 # debug_aflags => "/NOOPTIMIZE/DEBUG",
1748 # release_aflags => "/OPTIMIZE/NODEBUG",
1749 # bn_opts => "THIRTY_TWO_BIT RC4_CHAR RC4_CHUNK DES_PTR BF_PTR",
1752 inherit_from => [ "vms-generic" ],
1753 cflags => add(sub { my @warnings =
1754 @{vms_info(0)->{disable_warns}};
1756 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1759 return vms_info(0)->{def_zlib}
1760 ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : ();
1762 ex_libs => add(sub { return vms_info(0)->{zlib} || (); }),
1764 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1765 #release_aflags => "/OPTIMIZE/NODEBUG",
1766 bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1768 "vms-alpha-p32" => {
1769 inherit_from => [ "vms-generic" ],
1771 add("/POINTER_SIZE=32",
1772 sub { my @warnings =
1773 @{vms_info(32)->{disable_warns}};
1775 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1779 return vms_info(32)->{def_zlib}
1780 ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : ();
1782 ex_libs => add(sub { return vms_info(32)->{zlib} || (); }),
1784 "vms-alpha-p64" => {
1785 inherit_from => [ "vms-generic" ],
1787 add("/POINTER_SIZE=64=ARGV",
1788 sub { my @warnings =
1789 @{vms_info(64)->{disable_warns}};
1791 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1795 return vms_info(64)->{def_zlib}
1796 ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : ();
1798 ex_libs => add(sub { return vms_info(64)->{zlib} || (); }),
1801 inherit_from => [ "vms-generic" ],
1802 cflags => add(sub { my @warnings =
1803 @{vms_info(0)->{disable_warns}};
1805 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1808 return vms_info(0)->{def_zlib}
1809 ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : ();
1811 ex_libs => add(sub { return vms_info(0)->{zlib} || (); }),
1813 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1814 #release_aflags => "/OPTIMIZE/NODEBUG",
1815 bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1818 inherit_from => [ "vms-generic" ],
1820 add("/POINTER_SIZE=32",
1821 sub { my @warnings =
1822 @{vms_info(32)->{disable_warns}};
1824 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1828 return vms_info(32)->{def_zlib}
1829 ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : ();
1831 ex_libs => add(sub { return vms_info(32)->{zlib} || (); }),
1834 inherit_from => [ "vms-generic" ],
1836 add("/POINTER_SIZE=64=ARGV",
1837 sub { my @warnings =
1838 @{vms_info(64)->{disable_warns}};
1840 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1844 return vms_info(64)->{def_zlib}
1845 ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : ();
1847 ex_libs => add(sub { return vms_info(64)->{zlib} || (); }),