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",
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("-m32 -mcpu=ultrasparc"),
225 "solaris64-sparcv9-gcc" => {
226 inherit_from => [ "solaris-sparcv9-gcc" ],
227 cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
228 bn_ops => "BN_LLONG RC4_CHAR",
229 shared_ldflag => "-m64 -shared",
233 #### SPARC Solaris with Sun C setups
234 # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
235 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
236 # SC5.0 note: Compiler common patch 107357-01 or later is required!
237 "solaris-sparcv7-cc" => {
238 inherit_from => [ "solaris-common" ],
240 cflags => add_before(picker(default => "-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W",
242 release => "-xO5 -xdepend"),
243 threads("-D_REENTRANT")),
244 lflags => add(threads("-mt")),
245 ex_libs => add(threads("-lpthread")),
246 bn_ops => "BN_LLONG RC4_CHAR",
247 shared_cflag => "-KPIC",
248 shared_ldflag => "-G -dy -z text",
251 "solaris-sparcv8-cc" => {
252 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
253 cflags => add_before("-xarch=v8"),
255 "solaris-sparcv9-cc" => {
256 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
257 cflags => add_before("-xarch=v8plus -xtarget=ultra"),
259 "solaris64-sparcv9-cc" => {
260 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
261 cflags => add_before("-xarch=v9 -xtarget=ultra"),
262 bn_ops => "BN_LLONG RC4_CHAR",
263 shared_ldflag => "-xarch=v9 -G -dy -z text",
267 #### IRIX 5.x configs
268 # -mips2 flag is added by ./config when appropriate.
270 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
272 cflags => picker(default => "-DB_ENDIAN",
275 bn_ops => "BN_LLONG RC4_CHAR",
276 thread_scheme => "(unknown)",
277 perlasm_scheme => "o32",
278 dso_scheme => "dlfcn",
279 shared_target => "irix-shared",
280 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
283 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
285 cflags => picker(default => "-use_readonly_const -DB_ENDIAN",
288 bn_ops => "BN_LLONG RC4_CHAR",
289 thread_scheme => "(unknown)",
290 perlasm_scheme => "o32",
291 dso_scheme => "dlfcn",
292 shared_target => "irix-shared",
293 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
295 #### IRIX 6.x configs
296 # Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
297 # './Configure irix-cc -o32' manually.
298 "irix-mips3-gcc" => {
299 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
301 cflags => combine(picker(default => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W",
304 threads("-D_SGI_MP_SOURCE -pthread")),
305 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
306 thread_scheme => "pthreads",
307 perlasm_scheme => "n32",
308 dso_scheme => "dlfcn",
309 shared_target => "irix-shared",
310 shared_ldflag => "-mabi=n32",
311 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
315 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
317 cflags => combine(picker(default => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
320 threads("-D_SGI_MP_SOURCE")),
321 ex_libs => add(threads("-lpthread")),
322 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
323 thread_scheme => "pthreads",
324 perlasm_scheme => "n32",
325 dso_scheme => "dlfcn",
326 shared_target => "irix-shared",
327 shared_ldflag => "-n32",
328 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
332 "irix64-mips4-gcc" => {
333 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
335 cflags => combine(picker(default => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W",
338 threads("-D_SGI_MP_SOURCE")),
339 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
340 thread_scheme => "pthreads",
341 perlasm_scheme => "64",
342 dso_scheme => "dlfcn",
343 shared_target => "irix-shared",
344 shared_ldflag => "-mabi=64",
345 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
348 "irix64-mips4-cc" => {
349 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
351 cflags => combine(picker(default => "-64 -mips4 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
354 threads("-D_SGI_MP_SOURCE")),
355 ex_libs => add(threads("-lpthread")),
356 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
357 thread_scheme => "pthreads",
358 perlasm_scheme => "64",
359 dso_scheme => "dlfcn",
360 shared_target => "irix-shared",
361 shared_ldflag => "-64",
362 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
366 #### Unified HP-UX ANSI C configs.
368 # - Originally we were optimizing at +O4 level. It should be noted
369 # that the only difference between +O3 and +O4 is global inter-
370 # procedural analysis. As it has to be performed during the link
371 # stage the compiler leaves behind certain pseudo-code in lib*.a
372 # which might be release or even patch level specific. Generating
373 # the machine code for and analyzing the *whole* program appears
374 # to be *extremely* memory demanding while the performance gain is
375 # actually questionable. The situation is intensified by the default
376 # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
377 # which is way too low for +O4. In other words, doesn't +O3 make
379 # - Keep in mind that the HP compiler by default generates code
380 # suitable for execution on the host you're currently compiling at.
381 # If the toolkit is meant to be used on various PA-RISC processors
382 # consider './Configure hpux-parisc-[g]cc +DAportable'.
383 # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
384 # 32-bit message digests. (For the moment of this writing) HP C
385 # doesn't seem to "digest" too many local variables (they make "him"
386 # chew forever:-). For more details look-up MD32_XARRAY comment in
387 # crypto/sha/sha_lcl.h.
388 # - originally there were 32-bit hpux-parisc2-* targets. They were
389 # scrapped, because a) they were not interchangeable with other 32-bit
390 # targets; a) when critical 32-bit assembly modules detect if they
391 # are executed on PA-RISC 2.0 and thus adequate performance is
393 # <appro@fy.chalmers.se>
394 "hpux-parisc-gcc" => {
395 inherit_from => [ "BASE_unix" ],
397 cflags => combine(picker(default => "-DB_ENDIAN -DBN_DIV2W",
400 threads("-pthread")),
401 ex_libs => add("-Wl,+s -ldld"),
402 bn_ops => "BN_LLONG",
403 thread_scheme => "pthreads",
405 shared_target => "hpux-shared",
406 shared_cflag => "-fPIC",
407 shared_ldflag => "-shared",
408 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
410 "hpux-parisc1_1-gcc" => {
411 inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ],
412 multilib => "/pa1.1",
414 "hpux64-parisc2-gcc" => {
415 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
417 cflags => combine(picker(default => "-DB_ENDIAN",
420 threads("-D_REENTRANT")),
421 ex_libs => add("-ldl"),
422 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
423 thread_scheme => "pthreads",
424 dso_scheme => "dlfcn",
425 shared_target => "hpux-shared",
426 shared_cflag => "-fpic",
427 shared_ldflag => "-shared",
428 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
429 multilib => "/pa20_64",
432 # More attempts at unified 10.X and 11.X targets for HP C compiler.
434 # Chris Ruemmler <ruemmler@cup.hp.com>
435 # Kevin Steves <ks@hp.se>
436 "hpux-parisc-cc" => {
437 inherit_from => [ "BASE_unix" ],
439 cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
440 debug => "+O0 +d -g",
442 threads("-D_REENTRANT")),
443 ex_libs => add("-Wl,+s -ldld",threads("-lpthread")),
444 bn_ops => "RC4_CHAR",
445 thread_scheme => "pthreads",
447 shared_target => "hpux-shared",
448 shared_cflag => "+Z",
449 shared_ldflag => "-b",
450 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
452 "hpux-parisc1_1-cc" => {
453 inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ],
454 cflags => add_before("+DA1.1"),
455 multilib => "/pa1.1",
457 "hpux64-parisc2-cc" => {
458 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
460 cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY",
461 debug => "+O0 +d -g",
463 threads("-D_REENTRANT")),
464 ex_libs => add("-ldl",threads("-lpthread")),
465 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
466 thread_scheme => "pthreads",
467 dso_scheme => "dlfcn",
468 shared_target => "hpux-shared",
469 shared_cflag => "+Z",
470 shared_ldflag => "+DD64 -b",
471 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
472 multilib => "/pa20_64",
475 # HP/UX IA-64 targets
477 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
479 cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z -DB_ENDIAN",
480 debug => "+O0 +d -g",
482 threads("-D_REENTRANT")),
483 ex_libs => add("-ldl",threads("-lpthread")),
484 bn_ops => "SIXTY_FOUR_BIT",
485 thread_scheme => "pthreads",
486 dso_scheme => "dlfcn",
487 shared_target => "hpux-shared",
488 shared_cflag => "+Z",
489 shared_ldflag => "+DD32 -b",
490 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
491 multilib => "/hpux32",
493 # Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted
494 # with debugging of the following config.
495 "hpux64-ia64-cc" => {
496 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
498 cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z -DB_ENDIAN",
499 debug => "+O0 +d -g",
501 threads("-D_REENTRANT")),
502 ex_libs => add("-ldl", threads("-lpthread")),
503 bn_ops => "SIXTY_FOUR_BIT_LONG",
504 thread_scheme => "pthreads",
505 dso_scheme => "dlfcn",
506 shared_target => "hpux-shared",
507 shared_cflag => "+Z",
508 shared_ldflag => "+DD64 -b",
509 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
510 multilib => "/hpux64",
514 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
516 cflags => combine(picker(default => "-DB_ENDIAN",
519 threads("-pthread")),
520 ex_libs => add("-ldl"),
521 bn_ops => "SIXTY_FOUR_BIT",
522 thread_scheme => "pthreads",
523 dso_scheme => "dlfcn",
524 shared_target => "hpux-shared",
525 shared_cflag => "-fpic",
526 shared_ldflag => "-shared",
527 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
528 multilib => "/hpux32",
530 "hpux64-ia64-gcc" => {
531 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
533 cflags => combine(picker(default => "-mlp64 -DB_ENDIAN",
536 threads("-pthread")),
537 ex_libs => add("-ldl"),
538 bn_ops => "SIXTY_FOUR_BIT_LONG",
539 thread_scheme => "pthreads",
540 dso_scheme => "dlfcn",
541 shared_target => "hpux-shared",
542 shared_cflag => "-fpic",
543 shared_ldflag => "-mlp64 -shared",
544 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
545 multilib => "/hpux64",
548 #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
550 inherit_from => [ "BASE_unix" ],
552 cflags => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB",
554 ex_libs => add("-L/SYSLOG/PUB -lsyslog -lsocket -lcurses"),
555 thread_scheme => "(unknown)",
556 bn_ops => "BN_LLONG",
559 #### DEC Alpha OSF/1/Tru64 targets.
560 "osf1-alpha-gcc" => {
561 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
564 bn_ops => "SIXTY_FOUR_BIT_LONG",
565 thread_scheme => "(unknown)",
566 dso_scheme => "dlfcn",
567 shared_target => "alpha-osf1-shared",
568 shared_extension => ".so",
571 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
573 cflags => "-std1 -tune host -O4 -readonly_strings",
574 bn_ops => "SIXTY_FOUR_BIT_LONG",
575 thread_scheme => "(unknown)",
576 dso_scheme => "dlfcn",
577 shared_target => "alpha-osf1-shared",
578 shared_extension => ".so",
580 "tru64-alpha-cc" => {
581 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
583 cflags => combine("-std1 -tune host -fast -readonly_strings",
584 threads("-pthread")),
585 bn_ops => "SIXTY_FOUR_BIT_LONG",
586 thread_scheme => "pthreads",
587 dso_scheme => "dlfcn",
588 shared_target => "alpha-osf1-shared",
589 shared_ldflag => "-msym",
590 shared_extension => ".so",
594 #### Variety of LINUX:-)
596 # *-generic* is endian-neutral target, but ./config is free to
597 # throw in -D[BL]_ENDIAN, whichever appropriate...
598 "linux-generic32" => {
599 inherit_from => [ "BASE_unix" ],
601 cflags => combine(picker(default => "-Wall",
604 threads("-pthread")),
605 ex_libs => add("-ldl"),
606 bn_ops => "BN_LLONG RC4_CHAR",
607 thread_scheme => "pthreads",
608 dso_scheme => "dlfcn",
609 shared_target => "linux-shared",
610 shared_cflag => "-fPIC",
611 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
613 "linux-generic64" => {
614 inherit_from => [ "linux-generic32" ],
615 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
619 inherit_from => [ "linux-generic32", asm("ppc32_asm") ],
620 perlasm_scheme => "linux32",
623 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
624 cflags => add("-m64 -DB_ENDIAN"),
625 perlasm_scheme => "linux64",
626 shared_ldflag => "-m64",
630 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
631 cflags => add("-m64 -DL_ENDIAN"),
632 perlasm_scheme => "linux64le",
633 shared_ldflag => "-m64",
637 ################################################################
638 # Note that -march is not among compiler options in linux-armv4
639 # target description. Not specifying one is intentional to give
642 # a) rely on your compiler default by not specifying one;
643 # b) specify your target platform explicitly for optimal
644 # performance, e.g. -march=armv6 or -march=armv7-a;
645 # c) build "universal" binary that targets *range* of platforms
646 # by specifying minimum and maximum supported architecture;
648 # As for c) option. It actually makes no sense to specify
649 # maximum to be less than ARMv7, because it's the least
650 # requirement for run-time switch between platform-specific
651 # code paths. And without run-time switch performance would be
652 # equivalent to one for minimum. Secondly, there are some
653 # natural limitations that you'd have to accept and respect.
654 # Most notably you can *not* build "universal" binary for
655 # big-endian platform. This is because ARMv7 processor always
656 # picks instructions in little-endian order. Another similar
657 # limitation is that -mthumb can't "cross" -march=armv6t2
658 # boundary, because that's where it became Thumb-2. Well, this
659 # limitation is a bit artificial, because it's not really
660 # impossible, but it's deemed too tricky to support. And of
661 # course you have to be sure that your binutils are actually
662 # up to the task of handling maximum target platform. With all
663 # this in mind here is an example of how to configure
666 # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
668 inherit_from => [ "linux-generic32", asm("armv4_asm") ],
669 perlasm_scheme => "linux32",
672 inherit_from => [ "linux-generic64", asm("aarch64_asm") ],
673 perlasm_scheme => "linux64",
675 "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32
676 inherit_from => [ "linux-generic32", asm("aarch64_asm") ],
677 cflags => add("-mabi=ilp32"),
678 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
679 perlasm_scheme => "linux64",
680 shared_ldflag => "-mabi=ilp32",
684 # Configure script adds minimally required -march for assembly
685 # support, if no -march was specified at command line.
686 inherit_from => [ "linux-generic32", asm("mips32_asm") ],
687 cflags => add("-mabi=32 -DBN_DIV3W"),
688 perlasm_scheme => "o32",
689 shared_ldflag => "-mabi=32",
691 # mips32 and mips64 below refer to contemporary MIPS Architecture
692 # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
694 inherit_from => [ "linux-generic32", asm("mips64_asm") ],
695 cflags => add("-mabi=n32 -DBN_DIV3W"),
696 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
697 perlasm_scheme => "n32",
698 shared_ldflag => "-mabi=n32",
701 "linux64-mips64" => {
702 inherit_from => [ "linux-generic64", asm("mips64_asm") ],
703 cflags => add("-mabi=64 -DBN_DIV3W"),
704 perlasm_scheme => "64",
705 shared_ldflag => "-mabi=64",
709 #### IA-32 targets...
711 inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
712 cflags => add(picker(default => "-DL_ENDIAN",
713 release => "-fomit-frame-pointer")),
714 ex_libs => add(picker(debug => "-lefence")),
715 bn_ops => "BN_LLONG",
718 inherit_from => [ "BASE_unix", asm("x86_asm") ],
720 cflags => add(picker(default => "-DL_ENDIAN -Wall",
722 release => "-O3 -fomit-frame-pointer")),
723 bn_ops => "BN_LLONG",
724 thread_scheme => "(unknown)",
725 perlasm_scheme => "a.out",
729 inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
730 cflags => add("-m64 -DL_ENDIAN"),
731 bn_ops => "SIXTY_FOUR_BIT_LONG",
732 perlasm_scheme => "elf",
733 shared_ldflag => "-m64",
736 "linux-x86_64-clang" => {
737 inherit_from => [ "linux-x86_64" ],
739 cflags => add("-Wextra -Qunused-arguments"),
742 inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
743 cflags => add("-mx32 -DL_ENDIAN"),
744 bn_ops => "SIXTY_FOUR_BIT",
745 perlasm_scheme => "elf32",
746 shared_ldflag => "-mx32",
751 inherit_from => [ "linux-generic64", asm("ia64_asm") ],
752 bn_ops => "SIXTY_FOUR_BIT_LONG",
756 inherit_from => [ "linux-generic64", asm("s390x_asm") ],
757 cflags => add("-m64 -DB_ENDIAN"),
758 perlasm_scheme => "64",
759 shared_ldflag => "-m64",
763 #### So called "highgprs" target for z/Architecture CPUs
764 # "Highgprs" is kernel feature first implemented in Linux
765 # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
766 # significant bits of general purpose registers not only
767 # upon 32-bit process context switch, but even on
768 # asynchronous signal delivery to such process. This makes
769 # it possible to deploy 64-bit instructions even in legacy
770 # application context and achieve better [or should we say
771 # adequate] performance. The build is binary compatible with
772 # linux-generic32, and the idea is to be able to install the
773 # resulting libcrypto.so alongside generic one, e.g. as
774 # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
775 # linker to autodiscover. Unfortunately it doesn't work just
776 # yet, because of couple of bugs in glibc
777 # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
779 inherit_from => [ "linux-generic32", asm("s390x_asm") ],
780 cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"),
781 bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; },
782 perlasm_scheme => "31",
783 shared_ldflag => "-m31",
784 multilib => "/highgprs",
787 #### SPARC Linux setups
788 # Ray Miller <ray.miller@computing-services.oxford.ac.uk> has
789 # patiently assisted with debugging of following two configs.
791 inherit_from => [ "linux-generic32", asm("sparcv8_asm") ],
792 cflags => add("-mcpu=v8 -DB_ENDIAN -DBN_DIV2W"),
795 # it's a real mess with -mcpu=ultrasparc option under Linux,
796 # but -Wa,-Av8plus should do the trick no matter what.
797 inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
798 cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W"),
799 shared_ldflag => "-m32",
801 "linux64-sparcv9" => {
802 # GCC 3.1 is a requirement
803 inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
804 cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"),
805 bn_ops => "BN_LLONG RC4_CHAR",
806 shared_ldflag => "-m64",
810 "linux-alpha-gcc" => {
811 inherit_from => [ "linux-generic64", asm("alpha_asm") ],
812 cflags => add("-DL_ENDIAN"),
813 bn_ops => "SIXTY_FOUR_BIT_LONG",
815 "linux-c64xplus" => {
816 inherit_from => [ "BASE_unix" ],
817 # TI_CGT_C6000_7.3.x is a requirement
819 cflags => combine("--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT",
820 threads("-D_REENTRANT")),
821 bn_ops => "BN_LLONG",
822 cpuid_asm_src => "c64xpluscpuid.s",
823 bn_asm_src => "asm/bn-c64xplus.asm c64xplus-gf2m.s",
824 aes_asm_src => "aes-c64xplus.s aes_cbc.c aes-ctr.fake",
825 sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s",
826 rc4_asm_src => "rc4-c64xplus.s",
827 modes_asm_src => "ghash-c64xplus.s",
828 chacha_asm_src => "chacha-c64xplus.s",
829 poly1305_asm_src => "poly1305-c64xplus.s",
830 thread_scheme => "pthreads",
831 perlasm_scheme => "void",
832 dso_scheme => "dlfcn",
833 shared_target => "linux-shared",
834 shared_cflag => "--pic",
835 shared_ldflag => "-z --sysv --shared",
836 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
840 #### Android: linux-* but without pointers to headers and libs.
842 # It takes pair of prior-set environment variables to make it work:
844 # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<
845 # CROSS_COMPILE=<prefix>
847 # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
848 # For example to compile for ICS and ARM with NDK 10d, you'd:
850 # ANDROID_NDK=/some/where/android-ndk-10d
851 # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
852 # CROSS_COMPILE=arm-linux-adroideabi-
853 # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/
856 inherit_from => [ "linux-generic32" ],
857 # Special note about unconditional -fPIC and -pie. The underlying
858 # reason is that Lollipop refuses to run non-PIE. But what about
859 # older systems and NDKs? -fPIC was never problem, so the only
860 # concern if -pie. Older toolchains, e.g. r4, appear to handle it
861 # and binaries turn mostly functional. "Mostly" means that oldest
862 # Androids, such as Froyo, fail to handle executable, but newer
863 # systems are perfectly capable of executing binaries targeting
864 # Froyo. Keep in mind that in the nutshell Android builds are
865 # about JNI, i.e. shared libraries, not applications.
866 cflags => picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
873 inherit_from => [ "android", asm("x86_asm") ],
874 cflags => add(picker(release => "-fomit-frame-pointer")),
875 bn_ops => "BN_LLONG",
876 perlasm_scheme => "android",
878 ################################################################
879 # Contemporary Android applications can provide multiple JNI
880 # providers in .apk, targeting multiple architectures. Among
881 # them there is "place" for two ARM flavours: generic eabi and
882 # armv7-a/hard-float. However, it should be noted that OpenSSL's
883 # ability to engage NEON is not constrained by ABI choice, nor
884 # is your ability to call OpenSSL from your application code
885 # compiled with floating-point ABI other than default 'soft'.
886 # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
887 # This means that choice of ARM libraries you provide in .apk
888 # is driven by application needs. For example if application
889 # itself benefits from NEON or is floating-point intensive, then
890 # it might be appropriate to provide both libraries. Otherwise
891 # just generic eabi would do. But in latter case it would be
894 # ./Configure android-armeabi -D__ARM_MAX_ARCH__=8
896 # in order to build "universal" binary and allow OpenSSL take
897 # advantage of NEON when it's available.
899 "android-armeabi" => {
900 inherit_from => [ "android", asm("armv4_asm") ],
903 inherit_from => [ "android", asm("mips32_asm") ],
904 perlasm_scheme => "o32",
908 inherit_from => [ "linux-generic64" ],
909 cflags => picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
915 "android64-aarch64" => {
916 inherit_from => [ "android64", asm("aarch64_asm") ],
917 perlasm_scheme => "linux64",
922 # As for thread cflag. Idea is to maintain "collective" set of
923 # flags, which would cover all BSD flavors. -pthread applies
924 # to them all, but is treated differently. OpenBSD expands is
925 # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
926 # expands it as -lc_r, which has to be accompanied by explicit
927 # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
928 # expands it as -lc_r, which seems to be sufficient?
929 inherit_from => [ "BASE_unix" ],
931 cflags => combine(picker(default => "-Wall",
934 threads("-pthread -D_THREAD_SAFE -D_REENTRANT")),
935 bn_ops => "BN_LLONG",
936 thread_scheme => "pthreads",
937 dso_scheme => "dlfcn",
938 shared_target => "bsd-gcc-shared",
939 shared_cflag => "-fPIC",
940 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
943 inherit_from => [ "BSD-generic32" ],
944 bn_ops => "SIXTY_FOUR_BIT_LONG",
948 inherit_from => [ "BSD-generic32", asm("x86_asm") ],
949 cflags => add(picker(default => "-DL_ENDIAN",
950 release => "-fomit-frame-pointer")),
951 bn_ops => "BN_LLONG",
952 shared_target => "bsd-shared",
953 perlasm_scheme => "a.out",
956 inherit_from => [ "BSD-x86" ],
957 perlasm_scheme => "elf",
961 inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ],
962 cflags => add("-mcpu=v8 -DB_ENDIAN"),
965 # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
966 # simply *happens* to work around a compiler bug in gcc 3.3.3,
967 # triggered by RIPEMD160 code.
968 inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ],
969 cflags => add("-DB_ENDIAN -DMD32_REG_T=int"),
970 bn_ops => "BN_LLONG",
974 inherit_from => [ "BSD-generic64", asm("ia64_asm") ],
975 cflags => add_before("-DL_ENDIAN"),
976 bn_ops => "SIXTY_FOUR_BIT_LONG",
980 inherit_from => [ "BSD-generic64", asm("x86_64_asm") ],
981 cflags => add_before("-DL_ENDIAN"),
982 bn_ops => "SIXTY_FOUR_BIT_LONG",
983 perlasm_scheme => "elf",
987 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
989 cflags => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -Wall",
990 ex_libs => add("-ldl"),
991 bn_ops => "BN_LLONG",
992 thread_scheme => "(unknown)",
993 dso_scheme => "dlfcn",
994 shared_target => "bsd-gcc-shared",
995 shared_cflag => "-fPIC",
996 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1000 inherit_from => [ "BASE_unix" ],
1002 cflags => "-O -Wall",
1003 unistd => "<libc.h>",
1004 bn_ops => "BN_LLONG",
1005 thread_scheme => "(unknown)",
1008 inherit_from => [ "BASE_unix" ],
1010 cflags => "-O3 -Wall",
1011 unistd => "<libc.h>",
1012 bn_ops => "BN_LLONG",
1013 thread_scheme => "(unknown)",
1018 inherit_from => [ "BASE_unix" ],
1020 cflags => "-DL_ENDIAN -DTERMIO",
1021 thread_scheme => "(unknown)",
1024 inherit_from => [ "BASE_unix" ],
1026 ex_libs => add("-lsocket"),
1027 dso_scheme => "dlfcn",
1028 shared_target => "bsd-gcc-shared",
1029 shared_cflag => "-fPIC",
1030 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1033 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1035 cflags => "-DL_ENDIAN -O2 -Wall",
1036 ex_libs => add("-lsocket"),
1037 dso_scheme => "dlfcn",
1038 shared_target => "bsd-gcc-shared",
1039 shared_cflag => "-fPIC",
1040 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1043 #### SCO/Caldera targets.
1045 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
1046 # Now we only have blended unixware-* as it's the only one used by ./config.
1047 # If you want to optimize for particular microarchitecture, bypass ./config
1048 # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
1049 # Note that not all targets include assembler support. Mostly because of
1050 # lack of motivation to support out-of-date platforms with out-of-date
1051 # compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
1052 # patiently assisted to debug most of it.
1054 # UnixWare 2.0x fails destest with -O.
1056 inherit_from => [ "BASE_unix" ],
1058 cflags => combine("-DFILIO_H -DNO_STRINGS_H",
1059 threads("-Kthread")),
1060 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1061 thread_scheme => "uithreads",
1064 inherit_from => [ "BASE_unix" ],
1066 cflags => combine("-O -DFILIO_H",
1067 threads("-Kthread")),
1068 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1069 thread_scheme => "uithreads",
1072 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1074 cflags => combine("-O -DFILIO_H -Kalloca",
1075 threads("-Kthread")),
1076 ex_libs => add("-lsocket -lnsl"),
1077 thread_scheme => "uithreads",
1078 bn_ops => "BN_LLONG",
1079 perlasm_scheme => "elf-1",
1080 dso_scheme => "dlfcn",
1081 shared_target => "svr5-shared",
1082 shared_cflag => "-Kpic",
1083 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1085 "unixware-7-gcc" => {
1086 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1088 cflags => combine("-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -Wall",
1089 threads("-D_REENTRANT")),
1090 ex_libs => add("-lsocket -lnsl"),
1091 bn_ops => "BN_LLONG",
1092 thread_scheme => "pthreads",
1093 perlasm_scheme => "elf-1",
1094 dso_scheme => "dlfcn",
1095 shared_target => "gnu-shared",
1096 shared_cflag => "-fPIC",
1097 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1099 # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
1101 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1104 ex_libs => add("-lsocket -lnsl"),
1105 thread_scheme => "(unknown)",
1106 perlasm_scheme => "elf-1",
1107 dso_scheme => "dlfcn",
1108 shared_target => "svr3-shared",
1109 shared_cflag => "-Kpic",
1110 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1113 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1115 cflags => "-O3 -fomit-frame-pointer",
1116 ex_libs => add("-lsocket -lnsl"),
1117 bn_ops => "BN_LLONG",
1118 thread_scheme => "(unknown)",
1119 perlasm_scheme => "elf-1",
1120 dso_scheme => "dlfcn",
1121 shared_target => "svr3-shared",
1122 shared_cflag => "-fPIC",
1123 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1128 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1130 cflags => combine(picker(default => "-DB_ENDIAN",
1133 threads("-pthread")),
1135 bn_ops => "BN_LLONG RC4_CHAR",
1136 thread_scheme => "pthreads",
1137 perlasm_scheme => "aix32",
1138 dso_scheme => "dlfcn",
1139 shared_target => "aix-shared",
1140 shared_ldflag => "-shared -Wl,-G",
1141 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1145 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1147 cflags => combine(picker(default => "-maix64 -DB_ENDIAN",
1150 threads("-pthread")),
1152 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1153 thread_scheme => "pthreads",
1154 perlasm_scheme => "aix64",
1155 dso_scheme => "dlfcn",
1156 shared_target => "aix-shared",
1157 shared_ldflag => "-maix64 -shared -Wl,-G",
1158 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1161 # Below targets assume AIX 5. Idea is to effectively disregard
1162 # $OBJECT_MODE at build time. $OBJECT_MODE is respected at
1165 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1167 cflags => combine(picker(default => "-q32 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1170 threads("-qthreaded -D_THREAD_SAFE")),
1172 bn_ops => "BN_LLONG RC4_CHAR",
1173 thread_scheme => "pthreads",
1174 perlasm_scheme => "aix32",
1175 dso_scheme => "dlfcn",
1176 shared_target => "aix-shared",
1177 shared_ldflag => "-q32 -G",
1178 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1182 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1184 cflags => combine(picker(default => "-q64 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1187 threads("-qthreaded -D_THREAD_SAFE")),
1189 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1190 thread_scheme => "pthreads",
1191 perlasm_scheme => "aix64",
1192 dso_scheme => "dlfcn",
1193 shared_target => "aix-shared",
1194 shared_ldflag => "-q64 -G",
1195 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1199 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
1201 inherit_from => [ "BASE_unix" ],
1203 cflags => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC",
1204 ex_libs => add("-lsocket -lnsl"),
1205 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1206 thread_scheme => "(unknown)",
1209 # OS/390 Unix an EBCDIC-based Unix system on IBM mainframe
1210 # You need to compile using the c89.sh wrapper in the tools directory, because the
1211 # IBM compiler does not like the -L switch after any object modules.
1214 inherit_from => [ "BASE_unix" ],
1216 cflags => "-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE",
1217 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1218 thread_scheme => "(unknown)",
1221 #### Visual C targets
1223 # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
1225 # Note about -wd4090, disable warning C4090. This warning returns false
1226 # positives in some situations. Disabling it altogether masks both
1227 # legitimate and false cases, but as we compile on multiple platforms,
1228 # we rely on other compilers to catch legitimate cases.
1230 # Also note that we force threads no matter what. Configuring "no-threads"
1233 inherit_from => [ "BASE_Windows" ],
1236 cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
1240 lib_cflags => add("/Zi /Fdlib"),
1241 dso_cflags => "/Zi",
1242 bin_cflags => "/Zi /Fdapp",
1243 lflags => add("/debug"),
1244 shared_ldflag => "/dll",
1245 shared_target => "win-shared", # meaningless except it gives Configure a hint
1246 thread_scheme => "winthreads",
1247 dso_scheme => "win32",
1249 "VC-noCE-common" => {
1250 inherit_from => [ "VC-common" ],
1251 cflags => add(picker(default => "-DUNICODE -D_UNICODE",
1254 ($disabled{shared} ? "" : "/MDd")
1255 ." /Od -DDEBUG -D_DEBUG";
1259 ($disabled{shared} ? "" : "/MD")
1262 lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }),
1263 # Following might/should appears controversial, i.e. defining
1264 # /MDd without evaluating $disabled{shared}. It works in
1265 # non-shared build because static library is compiled with /Zl
1266 # and bares no reference to specific RTL. And it works in
1267 # shared build because multiple /MDd options are not prohibited.
1268 # But why /MDd in static build? Well, basically this is just a
1269 # reference point, which allows to catch eventual errors that
1270 # would prevent those who want to wrap OpenSSL into own .DLL.
1271 # Why not /MD in release build then? Well, some are likely to
1272 # prefer [non-debug] openssl.exe to be free from Micorosoft RTL
1274 bin_cflags => add(picker(debug => "/MDd",
1275 release => sub { $disabled{shared} ? "/MT" : () },
1277 bin_lflags => add("/subsystem:console /opt:ref"),
1280 push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
1281 push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
1282 return join(" ", @ex_libs);
1285 "VC-WIN64-common" => {
1286 inherit_from => [ "VC-noCE-common" ],
1289 push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
1290 return join(" ", @_, @ex_libs);
1292 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1293 build_scheme => add("VC-W64", { separator => undef }),
1296 inherit_from => [ "VC-WIN64-common", asm("ia64_asm"),
1297 sub { $disabled{shared} ? () : "ia64_uplink" } ],
1299 asflags => "-d debug",
1302 bn_asm_src => sub { return undef unless @_;
1303 my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; },
1304 perlasm_scheme => "ias",
1305 multilib => "-ia64",
1308 inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"),
1309 sub { $disabled{shared} ? () : "x86_64_uplink" } ],
1310 as => sub { vc_win64a_info()->{as} },
1311 asflags => sub { vc_win64a_info()->{asflags} },
1312 asoutflag => sub { vc_win64a_info()->{asoutflag} },
1314 bn_asm_src => sub { return undef unless @_;
1315 my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
1316 perlasm_scheme => "auto",
1320 # x86 Win32 target defaults to ANSI API, if you want UNICODE,
1321 # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
1322 inherit_from => [ "VC-noCE-common", asm("x86_asm"),
1323 sub { $disabled{shared} ? () : "uplink_common" } ],
1324 as => sub { my $ver=`nasm -v 2>NUL`;
1325 my $vew=`nasmw -v 2>NUL`;
1326 return $ver ge $vew ? "nasm" : "nasmw" },
1327 asflags => "-f win32",
1331 # WIN32 UNICODE build gets linked with unicows.lib for
1332 # backward compatibility with Win9x.
1333 push @ex_libs, 'unicows.lib'
1334 if (grep { $_ eq "UNICODE" } @user_defines);
1335 return join(" ", @ex_libs, @_);
1338 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1339 perlasm_scheme => "win32n",
1340 build_scheme => add("VC-W32", { separator => undef }),
1343 inherit_from => [ "VC-common" ],
1345 asflags => "/nologo /Cp /coff /c /Cx /Zi",
1350 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',
1351 sub { vc_wince_info()->{cflags}; },
1352 sub { defined($ENV{'WCECOMPAT'})
1353 ? '-I$(WCECOMPAT)/include' : (); },
1354 sub { defined($ENV{'PORTSDK_LIBPATH'})
1355 ? '-I$(PORTSDK_LIBPATH)/../../include' : (); },
1356 sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14
1357 ? ($disabled{shared} ? " /MT" : " /MD")
1359 debug => "/Od -DDEBUG -D_DEBUG",
1361 lflags => combine("/nologo /opt:ref",
1362 sub { vc_wince_info()->{lflags}; },
1363 sub { defined($ENV{PORTSDK_LIBPATH})
1364 ? "/entry:mainCRTstartup" : (); }),
1366 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1369 push @ex_libs, 'ws2.lib' unless $disabled{sock};
1370 push @ex_libs, 'crypt32.lib';
1371 if (defined($ENV{WCECOMPAT})) {
1372 my $x = '$(WCECOMPAT)/lib';
1373 if (-f "$x/$ENV{TARGETCPU}/wcecompatex.lib") {
1374 $x .= '/$(TARGETCPU)/wcecompatex.lib';
1376 $x .= '/wcecompatex.lib';
1380 push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
1381 if (defined($ENV{'PORTSDK_LIBPATH'}));
1382 push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
1383 if ($ENV{'TARGETCPU'} eq "X86");
1386 build_scheme => add("VC-WCE", { separator => undef }),
1391 inherit_from => [ "BASE_unix", asm("x86_asm"),
1392 sub { $disabled{shared} ? () : "x86_uplink" } ],
1394 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
1396 release => "-O3 -fomit-frame-pointer"),
1398 sys_id => "MINGW32",
1399 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1400 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1401 thread_scheme => "winthreads",
1402 perlasm_scheme => "coff",
1403 dso_scheme => "win32",
1404 shared_target => "mingw-shared",
1405 shared_cflag => add("-D_WINDLL"),
1406 shared_ldflag => "-static-libgcc",
1407 shared_rcflag => "--target=pe-i386",
1408 shared_extension => ".dll",
1412 # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1413 # .dll compiled with one compiler with application compiled with
1414 # another compiler. It's possible to engage Applink support in
1415 # mingw64 build, but it's not done, because till mingw64
1416 # supports structured exception handling, one can't seriously
1417 # consider its binaries for using with non-mingw64 run-time
1418 # environment. And as mingw64 is always consistent with itself,
1419 # Applink is never engaged and can as well be omitted.
1420 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1422 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall",
1426 sys_id => "MINGW64",
1427 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1428 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1429 thread_scheme => "winthreads",
1430 perlasm_scheme => "mingw64",
1431 dso_scheme => "win32",
1432 shared_target => "mingw-shared",
1433 shared_cflag => add("-D_WINDLL"),
1434 shared_ldflag => "-static-libgcc",
1435 shared_rcflag => "--target=pe-x86-64",
1436 shared_extension => ".dll",
1442 inherit_from => [ "BASE_unix" ],
1444 cflags => "-DL_ENDIAN -O",
1450 inherit_from => [ "BASE_unix" ],
1452 cflags => "-DTERMIOS -DL_ENDIAN -O -Wall",
1454 bn_ops => "BN_LLONG",
1455 dso_scheme => "win32",
1460 inherit_from => [ "BASE_unix", asm("x86_asm") ],
1462 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1464 release => "-O3 -fomit-frame-pointer"),
1466 bn_ops => "BN_LLONG",
1467 thread_scheme => "pthread",
1468 perlasm_scheme => "coff",
1469 dso_scheme => "dlfcn",
1470 shared_target => "cygwin-shared",
1471 shared_cflag => "-D_WINDLL",
1472 shared_ldflag => "-shared",
1473 shared_extension => ".dll",
1475 "Cygwin-x86_64" => {
1476 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1478 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1482 bn_ops => "SIXTY_FOUR_BIT_LONG",
1483 thread_scheme => "pthread",
1484 perlasm_scheme => "mingw64",
1485 dso_scheme => "dlfcn",
1486 shared_target => "cygwin-shared",
1487 shared_cflag => "-D_WINDLL",
1488 shared_ldflag => "-shared",
1489 shared_extension => ".dll",
1491 # Backward compatibility for those using this target
1493 inherit_from => [ "Cygwin-x86" ]
1495 # In case someone constructs the Cygwin target name themself
1497 inherit_from => [ "Cygwin-x86" ]
1500 inherit_from => [ "Cygwin-x86" ]
1503 inherit_from => [ "Cygwin-x86" ]
1506 inherit_from => [ "Cygwin-x86" ]
1511 inherit_from => [ asm("x86_asm") ],
1513 cflags => "-I/dev/env/WATT_ROOT/inc -DTERMIO -DL_ENDIAN -fomit-frame-pointer -O2 -Wall",
1515 ex_libs => add("-L/dev/env/WATT_ROOT/lib -lwatt"),
1516 bn_ops => "BN_LLONG",
1517 perlasm_scheme => "a.out",
1520 ##### MacOS X (a.k.a. Darwin) setup
1521 "darwin-common" => {
1522 inherit_from => [ "BASE_unix" ],
1525 cflags => combine(picker(default => "",
1528 threads("-D_REENTRANT")),
1530 plib_lflags => "-Wl,-search_paths_first",
1531 bn_ops => "BN_LLONG RC4_CHAR",
1532 thread_scheme => "pthreads",
1533 perlasm_scheme => "osx32",
1534 dso_scheme => "dlfcn",
1535 ranlib => "ranlib -c",
1536 shared_target => "darwin-shared",
1537 shared_cflag => "-fPIC",
1538 shared_ldflag => "-dynamiclib",
1539 shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
1541 # Option "freeze" such as -std=gnu9x can't negatively interfere
1542 # with future defaults for below two targets, because MacOS X
1543 # for PPC has no future, it was discontinued by vendor in 2009.
1544 "darwin-ppc-cc" => {
1545 inherit_from => [ "darwin-common", asm("ppc32_asm") ],
1546 cflags => add("-arch ppc -std=gnu9x -DB_ENDIAN -Wa,-force_cpusubtype_ALL"),
1547 perlasm_scheme => "osx32",
1548 shared_ldflag => "-arch ppc -dynamiclib",
1550 "darwin64-ppc-cc" => {
1551 inherit_from => [ "darwin-common", asm("ppc64_asm") ],
1552 cflags => add("-arch ppc64 -std=gnu9x -DB_ENDIAN"),
1553 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1554 perlasm_scheme => "osx64",
1555 shared_ldflag => "-arch ppc64 -dynamiclib",
1557 "darwin-i386-cc" => {
1558 inherit_from => [ "darwin-common", asm("x86_asm") ],
1559 cflags => add(picker(default => "-arch i386 -DL_ENDIAN",
1560 release => "-fomit-frame-pointer")),
1561 bn_ops => "BN_LLONG RC4_INT",
1562 perlasm_scheme => "macosx",
1563 shared_ldflag => "-arch i386 -dynamiclib",
1565 "darwin64-x86_64-cc" => {
1566 inherit_from => [ "darwin-common", asm("x86_64_asm") ],
1567 cflags => add("-arch x86_64 -DL_ENDIAN -Wall"),
1568 bn_ops => "SIXTY_FOUR_BIT_LONG",
1569 perlasm_scheme => "macosx",
1570 shared_ldflag => "-arch x86_64 -dynamiclib",
1575 # It takes three prior-set environment variables to make it work:
1577 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
1578 # CROSS_TOP=/where/SDKs/are
1579 # CROSS_SDK=iPhoneOSx.y.sdk
1581 # Exact paths vary with Xcode releases, but for couple of last ones
1582 # they would look like this:
1584 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
1585 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
1586 # CROSS_SDK=iPhoneOS.sdk
1588 "iphoneos-cross" => {
1589 inherit_from => [ "darwin-common" ],
1590 cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1594 inherit_from => [ "darwin-common", asm("armv4_asm") ],
1595 # It should be possible to go below iOS 6 and even add -arch armv6,
1596 # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
1598 cflags => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1600 perlasm_scheme => "ios32",
1603 inherit_from => [ "darwin-common", asm("aarch64_asm") ],
1604 cflags => add("-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1606 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1607 perlasm_scheme => "ios64",
1612 inherit_from => [ "BASE_unix" ],
1613 inherit_from => [ asm("x86_elf_asm") ],
1615 cflags => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
1616 threads("-pthread")),
1617 ex_libs => add("-ldl"),
1618 bn_ops => "BN_LLONG",
1619 thread_scheme => "pthreads",
1620 dso_scheme => "dlfcn",
1621 shared_target => "linux-shared",
1622 shared_cflag => "-fPIC",
1625 ##### VxWorks for various targets
1626 "vxworks-ppc60x" => {
1627 inherit_from => [ "BASE_unix" ],
1629 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",
1630 sys_id => "VXWORKS",
1631 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),
1633 "vxworks-ppcgen" => {
1634 inherit_from => [ "BASE_unix" ],
1636 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",
1637 sys_id => "VXWORKS",
1638 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),
1640 "vxworks-ppc405" => {
1641 inherit_from => [ "BASE_unix" ],
1643 cflags => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h",
1644 sys_id => "VXWORKS",
1647 "vxworks-ppc750" => {
1648 inherit_from => [ "BASE_unix" ],
1650 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)",
1651 sys_id => "VXWORKS",
1654 "vxworks-ppc750-debug" => {
1655 inherit_from => [ "BASE_unix" ],
1657 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",
1658 sys_id => "VXWORKS",
1661 "vxworks-ppc860" => {
1662 inherit_from => [ "BASE_unix" ],
1664 cflags => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h",
1665 sys_id => "VXWORKS",
1668 "vxworks-simlinux" => {
1669 inherit_from => [ "BASE_unix" ],
1671 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",
1672 sys_id => "VXWORKS",
1674 ranlib => "ranlibpentium",
1677 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
1679 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",
1680 threads("-D_REENTRANT")),
1681 sys_id => "VXWORKS",
1682 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),
1683 thread_scheme => "pthreads",
1684 perlasm_scheme => "o32",
1685 ranlib => "ranlibmips",
1690 inherit_from => [ "BASE_unix" ],
1692 cflags => combine("\$(CFLAGS)",
1693 threads("-D_REENTRANT")),
1694 plib_lflags => "\$(LDFLAGS)",
1695 ex_libs => add("\$(LDLIBS)"),
1696 bn_ops => "BN_LLONG",
1697 thread_scheme => "pthreads",
1698 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1699 shared_target => "linux-shared",
1700 shared_cflag => "-fPIC",
1701 shared_ldflag => "-shared",
1702 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1703 ranlib => "$ENV{'RANLIB'}",
1705 "uClinux-dist64" => {
1706 inherit_from => [ "BASE_unix" ],
1708 cflags => combine("\$(CFLAGS)",
1709 threads("-D_REENTRANT")),
1710 plib_lflags => "\$(LDFLAGS)",
1711 ex_libs => add("\$(LDLIBS)"),
1712 bn_ops => "SIXTY_FOUR_BIT_LONG",
1713 thread_scheme => "pthreads",
1714 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1715 shared_target => "linux-shared",
1716 shared_cflag => "-fPIC",
1717 shared_ldflag => "-shared",
1718 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1719 ranlib => "$ENV{'RANLIB'}",
1724 inherit_from => [ "BASE_VMS" ],
1727 cflags => picker(default => "/STANDARD=RELAXED/NOLIST/PREFIX=ALL/NAMES=(AS_IS,SHORTENED)",
1728 debug => "/NOOPTIMIZE/DEBUG",
1729 release => "/OPTIMIZE/NODEBUG"),
1730 lflags => picker(default => "/MAP",
1731 debug => "/DEBUG/TRACEBACK",
1732 release => "/NODEBUG/NOTRACEBACK"),
1733 shared_target => "vms-shared",
1734 dso_scheme => "vms",
1735 thread_scheme => "pthreads",
1737 apps_aux_src => "vms_decc_init.c",
1740 # VMS on VAX is *unsupported*
1743 # bn_obj => "[.asm]vms.obj vms-helper.obj"
1746 # inherit_from => [ "vms-generic", asm("vms-asm") ],
1748 # debug_aflags => "/NOOPTIMIZE/DEBUG",
1749 # release_aflags => "/OPTIMIZE/NODEBUG",
1750 # bn_opts => "THIRTY_TWO_BIT RC4_CHAR RC4_CHUNK DES_PTR BF_PTR",
1753 inherit_from => [ "vms-generic" ],
1754 cflags => add(sub { my @warnings =
1755 @{vms_info()->{disable_warns}};
1757 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1759 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1760 #release_aflags => "/OPTIMIZE/NODEBUG",
1761 bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1763 "vms-alpha-p32" => {
1764 inherit_from => [ "vms-alpha" ],
1766 add("/POINTER_SIZE=32",
1767 sub { my @warnings =
1768 @{vms_info()->{disable_warns_p32}};
1770 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1772 ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
1774 "vms-alpha-p64" => {
1775 inherit_from => [ "vms-alpha" ],
1777 add("/POINTER_SIZE=64=ARGV",
1778 sub { my @warnings =
1779 @{vms_info()->{disable_warns_p64}};
1781 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1783 ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
1786 inherit_from => [ "vms-generic" ],
1787 cflags => add(sub { my @warnings =
1788 @{vms_info()->{disable_warns}};
1790 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1792 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1793 #release_aflags => "/OPTIMIZE/NODEBUG",
1794 bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1797 inherit_from => [ "vms-ia64" ],
1799 add("/POINTER_SIZE=32",
1800 sub { my @warnings =
1801 @{vms_info()->{disable_warns_p32}};
1803 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1805 ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
1808 inherit_from => [ "vms-ia64" ],
1810 add("/POINTER_SIZE=64=ARGV",
1811 sub { my @warnings =
1812 @{vms_info()->{disable_warns_p64}};
1814 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1816 ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },