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",
13 $vc_win64a_info = { as => "ml64",
14 asflags => "/c /Cp /Cx /Zi",
18 return $vc_win64a_info;
21 my $vc_wince_info = {};
23 unless (%$vc_wince_info) {
25 die '%OSVERSION% is not defined' if (!defined($ENV{'OSVERSION'}));
26 die '%PLATFORM% is not defined' if (!defined($ENV{'PLATFORM'}));
27 die '%TARGETCPU% is not defined' if (!defined($ENV{'TARGETCPU'}));
30 # Idea behind this is to mimic flags set by eVC++ IDE...
32 my $wcevers = $ENV{'OSVERSION'}; # WCENNN
33 die '%OSVERSION% value is insane'
34 if ($wcevers !~ /^WCE([1-9])([0-9]{2})$/);
35 my $wcecdefs = "-D_WIN32_WCE=$1$2 -DUNDER_CE=$1$2"; # -D_WIN32_WCE=NNN
36 my $wcelflag = "/subsystem:windowsce,$1.$2"; # ...,N.NN
38 my $wceplatf = $ENV{'PLATFORM'};
40 $wceplatf =~ tr/a-z0-9 /A-Z0-9_/;
41 $wcecdefs .= " -DWCE_PLATFORM_$wceplatf";
43 my $wcetgt = $ENV{'TARGETCPU'}; # just shorter name...
44 SWITCH: for($wcetgt) {
45 /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_";
46 $wcelflag.=" /machine:X86"; last; };
47 /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
48 $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/);
49 $wcecdefs.=" -QRarch4T -QRinterwork-return";
50 $wcelflag.=" /machine:THUMB"; last; };
51 /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
52 $wcelflag.=" /machine:ARM"; last; };
53 /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
54 $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32";
55 $wcelflag.=" /machine:MIPSFPU"; last; };
56 /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
57 $wcecdefs.=" -DMIPSII -QMmips16";
58 $wcelflag.=" /machine:MIPS16"; last; };
59 /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
60 $wcecdefs.=" -QMmips2";
61 $wcelflag.=" /machine:MIPS"; last; };
62 /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000";
63 $wcelflag.=" /machine:MIPS"; last; };
64 /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx";
65 $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/);
66 $wcelflag.=" /machine:$wcetgt"; last; };
67 { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_";
68 $wcelflag.=" /machine:$wcetgt"; last; };
71 $vc_wince_info = { cflags => $wcecdefs,
72 lflags => $wcelflag };
74 return $vc_wince_info;
77 # Helper functions for the VMS configs
81 $vms_info->{disable_warns} = [ ];
82 $vms_info->{disable_warns_p32} = [ ];
83 $vms_info->{disable_warns_p64} = [ ];
84 `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;
86 push @{$vms_info->{disable_warns_p64}}, "MAYLOSEDATA3";
89 unless ($disabled{zlib}) {
90 if (defined($disabled{"zlib-dynamic"})) {
91 $vms_info->{zlib} = $withargs{zlib_lib} || 'GNV$LIBZSHR/SHARE';
92 $vms_info->{zlib_p32} = $withargs{zlib_lib} || 'GNV$LIBZSHR32/SHARE';
93 $vms_info->{zlib_p64} = $withargs{zlib_lib} || 'GNV$LIBZSHR64/SHARE';
95 $vms_info->{def_zlib} = $withargs{zlib_lib} || 'GNV$LIBZSHR';
96 $vms_info->{def_zlib_p32} = $withargs{zlib_lib} || 'GNV$LIBZSHR32';
97 $vms_info->{def_zlib_p64} = $withargs{zlib_lib} || 'GNV$LIBZSHR64';
106 #### Basic configs that should work on any 32-bit box
109 cflags => picker(debug => "-O0 -g",
111 thread_scheme => "(unknown)",
112 bn_ops => "BN_LLONG",
117 thread_scheme => "(unknown)",
120 #### VOS Configurations
122 inherit_from => [ "BASE_unix" ],
124 cflags => picker(default => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
127 thread_scheme => "(unknown)",
129 lflags => "-Wl,-map",
130 bn_ops => "BN_LLONG",
131 shared_extension => ".so",
134 #### Solaris configurations
135 "solaris-common" => {
136 inherit_from => [ "BASE_unix" ],
138 cflags => "-DFILIO_H",
139 ex_libs => add("-lresolv -lsocket -lnsl -ldl"),
140 dso_scheme => "dlfcn",
141 thread_scheme => "pthreads",
142 shared_target => "solaris-shared",
143 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
145 #### Solaris x86 with GNU C setups
146 "solaris-x86-gcc" => {
147 # -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have
148 # to do it here because whenever GNU C instantiates an assembler
149 # template it surrounds it with #APP #NO_APP comment pair which
150 # (at least Solaris 7_x86) /usr/ccs/bin/as fails to assemble
151 # with "Illegal mnemonic" error message.
152 inherit_from => [ "solaris-common", asm("x86_elf_asm") ],
154 cflags => add_before(picker(default => "-Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM",
156 release => "-O3 -fomit-frame-pointer"),
157 threads("-pthread")),
158 bn_ops => "BN_LLONG",
159 shared_cflag => "-fPIC",
160 shared_ldflag => "-shared",
162 "solaris64-x86_64-gcc" => {
163 # -shared -static-libgcc might appear controversial, but modules
164 # taken from static libgcc do not have relocations and linking
165 # them into our shared objects doesn't have any negative side
166 # effects. On the contrary, doing so makes it possible to use
167 # gcc shared build with Sun C. Given that gcc generates faster
168 # code [thanks to inline assembler], I would actually recommend
169 # to consider using gcc shared build even with vendor compiler:-)
170 # <appro@fy.chalmers.se>
171 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
173 cflags => add_before(picker(default => "-m64 -Wall -DL_ENDIAN",
176 threads("-pthread")),
177 bn_ops => "SIXTY_FOUR_BIT_LONG",
178 perlasm_scheme => "elf",
179 shared_cflag => "-fPIC",
180 shared_ldflag => "-m64 -shared -static-libgcc",
184 #### Solaris x86 with Sun C setups
185 "solaris-x86-cc" => {
186 inherit_from => [ "solaris-common" ],
188 cflags => add_before(picker(default => "-xarch=generic -xstrconst -Xa -DL_ENDIAN",
190 release => "-xO5 -xregs=frameptr -xdepend -xbuiltin"),
191 threads("-D_REENTRANT")),
192 lflags => add(threads("-mt")),
193 ex_libs => add(threads("-lpthread")),
194 bn_ops => "BN_LLONG RC4_CHAR",
195 shared_cflag => "-KPIC",
196 shared_ldflag => "-G -dy -z text",
198 "solaris64-x86_64-cc" => {
199 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
201 cflags => add_before(picker(default => "-xarch=generic64 -xstrconst -Xa -DL_ENDIAN",
203 release => "-xO5 -xdepend -xbuiltin"),
204 threads("-D_REENTRANT")),
205 thread_scheme => "pthreads",
206 lflags => add(threads("-mt")),
207 ex_libs => add(threads("-lpthread")),
208 bn_ops => "SIXTY_FOUR_BIT_LONG",
209 perlasm_scheme => "elf",
210 shared_cflag => "-KPIC",
211 shared_ldflag => "-xarch=generic64 -G -dy -z text",
215 #### SPARC Solaris with GNU C setups
216 "solaris-sparcv7-gcc" => {
217 inherit_from => [ "solaris-common" ],
219 cflags => add_before(picker(default => "-Wall -DB_ENDIAN -DBN_DIV2W",
222 threads("-pthread")),
223 bn_ops => "BN_LLONG RC4_CHAR",
224 shared_cflag => "-fPIC",
225 shared_ldflag => "-shared",
227 "solaris-sparcv8-gcc" => {
228 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
229 cflags => add_before("-mcpu=v8"),
231 "solaris-sparcv9-gcc" => {
232 # -m32 should be safe to add as long as driver recognizes
234 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
235 cflags => add_before("-m32 -mcpu=ultrasparc"),
237 "solaris64-sparcv9-gcc" => {
238 inherit_from => [ "solaris-sparcv9-gcc" ],
239 cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
240 bn_ops => "BN_LLONG RC4_CHAR",
241 shared_ldflag => "-m64 -shared",
245 #### SPARC Solaris with Sun C setups
246 # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
247 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
248 # SC5.0 note: Compiler common patch 107357-01 or later is required!
249 "solaris-sparcv7-cc" => {
250 inherit_from => [ "solaris-common" ],
252 cflags => add_before(picker(default => "-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W",
254 release => "-xO5 -xdepend"),
255 threads("-D_REENTRANT")),
256 lflags => add(threads("-mt")),
257 ex_libs => add(threads("-lpthread")),
258 bn_ops => "BN_LLONG RC4_CHAR",
259 shared_cflag => "-KPIC",
260 shared_ldflag => "-G -dy -z text",
263 "solaris-sparcv8-cc" => {
264 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
265 cflags => add_before("-xarch=v8"),
267 "solaris-sparcv9-cc" => {
268 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
269 cflags => add_before("-xarch=v8plus -xtarget=ultra"),
271 "solaris64-sparcv9-cc" => {
272 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
273 cflags => add_before("-xarch=v9 -xtarget=ultra"),
274 bn_ops => "BN_LLONG RC4_CHAR",
275 shared_ldflag => "-xarch=v9 -G -dy -z text",
279 #### IRIX 5.x configs
280 # -mips2 flag is added by ./config when appropriate.
282 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
284 cflags => picker(default => "-DB_ENDIAN",
287 bn_ops => "BN_LLONG RC4_CHAR",
288 thread_scheme => "(unknown)",
289 perlasm_scheme => "o32",
290 dso_scheme => "dlfcn",
291 shared_target => "irix-shared",
292 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
295 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
297 cflags => picker(default => "-use_readonly_const -DB_ENDIAN",
300 bn_ops => "BN_LLONG RC4_CHAR",
301 thread_scheme => "(unknown)",
302 perlasm_scheme => "o32",
303 dso_scheme => "dlfcn",
304 shared_target => "irix-shared",
305 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
307 #### IRIX 6.x configs
308 # Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
309 # './Configure irix-cc -o32' manually.
310 "irix-mips3-gcc" => {
311 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
313 cflags => combine(picker(default => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W",
316 threads("-D_SGI_MP_SOURCE -pthread")),
317 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
318 thread_scheme => "pthreads",
319 perlasm_scheme => "n32",
320 dso_scheme => "dlfcn",
321 shared_target => "irix-shared",
322 shared_ldflag => "-mabi=n32",
323 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
327 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
329 cflags => combine(picker(default => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
332 threads("-D_SGI_MP_SOURCE")),
333 ex_libs => add(threads("-lpthread")),
334 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
335 thread_scheme => "pthreads",
336 perlasm_scheme => "n32",
337 dso_scheme => "dlfcn",
338 shared_target => "irix-shared",
339 shared_ldflag => "-n32",
340 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
344 "irix64-mips4-gcc" => {
345 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
347 cflags => combine(picker(default => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W",
350 threads("-D_SGI_MP_SOURCE")),
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 OSF/1/Tru64 targets.
572 "osf1-alpha-gcc" => {
573 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
576 bn_ops => "SIXTY_FOUR_BIT_LONG",
577 thread_scheme => "(unknown)",
578 dso_scheme => "dlfcn",
579 shared_target => "alpha-osf1-shared",
580 shared_extension => ".so",
583 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
585 cflags => "-std1 -tune host -O4 -readonly_strings",
586 bn_ops => "SIXTY_FOUR_BIT_LONG",
587 thread_scheme => "(unknown)",
588 dso_scheme => "dlfcn",
589 shared_target => "alpha-osf1-shared",
590 shared_extension => ".so",
592 "tru64-alpha-cc" => {
593 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
595 cflags => combine("-std1 -tune host -fast -readonly_strings",
596 threads("-pthread")),
597 bn_ops => "SIXTY_FOUR_BIT_LONG",
598 thread_scheme => "pthreads",
599 dso_scheme => "dlfcn",
600 shared_target => "alpha-osf1-shared",
601 shared_ldflag => "-msym",
602 shared_extension => ".so",
606 #### Variety of LINUX:-)
608 # *-generic* is endian-neutral target, but ./config is free to
609 # throw in -D[BL]_ENDIAN, whichever appropriate...
610 "linux-generic32" => {
611 inherit_from => [ "BASE_unix" ],
613 cflags => combine(picker(default => "-Wall",
616 threads("-pthread")),
617 ex_libs => add("-ldl"),
618 bn_ops => "BN_LLONG RC4_CHAR",
619 thread_scheme => "pthreads",
620 dso_scheme => "dlfcn",
621 shared_target => "linux-shared",
622 shared_cflag => "-fPIC",
623 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
625 "linux-generic64" => {
626 inherit_from => [ "linux-generic32" ],
627 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
631 inherit_from => [ "linux-generic32", asm("ppc32_asm") ],
632 perlasm_scheme => "linux32",
635 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
636 cflags => add("-m64 -DB_ENDIAN"),
637 perlasm_scheme => "linux64",
638 shared_ldflag => "-m64",
642 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
643 cflags => add("-m64 -DL_ENDIAN"),
644 perlasm_scheme => "linux64le",
645 shared_ldflag => "-m64",
649 ################################################################
650 # Note that -march is not among compiler options in linux-armv4
651 # target description. Not specifying one is intentional to give
654 # a) rely on your compiler default by not specifying one;
655 # b) specify your target platform explicitly for optimal
656 # performance, e.g. -march=armv6 or -march=armv7-a;
657 # c) build "universal" binary that targets *range* of platforms
658 # by specifying minimum and maximum supported architecture;
660 # As for c) option. It actually makes no sense to specify
661 # maximum to be less than ARMv7, because it's the least
662 # requirement for run-time switch between platform-specific
663 # code paths. And without run-time switch performance would be
664 # equivalent to one for minimum. Secondly, there are some
665 # natural limitations that you'd have to accept and respect.
666 # Most notably you can *not* build "universal" binary for
667 # big-endian platform. This is because ARMv7 processor always
668 # picks instructions in little-endian order. Another similar
669 # limitation is that -mthumb can't "cross" -march=armv6t2
670 # boundary, because that's where it became Thumb-2. Well, this
671 # limitation is a bit artificial, because it's not really
672 # impossible, but it's deemed too tricky to support. And of
673 # course you have to be sure that your binutils are actually
674 # up to the task of handling maximum target platform. With all
675 # this in mind here is an example of how to configure
678 # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
680 inherit_from => [ "linux-generic32", asm("armv4_asm") ],
681 perlasm_scheme => "linux32",
684 inherit_from => [ "linux-generic64", asm("aarch64_asm") ],
685 perlasm_scheme => "linux64",
687 "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32
688 inherit_from => [ "linux-generic32", asm("aarch64_asm") ],
689 cflags => add("-mabi=ilp32"),
690 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
691 perlasm_scheme => "linux64",
692 shared_ldflag => "-mabi=ilp32",
696 # Configure script adds minimally required -march for assembly
697 # support, if no -march was specified at command line.
698 inherit_from => [ "linux-generic32", asm("mips32_asm") ],
699 cflags => add("-mabi=32 -DBN_DIV3W"),
700 perlasm_scheme => "o32",
701 shared_ldflag => "-mabi=32",
703 # mips32 and mips64 below refer to contemporary MIPS Architecture
704 # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
706 inherit_from => [ "linux-generic32", asm("mips64_asm") ],
707 cflags => add("-mabi=n32 -DBN_DIV3W"),
708 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
709 perlasm_scheme => "n32",
710 shared_ldflag => "-mabi=n32",
713 "linux64-mips64" => {
714 inherit_from => [ "linux-generic64", asm("mips64_asm") ],
715 cflags => add("-mabi=64 -DBN_DIV3W"),
716 perlasm_scheme => "64",
717 shared_ldflag => "-mabi=64",
721 #### IA-32 targets...
723 inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
724 cflags => add(picker(default => "-DL_ENDIAN",
725 release => "-fomit-frame-pointer")),
726 ex_libs => add(picker(debug => "-lefence")),
727 bn_ops => "BN_LLONG",
730 inherit_from => [ "BASE_unix", asm("x86_asm") ],
732 cflags => add(picker(default => "-DL_ENDIAN -Wall",
734 release => "-O3 -fomit-frame-pointer")),
735 bn_ops => "BN_LLONG",
736 thread_scheme => "(unknown)",
737 perlasm_scheme => "a.out",
741 inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
742 cflags => add("-m64 -DL_ENDIAN"),
743 bn_ops => "SIXTY_FOUR_BIT_LONG",
744 perlasm_scheme => "elf",
745 shared_ldflag => "-m64",
748 "linux-x86_64-clang" => {
749 inherit_from => [ "linux-x86_64" ],
751 cflags => add("-Wextra -Qunused-arguments"),
754 inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
755 cflags => add("-mx32 -DL_ENDIAN"),
756 bn_ops => "SIXTY_FOUR_BIT",
757 perlasm_scheme => "elf32",
758 shared_ldflag => "-mx32",
763 inherit_from => [ "linux-generic64", asm("ia64_asm") ],
764 bn_ops => "SIXTY_FOUR_BIT_LONG",
768 inherit_from => [ "linux-generic64", asm("s390x_asm") ],
769 cflags => add("-m64 -DB_ENDIAN"),
770 perlasm_scheme => "64",
771 shared_ldflag => "-m64",
775 #### So called "highgprs" target for z/Architecture CPUs
776 # "Highgprs" is kernel feature first implemented in Linux
777 # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
778 # significant bits of general purpose registers not only
779 # upon 32-bit process context switch, but even on
780 # asynchronous signal delivery to such process. This makes
781 # it possible to deploy 64-bit instructions even in legacy
782 # application context and achieve better [or should we say
783 # adequate] performance. The build is binary compatible with
784 # linux-generic32, and the idea is to be able to install the
785 # resulting libcrypto.so alongside generic one, e.g. as
786 # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
787 # linker to autodiscover. Unfortunately it doesn't work just
788 # yet, because of couple of bugs in glibc
789 # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
791 inherit_from => [ "linux-generic32", asm("s390x_asm") ],
792 cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"),
793 bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; },
794 perlasm_scheme => "31",
795 shared_ldflag => "-m31",
796 multilib => "/highgprs",
799 #### SPARC Linux setups
800 # Ray Miller <ray.miller@computing-services.oxford.ac.uk> has
801 # patiently assisted with debugging of following two configs.
803 inherit_from => [ "linux-generic32", asm("sparcv8_asm") ],
804 cflags => add("-mcpu=v8 -DB_ENDIAN -DBN_DIV2W"),
807 # it's a real mess with -mcpu=ultrasparc option under Linux,
808 # but -Wa,-Av8plus should do the trick no matter what.
809 inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
810 cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W"),
811 shared_ldflag => "-m32",
813 "linux64-sparcv9" => {
814 # GCC 3.1 is a requirement
815 inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
816 cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"),
817 bn_ops => "BN_LLONG RC4_CHAR",
818 shared_ldflag => "-m64",
822 "linux-alpha-gcc" => {
823 inherit_from => [ "linux-generic64", asm("alpha_asm") ],
824 cflags => add("-DL_ENDIAN"),
825 bn_ops => "SIXTY_FOUR_BIT_LONG",
827 "linux-c64xplus" => {
828 inherit_from => [ "BASE_unix" ],
829 # TI_CGT_C6000_7.3.x is a requirement
831 cflags => combine("--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT",
832 threads("-D_REENTRANT")),
833 bn_ops => "BN_LLONG",
834 cpuid_asm_src => "c64xpluscpuid.s",
835 bn_asm_src => "asm/bn-c64xplus.asm c64xplus-gf2m.s",
836 aes_asm_src => "aes-c64xplus.s aes_cbc.c aes-ctr.fake",
837 sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s",
838 rc4_asm_src => "rc4-c64xplus.s",
839 modes_asm_src => "ghash-c64xplus.s",
840 chacha_asm_src => "chacha-c64xplus.s",
841 poly1305_asm_src => "poly1305-c64xplus.s",
842 thread_scheme => "pthreads",
843 perlasm_scheme => "void",
844 dso_scheme => "dlfcn",
845 shared_target => "linux-shared",
846 shared_cflag => "--pic",
847 shared_ldflag => "-z --sysv --shared",
848 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
852 #### Android: linux-* but without pointers to headers and libs.
854 # It takes pair of prior-set environment variables to make it work:
856 # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<
857 # CROSS_COMPILE=<prefix>
859 # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
860 # For example to compile for ICS and ARM with NDK 10d, you'd:
862 # ANDROID_NDK=/some/where/android-ndk-10d
863 # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
864 # CROSS_COMPILE=arm-linux-adroideabi-
865 # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/
868 inherit_from => [ "linux-generic32" ],
869 # Special note about unconditional -fPIC and -pie. The underlying
870 # reason is that Lollipop refuses to run non-PIE. But what about
871 # older systems and NDKs? -fPIC was never problem, so the only
872 # concern if -pie. Older toolchains, e.g. r4, appear to handle it
873 # and binaries turn mostly functional. "Mostly" means that oldest
874 # Androids, such as Froyo, fail to handle executable, but newer
875 # systems are perfectly capable of executing binaries targeting
876 # Froyo. Keep in mind that in the nutshell Android builds are
877 # about JNI, i.e. shared libraries, not applications.
878 cflags => picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
885 inherit_from => [ "android", asm("x86_asm") ],
886 cflags => add(picker(release => "-fomit-frame-pointer")),
887 bn_ops => "BN_LLONG",
888 perlasm_scheme => "android",
890 ################################################################
891 # Contemporary Android applications can provide multiple JNI
892 # providers in .apk, targeting multiple architectures. Among
893 # them there is "place" for two ARM flavours: generic eabi and
894 # armv7-a/hard-float. However, it should be noted that OpenSSL's
895 # ability to engage NEON is not constrained by ABI choice, nor
896 # is your ability to call OpenSSL from your application code
897 # compiled with floating-point ABI other than default 'soft'.
898 # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
899 # This means that choice of ARM libraries you provide in .apk
900 # is driven by application needs. For example if application
901 # itself benefits from NEON or is floating-point intensive, then
902 # it might be appropriate to provide both libraries. Otherwise
903 # just generic eabi would do. But in latter case it would be
906 # ./Configure android-armeabi -D__ARM_MAX_ARCH__=8
908 # in order to build "universal" binary and allow OpenSSL take
909 # advantage of NEON when it's available.
911 "android-armeabi" => {
912 inherit_from => [ "android", asm("armv4_asm") ],
915 inherit_from => [ "android", asm("mips32_asm") ],
916 perlasm_scheme => "o32",
920 inherit_from => [ "linux-generic64" ],
921 cflags => picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
927 "android64-aarch64" => {
928 inherit_from => [ "android64", asm("aarch64_asm") ],
929 perlasm_scheme => "linux64",
934 # As for thread cflag. Idea is to maintain "collective" set of
935 # flags, which would cover all BSD flavors. -pthread applies
936 # to them all, but is treated differently. OpenBSD expands is
937 # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
938 # expands it as -lc_r, which has to be accompanied by explicit
939 # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
940 # expands it as -lc_r, which seems to be sufficient?
941 inherit_from => [ "BASE_unix" ],
943 cflags => combine(picker(default => "-Wall",
946 threads("-pthread -D_THREAD_SAFE -D_REENTRANT")),
947 bn_ops => "BN_LLONG",
948 thread_scheme => "pthreads",
949 dso_scheme => "dlfcn",
950 shared_target => "bsd-gcc-shared",
951 shared_cflag => "-fPIC",
952 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
955 inherit_from => [ "BSD-generic32" ],
956 bn_ops => "SIXTY_FOUR_BIT_LONG",
960 inherit_from => [ "BSD-generic32", asm("x86_asm") ],
961 cflags => add(picker(default => "-DL_ENDIAN",
962 release => "-fomit-frame-pointer")),
963 bn_ops => "BN_LLONG",
964 shared_target => "bsd-shared",
965 perlasm_scheme => "a.out",
968 inherit_from => [ "BSD-x86" ],
969 perlasm_scheme => "elf",
973 inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ],
974 cflags => add("-mcpu=v8 -DB_ENDIAN"),
977 # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
978 # simply *happens* to work around a compiler bug in gcc 3.3.3,
979 # triggered by RIPEMD160 code.
980 inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ],
981 cflags => add("-DB_ENDIAN -DMD32_REG_T=int"),
982 bn_ops => "BN_LLONG",
986 inherit_from => [ "BSD-generic64", asm("ia64_asm") ],
987 cflags => add_before("-DL_ENDIAN"),
988 bn_ops => "SIXTY_FOUR_BIT_LONG",
992 inherit_from => [ "BSD-generic64", asm("x86_64_asm") ],
993 cflags => add_before("-DL_ENDIAN"),
994 bn_ops => "SIXTY_FOUR_BIT_LONG",
995 perlasm_scheme => "elf",
999 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1001 cflags => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -Wall",
1002 ex_libs => add("-ldl"),
1003 bn_ops => "BN_LLONG",
1004 thread_scheme => "(unknown)",
1005 dso_scheme => "dlfcn",
1006 shared_target => "bsd-gcc-shared",
1007 shared_cflag => "-fPIC",
1008 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1012 inherit_from => [ "BASE_unix" ],
1014 cflags => "-O -Wall",
1015 unistd => "<libc.h>",
1016 bn_ops => "BN_LLONG",
1017 thread_scheme => "(unknown)",
1020 inherit_from => [ "BASE_unix" ],
1022 cflags => "-O3 -Wall",
1023 unistd => "<libc.h>",
1024 bn_ops => "BN_LLONG",
1025 thread_scheme => "(unknown)",
1030 inherit_from => [ "BASE_unix" ],
1032 cflags => "-DL_ENDIAN -DTERMIO",
1033 thread_scheme => "(unknown)",
1036 inherit_from => [ "BASE_unix" ],
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 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1047 cflags => "-DL_ENDIAN -O2 -Wall",
1048 ex_libs => add("-lsocket"),
1049 dso_scheme => "dlfcn",
1050 shared_target => "bsd-gcc-shared",
1051 shared_cflag => "-fPIC",
1052 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1055 #### SCO/Caldera targets.
1057 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
1058 # Now we only have blended unixware-* as it's the only one used by ./config.
1059 # If you want to optimize for particular microarchitecture, bypass ./config
1060 # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
1061 # Note that not all targets include assembler support. Mostly because of
1062 # lack of motivation to support out-of-date platforms with out-of-date
1063 # compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
1064 # patiently assisted to debug most of it.
1066 # UnixWare 2.0x fails destest with -O.
1068 inherit_from => [ "BASE_unix" ],
1070 cflags => combine("-DFILIO_H -DNO_STRINGS_H",
1071 threads("-Kthread")),
1072 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1073 thread_scheme => "uithreads",
1076 inherit_from => [ "BASE_unix" ],
1078 cflags => combine("-O -DFILIO_H",
1079 threads("-Kthread")),
1080 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1081 thread_scheme => "uithreads",
1084 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1086 cflags => combine("-O -DFILIO_H -Kalloca",
1087 threads("-Kthread")),
1088 ex_libs => add("-lsocket -lnsl"),
1089 thread_scheme => "uithreads",
1090 bn_ops => "BN_LLONG",
1091 perlasm_scheme => "elf-1",
1092 dso_scheme => "dlfcn",
1093 shared_target => "svr5-shared",
1094 shared_cflag => "-Kpic",
1095 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1097 "unixware-7-gcc" => {
1098 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1100 cflags => combine("-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -Wall",
1101 threads("-D_REENTRANT")),
1102 ex_libs => add("-lsocket -lnsl"),
1103 bn_ops => "BN_LLONG",
1104 thread_scheme => "pthreads",
1105 perlasm_scheme => "elf-1",
1106 dso_scheme => "dlfcn",
1107 shared_target => "gnu-shared",
1108 shared_cflag => "-fPIC",
1109 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1111 # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
1113 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1116 ex_libs => add("-lsocket -lnsl"),
1117 thread_scheme => "(unknown)",
1118 perlasm_scheme => "elf-1",
1119 dso_scheme => "dlfcn",
1120 shared_target => "svr3-shared",
1121 shared_cflag => "-Kpic",
1122 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1125 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1127 cflags => "-O3 -fomit-frame-pointer",
1128 ex_libs => add("-lsocket -lnsl"),
1129 bn_ops => "BN_LLONG",
1130 thread_scheme => "(unknown)",
1131 perlasm_scheme => "elf-1",
1132 dso_scheme => "dlfcn",
1133 shared_target => "svr3-shared",
1134 shared_cflag => "-fPIC",
1135 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1140 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1142 cflags => combine(picker(default => "-DB_ENDIAN",
1145 threads("-pthread")),
1147 bn_ops => "BN_LLONG RC4_CHAR",
1148 thread_scheme => "pthreads",
1149 perlasm_scheme => "aix32",
1150 dso_scheme => "dlfcn",
1151 shared_target => "aix-shared",
1152 shared_ldflag => "-shared -Wl,-G",
1153 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1157 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1159 cflags => combine(picker(default => "-maix64 -DB_ENDIAN",
1162 threads("-pthread")),
1164 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1165 thread_scheme => "pthreads",
1166 perlasm_scheme => "aix64",
1167 dso_scheme => "dlfcn",
1168 shared_target => "aix-shared",
1169 shared_ldflag => "-maix64 -shared -Wl,-G",
1170 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1173 # Below targets assume AIX 5. Idea is to effectively disregard
1174 # $OBJECT_MODE at build time. $OBJECT_MODE is respected at
1177 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1179 cflags => combine(picker(default => "-q32 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1182 threads("-qthreaded -D_THREAD_SAFE")),
1184 bn_ops => "BN_LLONG RC4_CHAR",
1185 thread_scheme => "pthreads",
1186 perlasm_scheme => "aix32",
1187 dso_scheme => "dlfcn",
1188 shared_target => "aix-shared",
1189 shared_ldflag => "-q32 -G",
1190 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1194 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1196 cflags => combine(picker(default => "-q64 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1199 threads("-qthreaded -D_THREAD_SAFE")),
1201 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1202 thread_scheme => "pthreads",
1203 perlasm_scheme => "aix64",
1204 dso_scheme => "dlfcn",
1205 shared_target => "aix-shared",
1206 shared_ldflag => "-q64 -G",
1207 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1211 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
1213 inherit_from => [ "BASE_unix" ],
1215 cflags => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC",
1216 ex_libs => add("-lsocket -lnsl"),
1217 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1218 thread_scheme => "(unknown)",
1221 # OS/390 Unix an EBCDIC-based Unix system on IBM mainframe
1222 # You need to compile using the c89.sh wrapper in the tools directory, because the
1223 # IBM compiler does not like the -L switch after any object modules.
1226 inherit_from => [ "BASE_unix" ],
1228 cflags => "-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE",
1229 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1230 thread_scheme => "(unknown)",
1233 #### Visual C targets
1235 # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
1237 # Note about -wd4090, disable warning C4090. This warning returns false
1238 # positives in some situations. Disabling it altogether masks both
1239 # legitimate and false cases, but as we compile on multiple platforms,
1240 # we rely on other compilers to catch legitimate cases.
1242 # Also note that we force threads no matter what. Configuring "no-threads"
1245 inherit_from => [ "BASE_Windows" ],
1248 cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
1252 lib_cflags => add("/Zi /Fdlib"),
1253 dso_cflags => "/Zi",
1254 bin_cflags => "/Zi /Fdapp",
1255 lflags => add("/debug"),
1256 shared_ldflag => "/dll",
1257 shared_target => "win-shared", # meaningless except it gives Configure a hint
1258 thread_scheme => "winthreads",
1259 dso_scheme => "win32",
1261 "VC-noCE-common" => {
1262 inherit_from => [ "VC-common" ],
1263 cflags => add(picker(default => "-DUNICODE -D_UNICODE",
1266 ($disabled{shared} ? "" : "/MDd")
1267 ." /Od -DDEBUG -D_DEBUG";
1271 ($disabled{shared} ? "" : "/MD")
1274 lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }),
1275 # Following might/should appears controversial, i.e. defining
1276 # /MDd without evaluating $disabled{shared}. It works in
1277 # non-shared build because static library is compiled with /Zl
1278 # and bares no reference to specific RTL. And it works in
1279 # shared build because multiple /MDd options are not prohibited.
1280 # But why /MDd in static build? Well, basically this is just a
1281 # reference point, which allows to catch eventual errors that
1282 # would prevent those who want to wrap OpenSSL into own .DLL.
1283 # Why not /MD in release build then? Well, some are likely to
1284 # prefer [non-debug] openssl.exe to be free from Micorosoft RTL
1286 bin_cflags => add(picker(debug => "/MDd",
1287 release => sub { $disabled{shared} ? "/MT" : () },
1289 bin_lflags => add("/subsystem:console /opt:ref"),
1292 push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
1293 push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
1294 return join(" ", @ex_libs);
1297 "VC-WIN64-common" => {
1298 inherit_from => [ "VC-noCE-common" ],
1301 push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
1302 return join(" ", @_, @ex_libs);
1304 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1305 build_scheme => add("VC-W64", { separator => undef }),
1308 inherit_from => [ "VC-WIN64-common", asm("ia64_asm"),
1309 sub { $disabled{shared} ? () : "ia64_uplink" } ],
1311 asflags => "-d debug",
1314 bn_asm_src => sub { return undef unless @_;
1315 my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; },
1316 perlasm_scheme => "ias",
1317 multilib => "-ia64",
1320 inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"),
1321 sub { $disabled{shared} ? () : "x86_64_uplink" } ],
1322 as => sub { vc_win64a_info()->{as} },
1323 asflags => sub { vc_win64a_info()->{asflags} },
1324 asoutflag => sub { vc_win64a_info()->{asoutflag} },
1326 bn_asm_src => sub { return undef unless @_;
1327 my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
1328 perlasm_scheme => "auto",
1332 # x86 Win32 target defaults to ANSI API, if you want UNICODE,
1333 # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
1334 inherit_from => [ "VC-noCE-common", asm("x86_asm"),
1335 sub { $disabled{shared} ? () : "uplink_common" } ],
1336 as => sub { my $ver=`nasm -v 2>NUL`;
1337 my $vew=`nasmw -v 2>NUL`;
1338 return $ver ge $vew ? "nasm" : "nasmw" },
1339 asflags => "-f win32",
1343 # WIN32 UNICODE build gets linked with unicows.lib for
1344 # backward compatibility with Win9x.
1345 push @ex_libs, 'unicows.lib'
1346 if (grep { $_ eq "UNICODE" } @user_defines);
1347 return join(" ", @ex_libs, @_);
1350 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1351 perlasm_scheme => "win32n",
1352 build_scheme => add("VC-W32", { separator => undef }),
1355 inherit_from => [ "VC-common" ],
1357 asflags => "/nologo /Cp /coff /c /Cx /Zi",
1362 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',
1363 sub { vc_wince_info()->{cflags}; },
1364 sub { defined($ENV{'WCECOMPAT'})
1365 ? '-I$(WCECOMPAT)/include' : (); },
1366 sub { defined($ENV{'PORTSDK_LIBPATH'})
1367 ? '-I$(PORTSDK_LIBPATH)/../../include' : (); },
1368 sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14
1369 ? ($disabled{shared} ? " /MT" : " /MD")
1371 debug => "/Od -DDEBUG -D_DEBUG",
1373 lflags => combine("/nologo /opt:ref",
1374 sub { vc_wince_info()->{lflags}; },
1375 sub { defined($ENV{PORTSDK_LIBPATH})
1376 ? "/entry:mainCRTstartup" : (); }),
1378 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1381 push @ex_libs, 'ws2.lib' unless $disabled{sock};
1382 push @ex_libs, 'crypt32.lib';
1383 if (defined($ENV{WCECOMPAT})) {
1384 my $x = '$(WCECOMPAT)/lib';
1385 if (-f "$x/$ENV{TARGETCPU}/wcecompatex.lib") {
1386 $x .= '/$(TARGETCPU)/wcecompatex.lib';
1388 $x .= '/wcecompatex.lib';
1392 push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
1393 if (defined($ENV{'PORTSDK_LIBPATH'}));
1394 push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
1395 if ($ENV{'TARGETCPU'} eq "X86");
1398 build_scheme => add("VC-WCE", { separator => undef }),
1403 inherit_from => [ "BASE_unix", asm("x86_asm"),
1404 sub { $disabled{shared} ? () : "x86_uplink" } ],
1406 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
1408 release => "-O3 -fomit-frame-pointer"),
1410 sys_id => "MINGW32",
1411 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1412 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1413 thread_scheme => "winthreads",
1414 perlasm_scheme => "coff",
1415 dso_scheme => "win32",
1416 shared_target => "mingw-shared",
1417 shared_cflag => add("-D_WINDLL"),
1418 shared_ldflag => "-static-libgcc",
1419 shared_rcflag => "--target=pe-i386",
1420 shared_extension => ".dll",
1424 # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1425 # .dll compiled with one compiler with application compiled with
1426 # another compiler. It's possible to engage Applink support in
1427 # mingw64 build, but it's not done, because till mingw64
1428 # supports structured exception handling, one can't seriously
1429 # consider its binaries for using with non-mingw64 run-time
1430 # environment. And as mingw64 is always consistent with itself,
1431 # Applink is never engaged and can as well be omitted.
1432 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1434 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall",
1438 sys_id => "MINGW64",
1439 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1440 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1441 thread_scheme => "winthreads",
1442 perlasm_scheme => "mingw64",
1443 dso_scheme => "win32",
1444 shared_target => "mingw-shared",
1445 shared_cflag => add("-D_WINDLL"),
1446 shared_ldflag => "-static-libgcc",
1447 shared_rcflag => "--target=pe-x86-64",
1448 shared_extension => ".dll",
1454 inherit_from => [ "BASE_unix" ],
1456 cflags => "-DL_ENDIAN -O",
1462 inherit_from => [ "BASE_unix" ],
1464 cflags => "-DTERMIOS -DL_ENDIAN -O -Wall",
1466 bn_ops => "BN_LLONG",
1467 dso_scheme => "win32",
1472 inherit_from => [ "BASE_unix", asm("x86_asm") ],
1474 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1476 release => "-O3 -fomit-frame-pointer"),
1478 bn_ops => "BN_LLONG",
1479 thread_scheme => "pthread",
1480 perlasm_scheme => "coff",
1481 dso_scheme => "dlfcn",
1482 shared_target => "cygwin-shared",
1483 shared_cflag => "-D_WINDLL",
1484 shared_ldflag => "-shared",
1485 shared_extension => ".dll",
1487 "Cygwin-x86_64" => {
1488 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1490 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1494 bn_ops => "SIXTY_FOUR_BIT_LONG",
1495 thread_scheme => "pthread",
1496 perlasm_scheme => "mingw64",
1497 dso_scheme => "dlfcn",
1498 shared_target => "cygwin-shared",
1499 shared_cflag => "-D_WINDLL",
1500 shared_ldflag => "-shared",
1501 shared_extension => ".dll",
1503 # Backward compatibility for those using this target
1505 inherit_from => [ "Cygwin-x86" ]
1507 # In case someone constructs the Cygwin target name themself
1509 inherit_from => [ "Cygwin-x86" ]
1512 inherit_from => [ "Cygwin-x86" ]
1515 inherit_from => [ "Cygwin-x86" ]
1518 inherit_from => [ "Cygwin-x86" ]
1523 inherit_from => [ asm("x86_asm") ],
1525 cflags => "-I/dev/env/WATT_ROOT/inc -DTERMIO -DL_ENDIAN -fomit-frame-pointer -O2 -Wall",
1527 ex_libs => add("-L/dev/env/WATT_ROOT/lib -lwatt"),
1528 bn_ops => "BN_LLONG",
1529 perlasm_scheme => "a.out",
1532 ##### MacOS X (a.k.a. Darwin) setup
1533 "darwin-common" => {
1534 inherit_from => [ "BASE_unix" ],
1537 cflags => combine(picker(default => "",
1540 threads("-D_REENTRANT")),
1542 plib_lflags => "-Wl,-search_paths_first",
1543 bn_ops => "BN_LLONG RC4_CHAR",
1544 thread_scheme => "pthreads",
1545 perlasm_scheme => "osx32",
1546 dso_scheme => "dlfcn",
1547 ranlib => "ranlib -c",
1548 shared_target => "darwin-shared",
1549 shared_cflag => "-fPIC",
1550 shared_ldflag => "-dynamiclib",
1551 shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
1553 # Option "freeze" such as -std=gnu9x can't negatively interfere
1554 # with future defaults for below two targets, because MacOS X
1555 # for PPC has no future, it was discontinued by vendor in 2009.
1556 "darwin-ppc-cc" => {
1557 inherit_from => [ "darwin-common", asm("ppc32_asm") ],
1558 cflags => add("-arch ppc -std=gnu9x -DB_ENDIAN -Wa,-force_cpusubtype_ALL"),
1559 perlasm_scheme => "osx32",
1560 shared_ldflag => "-arch ppc -dynamiclib",
1562 "darwin64-ppc-cc" => {
1563 inherit_from => [ "darwin-common", asm("ppc64_asm") ],
1564 cflags => add("-arch ppc64 -std=gnu9x -DB_ENDIAN"),
1565 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1566 perlasm_scheme => "osx64",
1567 shared_ldflag => "-arch ppc64 -dynamiclib",
1569 "darwin-i386-cc" => {
1570 inherit_from => [ "darwin-common", asm("x86_asm") ],
1571 cflags => add(picker(default => "-arch i386 -DL_ENDIAN",
1572 release => "-fomit-frame-pointer")),
1573 bn_ops => "BN_LLONG RC4_INT",
1574 perlasm_scheme => "macosx",
1575 shared_ldflag => "-arch i386 -dynamiclib",
1577 "darwin64-x86_64-cc" => {
1578 inherit_from => [ "darwin-common", asm("x86_64_asm") ],
1579 cflags => add("-arch x86_64 -DL_ENDIAN -Wall"),
1580 bn_ops => "SIXTY_FOUR_BIT_LONG",
1581 perlasm_scheme => "macosx",
1582 shared_ldflag => "-arch x86_64 -dynamiclib",
1587 # It takes three prior-set environment variables to make it work:
1589 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
1590 # CROSS_TOP=/where/SDKs/are
1591 # CROSS_SDK=iPhoneOSx.y.sdk
1593 # Exact paths vary with Xcode releases, but for couple of last ones
1594 # they would look like this:
1596 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
1597 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
1598 # CROSS_SDK=iPhoneOS.sdk
1600 "iphoneos-cross" => {
1601 inherit_from => [ "darwin-common" ],
1602 cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1606 inherit_from => [ "darwin-common", asm("armv4_asm") ],
1607 # It should be possible to go below iOS 6 and even add -arch armv6,
1608 # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
1610 cflags => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1612 perlasm_scheme => "ios32",
1615 inherit_from => [ "darwin-common", asm("aarch64_asm") ],
1616 cflags => add("-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1618 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1619 perlasm_scheme => "ios64",
1624 inherit_from => [ "BASE_unix" ],
1625 inherit_from => [ asm("x86_elf_asm") ],
1627 cflags => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
1628 threads("-pthread")),
1629 ex_libs => add("-ldl"),
1630 bn_ops => "BN_LLONG",
1631 thread_scheme => "pthreads",
1632 dso_scheme => "dlfcn",
1633 shared_target => "linux-shared",
1634 shared_cflag => "-fPIC",
1637 ##### VxWorks for various targets
1638 "vxworks-ppc60x" => {
1639 inherit_from => [ "BASE_unix" ],
1641 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",
1642 sys_id => "VXWORKS",
1643 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),
1645 "vxworks-ppcgen" => {
1646 inherit_from => [ "BASE_unix" ],
1648 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",
1649 sys_id => "VXWORKS",
1650 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),
1652 "vxworks-ppc405" => {
1653 inherit_from => [ "BASE_unix" ],
1655 cflags => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h",
1656 sys_id => "VXWORKS",
1659 "vxworks-ppc750" => {
1660 inherit_from => [ "BASE_unix" ],
1662 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)",
1663 sys_id => "VXWORKS",
1666 "vxworks-ppc750-debug" => {
1667 inherit_from => [ "BASE_unix" ],
1669 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",
1670 sys_id => "VXWORKS",
1673 "vxworks-ppc860" => {
1674 inherit_from => [ "BASE_unix" ],
1676 cflags => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h",
1677 sys_id => "VXWORKS",
1680 "vxworks-simlinux" => {
1681 inherit_from => [ "BASE_unix" ],
1683 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",
1684 sys_id => "VXWORKS",
1686 ranlib => "ranlibpentium",
1689 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
1691 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",
1692 threads("-D_REENTRANT")),
1693 sys_id => "VXWORKS",
1694 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),
1695 thread_scheme => "pthreads",
1696 perlasm_scheme => "o32",
1697 ranlib => "ranlibmips",
1702 inherit_from => [ "BASE_unix" ],
1704 cflags => combine("\$(CFLAGS)",
1705 threads("-D_REENTRANT")),
1706 plib_lflags => "\$(LDFLAGS)",
1707 ex_libs => add("\$(LDLIBS)"),
1708 bn_ops => "BN_LLONG",
1709 thread_scheme => "pthreads",
1710 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1711 shared_target => "linux-shared",
1712 shared_cflag => "-fPIC",
1713 shared_ldflag => "-shared",
1714 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1715 ranlib => "$ENV{'RANLIB'}",
1717 "uClinux-dist64" => {
1718 inherit_from => [ "BASE_unix" ],
1720 cflags => combine("\$(CFLAGS)",
1721 threads("-D_REENTRANT")),
1722 plib_lflags => "\$(LDFLAGS)",
1723 ex_libs => add("\$(LDLIBS)"),
1724 bn_ops => "SIXTY_FOUR_BIT_LONG",
1725 thread_scheme => "pthreads",
1726 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1727 shared_target => "linux-shared",
1728 shared_cflag => "-fPIC",
1729 shared_ldflag => "-shared",
1730 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1731 ranlib => "$ENV{'RANLIB'}",
1736 inherit_from => [ "BASE_VMS" ],
1739 cflags => picker(default => "/STANDARD=RELAXED/NOLIST/PREFIX=ALL/NAMES=(AS_IS,SHORTENED)",
1740 debug => "/NOOPTIMIZE/DEBUG",
1741 release => "/OPTIMIZE/NODEBUG"),
1742 lflags => picker(default => "/MAP",
1743 debug => "/DEBUG/TRACEBACK",
1744 release => "/NODEBUG/NOTRACEBACK"),
1745 shared_target => "vms-shared",
1746 dso_scheme => "vms",
1747 thread_scheme => "pthreads",
1749 apps_aux_src => "vms_decc_init.c",
1752 # VMS on VAX is *unsupported*
1755 # bn_obj => "[.asm]vms.obj vms-helper.obj"
1758 # inherit_from => [ "vms-generic", asm("vms-asm") ],
1760 # debug_aflags => "/NOOPTIMIZE/DEBUG",
1761 # release_aflags => "/OPTIMIZE/NODEBUG",
1762 # bn_opts => "THIRTY_TWO_BIT RC4_CHAR RC4_CHUNK DES_PTR BF_PTR",
1765 inherit_from => [ "vms-generic" ],
1766 cflags => add(sub { my @warnings =
1767 @{vms_info()->{disable_warns}};
1769 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1772 return vms_info()->{def_zlib}
1773 ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : ();
1775 ex_libs => add(sub { return vms_info()->{zlib} || (); }),
1777 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1778 #release_aflags => "/OPTIMIZE/NODEBUG",
1779 bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1781 "vms-alpha-p32" => {
1782 inherit_from => [ "vms-alpha" ],
1784 add("/POINTER_SIZE=32",
1785 sub { my @warnings =
1786 @{vms_info()->{disable_warns_p32}};
1788 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1792 return vms_info()->{def_zlib_p32}
1793 ? "LIBZ=\"\"\"".vms_info()->{def_zlib_p32}."\"\"\"" : ();
1795 ex_libs => add(sub { return vms_info()->{zlib_p32} || (); }),
1797 "vms-alpha-p64" => {
1798 inherit_from => [ "vms-alpha" ],
1800 add("/POINTER_SIZE=64=ARGV",
1801 sub { my @warnings =
1802 @{vms_info()->{disable_warns_p64}};
1804 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1808 return vms_info()->{def_zlib_p64}
1809 ? "LIBZ=\"\"\"".vms_info()->{def_zlib_p64}."\"\"\"" : ();
1811 ex_libs => add(sub { return vms_info()->{zlib_p64} || (); }),
1814 inherit_from => [ "vms-generic" ],
1815 cflags => add(sub { my @warnings =
1816 @{vms_info()->{disable_warns}};
1818 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1821 return vms_info()->{def_zlib}
1822 ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : ();
1824 ex_libs => add(sub { return vms_info()->{zlib} || (); }),
1826 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1827 #release_aflags => "/OPTIMIZE/NODEBUG",
1828 bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1831 inherit_from => [ "vms-ia64" ],
1833 add("/POINTER_SIZE=32",
1834 sub { my @warnings =
1835 @{vms_info()->{disable_warns_p32}};
1837 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1841 return vms_info()->{def_zlib_p32}
1842 ? "LIBZ=\"\"\"".vms_info()->{def_zlib_p32}."\"\"\"" : ();
1844 ex_libs => add(sub { return vms_info()->{zlib_p32} || (); }),
1847 inherit_from => [ "vms-ia64" ],
1849 add("/POINTER_SIZE=64=ARGV",
1850 sub { my @warnings =
1851 @{vms_info()->{disable_warns_p64}};
1853 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1857 return vms_info()->{def_zlib_p64}
1858 ? "LIBZ=\"\"\"".vms_info()->{def_zlib_p64}."\"\"\"" : ();
1860 ex_libs => add(sub { return vms_info()->{zlib_p64} || (); }),