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");
18 $vc_win64a_info = { as => "{unknown}",
23 return $vc_win64a_info;
26 my $vc_win32_info = {};
28 unless (%$vc_win32_info) {
29 my $ver=`nasm -v 2>NUL`;
30 my $vew=`nasmw -v 2>NUL`;
31 if ($ver ne "" || $vew ne "") {
32 $vc_win32_info = { as => $ver ge $vew ? "nasm" : "nasmw",
33 asflags => "-f win32",
35 perlasm_scheme => "win32n" };
36 } elsif ($disabled{asm}) {
37 $vc_win32_info = { as => "ml",
38 asflags => "/nologo /Cp /coff /c /Cx /Zi",
40 perlasm_scheme => "win32" };
42 $die->("NASM not found - please read INSTALL and NOTES.WIN for further details\n");
43 $vc_win32_info = { as => "{unknown}",
46 perlasm_scheme => "win32" };
49 return $vc_win32_info;
52 my $vc_wince_info = {};
54 unless (%$vc_wince_info) {
56 $die->('%OSVERSION% is not defined') if (!defined($ENV{'OSVERSION'}));
57 $die->('%PLATFORM% is not defined') if (!defined($ENV{'PLATFORM'}));
58 $die->('%TARGETCPU% is not defined') if (!defined($ENV{'TARGETCPU'}));
61 # Idea behind this is to mimic flags set by eVC++ IDE...
63 my $wcevers = $ENV{'OSVERSION'}; # WCENNN
66 if ($wcevers =~ /^WCE([1-9])([0-9]{2})$/) {
68 $wceverdotnum = "$1.$2";
70 $die->('%OSVERSION% value is insane');
71 $wcevernum = "{unknown}";
72 $wceverdotnum = "{unknown}";
74 my $wcecdefs = "-D_WIN32_WCE=$wcevernum -DUNDER_CE=$wcevernum"; # -D_WIN32_WCE=NNN
75 my $wcelflag = "/subsystem:windowsce,$wceverdotnum"; # ...,N.NN
77 my $wceplatf = $ENV{'PLATFORM'};
79 $wceplatf =~ tr/a-z0-9 /A-Z0-9_/;
80 $wcecdefs .= " -DWCE_PLATFORM_$wceplatf";
82 my $wcetgt = $ENV{'TARGETCPU'}; # just shorter name...
83 SWITCH: for($wcetgt) {
84 /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_";
85 $wcelflag.=" /machine:X86"; last; };
86 /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
87 $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/);
88 $wcecdefs.=" -QRarch4T -QRinterwork-return";
89 $wcelflag.=" /machine:THUMB"; last; };
90 /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
91 $wcelflag.=" /machine:ARM"; last; };
92 /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
93 $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32";
94 $wcelflag.=" /machine:MIPSFPU"; last; };
95 /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
96 $wcecdefs.=" -DMIPSII -QMmips16";
97 $wcelflag.=" /machine:MIPS16"; last; };
98 /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
99 $wcecdefs.=" -QMmips2";
100 $wcelflag.=" /machine:MIPS"; last; };
101 /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000";
102 $wcelflag.=" /machine:MIPS"; last; };
103 /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx";
104 $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/);
105 $wcelflag.=" /machine:$wcetgt"; last; };
106 { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_";
107 $wcelflag.=" /machine:$wcetgt"; last; };
110 $vc_wince_info = { cflags => $wcecdefs,
111 lflags => $wcelflag };
113 return $vc_wince_info;
116 # Helper functions for the VMS configs
119 unless (%$vms_info) {
120 my $pointer_size = shift;
121 my $pointer_size_str = $pointer_size == 0 ? "" : "$pointer_size";
123 $vms_info->{disable_warns} = [ ];
124 $vms_info->{pointer_size} = $pointer_size_str;
125 if ($pointer_size == 64) {
126 `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;
128 push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3";
132 unless ($disabled{zlib}) {
133 my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str;
134 if (defined($disabled{"zlib-dynamic"})) {
135 $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE";
137 $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib;
138 # In case the --with-zlib-lib value contains something like
139 # /SHARE or /LIB or so at the end, remove it.
140 $vms_info->{def_zlib} =~ s|/.*$||g;
149 #### Basic configs that should work on any 32-bit box
152 cflags => picker(debug => "-O0 -g",
154 thread_scheme => "(unknown)",
155 bn_ops => "BN_LLONG",
160 thread_scheme => "(unknown)",
163 #### VOS Configurations
165 inherit_from => [ "BASE_unix" ],
167 cflags => picker(default => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
170 thread_scheme => "(unknown)",
172 lflags => "-Wl,-map",
173 bn_ops => "BN_LLONG",
174 shared_extension => ".so",
177 #### Solaris configurations
178 "solaris-common" => {
179 inherit_from => [ "BASE_unix" ],
181 cflags => "-DFILIO_H",
182 ex_libs => add("-lresolv -lsocket -lnsl -ldl"),
183 dso_scheme => "dlfcn",
184 thread_scheme => "pthreads",
185 shared_target => "solaris-shared",
186 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
188 #### Solaris x86 with GNU C setups
189 "solaris-x86-gcc" => {
190 # -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have
191 # to do it here because whenever GNU C instantiates an assembler
192 # template it surrounds it with #APP #NO_APP comment pair which
193 # (at least Solaris 7_x86) /usr/ccs/bin/as fails to assemble
194 # with "Illegal mnemonic" error message.
195 inherit_from => [ "solaris-common", asm("x86_elf_asm") ],
197 cflags => add_before(picker(default => "-Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM",
199 release => "-O3 -fomit-frame-pointer"),
200 threads("-pthread")),
201 bn_ops => "BN_LLONG",
202 shared_cflag => "-fPIC",
203 shared_ldflag => "-shared -static-libgcc",
205 "solaris64-x86_64-gcc" => {
206 # -shared -static-libgcc might appear controversial, but modules
207 # taken from static libgcc do not have relocations and linking
208 # them into our shared objects doesn't have any negative side
209 # effects. On the contrary, doing so makes it possible to use
210 # gcc shared build with Sun C. Given that gcc generates faster
211 # code [thanks to inline assembler], I would actually recommend
212 # to consider using gcc shared build even with vendor compiler:-)
213 # <appro@fy.chalmers.se>
214 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
216 cflags => add_before(picker(default => "-m64 -Wall -DL_ENDIAN",
219 threads("-pthread")),
220 bn_ops => "SIXTY_FOUR_BIT_LONG",
221 perlasm_scheme => "elf",
222 shared_cflag => "-fPIC",
223 shared_ldflag => "-m64 -shared -static-libgcc",
227 #### Solaris x86 with Sun C setups
228 # There used to be solaris-x86-cc target, but it was removed,
229 # primarily because vendor assembler can't assemble our modules
230 # with -KPIC flag. As result it, assembly support, was not even
231 # available as option. But its lack means lack of side-channel
232 # resistant code, which is incompatible with security by todays
233 # standards. Fortunately gcc is readily available prepackaged
234 # option, which we can firmly point at...
236 # On related note, solaris64-x86_64-cc target won't compile code
237 # paths utilizing AVX and post-Haswell instruction extensions.
238 # Consider switching to solaris64-x86_64-gcc even here...
240 "solaris64-x86_64-cc" => {
241 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
243 cflags => add_before(picker(default => "-xarch=generic64 -xstrconst -Xa -DL_ENDIAN",
245 release => "-xO5 -xdepend -xbuiltin"),
246 threads("-D_REENTRANT")),
247 thread_scheme => "pthreads",
248 lflags => add("-xarch=generic64",threads("-mt")),
249 ex_libs => add(threads("-lpthread")),
250 bn_ops => "SIXTY_FOUR_BIT_LONG",
251 perlasm_scheme => "elf",
252 shared_cflag => "-KPIC",
253 shared_ldflag => "-xarch=generic64 -G -dy -z text",
257 #### SPARC Solaris with GNU C setups
258 "solaris-sparcv7-gcc" => {
259 inherit_from => [ "solaris-common" ],
261 cflags => add_before(picker(default => "-Wall -DB_ENDIAN -DBN_DIV2W",
264 threads("-pthread")),
265 bn_ops => "BN_LLONG RC4_CHAR",
266 shared_cflag => "-fPIC",
267 shared_ldflag => "-shared",
269 "solaris-sparcv8-gcc" => {
270 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
271 cflags => add_before("-mcpu=v8"),
273 "solaris-sparcv9-gcc" => {
274 # -m32 should be safe to add as long as driver recognizes
276 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
277 cflags => add_before("-m32 -mcpu=ultrasparc"),
279 "solaris64-sparcv9-gcc" => {
280 inherit_from => [ "solaris-sparcv9-gcc" ],
281 cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
282 bn_ops => "BN_LLONG RC4_CHAR",
283 shared_ldflag => "-m64 -shared",
287 #### SPARC Solaris with Sun C setups
288 # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
289 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
290 # SC5.0 note: Compiler common patch 107357-01 or later is required!
291 "solaris-sparcv7-cc" => {
292 inherit_from => [ "solaris-common" ],
294 cflags => add_before(picker(default => "-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W",
296 release => "-xO5 -xdepend"),
297 threads("-D_REENTRANT")),
298 lflags => add(threads("-mt")),
299 ex_libs => add(threads("-lpthread")),
300 bn_ops => "BN_LLONG RC4_CHAR",
301 shared_cflag => "-KPIC",
302 shared_ldflag => "-G -dy -z text",
305 "solaris-sparcv8-cc" => {
306 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
307 cflags => add_before("-xarch=v8"),
309 "solaris-sparcv9-cc" => {
310 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
311 cflags => add_before("-xarch=v8plus"),
313 "solaris64-sparcv9-cc" => {
314 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
315 cflags => add_before("-xarch=v9"),
316 lflags => add_before("-xarch=v9"),
317 bn_ops => "BN_LLONG RC4_CHAR",
318 shared_ldflag => "-xarch=v9 -G -dy -z text",
322 #### IRIX 6.x configs
323 # Only N32 and N64 ABIs are supported.
324 "irix-mips3-gcc" => {
325 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
327 cflags => combine(picker(default => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W",
330 threads("-D_SGI_MP_SOURCE")),
331 ex_libs => add(threads("-lpthread")),
332 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
333 thread_scheme => "pthreads",
334 perlasm_scheme => "n32",
335 dso_scheme => "dlfcn",
336 shared_target => "irix-shared",
337 shared_ldflag => "-mabi=n32",
338 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
342 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
344 cflags => combine(picker(default => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
347 threads("-D_SGI_MP_SOURCE")),
348 ex_libs => add(threads("-lpthread")),
349 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
350 thread_scheme => "pthreads",
351 perlasm_scheme => "n32",
352 dso_scheme => "dlfcn",
353 shared_target => "irix-shared",
354 shared_ldflag => "-n32",
355 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
359 "irix64-mips4-gcc" => {
360 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
362 cflags => combine(picker(default => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W",
365 threads("-D_SGI_MP_SOURCE")),
366 ex_libs => add(threads("-lpthread")),
367 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
368 thread_scheme => "pthreads",
369 perlasm_scheme => "64",
370 dso_scheme => "dlfcn",
371 shared_target => "irix-shared",
372 shared_ldflag => "-mabi=64",
373 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
376 "irix64-mips4-cc" => {
377 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
379 cflags => combine(picker(default => "-64 -mips4 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
382 threads("-D_SGI_MP_SOURCE")),
383 ex_libs => add(threads("-lpthread")),
384 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
385 thread_scheme => "pthreads",
386 perlasm_scheme => "64",
387 dso_scheme => "dlfcn",
388 shared_target => "irix-shared",
389 shared_ldflag => "-64",
390 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
394 #### Unified HP-UX ANSI C configs.
396 # - Originally we were optimizing at +O4 level. It should be noted
397 # that the only difference between +O3 and +O4 is global inter-
398 # procedural analysis. As it has to be performed during the link
399 # stage the compiler leaves behind certain pseudo-code in lib*.a
400 # which might be release or even patch level specific. Generating
401 # the machine code for and analyzing the *whole* program appears
402 # to be *extremely* memory demanding while the performance gain is
403 # actually questionable. The situation is intensified by the default
404 # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
405 # which is way too low for +O4. In other words, doesn't +O3 make
407 # - Keep in mind that the HP compiler by default generates code
408 # suitable for execution on the host you're currently compiling at.
409 # If the toolkit is meant to be used on various PA-RISC processors
410 # consider './Configure hpux-parisc-[g]cc +DAportable'.
411 # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
412 # 32-bit message digests. (For the moment of this writing) HP C
413 # doesn't seem to "digest" too many local variables (they make "him"
414 # chew forever:-). For more details look-up MD32_XARRAY comment in
415 # crypto/sha/sha_lcl.h.
416 # - originally there were 32-bit hpux-parisc2-* targets. They were
417 # scrapped, because a) they were not interchangeable with other 32-bit
418 # targets; b) performance-critical 32-bit assembly modules implement
419 # even PA-RISC 2.0-specific code paths, which are chosen at run-time,
420 # thus adequate performance is provided even with PA-RISC 1.1 build.
421 # <appro@fy.chalmers.se>
422 "hpux-parisc-gcc" => {
423 inherit_from => [ "BASE_unix" ],
425 cflags => combine(picker(default => "-DB_ENDIAN -DBN_DIV2W",
428 threads("-pthread")),
429 ex_libs => add("-Wl,+s -ldld"),
430 bn_ops => "BN_LLONG",
431 thread_scheme => "pthreads",
433 shared_target => "hpux-shared",
434 shared_cflag => "-fPIC",
435 shared_ldflag => "-shared",
436 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
438 "hpux-parisc1_1-gcc" => {
439 inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ],
440 multilib => "/pa1.1",
442 "hpux64-parisc2-gcc" => {
443 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
445 cflags => combine(picker(default => "-DB_ENDIAN",
448 threads("-D_REENTRANT")),
449 ex_libs => add("-ldl"),
450 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
451 thread_scheme => "pthreads",
452 dso_scheme => "dlfcn",
453 shared_target => "hpux-shared",
454 shared_cflag => "-fpic",
455 shared_ldflag => "-shared",
456 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
457 multilib => "/pa20_64",
460 # More attempts at unified 10.X and 11.X targets for HP C compiler.
462 # Chris Ruemmler <ruemmler@cup.hp.com>
463 # Kevin Steves <ks@hp.se>
464 "hpux-parisc-cc" => {
465 inherit_from => [ "BASE_unix" ],
467 cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
468 debug => "+O0 +d -g",
470 threads("-D_REENTRANT")),
471 ex_libs => add("-Wl,+s -ldld",threads("-lpthread")),
472 bn_ops => "RC4_CHAR",
473 thread_scheme => "pthreads",
475 shared_target => "hpux-shared",
476 shared_cflag => "+Z",
477 shared_ldflag => "-b",
478 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
480 "hpux-parisc1_1-cc" => {
481 inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ],
482 cflags => add_before("+DA1.1"),
483 multilib => "/pa1.1",
485 "hpux64-parisc2-cc" => {
486 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
488 cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY",
489 debug => "+O0 +d -g",
491 threads("-D_REENTRANT")),
492 ex_libs => add("-ldl",threads("-lpthread")),
493 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
494 thread_scheme => "pthreads",
495 dso_scheme => "dlfcn",
496 shared_target => "hpux-shared",
497 shared_cflag => "+Z",
498 shared_ldflag => "+DD64 -b",
499 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
500 multilib => "/pa20_64",
503 # HP/UX IA-64 targets
505 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
507 cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z -DB_ENDIAN",
508 debug => "+O0 +d -g",
510 threads("-D_REENTRANT")),
511 ex_libs => add("-ldl",threads("-lpthread")),
512 bn_ops => "SIXTY_FOUR_BIT",
513 thread_scheme => "pthreads",
514 dso_scheme => "dlfcn",
515 shared_target => "hpux-shared",
516 shared_cflag => "+Z",
517 shared_ldflag => "+DD32 -b",
518 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
519 multilib => "/hpux32",
521 # Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted
522 # with debugging of the following config.
523 "hpux64-ia64-cc" => {
524 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
526 cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z -DB_ENDIAN",
527 debug => "+O0 +d -g",
529 threads("-D_REENTRANT")),
530 ex_libs => add("-ldl", threads("-lpthread")),
531 bn_ops => "SIXTY_FOUR_BIT_LONG",
532 thread_scheme => "pthreads",
533 dso_scheme => "dlfcn",
534 shared_target => "hpux-shared",
535 shared_cflag => "+Z",
536 shared_ldflag => "+DD64 -b",
537 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
538 multilib => "/hpux64",
542 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
544 cflags => combine(picker(default => "-DB_ENDIAN",
547 threads("-pthread")),
548 ex_libs => add("-ldl"),
549 bn_ops => "SIXTY_FOUR_BIT",
550 thread_scheme => "pthreads",
551 dso_scheme => "dlfcn",
552 shared_target => "hpux-shared",
553 shared_cflag => "-fpic",
554 shared_ldflag => "-shared",
555 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
556 multilib => "/hpux32",
558 "hpux64-ia64-gcc" => {
559 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
561 cflags => combine(picker(default => "-mlp64 -DB_ENDIAN",
564 threads("-pthread")),
565 ex_libs => add("-ldl"),
566 bn_ops => "SIXTY_FOUR_BIT_LONG",
567 thread_scheme => "pthreads",
568 dso_scheme => "dlfcn",
569 shared_target => "hpux-shared",
570 shared_cflag => "-fpic",
571 shared_ldflag => "-mlp64 -shared",
572 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
573 multilib => "/hpux64",
576 #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
578 inherit_from => [ "BASE_unix" ],
580 cflags => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB",
582 ex_libs => add("-L/SYSLOG/PUB -lsyslog -lsocket -lcurses"),
583 thread_scheme => "(unknown)",
584 bn_ops => "BN_LLONG",
587 #### DEC Alpha Tru64 targets. Tru64 is marketing name for OSF/1 version 4
588 #### and forward. In reality 'uname -s' still returns "OSF1". Originally
589 #### there were even osf1-* configs targeting prior versions provided,
590 #### but not anymore...
591 "tru64-alpha-gcc" => {
592 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
594 cflags => combine("-std=c9x -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -O3",
595 threads("-pthread")),
596 ex_libs => "-lrt", # for mlock(2)
597 bn_ops => "SIXTY_FOUR_BIT_LONG",
598 thread_scheme => "pthreads",
599 dso_scheme => "dlfcn",
600 shared_target => "alpha-osf1-shared",
601 shared_extension => ".so",
603 "tru64-alpha-cc" => {
604 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
606 cflags => combine("-std1 -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -tune host -fast -readonly_strings",
607 threads("-pthread")),
608 ex_libs => "-lrt", # for mlock(2)
609 bn_ops => "SIXTY_FOUR_BIT_LONG",
610 thread_scheme => "pthreads",
611 dso_scheme => "dlfcn",
612 shared_target => "alpha-osf1-shared",
613 shared_ldflag => "-msym",
614 shared_extension => ".so",
618 #### Variety of LINUX:-)
620 # *-generic* is endian-neutral target, but ./config is free to
621 # throw in -D[BL]_ENDIAN, whichever appropriate...
622 "linux-generic32" => {
623 inherit_from => [ "BASE_unix" ],
625 cflags => combine(picker(default => "-Wall",
628 threads("-pthread")),
629 ex_libs => add("-ldl"),
630 bn_ops => "BN_LLONG RC4_CHAR",
631 thread_scheme => "pthreads",
632 dso_scheme => "dlfcn",
633 shared_target => "linux-shared",
634 shared_cflag => "-fPIC",
635 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
637 "linux-generic64" => {
638 inherit_from => [ "linux-generic32" ],
639 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
643 inherit_from => [ "linux-generic32", asm("ppc32_asm") ],
644 perlasm_scheme => "linux32",
647 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
648 cflags => add("-m64 -DB_ENDIAN"),
649 perlasm_scheme => "linux64",
650 shared_ldflag => "-m64",
654 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
655 cflags => add("-m64 -DL_ENDIAN"),
656 perlasm_scheme => "linux64le",
657 shared_ldflag => "-m64",
661 ################################################################
662 # Note that -march is not among compiler options in linux-armv4
663 # target description. Not specifying one is intentional to give
666 # a) rely on your compiler default by not specifying one;
667 # b) specify your target platform explicitly for optimal
668 # performance, e.g. -march=armv6 or -march=armv7-a;
669 # c) build "universal" binary that targets *range* of platforms
670 # by specifying minimum and maximum supported architecture;
672 # As for c) option. It actually makes no sense to specify
673 # maximum to be less than ARMv7, because it's the least
674 # requirement for run-time switch between platform-specific
675 # code paths. And without run-time switch performance would be
676 # equivalent to one for minimum. Secondly, there are some
677 # natural limitations that you'd have to accept and respect.
678 # Most notably you can *not* build "universal" binary for
679 # big-endian platform. This is because ARMv7 processor always
680 # picks instructions in little-endian order. Another similar
681 # limitation is that -mthumb can't "cross" -march=armv6t2
682 # boundary, because that's where it became Thumb-2. Well, this
683 # limitation is a bit artificial, because it's not really
684 # impossible, but it's deemed too tricky to support. And of
685 # course you have to be sure that your binutils are actually
686 # up to the task of handling maximum target platform. With all
687 # this in mind here is an example of how to configure
690 # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
692 inherit_from => [ "linux-generic32", asm("armv4_asm") ],
693 perlasm_scheme => "linux32",
696 inherit_from => [ "linux-generic64", asm("aarch64_asm") ],
697 perlasm_scheme => "linux64",
699 "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32
700 inherit_from => [ "linux-generic32", asm("aarch64_asm") ],
701 cflags => add("-mabi=ilp32"),
702 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
703 perlasm_scheme => "linux64",
704 shared_ldflag => "-mabi=ilp32",
708 # Configure script adds minimally required -march for assembly
709 # support, if no -march was specified at command line.
710 inherit_from => [ "linux-generic32", asm("mips32_asm") ],
711 cflags => add("-mabi=32 -DBN_DIV3W"),
712 perlasm_scheme => "o32",
713 shared_ldflag => "-mabi=32",
715 # mips32 and mips64 below refer to contemporary MIPS Architecture
716 # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
718 inherit_from => [ "linux-generic32", asm("mips64_asm") ],
719 cflags => add("-mabi=n32 -DBN_DIV3W"),
720 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
721 perlasm_scheme => "n32",
722 shared_ldflag => "-mabi=n32",
725 "linux64-mips64" => {
726 inherit_from => [ "linux-generic64", asm("mips64_asm") ],
727 cflags => add("-mabi=64 -DBN_DIV3W"),
728 perlasm_scheme => "64",
729 shared_ldflag => "-mabi=64",
733 #### IA-32 targets...
735 inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
736 cflags => add(picker(default => "-DL_ENDIAN",
737 release => "-fomit-frame-pointer")),
738 bn_ops => "BN_LLONG",
741 inherit_from => [ "BASE_unix", asm("x86_asm") ],
743 cflags => add(picker(default => "-DL_ENDIAN -Wall",
745 release => "-O3 -fomit-frame-pointer")),
746 bn_ops => "BN_LLONG",
747 thread_scheme => "(unknown)",
748 perlasm_scheme => "a.out",
752 inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
753 cflags => add("-m64 -DL_ENDIAN"),
754 bn_ops => "SIXTY_FOUR_BIT_LONG",
755 perlasm_scheme => "elf",
756 shared_ldflag => "-m64",
759 "linux-x86_64-clang" => {
760 inherit_from => [ "linux-x86_64" ],
762 cflags => add("-Wextra -Qunused-arguments"),
765 inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
766 cflags => add("-mx32 -DL_ENDIAN"),
767 bn_ops => "SIXTY_FOUR_BIT",
768 perlasm_scheme => "elf32",
769 shared_ldflag => "-mx32",
774 inherit_from => [ "linux-generic64", asm("ia64_asm") ],
775 bn_ops => "SIXTY_FOUR_BIT_LONG",
779 inherit_from => [ "linux-generic64", asm("s390x_asm") ],
780 cflags => add("-m64 -DB_ENDIAN"),
781 perlasm_scheme => "64",
782 shared_ldflag => "-m64",
786 #### So called "highgprs" target for z/Architecture CPUs
787 # "Highgprs" is kernel feature first implemented in Linux
788 # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
789 # significant bits of general purpose registers not only
790 # upon 32-bit process context switch, but even on
791 # asynchronous signal delivery to such process. This makes
792 # it possible to deploy 64-bit instructions even in legacy
793 # application context and achieve better [or should we say
794 # adequate] performance. The build is binary compatible with
795 # linux-generic32, and the idea is to be able to install the
796 # resulting libcrypto.so alongside generic one, e.g. as
797 # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
798 # linker to autodiscover. Unfortunately it doesn't work just
799 # yet, because of couple of bugs in glibc
800 # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
802 inherit_from => [ "linux-generic32", asm("s390x_asm") ],
803 cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"),
804 bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; },
805 perlasm_scheme => "31",
806 shared_ldflag => "-m31",
807 multilib => "/highgprs",
810 #### SPARC Linux setups
811 # Ray Miller <ray.miller@computing-services.oxford.ac.uk> has
812 # patiently assisted with debugging of following two configs.
814 inherit_from => [ "linux-generic32", asm("sparcv8_asm") ],
815 cflags => add("-mcpu=v8 -DB_ENDIAN -DBN_DIV2W"),
818 # it's a real mess with -mcpu=ultrasparc option under Linux,
819 # but -Wa,-Av8plus should do the trick no matter what.
820 inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
821 cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W"),
822 shared_ldflag => "-m32",
824 "linux64-sparcv9" => {
825 # GCC 3.1 is a requirement
826 inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
827 cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"),
828 bn_ops => "BN_LLONG RC4_CHAR",
829 shared_ldflag => "-m64",
833 "linux-alpha-gcc" => {
834 inherit_from => [ "linux-generic64", asm("alpha_asm") ],
835 cflags => add("-DL_ENDIAN"),
836 bn_ops => "SIXTY_FOUR_BIT_LONG",
838 "linux-c64xplus" => {
839 inherit_from => [ "BASE_unix" ],
840 # TI_CGT_C6000_7.3.x is a requirement
842 cflags => combine("--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT",
843 threads("-D_REENTRANT")),
844 bn_ops => "BN_LLONG",
845 cpuid_asm_src => "c64xpluscpuid.s",
846 bn_asm_src => "asm/bn-c64xplus.asm c64xplus-gf2m.s",
847 aes_asm_src => "aes-c64xplus.s aes_cbc.c aes-ctr.fake",
848 sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s",
849 rc4_asm_src => "rc4-c64xplus.s",
850 modes_asm_src => "ghash-c64xplus.s",
851 chacha_asm_src => "chacha-c64xplus.s",
852 poly1305_asm_src => "poly1305-c64xplus.s",
853 thread_scheme => "pthreads",
854 perlasm_scheme => "void",
855 dso_scheme => "dlfcn",
856 shared_target => "linux-shared",
857 shared_cflag => "--pic",
858 shared_ldflag => "-z --sysv --shared",
859 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
863 #### Android: linux-* but without pointers to headers and libs.
865 # It takes pair of prior-set environment variables to make it work:
867 # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<arch>
868 # CROSS_COMPILE=<prefix>
870 # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
871 # For example to compile for ICS and ARM with NDK 10d, you'd:
873 # ANDROID_NDK=/some/where/android-ndk-10d
874 # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
875 # CROSS_COMPILE=arm-linux-adroideabi-
876 # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/bin
879 inherit_from => [ "linux-generic32" ],
880 # Special note about unconditional -fPIC and -pie. The underlying
881 # reason is that Lollipop refuses to run non-PIE. But what about
882 # older systems and NDKs? -fPIC was never problem, so the only
883 # concern is -pie. Older toolchains, e.g. r4, appear to handle it
884 # and binaries turn mostly functional. "Mostly" means that oldest
885 # Androids, such as Froyo, fail to handle executable, but newer
886 # systems are perfectly capable of executing binaries targeting
887 # Froyo. Keep in mind that in the nutshell Android builds are
888 # about JNI, i.e. shared libraries, not applications.
889 cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")),
890 bin_cflags => "-pie",
893 inherit_from => [ "android", asm("x86_asm") ],
894 cflags => add(picker(release => "-fomit-frame-pointer")),
895 bn_ops => "BN_LLONG",
896 perlasm_scheme => "android",
898 ################################################################
899 # Contemporary Android applications can provide multiple JNI
900 # providers in .apk, targeting multiple architectures. Among
901 # them there is "place" for two ARM flavours: generic eabi and
902 # armv7-a/hard-float. However, it should be noted that OpenSSL's
903 # ability to engage NEON is not constrained by ABI choice, nor
904 # is your ability to call OpenSSL from your application code
905 # compiled with floating-point ABI other than default 'soft'.
906 # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
907 # This means that choice of ARM libraries you provide in .apk
908 # is driven by application needs. For example if application
909 # itself benefits from NEON or is floating-point intensive, then
910 # it might be appropriate to provide both libraries. Otherwise
911 # just generic eabi would do. But in latter case it would be
914 # ./Configure android-armeabi -D__ARM_MAX_ARCH__=8
916 # in order to build "universal" binary and allow OpenSSL take
917 # advantage of NEON when it's available.
919 "android-armeabi" => {
920 inherit_from => [ "android", asm("armv4_asm") ],
923 inherit_from => [ "android", asm("mips32_asm") ],
924 perlasm_scheme => "o32",
928 inherit_from => [ "linux-generic64" ],
929 cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")),
930 bin_cflags => "-pie",
932 "android64-aarch64" => {
933 inherit_from => [ "android64", asm("aarch64_asm") ],
934 perlasm_scheme => "linux64",
939 # As for thread cflag. Idea is to maintain "collective" set of
940 # flags, which would cover all BSD flavors. -pthread applies
941 # to them all, but is treated differently. OpenBSD expands is
942 # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
943 # expands it as -lc_r, which has to be accompanied by explicit
944 # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
945 # expands it as -lc_r, which seems to be sufficient?
946 inherit_from => [ "BASE_unix" ],
948 cflags => combine(picker(default => "-Wall",
951 threads("-pthread -D_THREAD_SAFE -D_REENTRANT")),
952 bn_ops => "BN_LLONG",
953 thread_scheme => "pthreads",
954 dso_scheme => "dlfcn",
955 shared_target => "bsd-gcc-shared",
956 shared_cflag => "-fPIC",
957 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
960 inherit_from => [ "BSD-generic32" ],
961 bn_ops => "SIXTY_FOUR_BIT_LONG",
965 inherit_from => [ "BSD-generic32", asm("x86_asm") ],
966 cflags => add(picker(default => "-DL_ENDIAN",
967 release => "-fomit-frame-pointer")),
968 bn_ops => "BN_LLONG",
969 shared_target => "bsd-shared",
970 perlasm_scheme => "a.out",
973 inherit_from => [ "BSD-x86" ],
974 perlasm_scheme => "elf",
978 inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ],
979 cflags => add("-mcpu=v8 -DB_ENDIAN"),
982 # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
983 # simply *happens* to work around a compiler bug in gcc 3.3.3,
984 # triggered by RIPEMD160 code.
985 inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ],
986 cflags => add("-DB_ENDIAN -DMD32_REG_T=int"),
987 bn_ops => "BN_LLONG",
991 inherit_from => [ "BSD-generic64", asm("ia64_asm") ],
992 cflags => add_before("-DL_ENDIAN"),
993 bn_ops => "SIXTY_FOUR_BIT_LONG",
997 inherit_from => [ "BSD-generic64", asm("x86_64_asm") ],
998 cflags => add_before("-DL_ENDIAN"),
999 bn_ops => "SIXTY_FOUR_BIT_LONG",
1000 perlasm_scheme => "elf",
1004 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1006 cflags => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -Wall",
1007 ex_libs => add("-ldl"),
1008 bn_ops => "BN_LLONG",
1009 thread_scheme => "(unknown)",
1010 dso_scheme => "dlfcn",
1011 shared_target => "bsd-gcc-shared",
1012 shared_cflag => "-fPIC",
1013 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1017 inherit_from => [ "BASE_unix" ],
1019 cflags => "-O -Wall",
1020 unistd => "<libc.h>",
1021 bn_ops => "BN_LLONG",
1022 thread_scheme => "(unknown)",
1025 inherit_from => [ "BASE_unix" ],
1027 cflags => "-O3 -Wall",
1028 unistd => "<libc.h>",
1029 bn_ops => "BN_LLONG",
1030 thread_scheme => "(unknown)",
1035 inherit_from => [ "BASE_unix" ],
1037 cflags => "-DL_ENDIAN -DTERMIO",
1038 thread_scheme => "(unknown)",
1041 inherit_from => [ "BASE_unix" ],
1043 ex_libs => add("-lsocket"),
1044 dso_scheme => "dlfcn",
1045 shared_target => "bsd-gcc-shared",
1046 shared_cflag => "-fPIC",
1047 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1050 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1052 cflags => "-DL_ENDIAN -O2 -Wall",
1053 ex_libs => add("-lsocket"),
1054 dso_scheme => "dlfcn",
1055 shared_target => "bsd-gcc-shared",
1056 shared_cflag => "-fPIC",
1057 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1060 #### SCO/Caldera targets.
1062 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
1063 # Now we only have blended unixware-* as it's the only one used by ./config.
1064 # If you want to optimize for particular microarchitecture, bypass ./config
1065 # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
1066 # Note that not all targets include assembler support. Mostly because of
1067 # lack of motivation to support out-of-date platforms with out-of-date
1068 # compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
1069 # patiently assisted to debug most of it.
1071 # UnixWare 2.0x fails destest with -O.
1073 inherit_from => [ "BASE_unix" ],
1075 cflags => combine("-DFILIO_H -DNO_STRINGS_H",
1076 threads("-Kthread")),
1077 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1078 thread_scheme => "uithreads",
1081 inherit_from => [ "BASE_unix" ],
1083 cflags => combine("-O -DFILIO_H",
1084 threads("-Kthread")),
1085 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1086 thread_scheme => "uithreads",
1089 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1091 cflags => combine("-O -DFILIO_H -Kalloca",
1092 threads("-Kthread")),
1093 ex_libs => add("-lsocket -lnsl"),
1094 thread_scheme => "uithreads",
1095 bn_ops => "BN_LLONG",
1096 perlasm_scheme => "elf-1",
1097 dso_scheme => "dlfcn",
1098 shared_target => "svr5-shared",
1099 shared_cflag => "-Kpic",
1100 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1102 "unixware-7-gcc" => {
1103 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1105 cflags => combine("-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -Wall",
1106 threads("-D_REENTRANT")),
1107 ex_libs => add("-lsocket -lnsl"),
1108 bn_ops => "BN_LLONG",
1109 thread_scheme => "pthreads",
1110 perlasm_scheme => "elf-1",
1111 dso_scheme => "dlfcn",
1112 shared_target => "gnu-shared",
1113 shared_cflag => "-fPIC",
1114 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1116 # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
1118 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1121 ex_libs => add("-lsocket -lnsl"),
1122 thread_scheme => "(unknown)",
1123 perlasm_scheme => "elf-1",
1124 dso_scheme => "dlfcn",
1125 shared_target => "svr3-shared",
1126 shared_cflag => "-Kpic",
1127 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1130 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1132 cflags => "-O3 -fomit-frame-pointer",
1133 ex_libs => add("-lsocket -lnsl"),
1134 bn_ops => "BN_LLONG",
1135 thread_scheme => "(unknown)",
1136 perlasm_scheme => "elf-1",
1137 dso_scheme => "dlfcn",
1138 shared_target => "svr3-shared",
1139 shared_cflag => "-fPIC",
1140 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1144 # Below targets assume AIX >=5. Caveat lector. If you are accustomed
1145 # to control compilation "bitness" by setting $OBJECT_MODE environment
1146 # variable, then you should know that in OpenSSL case it's considered
1147 # only in ./config. Once configured, build procedure remains "deaf" to
1148 # current value of $OBJECT_MODE.
1150 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1152 cflags => combine(picker(default => "-DB_ENDIAN",
1155 threads("-pthread")),
1157 bn_ops => "BN_LLONG RC4_CHAR",
1158 thread_scheme => "pthreads",
1159 perlasm_scheme => "aix32",
1160 dso_scheme => "dlfcn",
1161 shared_target => "aix-shared",
1162 shared_ldflag => "-shared -static-libgcc -Wl,-G",
1163 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1167 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1169 cflags => combine(picker(default => "-maix64 -DB_ENDIAN",
1172 threads("-pthread")),
1174 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1175 thread_scheme => "pthreads",
1176 perlasm_scheme => "aix64",
1177 dso_scheme => "dlfcn",
1178 shared_target => "aix-shared",
1179 shared_ldflag => "-maix64 -shared -static-libgcc -Wl,-G",
1180 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1184 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1186 cflags => combine(picker(default => "-q32 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1189 threads("-qthreaded -D_THREAD_SAFE")),
1191 bn_ops => "BN_LLONG RC4_CHAR",
1192 thread_scheme => "pthreads",
1193 ex_libs => threads("-lpthreads"),
1194 perlasm_scheme => "aix32",
1195 dso_scheme => "dlfcn",
1196 shared_target => "aix-shared",
1197 shared_ldflag => "-q32 -G",
1198 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1202 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1204 cflags => combine(picker(default => "-q64 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1207 threads("-qthreaded -D_THREAD_SAFE")),
1209 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1210 thread_scheme => "pthreads",
1211 ex_libs => threads("-lpthreads"),
1212 perlasm_scheme => "aix64",
1213 dso_scheme => "dlfcn",
1214 shared_target => "aix-shared",
1215 shared_ldflag => "-q64 -G",
1216 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1220 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
1222 inherit_from => [ "BASE_unix" ],
1224 cflags => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC",
1225 ex_libs => add("-lsocket -lnsl"),
1226 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1227 thread_scheme => "(unknown)",
1230 # OS/390 Unix an EBCDIC-based Unix system on IBM mainframe
1231 # You need to compile using the c89.sh wrapper in the tools directory, because the
1232 # IBM compiler does not like the -L switch after any object modules.
1235 inherit_from => [ "BASE_unix" ],
1237 cflags => "-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE",
1238 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1239 thread_scheme => "(unknown)",
1242 #### Visual C targets
1244 # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
1246 # Note about -wd4090, disable warning C4090. This warning returns false
1247 # positives in some situations. Disabling it altogether masks both
1248 # legitimate and false cases, but as we compile on multiple platforms,
1249 # we rely on other compilers to catch legitimate cases.
1251 # Also note that we force threads no matter what. Configuring "no-threads"
1254 inherit_from => [ "BASE_Windows" ],
1257 cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
1258 defines => add(sub { my @defs = ();
1259 unless ($disabled{"zlib-dynamic"}) {
1262 'LIBZ="' . $withargs{zlib_lib} . '"');
1267 lib_cflags => add("/Zi /Fdossl_static"),
1268 dso_cflags => "/Zi /Fddso",
1269 bin_cflags => "/Zi /Fdapp",
1270 lflags => add("/debug"),
1271 shared_ldflag => "/dll",
1272 shared_target => "win-shared", # meaningless except it gives Configure a hint
1273 thread_scheme => "winthreads",
1274 dso_scheme => "win32",
1275 apps_aux_src => add("win32_init.c"),
1277 "VC-noCE-common" => {
1278 inherit_from => [ "VC-common" ],
1280 cflags => add(picker(default => "-DUNICODE -D_UNICODE",
1283 ($disabled{shared} ? "" : "/MDd")
1284 ." /Od -DDEBUG -D_DEBUG";
1288 ($disabled{shared} ? "" : "/MD")
1291 lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }),
1292 # Following might/should appears controversial, i.e. defining
1293 # /MDd without evaluating $disabled{shared}. It works in
1294 # non-shared build because static library is compiled with /Zl
1295 # and bares no reference to specific RTL. And it works in
1296 # shared build because multiple /MDd options are not prohibited.
1297 # But why /MDd in static build? Well, basically this is just a
1298 # reference point, which allows to catch eventual errors that
1299 # would prevent those who want to wrap OpenSSL into own .DLL.
1300 # Why not /MD in release build then? Well, some are likely to
1301 # prefer [non-debug] openssl.exe to be free from Micorosoft RTL
1303 bin_cflags => add(picker(debug => "/MDd",
1304 release => sub { $disabled{shared} ? "/MT" : () },
1306 bin_lflags => add("/subsystem:console /opt:ref"),
1307 ex_libs => add(sub {
1309 push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
1310 push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
1311 return join(" ", @ex_libs);
1314 "VC-WIN64-common" => {
1315 inherit_from => [ "VC-noCE-common" ],
1317 ex_libs => add(sub {
1319 push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
1320 return join(" ", @_, @ex_libs);
1322 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1323 build_scheme => add("VC-W64", { separator => undef }),
1326 inherit_from => [ "VC-WIN64-common", asm("ia64_asm"),
1327 sub { $disabled{shared} ? () : "ia64_uplink" } ],
1329 asflags => "-d debug",
1332 bn_asm_src => sub { return undef unless @_;
1333 my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; },
1334 perlasm_scheme => "ias",
1335 multilib => "-ia64",
1338 inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"),
1339 sub { $disabled{shared} ? () : "x86_64_uplink" } ],
1340 as => sub { vc_win64a_info()->{as} },
1341 asflags => sub { vc_win64a_info()->{asflags} },
1342 asoutflag => sub { vc_win64a_info()->{asoutflag} },
1344 bn_asm_src => sub { return undef unless @_;
1345 my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
1346 perlasm_scheme => "auto",
1350 # x86 Win32 target defaults to ANSI API, if you want UNICODE,
1351 # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
1352 inherit_from => [ "VC-noCE-common", asm("x86_asm"),
1353 sub { $disabled{shared} ? () : "uplink_common" } ],
1354 as => sub { vc_win32_info()->{as} },
1355 asflags => sub { vc_win32_info()->{asflags} },
1356 asoutflag => sub { vc_win32_info()->{asoutflag} },
1357 ex_libs => add(sub {
1359 # WIN32 UNICODE build gets linked with unicows.lib for
1360 # backward compatibility with Win9x.
1361 push @ex_libs, 'unicows.lib'
1362 if (grep { $_ eq "UNICODE" } @user_defines);
1363 return join(" ", @ex_libs, @_);
1366 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1367 perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} },
1368 build_scheme => add("VC-W32", { separator => undef }),
1371 inherit_from => [ "VC-common" ],
1373 asflags => "/nologo /Cp /coff /c /Cx /Zi",
1378 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',
1379 sub { vc_wince_info()->{cflags}; },
1380 sub { defined($ENV{'WCECOMPAT'})
1381 ? '-I$(WCECOMPAT)/include' : (); },
1382 sub { defined($ENV{'PORTSDK_LIBPATH'})
1383 ? '-I$(PORTSDK_LIBPATH)/../../include' : (); },
1384 sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14
1385 ? ($disabled{shared} ? " /MT" : " /MD")
1387 debug => "/Od -DDEBUG -D_DEBUG",
1389 lflags => combine("/nologo /opt:ref",
1390 sub { vc_wince_info()->{lflags}; },
1391 sub { defined($ENV{PORTSDK_LIBPATH})
1392 ? "/entry:mainCRTstartup" : (); }),
1394 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1395 ex_libs => add(sub {
1397 push @ex_libs, 'ws2.lib' unless $disabled{sock};
1398 push @ex_libs, 'crypt32.lib';
1399 if (defined($ENV{WCECOMPAT})) {
1400 my $x = '$(WCECOMPAT)/lib';
1401 if (-f "$x/$ENV{TARGETCPU}/wcecompatex.lib") {
1402 $x .= '/$(TARGETCPU)/wcecompatex.lib';
1404 $x .= '/wcecompatex.lib';
1408 push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
1409 if (defined($ENV{'PORTSDK_LIBPATH'}));
1410 push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
1411 if ($ENV{'TARGETCPU'} eq "X86");
1414 build_scheme => add("VC-WCE", { separator => undef }),
1419 inherit_from => [ "BASE_unix", asm("x86_asm"),
1420 sub { $disabled{shared} ? () : "x86_uplink" } ],
1422 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
1424 release => "-O3 -fomit-frame-pointer"),
1426 sys_id => "MINGW32",
1427 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1428 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1429 thread_scheme => "winthreads",
1430 perlasm_scheme => "coff",
1431 dso_scheme => "win32",
1432 shared_target => "mingw-shared",
1433 shared_cflag => add("-D_WINDLL"),
1434 shared_ldflag => "-static-libgcc",
1435 shared_rcflag => "--target=pe-i386",
1436 shared_extension => ".dll",
1438 apps_aux_src => add("win32_init.c"),
1441 # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1442 # .dll compiled with one compiler with application compiled with
1443 # another compiler. It's possible to engage Applink support in
1444 # mingw64 build, but it's not done, because till mingw64
1445 # supports structured exception handling, one can't seriously
1446 # consider its binaries for using with non-mingw64 run-time
1447 # environment. And as mingw64 is always consistent with itself,
1448 # Applink is never engaged and can as well be omitted.
1449 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1451 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall",
1455 sys_id => "MINGW64",
1456 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1457 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1458 thread_scheme => "winthreads",
1459 perlasm_scheme => "mingw64",
1460 dso_scheme => "win32",
1461 shared_target => "mingw-shared",
1462 shared_cflag => add("-D_WINDLL"),
1463 shared_ldflag => "-static-libgcc",
1464 shared_rcflag => "--target=pe-x86-64",
1465 shared_extension => ".dll",
1467 apps_aux_src => add("win32_init.c"),
1472 inherit_from => [ "BASE_unix" ],
1474 cflags => "-DL_ENDIAN -O",
1480 inherit_from => [ "BASE_unix" ],
1482 cflags => "-DTERMIOS -DL_ENDIAN -O -Wall",
1484 bn_ops => "BN_LLONG",
1485 dso_scheme => "win32",
1490 inherit_from => [ "BASE_unix", asm("x86_asm") ],
1492 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1494 release => "-O3 -fomit-frame-pointer"),
1496 bn_ops => "BN_LLONG",
1497 thread_scheme => "pthread",
1498 perlasm_scheme => "coff",
1499 dso_scheme => "dlfcn",
1500 shared_target => "cygwin-shared",
1501 shared_cflag => "-D_WINDLL",
1502 shared_ldflag => "-shared",
1503 shared_extension => ".dll",
1505 "Cygwin-x86_64" => {
1506 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1508 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1512 bn_ops => "SIXTY_FOUR_BIT_LONG",
1513 thread_scheme => "pthread",
1514 perlasm_scheme => "mingw64",
1515 dso_scheme => "dlfcn",
1516 shared_target => "cygwin-shared",
1517 shared_cflag => "-D_WINDLL",
1518 shared_ldflag => "-shared",
1519 shared_extension => ".dll",
1521 # Backward compatibility for those using this target
1523 inherit_from => [ "Cygwin-x86" ]
1525 # In case someone constructs the Cygwin target name themself
1527 inherit_from => [ "Cygwin-x86" ]
1530 inherit_from => [ "Cygwin-x86" ]
1533 inherit_from => [ "Cygwin-x86" ]
1536 inherit_from => [ "Cygwin-x86" ]
1539 ##### MacOS X (a.k.a. Darwin) setup
1540 "darwin-common" => {
1541 inherit_from => [ "BASE_unix" ],
1544 cflags => combine(picker(default => "",
1547 threads("-D_REENTRANT")),
1549 plib_lflags => "-Wl,-search_paths_first",
1550 bn_ops => "BN_LLONG RC4_CHAR",
1551 thread_scheme => "pthreads",
1552 perlasm_scheme => "osx32",
1553 dso_scheme => "dlfcn",
1554 ranlib => "ranlib -c",
1555 shared_target => "darwin-shared",
1556 shared_cflag => "-fPIC",
1557 shared_ldflag => "-dynamiclib",
1558 shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
1560 # Option "freeze" such as -std=gnu9x can't negatively interfere
1561 # with future defaults for below two targets, because MacOS X
1562 # for PPC has no future, it was discontinued by vendor in 2009.
1563 "darwin-ppc-cc" => {
1564 inherit_from => [ "darwin-common", asm("ppc32_asm") ],
1565 cflags => add("-arch ppc -std=gnu9x -DB_ENDIAN -Wa,-force_cpusubtype_ALL"),
1566 perlasm_scheme => "osx32",
1567 shared_ldflag => "-arch ppc -dynamiclib",
1569 "darwin64-ppc-cc" => {
1570 inherit_from => [ "darwin-common", asm("ppc64_asm") ],
1571 cflags => add("-arch ppc64 -std=gnu9x -DB_ENDIAN"),
1572 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1573 perlasm_scheme => "osx64",
1574 shared_ldflag => "-arch ppc64 -dynamiclib",
1576 "darwin-i386-cc" => {
1577 inherit_from => [ "darwin-common", asm("x86_asm") ],
1578 cflags => add(picker(default => "-arch i386 -DL_ENDIAN",
1579 release => "-fomit-frame-pointer")),
1580 bn_ops => "BN_LLONG RC4_INT",
1581 perlasm_scheme => "macosx",
1582 shared_ldflag => "-arch i386 -dynamiclib",
1584 "darwin64-x86_64-cc" => {
1585 inherit_from => [ "darwin-common", asm("x86_64_asm") ],
1586 cflags => add("-arch x86_64 -DL_ENDIAN -Wall"),
1587 bn_ops => "SIXTY_FOUR_BIT_LONG",
1588 perlasm_scheme => "macosx",
1589 shared_ldflag => "-arch x86_64 -dynamiclib",
1594 # It takes three prior-set environment variables to make it work:
1596 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
1597 # CROSS_TOP=/where/SDKs/are
1598 # CROSS_SDK=iPhoneOSx.y.sdk
1600 # Exact paths vary with Xcode releases, but for couple of last ones
1601 # they would look like this:
1603 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
1604 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
1605 # CROSS_SDK=iPhoneOS.sdk
1607 "iphoneos-cross" => {
1608 inherit_from => [ "darwin-common" ],
1609 cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1613 inherit_from => [ "darwin-common", asm("armv4_asm") ],
1614 # It should be possible to go below iOS 6 and even add -arch armv6,
1615 # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
1617 cflags => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1619 perlasm_scheme => "ios32",
1622 inherit_from => [ "darwin-common", asm("aarch64_asm") ],
1623 cflags => add("-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1625 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1626 perlasm_scheme => "ios64",
1631 inherit_from => [ "BASE_unix" ],
1632 inherit_from => [ asm("x86_elf_asm") ],
1634 cflags => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
1635 threads("-pthread")),
1636 ex_libs => add("-ldl"),
1637 bn_ops => "BN_LLONG",
1638 thread_scheme => "pthreads",
1639 dso_scheme => "dlfcn",
1640 shared_target => "linux-shared",
1641 shared_cflag => "-fPIC",
1642 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1645 ##### VxWorks for various targets
1646 "vxworks-ppc60x" => {
1647 inherit_from => [ "BASE_unix" ],
1649 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",
1650 sys_id => "VXWORKS",
1651 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),
1653 "vxworks-ppcgen" => {
1654 inherit_from => [ "BASE_unix" ],
1656 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",
1657 sys_id => "VXWORKS",
1658 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),
1660 "vxworks-ppc405" => {
1661 inherit_from => [ "BASE_unix" ],
1663 cflags => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h",
1664 sys_id => "VXWORKS",
1667 "vxworks-ppc750" => {
1668 inherit_from => [ "BASE_unix" ],
1670 cflags => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG)",
1671 sys_id => "VXWORKS",
1674 "vxworks-ppc750-debug" => {
1675 inherit_from => [ "BASE_unix" ],
1677 cflags => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DPEDANTIC -DDEBUG -g",
1678 sys_id => "VXWORKS",
1681 "vxworks-ppc860" => {
1682 inherit_from => [ "BASE_unix" ],
1684 cflags => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h",
1685 sys_id => "VXWORKS",
1688 "vxworks-simlinux" => {
1689 inherit_from => [ "BASE_unix" ],
1691 cflags => "-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DL_ENDIAN -DCPU=SIMLINUX -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/h -I\$(WIND_BASE)/target/h/wrn/coreip -DOPENSSL_NO_HW_PADLOCK",
1692 sys_id => "VXWORKS",
1694 ranlib => "ranlibpentium",
1697 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
1699 cflags => combine("-mrtp -mips2 -O -G 0 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DCPU=MIPS32 -msoft-float -mno-branch-likely -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/h/wrn/coreip",
1700 threads("-D_REENTRANT")),
1701 sys_id => "VXWORKS",
1702 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),
1703 thread_scheme => "pthreads",
1704 perlasm_scheme => "o32",
1705 ranlib => "ranlibmips",
1710 inherit_from => [ "BASE_unix" ],
1712 cflags => combine("\$(CFLAGS)",
1713 threads("-D_REENTRANT")),
1714 plib_lflags => "\$(LDFLAGS)",
1715 ex_libs => add("\$(LDLIBS)"),
1716 bn_ops => "BN_LLONG",
1717 thread_scheme => "pthreads",
1718 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1719 shared_target => "linux-shared",
1720 shared_cflag => "-fPIC",
1721 shared_ldflag => "-shared",
1722 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1723 ranlib => "$ENV{'RANLIB'}",
1725 "uClinux-dist64" => {
1726 inherit_from => [ "BASE_unix" ],
1728 cflags => combine("\$(CFLAGS)",
1729 threads("-D_REENTRANT")),
1730 plib_lflags => "\$(LDFLAGS)",
1731 ex_libs => add("\$(LDLIBS)"),
1732 bn_ops => "SIXTY_FOUR_BIT_LONG",
1733 thread_scheme => "pthreads",
1734 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1735 shared_target => "linux-shared",
1736 shared_cflag => "-fPIC",
1737 shared_ldflag => "-shared",
1738 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1739 ranlib => "$ENV{'RANLIB'}",
1744 inherit_from => [ "BASE_VMS" ],
1747 cflags => picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL",
1748 debug => "/NOOPTIMIZE/DEBUG",
1749 release => "/OPTIMIZE/NODEBUG"),
1750 lflags => picker(default => "/MAP",
1751 debug => "/DEBUG/TRACEBACK",
1752 release => "/NODEBUG/NOTRACEBACK"),
1753 lib_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
1754 dso_cflags => add("/NAMES=(AS_IS,SHORTENED)"),
1755 shared_target => "vms-shared",
1756 dso_scheme => "vms",
1757 thread_scheme => "pthreads",
1759 apps_aux_src => "vms_decc_init.c vms_term_sock.c",
1763 inherit_from => [ "vms-generic" ],
1764 cflags => add(sub { my @warnings =
1765 @{vms_info(0)->{disable_warns}};
1767 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1770 return vms_info(0)->{def_zlib}
1771 ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : ();
1773 ex_libs => add(sub { return vms_info(0)->{zlib} || (); }),
1774 pointer_size => sub { return vms_info(0)->{pointer_size} },
1776 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1777 #release_aflags => "/OPTIMIZE/NODEBUG",
1778 bn_opts => "SIXTY_FOUR_BIT RC4_INT",
1780 "vms-alpha-p32" => {
1781 inherit_from => [ "vms-generic" ],
1783 add("/POINTER_SIZE=32",
1784 sub { my @warnings =
1785 @{vms_info(32)->{disable_warns}};
1787 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1791 return vms_info(32)->{def_zlib}
1792 ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : ();
1794 ex_libs => add(sub { return vms_info(32)->{zlib} || (); }),
1795 pointer_size => sub { return vms_info(32)->{pointer_size} },
1797 "vms-alpha-p64" => {
1798 inherit_from => [ "vms-generic" ],
1800 add("/POINTER_SIZE=64=ARGV",
1801 sub { my @warnings =
1802 @{vms_info(64)->{disable_warns}};
1804 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1808 return vms_info(64)->{def_zlib}
1809 ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : ();
1811 ex_libs => add(sub { return vms_info(64)->{zlib} || (); }),
1812 pointer_size => sub { return vms_info(64)->{pointer_size} },
1815 inherit_from => [ "vms-generic" ],
1816 cflags => add(sub { my @warnings =
1817 @{vms_info(0)->{disable_warns}};
1819 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1822 return vms_info(0)->{def_zlib}
1823 ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : ();
1825 ex_libs => add(sub { return vms_info(0)->{zlib} || (); }),
1826 pointer_size => sub { return vms_info(0)->{pointer_size} },
1828 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1829 #release_aflags => "/OPTIMIZE/NODEBUG",
1830 bn_opts => "SIXTY_FOUR_BIT RC4_INT",
1833 inherit_from => [ "vms-generic" ],
1835 add("/POINTER_SIZE=32",
1836 sub { my @warnings =
1837 @{vms_info(32)->{disable_warns}};
1839 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1843 return vms_info(32)->{def_zlib}
1844 ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : ();
1846 ex_libs => add(sub { return vms_info(32)->{zlib} || (); }),
1847 pointer_size => sub { return vms_info(32)->{pointer_size} },
1850 inherit_from => [ "vms-generic" ],
1852 add("/POINTER_SIZE=64=ARGV",
1853 sub { my @warnings =
1854 @{vms_info(64)->{disable_warns}};
1856 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1860 return vms_info(64)->{def_zlib}
1861 ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : ();
1863 ex_libs => add(sub { return vms_info(64)->{zlib} || (); }),
1864 pointer_size => sub { return vms_info(64)->{pointer_size} },