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";
94 #### Basic configs that should work on any 32-bit box
97 cflags => picker(debug => "-O0 -g",
99 thread_scheme => "(unknown)",
100 bn_ops => "BN_LLONG",
105 thread_scheme => "(unknown)",
108 #### VOS Configurations
110 inherit_from => [ "BASE_unix" ],
112 cflags => picker(default => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
113 debug => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG",
115 thread_scheme => "(unknown)",
117 lflags => "-Wl,-map",
118 bn_ops => "BN_LLONG",
119 shared_extension => ".so",
122 #### Solaris configurations
123 "solaris-common" => {
124 inherit_from => [ "BASE_unix" ],
126 cflags => "-DFILIO_H",
127 ex_libs => add("-lresolv -lsocket -lnsl -ldl"),
128 dso_scheme => "dlfcn",
129 thread_scheme => "pthreads",
130 shared_target => "solaris-shared",
131 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
133 #### Solaris x86 with GNU C setups
134 "solaris-x86-gcc" => {
135 # -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have
136 # to do it here because whenever GNU C instantiates an assembler
137 # template it surrounds it with #APP #NO_APP comment pair which
138 # (at least Solaris 7_x86) /usr/ccs/bin/as fails to assemble
139 # with "Illegal mnemonic" error message.
140 inherit_from => [ "solaris-common", asm("x86_elf_asm") ],
142 cflags => add_before(picker(default => "-Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM",
144 release => "-O3 -fomit-frame-pointer"),
145 threads("-pthread")),
146 bn_ops => "BN_LLONG",
147 shared_cflag => "-fPIC",
148 shared_ldflag => "-shared",
150 "solaris64-x86_64-gcc" => {
151 # -shared -static-libgcc might appear controversial, but modules
152 # taken from static libgcc do not have relocations and linking
153 # them into our shared objects doesn't have any negative side
154 # effects. On the contrary, doing so makes it possible to use
155 # gcc shared build with Sun C. Given that gcc generates faster
156 # code [thanks to inline assembler], I would actually recommend
157 # to consider using gcc shared build even with vendor compiler:-)
158 # <appro@fy.chalmers.se>
159 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
161 cflags => add_before(picker(default => "-m64 -Wall -DL_ENDIAN",
164 threads("-pthread")),
165 bn_ops => "SIXTY_FOUR_BIT_LONG",
166 perlasm_scheme => "elf",
167 shared_cflag => "-fPIC",
168 shared_ldflag => "-m64 -shared -static-libgcc",
172 #### Solaris x86 with Sun C setups
173 "solaris-x86-cc" => {
174 inherit_from => [ "solaris-common" ],
176 cflags => add_before(picker(default => "-xarch=generic -xstrconst -Xa -DL_ENDIAN",
178 release => "-xO5 -xregs=frameptr -xdepend -xbuiltin"),
179 threads("-D_REENTRANT")),
180 lflags => add(threads("-mt")),
181 ex_libs => add(threads("-lpthread")),
182 bn_ops => "BN_LLONG RC4_CHAR",
183 shared_cflag => "-KPIC",
184 shared_ldflag => "-G -dy -z text",
186 "solaris64-x86_64-cc" => {
187 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
189 cflags => add_before(picker(default => "-xarch=generic64 -xstrconst -Xa -DL_ENDIAN",
191 release => "-xO5 -xdepend -xbuiltin"),
192 threads("-D_REENTRANT")),
193 thread_scheme => "pthreads",
194 lflags => add(threads("-mt")),
195 ex_libs => add(threads("-lpthread")),
196 bn_ops => "SIXTY_FOUR_BIT_LONG",
197 perlasm_scheme => "elf",
198 shared_cflag => "-KPIC",
199 shared_ldflag => "-xarch=generic64 -G -dy -z text",
203 #### SPARC Solaris with GNU C setups
204 "solaris-sparcv7-gcc" => {
205 inherit_from => [ "solaris-common" ],
207 cflags => add_before(picker(default => "-Wall -DB_ENDIAN -DBN_DIV2W",
210 threads("-pthread")),
211 bn_ops => "BN_LLONG RC4_CHAR",
212 shared_cflag => "-fPIC",
213 shared_ldflag => "-shared",
215 "solaris-sparcv8-gcc" => {
216 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
217 cflags => add_before("-mcpu=v8"),
219 "solaris-sparcv9-gcc" => {
220 # -m32 should be safe to add as long as driver recognizes
222 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
223 cflags => add_before(picker(default => "-m32 -mcpu=ultrasparc",
224 debug => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -O -g -pedantic -ansi -Wshadow -Wno-long-long -D__EXTENSIONS__")),
226 "solaris64-sparcv9-gcc" => {
227 inherit_from => [ "solaris-sparcv9-gcc" ],
228 cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
229 bn_ops => "BN_LLONG RC4_CHAR",
230 shared_ldflag => "-m64 -shared",
234 #### SPARC Solaris with Sun C setups
235 # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
236 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
237 # SC5.0 note: Compiler common patch 107357-01 or later is required!
238 "solaris-sparcv7-cc" => {
239 inherit_from => [ "solaris-common" ],
241 cflags => add_before(picker(default => "-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W",
242 debug => "-g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG",
243 release => "-xO5 -xdepend"),
244 threads("-D_REENTRANT")),
245 lflags => add(threads("-mt")),
246 ex_libs => add(threads("-lpthread")),
247 bn_ops => "BN_LLONG RC4_CHAR",
248 shared_cflag => "-KPIC",
249 shared_ldflag => "-G -dy -z text",
252 "solaris-sparcv8-cc" => {
253 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
254 cflags => add_before("-xarch=v8"),
256 "solaris-sparcv9-cc" => {
257 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
258 cflags => add_before("-xarch=v8plus -xtarget=ultra"),
260 "solaris64-sparcv9-cc" => {
261 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
262 cflags => add_before("-xarch=v9 -xtarget=ultra"),
263 bn_ops => "BN_LLONG RC4_CHAR",
264 shared_ldflag => "-xarch=v9 -G -dy -z text",
268 #### IRIX 5.x configs
269 # -mips2 flag is added by ./config when appropriate.
271 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
273 cflags => picker(default => "-DB_ENDIAN",
276 bn_ops => "BN_LLONG RC4_CHAR",
277 thread_scheme => "(unknown)",
278 perlasm_scheme => "o32",
279 dso_scheme => "dlfcn",
280 shared_target => "irix-shared",
281 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
284 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
286 cflags => picker(default => "-use_readonly_const -DB_ENDIAN",
289 bn_ops => "BN_LLONG RC4_CHAR",
290 thread_scheme => "(unknown)",
291 perlasm_scheme => "o32",
292 dso_scheme => "dlfcn",
293 shared_target => "irix-shared",
294 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
296 #### IRIX 6.x configs
297 # Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
298 # './Configure irix-cc -o32' manually.
299 "irix-mips3-gcc" => {
300 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
302 cflags => combine(picker(default => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W",
305 threads("-D_SGI_MP_SOURCE -pthread")),
306 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
307 thread_scheme => "pthreads",
308 perlasm_scheme => "n32",
309 dso_scheme => "dlfcn",
310 shared_target => "irix-shared",
311 shared_ldflag => "-mabi=n32",
312 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
316 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
318 cflags => combine(picker(default => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
321 threads("-D_SGI_MP_SOURCE")),
322 ex_libs => add(threads("-lpthread")),
323 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
324 thread_scheme => "pthreads",
325 perlasm_scheme => "n32",
326 dso_scheme => "dlfcn",
327 shared_target => "irix-shared",
328 shared_ldflag => "-n32",
329 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
333 "irix64-mips4-gcc" => {
334 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
336 cflags => combine(picker(default => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W",
339 threads("-D_SGI_MP_SOURCE")),
340 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
341 thread_scheme => "pthreads",
342 perlasm_scheme => "64",
343 dso_scheme => "dlfcn",
344 shared_target => "irix-shared",
345 shared_ldflag => "-mabi=64",
346 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
349 "irix64-mips4-cc" => {
350 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
352 cflags => combine(picker(default => "-64 -mips4 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
355 threads("-D_SGI_MP_SOURCE")),
356 ex_libs => add(threads("-lpthread")),
357 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
358 thread_scheme => "pthreads",
359 perlasm_scheme => "64",
360 dso_scheme => "dlfcn",
361 shared_target => "irix-shared",
362 shared_ldflag => "-64",
363 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
367 #### Unified HP-UX ANSI C configs.
369 # - Originally we were optimizing at +O4 level. It should be noted
370 # that the only difference between +O3 and +O4 is global inter-
371 # procedural analysis. As it has to be performed during the link
372 # stage the compiler leaves behind certain pseudo-code in lib*.a
373 # which might be release or even patch level specific. Generating
374 # the machine code for and analyzing the *whole* program appears
375 # to be *extremely* memory demanding while the performance gain is
376 # actually questionable. The situation is intensified by the default
377 # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
378 # which is way too low for +O4. In other words, doesn't +O3 make
380 # - Keep in mind that the HP compiler by default generates code
381 # suitable for execution on the host you're currently compiling at.
382 # If the toolkit is meant to be used on various PA-RISC processors
383 # consider './Configure hpux-parisc-[g]cc +DAportable'.
384 # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
385 # 32-bit message digests. (For the moment of this writing) HP C
386 # doesn't seem to "digest" too many local variables (they make "him"
387 # chew forever:-). For more details look-up MD32_XARRAY comment in
388 # crypto/sha/sha_lcl.h.
389 # - originally there were 32-bit hpux-parisc2-* targets. They were
390 # scrapped, because a) they were not interchangeable with other 32-bit
391 # targets; a) when critical 32-bit assembly modules detect if they
392 # are executed on PA-RISC 2.0 and thus adequate performance is
394 # <appro@fy.chalmers.se>
395 "hpux-parisc-gcc" => {
396 inherit_from => [ "BASE_unix" ],
398 cflags => combine(picker(default => "-DB_ENDIAN -DBN_DIV2W",
401 threads("-pthread")),
402 ex_libs => add("-Wl,+s -ldld"),
403 bn_ops => "BN_LLONG",
404 thread_scheme => "pthreads",
406 shared_target => "hpux-shared",
407 shared_cflag => "-fPIC",
408 shared_ldflag => "-shared",
409 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
411 "hpux-parisc1_1-gcc" => {
412 inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ],
413 multilib => "/pa1.1",
415 "hpux64-parisc2-gcc" => {
416 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
418 cflags => combine(picker(default => "-DB_ENDIAN",
421 threads("-D_REENTRANT")),
422 ex_libs => add("-ldl"),
423 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
424 thread_scheme => "pthreads",
425 dso_scheme => "dlfcn",
426 shared_target => "hpux-shared",
427 shared_cflag => "-fpic",
428 shared_ldflag => "-shared",
429 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
430 multilib => "/pa20_64",
433 # More attempts at unified 10.X and 11.X targets for HP C compiler.
435 # Chris Ruemmler <ruemmler@cup.hp.com>
436 # Kevin Steves <ks@hp.se>
437 "hpux-parisc-cc" => {
438 inherit_from => [ "BASE_unix" ],
440 cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
441 debug => "+O0 +d -g",
443 threads("-D_REENTRANT")),
444 ex_libs => add("-Wl,+s -ldld",threads("-lpthread")),
445 bn_ops => "RC4_CHAR",
446 thread_scheme => "pthreads",
448 shared_target => "hpux-shared",
449 shared_cflag => "+Z",
450 shared_ldflag => "-b",
451 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
453 "hpux-parisc1_1-cc" => {
454 inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ],
455 cflags => add_before("+DA1.1"),
456 multilib => "/pa1.1",
458 "hpux64-parisc2-cc" => {
459 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
461 cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY",
462 debug => "+O0 +d -g",
464 threads("-D_REENTRANT")),
465 ex_libs => add("-ldl",threads("-lpthread")),
466 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
467 thread_scheme => "pthreads",
468 dso_scheme => "dlfcn",
469 shared_target => "hpux-shared",
470 shared_cflag => "+Z",
471 shared_ldflag => "+DD64 -b",
472 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
473 multilib => "/pa20_64",
476 # HP/UX IA-64 targets
478 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
480 cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z -DB_ENDIAN",
481 debug => "+O0 +d -g",
483 threads("-D_REENTRANT")),
484 ex_libs => add("-ldl",threads("-lpthread")),
485 bn_ops => "SIXTY_FOUR_BIT",
486 thread_scheme => "pthreads",
487 dso_scheme => "dlfcn",
488 shared_target => "hpux-shared",
489 shared_cflag => "+Z",
490 shared_ldflag => "+DD32 -b",
491 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
492 multilib => "/hpux32",
494 # Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted
495 # with debugging of the following config.
496 "hpux64-ia64-cc" => {
497 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
499 cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z -DB_ENDIAN",
500 debug => "+O0 +d -g",
502 threads("-D_REENTRANT")),
503 ex_libs => add("-ldl", threads("-lpthread")),
504 bn_ops => "SIXTY_FOUR_BIT_LONG",
505 thread_scheme => "pthreads",
506 dso_scheme => "dlfcn",
507 shared_target => "hpux-shared",
508 shared_cflag => "+Z",
509 shared_ldflag => "+DD64 -b",
510 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
511 multilib => "/hpux64",
515 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
517 cflags => combine(picker(default => "-DB_ENDIAN",
520 threads("-pthread")),
521 ex_libs => add("-ldl"),
522 bn_ops => "SIXTY_FOUR_BIT",
523 thread_scheme => "pthreads",
524 dso_scheme => "dlfcn",
525 shared_target => "hpux-shared",
526 shared_cflag => "-fpic",
527 shared_ldflag => "-shared",
528 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
529 multilib => "/hpux32",
531 "hpux64-ia64-gcc" => {
532 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
534 cflags => combine(picker(default => "-mlp64 -DB_ENDIAN",
537 threads("-pthread")),
538 ex_libs => add("-ldl"),
539 bn_ops => "SIXTY_FOUR_BIT_LONG",
540 thread_scheme => "pthreads",
541 dso_scheme => "dlfcn",
542 shared_target => "hpux-shared",
543 shared_cflag => "-fpic",
544 shared_ldflag => "-mlp64 -shared",
545 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
546 multilib => "/hpux64",
549 #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
551 inherit_from => [ "BASE_unix" ],
553 cflags => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB",
555 ex_libs => add("-L/SYSLOG/PUB -lsyslog -lsocket -lcurses"),
556 thread_scheme => "(unknown)",
557 bn_ops => "BN_LLONG",
560 #### DEC Alpha OSF/1/Tru64 targets.
561 "osf1-alpha-gcc" => {
562 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
565 bn_ops => "SIXTY_FOUR_BIT_LONG",
566 thread_scheme => "(unknown)",
567 dso_scheme => "dlfcn",
568 shared_target => "alpha-osf1-shared",
569 shared_extension => ".so",
572 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
574 cflags => "-std1 -tune host -O4 -readonly_strings",
575 bn_ops => "SIXTY_FOUR_BIT_LONG",
576 thread_scheme => "(unknown)",
577 dso_scheme => "dlfcn",
578 shared_target => "alpha-osf1-shared",
579 shared_extension => ".so",
581 "tru64-alpha-cc" => {
582 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
584 cflags => combine("-std1 -tune host -fast -readonly_strings",
585 threads("-pthread")),
586 bn_ops => "SIXTY_FOUR_BIT_LONG",
587 thread_scheme => "pthreads",
588 dso_scheme => "dlfcn",
589 shared_target => "alpha-osf1-shared",
590 shared_ldflag => "-msym",
591 shared_extension => ".so",
595 #### Variety of LINUX:-)
597 # *-generic* is endian-neutral target, but ./config is free to
598 # throw in -D[BL]_ENDIAN, whichever appropriate...
599 "linux-generic32" => {
600 inherit_from => [ "BASE_unix" ],
602 cflags => combine(picker(default => "-Wall",
603 debug => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG",
605 threads("-pthread")),
606 ex_libs => add("-ldl"),
607 bn_ops => "BN_LLONG RC4_CHAR",
608 thread_scheme => "pthreads",
609 dso_scheme => "dlfcn",
610 shared_target => "linux-shared",
611 shared_cflag => "-fPIC",
612 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
614 "linux-generic64" => {
615 inherit_from => [ "linux-generic32" ],
616 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
620 inherit_from => [ "linux-generic32", asm("ppc32_asm") ],
621 perlasm_scheme => "linux32",
624 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
625 cflags => add("-m64 -DB_ENDIAN"),
626 perlasm_scheme => "linux64",
627 shared_ldflag => "-m64",
631 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
632 cflags => add("-m64 -DL_ENDIAN"),
633 perlasm_scheme => "linux64le",
634 shared_ldflag => "-m64",
638 ################################################################
639 # Note that -march is not among compiler options in linux-armv4
640 # target description. Not specifying one is intentional to give
643 # a) rely on your compiler default by not specifying one;
644 # b) specify your target platform explicitly for optimal
645 # performance, e.g. -march=armv6 or -march=armv7-a;
646 # c) build "universal" binary that targets *range* of platforms
647 # by specifying minimum and maximum supported architecture;
649 # As for c) option. It actually makes no sense to specify
650 # maximum to be less than ARMv7, because it's the least
651 # requirement for run-time switch between platform-specific
652 # code paths. And without run-time switch performance would be
653 # equivalent to one for minimum. Secondly, there are some
654 # natural limitations that you'd have to accept and respect.
655 # Most notably you can *not* build "universal" binary for
656 # big-endian platform. This is because ARMv7 processor always
657 # picks instructions in little-endian order. Another similar
658 # limitation is that -mthumb can't "cross" -march=armv6t2
659 # boundary, because that's where it became Thumb-2. Well, this
660 # limitation is a bit artificial, because it's not really
661 # impossible, but it's deemed too tricky to support. And of
662 # course you have to be sure that your binutils are actually
663 # up to the task of handling maximum target platform. With all
664 # this in mind here is an example of how to configure
667 # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
669 inherit_from => [ "linux-generic32", asm("armv4_asm") ],
670 perlasm_scheme => "linux32",
673 inherit_from => [ "linux-generic64", asm("aarch64_asm") ],
674 perlasm_scheme => "linux64",
676 "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32
677 inherit_from => [ "linux-generic32", asm("aarch64_asm") ],
678 cflags => add("-mabi=ilp32"),
679 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
680 perlasm_scheme => "linux64",
681 shared_ldflag => "-mabi=ilp32",
685 # Configure script adds minimally required -march for assembly
686 # support, if no -march was specified at command line.
687 inherit_from => [ "linux-generic32", asm("mips32_asm") ],
688 cflags => add("-mabi=32 -DBN_DIV3W"),
689 perlasm_scheme => "o32",
690 shared_ldflag => "-mabi=32",
692 # mips32 and mips64 below refer to contemporary MIPS Architecture
693 # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
695 inherit_from => [ "linux-generic32", asm("mips64_asm") ],
696 cflags => add("-mabi=n32 -DBN_DIV3W"),
697 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
698 perlasm_scheme => "n32",
699 shared_ldflag => "-mabi=n32",
702 "linux64-mips64" => {
703 inherit_from => [ "linux-generic64", asm("mips64_asm") ],
704 cflags => add("-mabi=64 -DBN_DIV3W"),
705 perlasm_scheme => "64",
706 shared_ldflag => "-mabi=64",
710 #### IA-32 targets...
712 inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
713 cflags => add(picker(default => "-DL_ENDIAN",
714 release => "-fomit-frame-pointer")),
715 ex_libs => add(picker(debug => "-lefence")),
716 bn_ops => "BN_LLONG",
719 inherit_from => [ "BASE_unix", asm("x86_asm") ],
721 cflags => add(picker(default => "-DL_ENDIAN -Wall",
723 release => "-O3 -fomit-frame-pointer")),
724 bn_ops => "BN_LLONG",
725 thread_scheme => "(unknown)",
726 perlasm_scheme => "a.out",
730 inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
731 cflags => add("-m64 -DL_ENDIAN"),
732 bn_ops => "SIXTY_FOUR_BIT_LONG",
733 perlasm_scheme => "elf",
734 shared_ldflag => "-m64",
737 "linux-x86_64-clang" => {
738 inherit_from => [ "linux-x86_64" ],
740 cflags => add("-Wextra -Qunused-arguments"),
743 inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
744 cflags => add("-mx32 -DL_ENDIAN"),
745 bn_ops => "SIXTY_FOUR_BIT",
746 perlasm_scheme => "elf32",
747 shared_ldflag => "-mx32",
752 inherit_from => [ "linux-generic64", asm("ia64_asm") ],
753 bn_ops => "SIXTY_FOUR_BIT_LONG",
757 inherit_from => [ "linux-generic64", asm("s390x_asm") ],
758 cflags => add("-m64 -DB_ENDIAN"),
759 perlasm_scheme => "64",
760 shared_ldflag => "-m64",
764 #### So called "highgprs" target for z/Architecture CPUs
765 # "Highgprs" is kernel feature first implemented in Linux
766 # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
767 # significant bits of general purpose registers not only
768 # upon 32-bit process context switch, but even on
769 # asynchronous signal delivery to such process. This makes
770 # it possible to deploy 64-bit instructions even in legacy
771 # application context and achieve better [or should we say
772 # adequate] performance. The build is binary compatible with
773 # linux-generic32, and the idea is to be able to install the
774 # resulting libcrypto.so alongside generic one, e.g. as
775 # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
776 # linker to autodiscover. Unfortunately it doesn't work just
777 # yet, because of couple of bugs in glibc
778 # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
780 inherit_from => [ "linux-generic32", asm("s390x_asm") ],
781 cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"),
782 bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; },
783 perlasm_scheme => "31",
784 shared_ldflag => "-m31",
785 multilib => "/highgprs",
788 #### SPARC Linux setups
789 # Ray Miller <ray.miller@computing-services.oxford.ac.uk> has
790 # patiently assisted with debugging of following two configs.
792 inherit_from => [ "linux-generic32", asm("sparcv8_asm") ],
793 cflags => add("-mcpu=v8 -DB_ENDIAN -DBN_DIV2W"),
796 # it's a real mess with -mcpu=ultrasparc option under Linux,
797 # but -Wa,-Av8plus should do the trick no matter what.
798 inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
799 cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W"),
800 shared_ldflag => "-m32",
802 "linux64-sparcv9" => {
803 # GCC 3.1 is a requirement
804 inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
805 cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"),
806 bn_ops => "BN_LLONG RC4_CHAR",
807 shared_ldflag => "-m64",
811 "linux-alpha-gcc" => {
812 inherit_from => [ "linux-generic64", asm("alpha_asm") ],
813 cflags => add("-DL_ENDIAN"),
814 bn_ops => "SIXTY_FOUR_BIT_LONG",
816 "linux-c64xplus" => {
817 inherit_from => [ "BASE_unix" ],
818 # TI_CGT_C6000_7.3.x is a requirement
820 cflags => combine("--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT",
821 threads("-D_REENTRANT")),
822 bn_ops => "BN_LLONG",
823 cpuid_asm_src => "c64xpluscpuid.s",
824 bn_asm_src => "asm/bn-c64xplus.asm c64xplus-gf2m.s",
825 aes_asm_src => "aes-c64xplus.s aes_cbc.c aes-ctr.fake",
826 sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s",
827 rc4_asm_src => "rc4-c64xplus.s",
828 modes_asm_src => "ghash-c64xplus.s",
829 chacha_asm_src => "chacha-c64xplus.s",
830 poly1305_asm_src => "poly1305-c64xplus.s",
831 thread_scheme => "pthreads",
832 perlasm_scheme => "void",
833 dso_scheme => "dlfcn",
834 shared_target => "linux-shared",
835 shared_cflag => "--pic",
836 shared_ldflag => "-z --sysv --shared",
837 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
841 #### Android: linux-* but without pointers to headers and libs.
843 # It takes pair of prior-set environment variables to make it work:
845 # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<
846 # CROSS_COMPILE=<prefix>
848 # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
849 # For example to compile for ICS and ARM with NDK 10d, you'd:
851 # ANDROID_NDK=/some/where/android-ndk-10d
852 # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
853 # CROSS_COMPILE=arm-linux-adroideabi-
854 # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/
857 inherit_from => [ "linux-generic32" ],
858 # Special note about unconditional -fPIC and -pie. The underlying
859 # reason is that Lollipop refuses to run non-PIE. But what about
860 # older systems and NDKs? -fPIC was never problem, so the only
861 # concern if -pie. Older toolchains, e.g. r4, appear to handle it
862 # and binaries turn mostly functional. "Mostly" means that oldest
863 # Androids, such as Froyo, fail to handle executable, but newer
864 # systems are perfectly capable of executing binaries targeting
865 # Froyo. Keep in mind that in the nutshell Android builds are
866 # about JNI, i.e. shared libraries, not applications.
867 cflags => picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
874 inherit_from => [ "android", asm("x86_asm") ],
875 cflags => add(picker(release => "-fomit-frame-pointer")),
876 bn_ops => "BN_LLONG",
877 perlasm_scheme => "android",
879 ################################################################
880 # Contemporary Android applications can provide multiple JNI
881 # providers in .apk, targeting multiple architectures. Among
882 # them there is "place" for two ARM flavours: generic eabi and
883 # armv7-a/hard-float. However, it should be noted that OpenSSL's
884 # ability to engage NEON is not constrained by ABI choice, nor
885 # is your ability to call OpenSSL from your application code
886 # compiled with floating-point ABI other than default 'soft'.
887 # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
888 # This means that choice of ARM libraries you provide in .apk
889 # is driven by application needs. For example if application
890 # itself benefits from NEON or is floating-point intensive, then
891 # it might be appropriate to provide both libraries. Otherwise
892 # just generic eabi would do. But in latter case it would be
895 # ./Configure android-armeabi -D__ARM_MAX_ARCH__=8
897 # in order to build "universal" binary and allow OpenSSL take
898 # advantage of NEON when it's available.
900 "android-armeabi" => {
901 inherit_from => [ "android", asm("armv4_asm") ],
904 inherit_from => [ "android", asm("mips32_asm") ],
905 perlasm_scheme => "o32",
909 inherit_from => [ "linux-generic64" ],
910 cflags => picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
916 "android64-aarch64" => {
917 inherit_from => [ "android64", asm("aarch64_asm") ],
918 perlasm_scheme => "linux64",
923 # As for thread cflag. Idea is to maintain "collective" set of
924 # flags, which would cover all BSD flavors. -pthread applies
925 # to them all, but is treated differently. OpenBSD expands is
926 # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
927 # expands it as -lc_r, which has to be accompanied by explicit
928 # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
929 # expands it as -lc_r, which seems to be sufficient?
930 inherit_from => [ "BASE_unix" ],
932 cflags => combine(picker(default => "-Wall",
935 threads("-pthread -D_THREAD_SAFE -D_REENTRANT")),
936 bn_ops => "BN_LLONG",
937 thread_scheme => "pthreads",
938 dso_scheme => "dlfcn",
939 shared_target => "bsd-gcc-shared",
940 shared_cflag => "-fPIC",
941 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
944 inherit_from => [ "BSD-generic32" ],
945 bn_ops => "SIXTY_FOUR_BIT_LONG",
949 inherit_from => [ "BSD-generic32", asm("x86_asm") ],
950 cflags => add(picker(default => "-DL_ENDIAN",
951 release => "-fomit-frame-pointer")),
952 bn_ops => "BN_LLONG",
953 shared_target => "bsd-shared",
954 perlasm_scheme => "a.out",
957 inherit_from => [ "BSD-x86" ],
958 perlasm_scheme => "elf",
962 inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ],
963 cflags => add("-mcpu=v8 -DB_ENDIAN"),
966 # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
967 # simply *happens* to work around a compiler bug in gcc 3.3.3,
968 # triggered by RIPEMD160 code.
969 inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ],
970 cflags => add("-DB_ENDIAN -DMD32_REG_T=int"),
971 bn_ops => "BN_LLONG",
975 inherit_from => [ "BSD-generic64", asm("ia64_asm") ],
976 cflags => add_before("-DL_ENDIAN"),
977 bn_ops => "SIXTY_FOUR_BIT_LONG",
981 inherit_from => [ "BSD-generic64", asm("x86_64_asm") ],
982 cflags => add_before("-DL_ENDIAN"),
983 bn_ops => "SIXTY_FOUR_BIT_LONG",
984 perlasm_scheme => "elf",
988 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
990 cflags => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -Wall",
991 ex_libs => add("-ldl"),
992 bn_ops => "BN_LLONG",
993 thread_scheme => "(unknown)",
994 dso_scheme => "dlfcn",
995 shared_target => "bsd-gcc-shared",
996 shared_cflag => "-fPIC",
997 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1001 inherit_from => [ "BASE_unix" ],
1003 cflags => "-O -Wall",
1004 unistd => "<libc.h>",
1005 bn_ops => "BN_LLONG",
1006 thread_scheme => "(unknown)",
1009 inherit_from => [ "BASE_unix" ],
1011 cflags => "-O3 -Wall",
1012 unistd => "<libc.h>",
1013 bn_ops => "BN_LLONG",
1014 thread_scheme => "(unknown)",
1019 inherit_from => [ "BASE_unix" ],
1021 cflags => "-DL_ENDIAN -DTERMIO",
1022 thread_scheme => "(unknown)",
1025 inherit_from => [ "BASE_unix" ],
1027 ex_libs => add("-lsocket"),
1028 dso_scheme => "dlfcn",
1029 shared_target => "bsd-gcc-shared",
1030 shared_cflag => "-fPIC",
1031 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1034 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1036 cflags => "-DL_ENDIAN -O2 -Wall",
1037 ex_libs => add("-lsocket"),
1038 dso_scheme => "dlfcn",
1039 shared_target => "bsd-gcc-shared",
1040 shared_cflag => "-fPIC",
1041 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1044 #### SCO/Caldera targets.
1046 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
1047 # Now we only have blended unixware-* as it's the only one used by ./config.
1048 # If you want to optimize for particular microarchitecture, bypass ./config
1049 # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
1050 # Note that not all targets include assembler support. Mostly because of
1051 # lack of motivation to support out-of-date platforms with out-of-date
1052 # compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
1053 # patiently assisted to debug most of it.
1055 # UnixWare 2.0x fails destest with -O.
1057 inherit_from => [ "BASE_unix" ],
1059 cflags => combine("-DFILIO_H -DNO_STRINGS_H",
1060 threads("-Kthread")),
1061 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1062 thread_scheme => "uithreads",
1065 inherit_from => [ "BASE_unix" ],
1067 cflags => combine("-O -DFILIO_H",
1068 threads("-Kthread")),
1069 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1070 thread_scheme => "uithreads",
1073 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1075 cflags => combine("-O -DFILIO_H -Kalloca",
1076 threads("-Kthread")),
1077 ex_libs => add("-lsocket -lnsl"),
1078 thread_scheme => "uithreads",
1079 bn_ops => "BN_LLONG",
1080 perlasm_scheme => "elf-1",
1081 dso_scheme => "dlfcn",
1082 shared_target => "svr5-shared",
1083 shared_cflag => "-Kpic",
1084 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1086 "unixware-7-gcc" => {
1087 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1089 cflags => combine("-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -Wall",
1090 threads("-D_REENTRANT")),
1091 ex_libs => add("-lsocket -lnsl"),
1092 bn_ops => "BN_LLONG",
1093 thread_scheme => "pthreads",
1094 perlasm_scheme => "elf-1",
1095 dso_scheme => "dlfcn",
1096 shared_target => "gnu-shared",
1097 shared_cflag => "-fPIC",
1098 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1100 # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
1102 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1105 ex_libs => add("-lsocket -lnsl"),
1106 thread_scheme => "(unknown)",
1107 perlasm_scheme => "elf-1",
1108 dso_scheme => "dlfcn",
1109 shared_target => "svr3-shared",
1110 shared_cflag => "-Kpic",
1111 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1114 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1116 cflags => "-O3 -fomit-frame-pointer",
1117 ex_libs => add("-lsocket -lnsl"),
1118 bn_ops => "BN_LLONG",
1119 thread_scheme => "(unknown)",
1120 perlasm_scheme => "elf-1",
1121 dso_scheme => "dlfcn",
1122 shared_target => "svr3-shared",
1123 shared_cflag => "-fPIC",
1124 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1129 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1131 cflags => combine(picker(default => "-DB_ENDIAN",
1134 threads("-pthread")),
1136 bn_ops => "BN_LLONG RC4_CHAR",
1137 thread_scheme => "pthreads",
1138 perlasm_scheme => "aix32",
1139 dso_scheme => "dlfcn",
1140 shared_target => "aix-shared",
1141 shared_ldflag => "-shared -Wl,-G",
1142 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1146 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1148 cflags => combine(picker(default => "-maix64 -DB_ENDIAN",
1151 threads("-pthread")),
1153 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1154 thread_scheme => "pthreads",
1155 perlasm_scheme => "aix64",
1156 dso_scheme => "dlfcn",
1157 shared_target => "aix-shared",
1158 shared_ldflag => "-maix64 -shared -Wl,-G",
1159 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1162 # Below targets assume AIX 5. Idea is to effectively disregard
1163 # $OBJECT_MODE at build time. $OBJECT_MODE is respected at
1166 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1168 cflags => combine(picker(default => "-q32 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1171 threads("-qthreaded -D_THREAD_SAFE")),
1173 bn_ops => "BN_LLONG RC4_CHAR",
1174 thread_scheme => "pthreads",
1175 perlasm_scheme => "aix32",
1176 dso_scheme => "dlfcn",
1177 shared_target => "aix-shared",
1178 shared_ldflag => "-q32 -G",
1179 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1183 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1185 cflags => combine(picker(default => "-q64 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1188 threads("-qthreaded -D_THREAD_SAFE")),
1190 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1191 thread_scheme => "pthreads",
1192 perlasm_scheme => "aix64",
1193 dso_scheme => "dlfcn",
1194 shared_target => "aix-shared",
1195 shared_ldflag => "-q64 -G",
1196 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1200 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
1202 inherit_from => [ "BASE_unix" ],
1204 cflags => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC",
1205 ex_libs => add("-lsocket -lnsl"),
1206 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1207 thread_scheme => "(unknown)",
1210 # OS/390 Unix an EBCDIC-based Unix system on IBM mainframe
1211 # You need to compile using the c89.sh wrapper in the tools directory, because the
1212 # IBM compiler does not like the -L switch after any object modules.
1215 inherit_from => [ "BASE_unix" ],
1217 cflags => "-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE",
1218 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1219 thread_scheme => "(unknown)",
1222 #### Visual C targets
1224 # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
1226 # Note about -wd4090, disable warning C4090. This warning returns false
1227 # positives in some situations. Disabling it altogether masks both
1228 # legitimate and false cases, but as we compile on multiple platforms,
1229 # we rely on other compilers to catch legitimate cases.
1231 # Also note that we force threads no matter what. Configuring "no-threads"
1234 inherit_from => [ "BASE_Windows" ],
1237 cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
1241 lib_cflags => sub { join(" ",
1242 ($disabled{shared} ? "/Zl" : ()),
1244 dso_cflags => "/Zi",
1245 bin_cflags => "/Zi /Fdapp",
1246 lflags => add("/debug"),
1247 shared_cflag => "-D_WINDLL",
1248 shared_ldflag => "/dll",
1249 shared_target => "win-shared", # meaningless except it gives Configure a hint
1250 thread_scheme => "winthreads",
1251 dso_scheme => "win32",
1253 "VC-noCE-common" => {
1254 inherit_from => [ "VC-common" ],
1255 cflags => add(picker(default => "-DUNICODE -D_UNICODE",
1258 ($disabled{shared} ? "/MT" : "/MD")
1259 ."d /Od -DDEBUG -D_DEBUG";
1263 ($disabled{shared} ? "/MT" : "/MD")
1266 bin_lflags => add("/subsystem:console /opt:ref"),
1269 push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
1270 push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
1271 return join(" ", @ex_libs);
1274 "VC-WIN64-common" => {
1275 inherit_from => [ "VC-noCE-common" ],
1278 push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
1279 return join(" ", @_, @ex_libs);
1281 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1282 build_scheme => add("VC-W64", { separator => undef }),
1285 inherit_from => [ "VC-WIN64-common", asm("ia64_asm"),
1286 sub { $disabled{shared} ? () : "ia64_uplink" } ],
1288 asflags => "-d debug",
1291 bn_asm_src => sub { return undef unless @_;
1292 my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; },
1293 perlasm_scheme => "ias",
1294 multilib => "-ia64",
1297 inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"),
1298 sub { $disabled{shared} ? () : "x86_64_uplink" } ],
1299 as => sub { vc_win64a_info()->{as} },
1300 asflags => sub { vc_win64a_info()->{asflags} },
1301 asoutflag => sub { vc_win64a_info()->{asoutflag} },
1303 bn_asm_src => sub { return undef unless @_;
1304 my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
1305 perlasm_scheme => "auto",
1309 # x86 Win32 target defaults to ANSI API, if you want UNICODE,
1310 # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
1311 inherit_from => [ "VC-noCE-common", asm("x86_asm"),
1312 sub { $disabled{shared} ? () : "uplink_common" } ],
1313 as => sub { my $ver=`nasm -v 2>NUL`;
1314 my $vew=`nasmw -v 2>NUL`;
1315 return $ver ge $vew ? "nasm" : "nasmw" },
1316 asflags => "-f win32",
1320 # WIN32 UNICODE build gets linked with unicows.lib for
1321 # backward compatibility with Win9x.
1322 push @ex_libs, 'unicows.lib'
1323 if (grep { $_ eq "UNICODE" } @user_defines);
1324 return join(" ", @ex_libs, @_);
1327 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1328 perlasm_scheme => "win32n",
1329 build_scheme => add("VC-W32", { separator => undef }),
1332 inherit_from => [ "VC-common" ],
1334 asflags => "/nologo /Cp /coff /c /Cx /Zi",
1339 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',
1340 sub { vc_wince_info()->{cflags}; },
1341 sub { defined($ENV{'WCECOMPAT'})
1342 ? '-I$(WCECOMPAT)/include' : (); },
1343 sub { defined($ENV{'PORTSDK_LIBPATH'})
1344 ? '-I$(PORTSDK_LIBPATH)/../../include' : (); },
1345 sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14
1346 ? ($disabled{shared} ? " /MT" : " /MD")
1348 debug => "/Od -DDEBUG -D_DEBUG",
1350 lflags => combine("/nologo /opt:ref",
1351 sub { vc_wince_info()->{lflags}; },
1352 sub { defined($ENV{PORTSDK_LIBPATH})
1353 ? "/entry:mainCRTstartup" : (); }),
1355 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1358 push @ex_libs, 'ws2.lib' unless $disabled{sock};
1359 push @ex_libs, 'crypt32.lib';
1360 if (defined($ENV{WCECOMPAT})) {
1361 my $x = '$(WCECOMPAT)/lib';
1362 if (-f "$x/$ENV{TARGETCPU}/wcecompatex.lib") {
1363 $x .= '/$(TARGETCPU)/wcecompatex.lib';
1365 $x .= '/wcecompatex.lib';
1369 push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
1370 if (defined($ENV{'PORTSDK_LIBPATH'}));
1371 push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
1372 if ($ENV{'TARGETCPU'} eq "X86");
1375 build_scheme => add("VC-WCE", { separator => undef }),
1380 inherit_from => [ "BASE_unix", asm("x86_asm"),
1381 sub { $disabled{shared} ? () : "x86_uplink" } ],
1383 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
1385 release => "-O3 -fomit-frame-pointer"),
1387 sys_id => "MINGW32",
1388 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1389 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1390 thread_scheme => "winthreads",
1391 perlasm_scheme => "coff",
1392 dso_scheme => "win32",
1393 shared_target => "mingw-shared",
1394 shared_cflag => add("-D_WINDLL"),
1395 shared_ldflag => "-static-libgcc",
1396 shared_rcflag => "--target=pe-i386",
1397 shared_extension => ".dll",
1401 # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1402 # .dll compiled with one compiler with application compiled with
1403 # another compiler. It's possible to engage Applink support in
1404 # mingw64 build, but it's not done, because till mingw64
1405 # supports structured exception handling, one can't seriously
1406 # consider its binaries for using with non-mingw64 run-time
1407 # environment. And as mingw64 is always consistent with itself,
1408 # Applink is never engaged and can as well be omitted.
1409 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1411 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall",
1415 sys_id => "MINGW64",
1416 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1417 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1418 thread_scheme => "winthreads",
1419 perlasm_scheme => "mingw64",
1420 dso_scheme => "win32",
1421 shared_target => "mingw-shared",
1422 shared_cflag => add("-D_WINDLL"),
1423 shared_ldflag => "-static-libgcc",
1424 shared_rcflag => "--target=pe-x86-64",
1425 shared_extension => ".dll",
1431 inherit_from => [ "BASE_unix" ],
1433 cflags => "-DL_ENDIAN -O",
1439 inherit_from => [ "BASE_unix" ],
1441 cflags => "-DTERMIOS -DL_ENDIAN -O -Wall",
1443 bn_ops => "BN_LLONG",
1444 dso_scheme => "win32",
1449 inherit_from => [ "BASE_unix", asm("x86_asm") ],
1451 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1453 release => "-O3 -fomit-frame-pointer"),
1455 bn_ops => "BN_LLONG",
1456 thread_scheme => "pthread",
1457 perlasm_scheme => "coff",
1458 dso_scheme => "dlfcn",
1459 shared_target => "cygwin-shared",
1460 shared_cflag => "-D_WINDLL",
1461 shared_ldflag => "-shared",
1462 shared_extension => ".dll",
1464 "Cygwin-x86_64" => {
1465 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1467 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1471 bn_ops => "SIXTY_FOUR_BIT_LONG",
1472 thread_scheme => "pthread",
1473 perlasm_scheme => "mingw64",
1474 dso_scheme => "dlfcn",
1475 shared_target => "cygwin-shared",
1476 shared_cflag => "-D_WINDLL",
1477 shared_ldflag => "-shared",
1478 shared_extension => ".dll",
1480 # Backward compatibility for those using this target
1482 inherit_from => [ "Cygwin-x86" ]
1484 # In case someone constructs the Cygwin target name themself
1486 inherit_from => [ "Cygwin-x86" ]
1489 inherit_from => [ "Cygwin-x86" ]
1492 inherit_from => [ "Cygwin-x86" ]
1495 inherit_from => [ "Cygwin-x86" ]
1500 inherit_from => [ asm("x86_asm") ],
1502 cflags => "-I/dev/env/WATT_ROOT/inc -DTERMIO -DL_ENDIAN -fomit-frame-pointer -O2 -Wall",
1504 ex_libs => add("-L/dev/env/WATT_ROOT/lib -lwatt"),
1505 bn_ops => "BN_LLONG",
1506 perlasm_scheme => "a.out",
1509 ##### MacOS X (a.k.a. Darwin) setup
1510 "darwin-common" => {
1511 inherit_from => [ "BASE_unix" ],
1514 cflags => combine(picker(default => "",
1517 threads("-D_REENTRANT")),
1519 plib_lflags => "-Wl,-search_paths_first",
1520 bn_ops => "BN_LLONG RC4_CHAR",
1521 thread_scheme => "pthreads",
1522 perlasm_scheme => "osx32",
1523 dso_scheme => "dlfcn",
1524 ranlib => "ranlib -c",
1525 shared_target => "darwin-shared",
1526 shared_cflag => "-fPIC",
1527 shared_ldflag => "-dynamiclib",
1528 shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
1530 # Option "freeze" such as -std=gnu9x can't negatively interfere
1531 # with future defaults for below two targets, because MacOS X
1532 # for PPC has no future, it was discontinued by vendor in 2009.
1533 "darwin-ppc-cc" => {
1534 inherit_from => [ "darwin-common", asm("ppc32_asm") ],
1535 cflags => add("-arch ppc -std=gnu9x -DB_ENDIAN -Wa,-force_cpusubtype_ALL"),
1536 perlasm_scheme => "osx32",
1537 shared_ldflag => "-arch ppc -dynamiclib",
1539 "darwin64-ppc-cc" => {
1540 inherit_from => [ "darwin-common", asm("ppc64_asm") ],
1541 cflags => add("-arch ppc64 -std=gnu9x -DB_ENDIAN"),
1542 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1543 perlasm_scheme => "osx64",
1544 shared_ldflag => "-arch ppc64 -dynamiclib",
1546 "darwin-i386-cc" => {
1547 inherit_from => [ "darwin-common", asm("x86_asm") ],
1548 cflags => add(picker(default => "-arch i386 -DL_ENDIAN",
1549 release => "-fomit-frame-pointer")),
1550 bn_ops => "BN_LLONG RC4_INT",
1551 perlasm_scheme => "macosx",
1552 shared_ldflag => "-arch i386 -dynamiclib",
1554 "darwin64-x86_64-cc" => {
1555 inherit_from => [ "darwin-common", asm("x86_64_asm") ],
1556 cflags => add("-arch x86_64 -DL_ENDIAN -Wall"),
1557 bn_ops => "SIXTY_FOUR_BIT_LONG",
1558 perlasm_scheme => "macosx",
1559 shared_ldflag => "-arch x86_64 -dynamiclib",
1564 # It takes three prior-set environment variables to make it work:
1566 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
1567 # CROSS_TOP=/where/SDKs/are
1568 # CROSS_SDK=iPhoneOSx.y.sdk
1570 # Exact paths vary with Xcode releases, but for couple of last ones
1571 # they would look like this:
1573 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
1574 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
1575 # CROSS_SDK=iPhoneOS.sdk
1577 "iphoneos-cross" => {
1578 inherit_from => [ "darwin-common" ],
1579 cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1583 inherit_from => [ "darwin-common", asm("armv4_asm") ],
1584 # It should be possible to go below iOS 6 and even add -arch armv6,
1585 # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
1587 cflags => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1589 perlasm_scheme => "ios32",
1592 inherit_from => [ "darwin-common", asm("aarch64_asm") ],
1593 cflags => add("-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1595 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1596 perlasm_scheme => "ios64",
1601 inherit_from => [ "BASE_unix" ],
1602 inherit_from => [ asm("x86_elf_asm") ],
1604 cflags => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
1605 threads("-pthread")),
1606 ex_libs => add("-ldl"),
1607 bn_ops => "BN_LLONG",
1608 thread_scheme => "pthreads",
1609 dso_scheme => "dlfcn",
1610 shared_target => "linux-shared",
1611 shared_cflag => "-fPIC",
1614 ##### VxWorks for various targets
1615 "vxworks-ppc60x" => {
1616 inherit_from => [ "BASE_unix" ],
1618 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",
1619 sys_id => "VXWORKS",
1620 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),
1622 "vxworks-ppcgen" => {
1623 inherit_from => [ "BASE_unix" ],
1625 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",
1626 sys_id => "VXWORKS",
1627 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),
1629 "vxworks-ppc405" => {
1630 inherit_from => [ "BASE_unix" ],
1632 cflags => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h",
1633 sys_id => "VXWORKS",
1636 "vxworks-ppc750" => {
1637 inherit_from => [ "BASE_unix" ],
1639 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)",
1640 sys_id => "VXWORKS",
1643 "vxworks-ppc750-debug" => {
1644 inherit_from => [ "BASE_unix" ],
1646 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 -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g",
1647 sys_id => "VXWORKS",
1650 "vxworks-ppc860" => {
1651 inherit_from => [ "BASE_unix" ],
1653 cflags => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h",
1654 sys_id => "VXWORKS",
1657 "vxworks-simlinux" => {
1658 inherit_from => [ "BASE_unix" ],
1660 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",
1661 sys_id => "VXWORKS",
1663 ranlib => "ranlibpentium",
1666 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
1668 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",
1669 threads("-D_REENTRANT")),
1670 sys_id => "VXWORKS",
1671 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),
1672 thread_scheme => "pthreads",
1673 perlasm_scheme => "o32",
1674 ranlib => "ranlibmips",
1679 inherit_from => [ "BASE_unix" ],
1681 cflags => combine("\$(CFLAGS)",
1682 threads("-D_REENTRANT")),
1683 plib_lflags => "\$(LDFLAGS)",
1684 ex_libs => add("\$(LDLIBS)"),
1685 bn_ops => "BN_LLONG",
1686 thread_scheme => "pthreads",
1687 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1688 shared_target => "linux-shared",
1689 shared_cflag => "-fPIC",
1690 shared_ldflag => "-shared",
1691 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1692 ranlib => "$ENV{'RANLIB'}",
1694 "uClinux-dist64" => {
1695 inherit_from => [ "BASE_unix" ],
1697 cflags => combine("\$(CFLAGS)",
1698 threads("-D_REENTRANT")),
1699 plib_lflags => "\$(LDFLAGS)",
1700 ex_libs => add("\$(LDLIBS)"),
1701 bn_ops => "SIXTY_FOUR_BIT_LONG",
1702 thread_scheme => "pthreads",
1703 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1704 shared_target => "linux-shared",
1705 shared_cflag => "-fPIC",
1706 shared_ldflag => "-shared",
1707 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1708 ranlib => "$ENV{'RANLIB'}",
1713 inherit_from => [ "BASE_VMS" ],
1716 cflags => picker(default => "/STANDARD=RELAXED/NOLIST/PREFIX=ALL/NAMES=(AS_IS,SHORTENED)",
1717 debug => "/NOOPTIMIZE/DEBUG",
1718 release => "/OPTIMIZE/NODEBUG"),
1719 lflags => picker(default => "/MAP",
1720 debug => "/DEBUG/TRACEBACK",
1721 release => "/NODEBUG/NOTRACEBACK"),
1722 shared_target => "vms-shared",
1723 dso_scheme => "vms",
1724 thread_scheme => "pthreads",
1726 apps_aux_src => "vms_decc_init.c",
1729 # VMS on VAX is *unsupported*
1732 # bn_obj => "[.asm]vms.obj vms-helper.obj"
1735 # inherit_from => [ "vms-generic", asm("vms-asm") ],
1737 # debug_aflags => "/NOOPTIMIZE/DEBUG",
1738 # release_aflags => "/OPTIMIZE/NODEBUG",
1739 # bn_opts => "THIRTY_TWO_BIT RC4_CHAR RC4_CHUNK DES_PTR BF_PTR",
1742 inherit_from => [ "vms-generic" ],
1743 cflags => add(sub { my @warnings =
1744 @{vms_info()->{disable_warns}};
1746 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1748 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1749 #release_aflags => "/OPTIMIZE/NODEBUG",
1750 bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1752 "vms-alpha-p32" => {
1753 inherit_from => [ "vms-alpha" ],
1755 add("/POINTER_SIZE=32",
1756 sub { my @warnings =
1757 @{vms_info()->{disable_warns_p32}};
1759 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1761 ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
1763 "vms-alpha-p64" => {
1764 inherit_from => [ "vms-alpha" ],
1766 add("/POINTER_SIZE=64",
1767 sub { my @warnings =
1768 @{vms_info()->{disable_warns_p64}};
1770 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1772 ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
1775 inherit_from => [ "vms-generic" ],
1776 cflags => add(sub { my @warnings =
1777 @{vms_info()->{disable_warns}};
1779 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1781 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1782 #release_aflags => "/OPTIMIZE/NODEBUG",
1783 bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1786 inherit_from => [ "vms-ia64" ],
1788 add("/POINTER_SIZE=32",
1789 sub { my @warnings =
1790 @{vms_info()->{disable_warns_p32}};
1792 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1794 ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
1797 inherit_from => [ "vms-ia64" ],
1799 add("/POINTER_SIZE=64",
1800 sub { my @warnings =
1801 @{vms_info()->{disable_warns_p64}};
1803 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1805 ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },