2 ## Standard openssl configuration targets.
4 # Helper functions for the Windows configs
5 my $vc_win64a_info = {};
7 unless (%$vc_win64a_info) {
8 if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) {
9 $vc_win64a_info = { as => "nasm",
10 asflags => "-f win64 -DNEAR -Ox -g",
12 } elsif ($disabled{asm}) {
13 $vc_win64a_info = { as => "ml64",
14 asflags => "/c /Cp /Cx /Zi",
17 die "NASM not found - please read INSTALL and NOTES.WIN for further details\n";
20 return $vc_win64a_info;
23 my $vc_win32_info = {};
25 unless (%$vc_win32_info) {
26 my $ver=`nasm -v 2>NUL`;
27 my $vew=`nasmw -v 2>NUL`;
28 if ($ver ne "" || $vew ne "") {
29 $vc_win32_info = { as => $ver ge $vew ? "nasm" : "nasmw",
30 asflags => "-f win32",
32 perlasm_scheme => "win32n" };
33 } elsif ($disabled{asm}) {
34 $vc_win32_info = { as => "ml",
35 asflags => "/nologo /Cp /coff /c /Cx /Zi",
37 perlasm_scheme => "win32" };
39 die "NASM not found - please read INSTALL and NOTES.WIN for further details\n";
42 return $vc_win32_info;
45 my $vc_wince_info = {};
47 unless (%$vc_wince_info) {
49 die '%OSVERSION% is not defined' if (!defined($ENV{'OSVERSION'}));
50 die '%PLATFORM% is not defined' if (!defined($ENV{'PLATFORM'}));
51 die '%TARGETCPU% is not defined' if (!defined($ENV{'TARGETCPU'}));
54 # Idea behind this is to mimic flags set by eVC++ IDE...
56 my $wcevers = $ENV{'OSVERSION'}; # WCENNN
57 die '%OSVERSION% value is insane'
58 if ($wcevers !~ /^WCE([1-9])([0-9]{2})$/);
59 my $wcecdefs = "-D_WIN32_WCE=$1$2 -DUNDER_CE=$1$2"; # -D_WIN32_WCE=NNN
60 my $wcelflag = "/subsystem:windowsce,$1.$2"; # ...,N.NN
62 my $wceplatf = $ENV{'PLATFORM'};
64 $wceplatf =~ tr/a-z0-9 /A-Z0-9_/;
65 $wcecdefs .= " -DWCE_PLATFORM_$wceplatf";
67 my $wcetgt = $ENV{'TARGETCPU'}; # just shorter name...
68 SWITCH: for($wcetgt) {
69 /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_";
70 $wcelflag.=" /machine:X86"; last; };
71 /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
72 $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/);
73 $wcecdefs.=" -QRarch4T -QRinterwork-return";
74 $wcelflag.=" /machine:THUMB"; last; };
75 /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
76 $wcelflag.=" /machine:ARM"; last; };
77 /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
78 $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32";
79 $wcelflag.=" /machine:MIPSFPU"; last; };
80 /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
81 $wcecdefs.=" -DMIPSII -QMmips16";
82 $wcelflag.=" /machine:MIPS16"; last; };
83 /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
84 $wcecdefs.=" -QMmips2";
85 $wcelflag.=" /machine:MIPS"; last; };
86 /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000";
87 $wcelflag.=" /machine:MIPS"; last; };
88 /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx";
89 $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/);
90 $wcelflag.=" /machine:$wcetgt"; last; };
91 { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_";
92 $wcelflag.=" /machine:$wcetgt"; last; };
95 $vc_wince_info = { cflags => $wcecdefs,
96 lflags => $wcelflag };
98 return $vc_wince_info;
101 # Helper functions for the VMS configs
104 unless (%$vms_info) {
105 my $pointer_size = shift;
106 my $pointer_size_str = $pointer_size == 0 ? "" : "$pointer_size";
108 $vms_info->{disable_warns} = [ ];
109 $vms_info->{pointer_size} = $pointer_size_str;
110 if ($pointer_size == 64) {
111 `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;
113 push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3";
117 unless ($disabled{zlib}) {
118 my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str;
119 if (defined($disabled{"zlib-dynamic"})) {
120 $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE";
122 $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib;
123 # In case the --with-zlib-lib value contains something like
124 # /SHARE or /LIB or so at the end, remove it.
125 $vms_info->{def_zlib} =~ s|/.*$||g;
134 #### Basic configs that should work on any 32-bit box
137 cflags => picker(debug => "-O0 -g",
139 thread_scheme => "(unknown)",
140 bn_ops => "BN_LLONG",
145 thread_scheme => "(unknown)",
148 #### VOS Configurations
150 inherit_from => [ "BASE_unix" ],
152 cflags => picker(default => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
155 thread_scheme => "(unknown)",
157 lflags => "-Wl,-map",
158 bn_ops => "BN_LLONG",
159 shared_extension => ".so",
162 #### Solaris configurations
163 "solaris-common" => {
164 inherit_from => [ "BASE_unix" ],
166 cflags => "-DFILIO_H",
167 ex_libs => add("-lresolv -lsocket -lnsl -ldl"),
168 dso_scheme => "dlfcn",
169 thread_scheme => "pthreads",
170 shared_target => "solaris-shared",
171 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
173 #### Solaris x86 with GNU C setups
174 "solaris-x86-gcc" => {
175 # -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have
176 # to do it here because whenever GNU C instantiates an assembler
177 # template it surrounds it with #APP #NO_APP comment pair which
178 # (at least Solaris 7_x86) /usr/ccs/bin/as fails to assemble
179 # with "Illegal mnemonic" error message.
180 inherit_from => [ "solaris-common", asm("x86_elf_asm") ],
182 cflags => add_before(picker(default => "-Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM",
184 release => "-O3 -fomit-frame-pointer"),
185 threads("-pthread")),
186 bn_ops => "BN_LLONG",
187 shared_cflag => "-fPIC",
188 shared_ldflag => "-shared",
190 "solaris64-x86_64-gcc" => {
191 # -shared -static-libgcc might appear controversial, but modules
192 # taken from static libgcc do not have relocations and linking
193 # them into our shared objects doesn't have any negative side
194 # effects. On the contrary, doing so makes it possible to use
195 # gcc shared build with Sun C. Given that gcc generates faster
196 # code [thanks to inline assembler], I would actually recommend
197 # to consider using gcc shared build even with vendor compiler:-)
198 # <appro@fy.chalmers.se>
199 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
201 cflags => add_before(picker(default => "-m64 -Wall -DL_ENDIAN",
204 threads("-pthread")),
205 bn_ops => "SIXTY_FOUR_BIT_LONG",
206 perlasm_scheme => "elf",
207 shared_cflag => "-fPIC",
208 shared_ldflag => "-m64 -shared -static-libgcc",
212 #### Solaris x86 with Sun C setups
213 "solaris-x86-cc" => {
214 inherit_from => [ "solaris-common" ],
216 cflags => add_before(picker(default => "-xarch=generic -xstrconst -Xa -DL_ENDIAN",
218 release => "-xO5 -xregs=frameptr -xdepend -xbuiltin"),
219 threads("-D_REENTRANT")),
220 lflags => add(threads("-mt")),
221 ex_libs => add(threads("-lpthread")),
222 bn_ops => "BN_LLONG RC4_CHAR",
223 shared_cflag => "-KPIC",
224 shared_ldflag => "-G -dy -z text",
226 "solaris64-x86_64-cc" => {
227 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
229 cflags => add_before(picker(default => "-xarch=generic64 -xstrconst -Xa -DL_ENDIAN",
231 release => "-xO5 -xdepend -xbuiltin"),
232 threads("-D_REENTRANT")),
233 thread_scheme => "pthreads",
234 lflags => add(threads("-mt")),
235 ex_libs => add(threads("-lpthread")),
236 bn_ops => "SIXTY_FOUR_BIT_LONG",
237 perlasm_scheme => "elf",
238 shared_cflag => "-KPIC",
239 shared_ldflag => "-xarch=generic64 -G -dy -z text",
243 #### SPARC Solaris with GNU C setups
244 "solaris-sparcv7-gcc" => {
245 inherit_from => [ "solaris-common" ],
247 cflags => add_before(picker(default => "-Wall -DB_ENDIAN -DBN_DIV2W",
250 threads("-pthread")),
251 bn_ops => "BN_LLONG RC4_CHAR",
252 shared_cflag => "-fPIC",
253 shared_ldflag => "-shared",
255 "solaris-sparcv8-gcc" => {
256 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
257 cflags => add_before("-mcpu=v8"),
259 "solaris-sparcv9-gcc" => {
260 # -m32 should be safe to add as long as driver recognizes
262 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
263 cflags => add_before("-m32 -mcpu=ultrasparc"),
265 "solaris64-sparcv9-gcc" => {
266 inherit_from => [ "solaris-sparcv9-gcc" ],
267 cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
268 bn_ops => "BN_LLONG RC4_CHAR",
269 shared_ldflag => "-m64 -shared",
273 #### SPARC Solaris with Sun C setups
274 # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
275 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
276 # SC5.0 note: Compiler common patch 107357-01 or later is required!
277 "solaris-sparcv7-cc" => {
278 inherit_from => [ "solaris-common" ],
280 cflags => add_before(picker(default => "-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W",
282 release => "-xO5 -xdepend"),
283 threads("-D_REENTRANT")),
284 lflags => add(threads("-mt")),
285 ex_libs => add(threads("-lpthread")),
286 bn_ops => "BN_LLONG RC4_CHAR",
287 shared_cflag => "-KPIC",
288 shared_ldflag => "-G -dy -z text",
291 "solaris-sparcv8-cc" => {
292 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
293 cflags => add_before("-xarch=v8"),
295 "solaris-sparcv9-cc" => {
296 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
297 cflags => add_before("-xarch=v8plus -xtarget=ultra"),
299 "solaris64-sparcv9-cc" => {
300 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
301 cflags => add_before("-xarch=v9 -xtarget=ultra"),
302 bn_ops => "BN_LLONG RC4_CHAR",
303 shared_ldflag => "-xarch=v9 -G -dy -z text",
307 #### IRIX 6.x configs
308 # Only N32 and N64 ABIs are supported.
309 "irix-mips3-gcc" => {
310 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
312 cflags => combine(picker(default => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W",
315 threads("-D_SGI_MP_SOURCE")),
316 ex_libs => add(threads("-lpthread")),
317 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
318 thread_scheme => "pthreads",
319 perlasm_scheme => "n32",
320 dso_scheme => "dlfcn",
321 shared_target => "irix-shared",
322 shared_ldflag => "-mabi=n32",
323 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
327 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
329 cflags => combine(picker(default => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
332 threads("-D_SGI_MP_SOURCE")),
333 ex_libs => add(threads("-lpthread")),
334 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
335 thread_scheme => "pthreads",
336 perlasm_scheme => "n32",
337 dso_scheme => "dlfcn",
338 shared_target => "irix-shared",
339 shared_ldflag => "-n32",
340 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
344 "irix64-mips4-gcc" => {
345 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
347 cflags => combine(picker(default => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W",
350 threads("-D_SGI_MP_SOURCE")),
351 ex_libs => add(threads("-lpthread")),
352 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
353 thread_scheme => "pthreads",
354 perlasm_scheme => "64",
355 dso_scheme => "dlfcn",
356 shared_target => "irix-shared",
357 shared_ldflag => "-mabi=64",
358 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
361 "irix64-mips4-cc" => {
362 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
364 cflags => combine(picker(default => "-64 -mips4 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
367 threads("-D_SGI_MP_SOURCE")),
368 ex_libs => add(threads("-lpthread")),
369 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
370 thread_scheme => "pthreads",
371 perlasm_scheme => "64",
372 dso_scheme => "dlfcn",
373 shared_target => "irix-shared",
374 shared_ldflag => "-64",
375 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
379 #### Unified HP-UX ANSI C configs.
381 # - Originally we were optimizing at +O4 level. It should be noted
382 # that the only difference between +O3 and +O4 is global inter-
383 # procedural analysis. As it has to be performed during the link
384 # stage the compiler leaves behind certain pseudo-code in lib*.a
385 # which might be release or even patch level specific. Generating
386 # the machine code for and analyzing the *whole* program appears
387 # to be *extremely* memory demanding while the performance gain is
388 # actually questionable. The situation is intensified by the default
389 # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
390 # which is way too low for +O4. In other words, doesn't +O3 make
392 # - Keep in mind that the HP compiler by default generates code
393 # suitable for execution on the host you're currently compiling at.
394 # If the toolkit is meant to be used on various PA-RISC processors
395 # consider './Configure hpux-parisc-[g]cc +DAportable'.
396 # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
397 # 32-bit message digests. (For the moment of this writing) HP C
398 # doesn't seem to "digest" too many local variables (they make "him"
399 # chew forever:-). For more details look-up MD32_XARRAY comment in
400 # crypto/sha/sha_lcl.h.
401 # - originally there were 32-bit hpux-parisc2-* targets. They were
402 # scrapped, because a) they were not interchangeable with other 32-bit
403 # targets; b) performance-critical 32-bit assembly modules implement
404 # even PA-RISC 2.0-specific code paths, which are chosen at run-time,
405 # thus adequate performance is provided even with PA-RISC 1.1 build.
406 # <appro@fy.chalmers.se>
407 "hpux-parisc-gcc" => {
408 inherit_from => [ "BASE_unix" ],
410 cflags => combine(picker(default => "-DB_ENDIAN -DBN_DIV2W",
413 threads("-pthread")),
414 ex_libs => add("-Wl,+s -ldld"),
415 bn_ops => "BN_LLONG",
416 thread_scheme => "pthreads",
418 shared_target => "hpux-shared",
419 shared_cflag => "-fPIC",
420 shared_ldflag => "-shared",
421 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
423 "hpux-parisc1_1-gcc" => {
424 inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ],
425 multilib => "/pa1.1",
427 "hpux64-parisc2-gcc" => {
428 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
430 cflags => combine(picker(default => "-DB_ENDIAN",
433 threads("-D_REENTRANT")),
434 ex_libs => add("-ldl"),
435 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
436 thread_scheme => "pthreads",
437 dso_scheme => "dlfcn",
438 shared_target => "hpux-shared",
439 shared_cflag => "-fpic",
440 shared_ldflag => "-shared",
441 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
442 multilib => "/pa20_64",
445 # More attempts at unified 10.X and 11.X targets for HP C compiler.
447 # Chris Ruemmler <ruemmler@cup.hp.com>
448 # Kevin Steves <ks@hp.se>
449 "hpux-parisc-cc" => {
450 inherit_from => [ "BASE_unix" ],
452 cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
453 debug => "+O0 +d -g",
455 threads("-D_REENTRANT")),
456 ex_libs => add("-Wl,+s -ldld",threads("-lpthread")),
457 bn_ops => "RC4_CHAR",
458 thread_scheme => "pthreads",
460 shared_target => "hpux-shared",
461 shared_cflag => "+Z",
462 shared_ldflag => "-b",
463 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
465 "hpux-parisc1_1-cc" => {
466 inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ],
467 cflags => add_before("+DA1.1"),
468 multilib => "/pa1.1",
470 "hpux64-parisc2-cc" => {
471 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
473 cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY",
474 debug => "+O0 +d -g",
476 threads("-D_REENTRANT")),
477 ex_libs => add("-ldl",threads("-lpthread")),
478 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
479 thread_scheme => "pthreads",
480 dso_scheme => "dlfcn",
481 shared_target => "hpux-shared",
482 shared_cflag => "+Z",
483 shared_ldflag => "+DD64 -b",
484 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
485 multilib => "/pa20_64",
488 # HP/UX IA-64 targets
490 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
492 cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z -DB_ENDIAN",
493 debug => "+O0 +d -g",
495 threads("-D_REENTRANT")),
496 ex_libs => add("-ldl",threads("-lpthread")),
497 bn_ops => "SIXTY_FOUR_BIT",
498 thread_scheme => "pthreads",
499 dso_scheme => "dlfcn",
500 shared_target => "hpux-shared",
501 shared_cflag => "+Z",
502 shared_ldflag => "+DD32 -b",
503 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
504 multilib => "/hpux32",
506 # Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted
507 # with debugging of the following config.
508 "hpux64-ia64-cc" => {
509 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
511 cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z -DB_ENDIAN",
512 debug => "+O0 +d -g",
514 threads("-D_REENTRANT")),
515 ex_libs => add("-ldl", threads("-lpthread")),
516 bn_ops => "SIXTY_FOUR_BIT_LONG",
517 thread_scheme => "pthreads",
518 dso_scheme => "dlfcn",
519 shared_target => "hpux-shared",
520 shared_cflag => "+Z",
521 shared_ldflag => "+DD64 -b",
522 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
523 multilib => "/hpux64",
527 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
529 cflags => combine(picker(default => "-DB_ENDIAN",
532 threads("-pthread")),
533 ex_libs => add("-ldl"),
534 bn_ops => "SIXTY_FOUR_BIT",
535 thread_scheme => "pthreads",
536 dso_scheme => "dlfcn",
537 shared_target => "hpux-shared",
538 shared_cflag => "-fpic",
539 shared_ldflag => "-shared",
540 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
541 multilib => "/hpux32",
543 "hpux64-ia64-gcc" => {
544 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
546 cflags => combine(picker(default => "-mlp64 -DB_ENDIAN",
549 threads("-pthread")),
550 ex_libs => add("-ldl"),
551 bn_ops => "SIXTY_FOUR_BIT_LONG",
552 thread_scheme => "pthreads",
553 dso_scheme => "dlfcn",
554 shared_target => "hpux-shared",
555 shared_cflag => "-fpic",
556 shared_ldflag => "-mlp64 -shared",
557 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
558 multilib => "/hpux64",
561 #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
563 inherit_from => [ "BASE_unix" ],
565 cflags => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB",
567 ex_libs => add("-L/SYSLOG/PUB -lsyslog -lsocket -lcurses"),
568 thread_scheme => "(unknown)",
569 bn_ops => "BN_LLONG",
572 #### DEC Alpha Tru64 targets. Tru64 is marketing name for OSF/1 version 4
573 #### and forward. In reality 'uname -s' still returns "OSF1". Originally
574 #### there were even osf1-* configs targeting prior versions provided,
575 #### but not anymore...
576 "tru64-alpha-gcc" => {
577 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
579 cflags => combine("-std=c9x -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -O3",
580 threads("-pthread")),
581 ex_libs => "-lrt", # for mlock(2)
582 bn_ops => "SIXTY_FOUR_BIT_LONG",
583 thread_scheme => "pthreads",
584 dso_scheme => "dlfcn",
585 shared_target => "alpha-osf1-shared",
586 shared_extension => ".so",
588 "tru64-alpha-cc" => {
589 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
591 cflags => combine("-std1 -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -tune host -fast -readonly_strings",
592 threads("-pthread")),
593 ex_libs => "-lrt", # for mlock(2)
594 bn_ops => "SIXTY_FOUR_BIT_LONG",
595 thread_scheme => "pthreads",
596 dso_scheme => "dlfcn",
597 shared_target => "alpha-osf1-shared",
598 shared_ldflag => "-msym",
599 shared_extension => ".so",
603 #### Variety of LINUX:-)
605 # *-generic* is endian-neutral target, but ./config is free to
606 # throw in -D[BL]_ENDIAN, whichever appropriate...
607 "linux-generic32" => {
608 inherit_from => [ "BASE_unix" ],
610 cflags => combine(picker(default => "-Wall",
613 threads("-pthread")),
614 ex_libs => add("-ldl"),
615 bn_ops => "BN_LLONG RC4_CHAR",
616 thread_scheme => "pthreads",
617 dso_scheme => "dlfcn",
618 shared_target => "linux-shared",
619 shared_cflag => "-fPIC",
620 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
622 "linux-generic64" => {
623 inherit_from => [ "linux-generic32" ],
624 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
628 inherit_from => [ "linux-generic32", asm("ppc32_asm") ],
629 perlasm_scheme => "linux32",
632 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
633 cflags => add("-m64 -DB_ENDIAN"),
634 perlasm_scheme => "linux64",
635 shared_ldflag => "-m64",
639 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
640 cflags => add("-m64 -DL_ENDIAN"),
641 perlasm_scheme => "linux64le",
642 shared_ldflag => "-m64",
646 ################################################################
647 # Note that -march is not among compiler options in linux-armv4
648 # target description. Not specifying one is intentional to give
651 # a) rely on your compiler default by not specifying one;
652 # b) specify your target platform explicitly for optimal
653 # performance, e.g. -march=armv6 or -march=armv7-a;
654 # c) build "universal" binary that targets *range* of platforms
655 # by specifying minimum and maximum supported architecture;
657 # As for c) option. It actually makes no sense to specify
658 # maximum to be less than ARMv7, because it's the least
659 # requirement for run-time switch between platform-specific
660 # code paths. And without run-time switch performance would be
661 # equivalent to one for minimum. Secondly, there are some
662 # natural limitations that you'd have to accept and respect.
663 # Most notably you can *not* build "universal" binary for
664 # big-endian platform. This is because ARMv7 processor always
665 # picks instructions in little-endian order. Another similar
666 # limitation is that -mthumb can't "cross" -march=armv6t2
667 # boundary, because that's where it became Thumb-2. Well, this
668 # limitation is a bit artificial, because it's not really
669 # impossible, but it's deemed too tricky to support. And of
670 # course you have to be sure that your binutils are actually
671 # up to the task of handling maximum target platform. With all
672 # this in mind here is an example of how to configure
675 # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
677 inherit_from => [ "linux-generic32", asm("armv4_asm") ],
678 perlasm_scheme => "linux32",
681 inherit_from => [ "linux-generic64", asm("aarch64_asm") ],
682 perlasm_scheme => "linux64",
684 "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32
685 inherit_from => [ "linux-generic32", asm("aarch64_asm") ],
686 cflags => add("-mabi=ilp32"),
687 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
688 perlasm_scheme => "linux64",
689 shared_ldflag => "-mabi=ilp32",
693 # Configure script adds minimally required -march for assembly
694 # support, if no -march was specified at command line.
695 inherit_from => [ "linux-generic32", asm("mips32_asm") ],
696 cflags => add("-mabi=32 -DBN_DIV3W"),
697 perlasm_scheme => "o32",
698 shared_ldflag => "-mabi=32",
700 # mips32 and mips64 below refer to contemporary MIPS Architecture
701 # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
703 inherit_from => [ "linux-generic32", asm("mips64_asm") ],
704 cflags => add("-mabi=n32 -DBN_DIV3W"),
705 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
706 perlasm_scheme => "n32",
707 shared_ldflag => "-mabi=n32",
710 "linux64-mips64" => {
711 inherit_from => [ "linux-generic64", asm("mips64_asm") ],
712 cflags => add("-mabi=64 -DBN_DIV3W"),
713 perlasm_scheme => "64",
714 shared_ldflag => "-mabi=64",
718 #### IA-32 targets...
720 inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
721 cflags => add(picker(default => "-DL_ENDIAN",
722 release => "-fomit-frame-pointer")),
723 ex_libs => add(picker(debug => "-lefence")),
724 bn_ops => "BN_LLONG",
727 inherit_from => [ "BASE_unix", asm("x86_asm") ],
729 cflags => add(picker(default => "-DL_ENDIAN -Wall",
731 release => "-O3 -fomit-frame-pointer")),
732 bn_ops => "BN_LLONG",
733 thread_scheme => "(unknown)",
734 perlasm_scheme => "a.out",
738 inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
739 cflags => add("-m64 -DL_ENDIAN"),
740 bn_ops => "SIXTY_FOUR_BIT_LONG",
741 perlasm_scheme => "elf",
742 shared_ldflag => "-m64",
745 "linux-x86_64-clang" => {
746 inherit_from => [ "linux-x86_64" ],
748 cflags => add("-Wextra -Qunused-arguments"),
751 inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
752 cflags => add("-mx32 -DL_ENDIAN"),
753 bn_ops => "SIXTY_FOUR_BIT",
754 perlasm_scheme => "elf32",
755 shared_ldflag => "-mx32",
760 inherit_from => [ "linux-generic64", asm("ia64_asm") ],
761 bn_ops => "SIXTY_FOUR_BIT_LONG",
765 inherit_from => [ "linux-generic64", asm("s390x_asm") ],
766 cflags => add("-m64 -DB_ENDIAN"),
767 perlasm_scheme => "64",
768 shared_ldflag => "-m64",
772 #### So called "highgprs" target for z/Architecture CPUs
773 # "Highgprs" is kernel feature first implemented in Linux
774 # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
775 # significant bits of general purpose registers not only
776 # upon 32-bit process context switch, but even on
777 # asynchronous signal delivery to such process. This makes
778 # it possible to deploy 64-bit instructions even in legacy
779 # application context and achieve better [or should we say
780 # adequate] performance. The build is binary compatible with
781 # linux-generic32, and the idea is to be able to install the
782 # resulting libcrypto.so alongside generic one, e.g. as
783 # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
784 # linker to autodiscover. Unfortunately it doesn't work just
785 # yet, because of couple of bugs in glibc
786 # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
788 inherit_from => [ "linux-generic32", asm("s390x_asm") ],
789 cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"),
790 bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; },
791 perlasm_scheme => "31",
792 shared_ldflag => "-m31",
793 multilib => "/highgprs",
796 #### SPARC Linux setups
797 # Ray Miller <ray.miller@computing-services.oxford.ac.uk> has
798 # patiently assisted with debugging of following two configs.
800 inherit_from => [ "linux-generic32", asm("sparcv8_asm") ],
801 cflags => add("-mcpu=v8 -DB_ENDIAN -DBN_DIV2W"),
804 # it's a real mess with -mcpu=ultrasparc option under Linux,
805 # but -Wa,-Av8plus should do the trick no matter what.
806 inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
807 cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W"),
808 shared_ldflag => "-m32",
810 "linux64-sparcv9" => {
811 # GCC 3.1 is a requirement
812 inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
813 cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"),
814 bn_ops => "BN_LLONG RC4_CHAR",
815 shared_ldflag => "-m64",
819 "linux-alpha-gcc" => {
820 inherit_from => [ "linux-generic64", asm("alpha_asm") ],
821 cflags => add("-DL_ENDIAN"),
822 bn_ops => "SIXTY_FOUR_BIT_LONG",
824 "linux-c64xplus" => {
825 inherit_from => [ "BASE_unix" ],
826 # TI_CGT_C6000_7.3.x is a requirement
828 cflags => combine("--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT",
829 threads("-D_REENTRANT")),
830 bn_ops => "BN_LLONG",
831 cpuid_asm_src => "c64xpluscpuid.s",
832 bn_asm_src => "asm/bn-c64xplus.asm c64xplus-gf2m.s",
833 aes_asm_src => "aes-c64xplus.s aes_cbc.c aes-ctr.fake",
834 sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s",
835 rc4_asm_src => "rc4-c64xplus.s",
836 modes_asm_src => "ghash-c64xplus.s",
837 chacha_asm_src => "chacha-c64xplus.s",
838 poly1305_asm_src => "poly1305-c64xplus.s",
839 thread_scheme => "pthreads",
840 perlasm_scheme => "void",
841 dso_scheme => "dlfcn",
842 shared_target => "linux-shared",
843 shared_cflag => "--pic",
844 shared_ldflag => "-z --sysv --shared",
845 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
849 #### Android: linux-* but without pointers to headers and libs.
851 # It takes pair of prior-set environment variables to make it work:
853 # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<
854 # CROSS_COMPILE=<prefix>
856 # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
857 # For example to compile for ICS and ARM with NDK 10d, you'd:
859 # ANDROID_NDK=/some/where/android-ndk-10d
860 # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
861 # CROSS_COMPILE=arm-linux-adroideabi-
862 # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/
865 inherit_from => [ "linux-generic32" ],
866 # Special note about unconditional -fPIC and -pie. The underlying
867 # reason is that Lollipop refuses to run non-PIE. But what about
868 # older systems and NDKs? -fPIC was never problem, so the only
869 # concern is -pie. Older toolchains, e.g. r4, appear to handle it
870 # and binaries turn mostly functional. "Mostly" means that oldest
871 # Androids, such as Froyo, fail to handle executable, but newer
872 # systems are perfectly capable of executing binaries targeting
873 # Froyo. Keep in mind that in the nutshell Android builds are
874 # about JNI, i.e. shared libraries, not applications.
875 cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")),
876 bin_cflags => "-pie",
879 inherit_from => [ "android", asm("x86_asm") ],
880 cflags => add(picker(release => "-fomit-frame-pointer")),
881 bn_ops => "BN_LLONG",
882 perlasm_scheme => "android",
884 ################################################################
885 # Contemporary Android applications can provide multiple JNI
886 # providers in .apk, targeting multiple architectures. Among
887 # them there is "place" for two ARM flavours: generic eabi and
888 # armv7-a/hard-float. However, it should be noted that OpenSSL's
889 # ability to engage NEON is not constrained by ABI choice, nor
890 # is your ability to call OpenSSL from your application code
891 # compiled with floating-point ABI other than default 'soft'.
892 # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
893 # This means that choice of ARM libraries you provide in .apk
894 # is driven by application needs. For example if application
895 # itself benefits from NEON or is floating-point intensive, then
896 # it might be appropriate to provide both libraries. Otherwise
897 # just generic eabi would do. But in latter case it would be
900 # ./Configure android-armeabi -D__ARM_MAX_ARCH__=8
902 # in order to build "universal" binary and allow OpenSSL take
903 # advantage of NEON when it's available.
905 "android-armeabi" => {
906 inherit_from => [ "android", asm("armv4_asm") ],
909 inherit_from => [ "android", asm("mips32_asm") ],
910 perlasm_scheme => "o32",
914 inherit_from => [ "linux-generic64" ],
915 cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")),
916 bin_cflags => "-pie",
918 "android64-aarch64" => {
919 inherit_from => [ "android64", asm("aarch64_asm") ],
920 perlasm_scheme => "linux64",
925 # As for thread cflag. Idea is to maintain "collective" set of
926 # flags, which would cover all BSD flavors. -pthread applies
927 # to them all, but is treated differently. OpenBSD expands is
928 # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
929 # expands it as -lc_r, which has to be accompanied by explicit
930 # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
931 # expands it as -lc_r, which seems to be sufficient?
932 inherit_from => [ "BASE_unix" ],
934 cflags => combine(picker(default => "-Wall",
937 threads("-pthread -D_THREAD_SAFE -D_REENTRANT")),
938 bn_ops => "BN_LLONG",
939 thread_scheme => "pthreads",
940 dso_scheme => "dlfcn",
941 shared_target => "bsd-gcc-shared",
942 shared_cflag => "-fPIC",
943 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
946 inherit_from => [ "BSD-generic32" ],
947 bn_ops => "SIXTY_FOUR_BIT_LONG",
951 inherit_from => [ "BSD-generic32", asm("x86_asm") ],
952 cflags => add(picker(default => "-DL_ENDIAN",
953 release => "-fomit-frame-pointer")),
954 bn_ops => "BN_LLONG",
955 shared_target => "bsd-shared",
956 perlasm_scheme => "a.out",
959 inherit_from => [ "BSD-x86" ],
960 perlasm_scheme => "elf",
964 inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ],
965 cflags => add("-mcpu=v8 -DB_ENDIAN"),
968 # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
969 # simply *happens* to work around a compiler bug in gcc 3.3.3,
970 # triggered by RIPEMD160 code.
971 inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ],
972 cflags => add("-DB_ENDIAN -DMD32_REG_T=int"),
973 bn_ops => "BN_LLONG",
977 inherit_from => [ "BSD-generic64", asm("ia64_asm") ],
978 cflags => add_before("-DL_ENDIAN"),
979 bn_ops => "SIXTY_FOUR_BIT_LONG",
983 inherit_from => [ "BSD-generic64", asm("x86_64_asm") ],
984 cflags => add_before("-DL_ENDIAN"),
985 bn_ops => "SIXTY_FOUR_BIT_LONG",
986 perlasm_scheme => "elf",
990 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
992 cflags => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -Wall",
993 ex_libs => add("-ldl"),
994 bn_ops => "BN_LLONG",
995 thread_scheme => "(unknown)",
996 dso_scheme => "dlfcn",
997 shared_target => "bsd-gcc-shared",
998 shared_cflag => "-fPIC",
999 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1003 inherit_from => [ "BASE_unix" ],
1005 cflags => "-O -Wall",
1006 unistd => "<libc.h>",
1007 bn_ops => "BN_LLONG",
1008 thread_scheme => "(unknown)",
1011 inherit_from => [ "BASE_unix" ],
1013 cflags => "-O3 -Wall",
1014 unistd => "<libc.h>",
1015 bn_ops => "BN_LLONG",
1016 thread_scheme => "(unknown)",
1021 inherit_from => [ "BASE_unix" ],
1023 cflags => "-DL_ENDIAN -DTERMIO",
1024 thread_scheme => "(unknown)",
1027 inherit_from => [ "BASE_unix" ],
1029 ex_libs => add("-lsocket"),
1030 dso_scheme => "dlfcn",
1031 shared_target => "bsd-gcc-shared",
1032 shared_cflag => "-fPIC",
1033 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1036 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1038 cflags => "-DL_ENDIAN -O2 -Wall",
1039 ex_libs => add("-lsocket"),
1040 dso_scheme => "dlfcn",
1041 shared_target => "bsd-gcc-shared",
1042 shared_cflag => "-fPIC",
1043 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1046 #### SCO/Caldera targets.
1048 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
1049 # Now we only have blended unixware-* as it's the only one used by ./config.
1050 # If you want to optimize for particular microarchitecture, bypass ./config
1051 # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
1052 # Note that not all targets include assembler support. Mostly because of
1053 # lack of motivation to support out-of-date platforms with out-of-date
1054 # compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
1055 # patiently assisted to debug most of it.
1057 # UnixWare 2.0x fails destest with -O.
1059 inherit_from => [ "BASE_unix" ],
1061 cflags => combine("-DFILIO_H -DNO_STRINGS_H",
1062 threads("-Kthread")),
1063 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1064 thread_scheme => "uithreads",
1067 inherit_from => [ "BASE_unix" ],
1069 cflags => combine("-O -DFILIO_H",
1070 threads("-Kthread")),
1071 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1072 thread_scheme => "uithreads",
1075 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1077 cflags => combine("-O -DFILIO_H -Kalloca",
1078 threads("-Kthread")),
1079 ex_libs => add("-lsocket -lnsl"),
1080 thread_scheme => "uithreads",
1081 bn_ops => "BN_LLONG",
1082 perlasm_scheme => "elf-1",
1083 dso_scheme => "dlfcn",
1084 shared_target => "svr5-shared",
1085 shared_cflag => "-Kpic",
1086 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1088 "unixware-7-gcc" => {
1089 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1091 cflags => combine("-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -Wall",
1092 threads("-D_REENTRANT")),
1093 ex_libs => add("-lsocket -lnsl"),
1094 bn_ops => "BN_LLONG",
1095 thread_scheme => "pthreads",
1096 perlasm_scheme => "elf-1",
1097 dso_scheme => "dlfcn",
1098 shared_target => "gnu-shared",
1099 shared_cflag => "-fPIC",
1100 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1102 # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
1104 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1107 ex_libs => add("-lsocket -lnsl"),
1108 thread_scheme => "(unknown)",
1109 perlasm_scheme => "elf-1",
1110 dso_scheme => "dlfcn",
1111 shared_target => "svr3-shared",
1112 shared_cflag => "-Kpic",
1113 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1116 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1118 cflags => "-O3 -fomit-frame-pointer",
1119 ex_libs => add("-lsocket -lnsl"),
1120 bn_ops => "BN_LLONG",
1121 thread_scheme => "(unknown)",
1122 perlasm_scheme => "elf-1",
1123 dso_scheme => "dlfcn",
1124 shared_target => "svr3-shared",
1125 shared_cflag => "-fPIC",
1126 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1131 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1133 cflags => combine(picker(default => "-DB_ENDIAN",
1136 threads("-pthread")),
1138 bn_ops => "BN_LLONG RC4_CHAR",
1139 thread_scheme => "pthreads",
1140 perlasm_scheme => "aix32",
1141 dso_scheme => "dlfcn",
1142 shared_target => "aix-shared",
1143 shared_ldflag => "-shared -Wl,-G",
1144 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1148 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1150 cflags => combine(picker(default => "-maix64 -DB_ENDIAN",
1153 threads("-pthread")),
1155 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1156 thread_scheme => "pthreads",
1157 perlasm_scheme => "aix64",
1158 dso_scheme => "dlfcn",
1159 shared_target => "aix-shared",
1160 shared_ldflag => "-maix64 -shared -Wl,-G",
1161 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1164 # Below targets assume AIX 5. Idea is to effectively disregard
1165 # $OBJECT_MODE at build time. $OBJECT_MODE is respected at
1168 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1170 cflags => combine(picker(default => "-q32 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1173 threads("-qthreaded -D_THREAD_SAFE")),
1175 bn_ops => "BN_LLONG RC4_CHAR",
1176 thread_scheme => "pthreads",
1177 perlasm_scheme => "aix32",
1178 dso_scheme => "dlfcn",
1179 shared_target => "aix-shared",
1180 shared_ldflag => "-q32 -G",
1181 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1185 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1187 cflags => combine(picker(default => "-q64 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1190 threads("-qthreaded -D_THREAD_SAFE")),
1192 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1193 thread_scheme => "pthreads",
1194 perlasm_scheme => "aix64",
1195 dso_scheme => "dlfcn",
1196 shared_target => "aix-shared",
1197 shared_ldflag => "-q64 -G",
1198 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1202 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
1204 inherit_from => [ "BASE_unix" ],
1206 cflags => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC",
1207 ex_libs => add("-lsocket -lnsl"),
1208 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1209 thread_scheme => "(unknown)",
1212 # OS/390 Unix an EBCDIC-based Unix system on IBM mainframe
1213 # You need to compile using the c89.sh wrapper in the tools directory, because the
1214 # IBM compiler does not like the -L switch after any object modules.
1217 inherit_from => [ "BASE_unix" ],
1219 cflags => "-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE",
1220 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1221 thread_scheme => "(unknown)",
1224 #### Visual C targets
1226 # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
1228 # Note about -wd4090, disable warning C4090. This warning returns false
1229 # positives in some situations. Disabling it altogether masks both
1230 # legitimate and false cases, but as we compile on multiple platforms,
1231 # we rely on other compilers to catch legitimate cases.
1233 # Also note that we force threads no matter what. Configuring "no-threads"
1236 inherit_from => [ "BASE_Windows" ],
1239 cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
1240 defines => add(sub { my @defs = ();
1241 unless ($disabled{"zlib-dynamic"}) {
1244 'LIBZ="' . $withargs{zlib_lib} . '"');
1249 lib_cflags => add("/Zi /Fdossl_static"),
1250 dso_cflags => "/Zi /Fddso",
1251 bin_cflags => "/Zi /Fdapp",
1252 lflags => add("/debug"),
1253 shared_ldflag => "/dll",
1254 shared_target => "win-shared", # meaningless except it gives Configure a hint
1255 thread_scheme => "winthreads",
1256 dso_scheme => "win32",
1258 "VC-noCE-common" => {
1259 inherit_from => [ "VC-common" ],
1260 cflags => add(picker(default => "-DUNICODE -D_UNICODE",
1263 ($disabled{shared} ? "" : "/MDd")
1264 ." /Od -DDEBUG -D_DEBUG";
1268 ($disabled{shared} ? "" : "/MD")
1271 lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }),
1272 # Following might/should appears controversial, i.e. defining
1273 # /MDd without evaluating $disabled{shared}. It works in
1274 # non-shared build because static library is compiled with /Zl
1275 # and bares no reference to specific RTL. And it works in
1276 # shared build because multiple /MDd options are not prohibited.
1277 # But why /MDd in static build? Well, basically this is just a
1278 # reference point, which allows to catch eventual errors that
1279 # would prevent those who want to wrap OpenSSL into own .DLL.
1280 # Why not /MD in release build then? Well, some are likely to
1281 # prefer [non-debug] openssl.exe to be free from Micorosoft RTL
1283 bin_cflags => add(picker(debug => "/MDd",
1284 release => sub { $disabled{shared} ? "/MT" : () },
1286 bin_lflags => add("/subsystem:console /opt:ref"),
1287 ex_libs => add(sub {
1289 push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
1290 push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
1291 return join(" ", @ex_libs);
1294 "VC-WIN64-common" => {
1295 inherit_from => [ "VC-noCE-common" ],
1296 ex_libs => add(sub {
1298 push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
1299 return join(" ", @_, @ex_libs);
1301 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1302 build_scheme => add("VC-W64", { separator => undef }),
1305 inherit_from => [ "VC-WIN64-common", asm("ia64_asm"),
1306 sub { $disabled{shared} ? () : "ia64_uplink" } ],
1308 asflags => "-d debug",
1311 bn_asm_src => sub { return undef unless @_;
1312 my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; },
1313 perlasm_scheme => "ias",
1314 multilib => "-ia64",
1317 inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"),
1318 sub { $disabled{shared} ? () : "x86_64_uplink" } ],
1319 as => sub { vc_win64a_info()->{as} },
1320 asflags => sub { vc_win64a_info()->{asflags} },
1321 asoutflag => sub { vc_win64a_info()->{asoutflag} },
1323 bn_asm_src => sub { return undef unless @_;
1324 my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
1325 perlasm_scheme => "auto",
1329 # x86 Win32 target defaults to ANSI API, if you want UNICODE,
1330 # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
1331 inherit_from => [ "VC-noCE-common", asm("x86_asm"),
1332 sub { $disabled{shared} ? () : "uplink_common" } ],
1333 as => sub { vc_win32_info()->{as} },
1334 asflags => sub { vc_win32_info()->{asflags} },
1335 asoutflag => sub { vc_win32_info()->{asoutflag} },
1336 ex_libs => add(sub {
1338 # WIN32 UNICODE build gets linked with unicows.lib for
1339 # backward compatibility with Win9x.
1340 push @ex_libs, 'unicows.lib'
1341 if (grep { $_ eq "UNICODE" } @user_defines);
1342 return join(" ", @ex_libs, @_);
1345 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1346 perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} },
1347 build_scheme => add("VC-W32", { separator => undef }),
1350 inherit_from => [ "VC-common" ],
1352 asflags => "/nologo /Cp /coff /c /Cx /Zi",
1357 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',
1358 sub { vc_wince_info()->{cflags}; },
1359 sub { defined($ENV{'WCECOMPAT'})
1360 ? '-I$(WCECOMPAT)/include' : (); },
1361 sub { defined($ENV{'PORTSDK_LIBPATH'})
1362 ? '-I$(PORTSDK_LIBPATH)/../../include' : (); },
1363 sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14
1364 ? ($disabled{shared} ? " /MT" : " /MD")
1366 debug => "/Od -DDEBUG -D_DEBUG",
1368 lflags => combine("/nologo /opt:ref",
1369 sub { vc_wince_info()->{lflags}; },
1370 sub { defined($ENV{PORTSDK_LIBPATH})
1371 ? "/entry:mainCRTstartup" : (); }),
1373 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1374 ex_libs => add(sub {
1376 push @ex_libs, 'ws2.lib' unless $disabled{sock};
1377 push @ex_libs, 'crypt32.lib';
1378 if (defined($ENV{WCECOMPAT})) {
1379 my $x = '$(WCECOMPAT)/lib';
1380 if (-f "$x/$ENV{TARGETCPU}/wcecompatex.lib") {
1381 $x .= '/$(TARGETCPU)/wcecompatex.lib';
1383 $x .= '/wcecompatex.lib';
1387 push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
1388 if (defined($ENV{'PORTSDK_LIBPATH'}));
1389 push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
1390 if ($ENV{'TARGETCPU'} eq "X86");
1393 build_scheme => add("VC-WCE", { separator => undef }),
1398 inherit_from => [ "BASE_unix", asm("x86_asm"),
1399 sub { $disabled{shared} ? () : "x86_uplink" } ],
1401 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
1403 release => "-O3 -fomit-frame-pointer"),
1405 sys_id => "MINGW32",
1406 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1407 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1408 thread_scheme => "winthreads",
1409 perlasm_scheme => "coff",
1410 dso_scheme => "win32",
1411 shared_target => "mingw-shared",
1412 shared_cflag => add("-D_WINDLL"),
1413 shared_ldflag => "-static-libgcc",
1414 shared_rcflag => "--target=pe-i386",
1415 shared_extension => ".dll",
1419 # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1420 # .dll compiled with one compiler with application compiled with
1421 # another compiler. It's possible to engage Applink support in
1422 # mingw64 build, but it's not done, because till mingw64
1423 # supports structured exception handling, one can't seriously
1424 # consider its binaries for using with non-mingw64 run-time
1425 # environment. And as mingw64 is always consistent with itself,
1426 # Applink is never engaged and can as well be omitted.
1427 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1429 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall",
1433 sys_id => "MINGW64",
1434 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1435 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1436 thread_scheme => "winthreads",
1437 perlasm_scheme => "mingw64",
1438 dso_scheme => "win32",
1439 shared_target => "mingw-shared",
1440 shared_cflag => add("-D_WINDLL"),
1441 shared_ldflag => "-static-libgcc",
1442 shared_rcflag => "--target=pe-x86-64",
1443 shared_extension => ".dll",
1449 inherit_from => [ "BASE_unix" ],
1451 cflags => "-DL_ENDIAN -O",
1457 inherit_from => [ "BASE_unix" ],
1459 cflags => "-DTERMIOS -DL_ENDIAN -O -Wall",
1461 bn_ops => "BN_LLONG",
1462 dso_scheme => "win32",
1467 inherit_from => [ "BASE_unix", asm("x86_asm") ],
1469 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1471 release => "-O3 -fomit-frame-pointer"),
1473 bn_ops => "BN_LLONG",
1474 thread_scheme => "pthread",
1475 perlasm_scheme => "coff",
1476 dso_scheme => "dlfcn",
1477 shared_target => "cygwin-shared",
1478 shared_cflag => "-D_WINDLL",
1479 shared_ldflag => "-shared",
1480 shared_extension => ".dll",
1482 "Cygwin-x86_64" => {
1483 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1485 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1489 bn_ops => "SIXTY_FOUR_BIT_LONG",
1490 thread_scheme => "pthread",
1491 perlasm_scheme => "mingw64",
1492 dso_scheme => "dlfcn",
1493 shared_target => "cygwin-shared",
1494 shared_cflag => "-D_WINDLL",
1495 shared_ldflag => "-shared",
1496 shared_extension => ".dll",
1498 # Backward compatibility for those using this target
1500 inherit_from => [ "Cygwin-x86" ]
1502 # In case someone constructs the Cygwin target name themself
1504 inherit_from => [ "Cygwin-x86" ]
1507 inherit_from => [ "Cygwin-x86" ]
1510 inherit_from => [ "Cygwin-x86" ]
1513 inherit_from => [ "Cygwin-x86" ]
1516 ##### MacOS X (a.k.a. Darwin) setup
1517 "darwin-common" => {
1518 inherit_from => [ "BASE_unix" ],
1521 cflags => combine(picker(default => "",
1524 threads("-D_REENTRANT")),
1526 plib_lflags => "-Wl,-search_paths_first",
1527 bn_ops => "BN_LLONG RC4_CHAR",
1528 thread_scheme => "pthreads",
1529 perlasm_scheme => "osx32",
1530 dso_scheme => "dlfcn",
1531 ranlib => "ranlib -c",
1532 shared_target => "darwin-shared",
1533 shared_cflag => "-fPIC",
1534 shared_ldflag => "-dynamiclib",
1535 shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
1537 # Option "freeze" such as -std=gnu9x can't negatively interfere
1538 # with future defaults for below two targets, because MacOS X
1539 # for PPC has no future, it was discontinued by vendor in 2009.
1540 "darwin-ppc-cc" => {
1541 inherit_from => [ "darwin-common", asm("ppc32_asm") ],
1542 cflags => add("-arch ppc -std=gnu9x -DB_ENDIAN -Wa,-force_cpusubtype_ALL"),
1543 perlasm_scheme => "osx32",
1544 shared_ldflag => "-arch ppc -dynamiclib",
1546 "darwin64-ppc-cc" => {
1547 inherit_from => [ "darwin-common", asm("ppc64_asm") ],
1548 cflags => add("-arch ppc64 -std=gnu9x -DB_ENDIAN"),
1549 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1550 perlasm_scheme => "osx64",
1551 shared_ldflag => "-arch ppc64 -dynamiclib",
1553 "darwin-i386-cc" => {
1554 inherit_from => [ "darwin-common", asm("x86_asm") ],
1555 cflags => add(picker(default => "-arch i386 -DL_ENDIAN",
1556 release => "-fomit-frame-pointer")),
1557 bn_ops => "BN_LLONG RC4_INT",
1558 perlasm_scheme => "macosx",
1559 shared_ldflag => "-arch i386 -dynamiclib",
1561 "darwin64-x86_64-cc" => {
1562 inherit_from => [ "darwin-common", asm("x86_64_asm") ],
1563 cflags => add("-arch x86_64 -DL_ENDIAN -Wall"),
1564 bn_ops => "SIXTY_FOUR_BIT_LONG",
1565 perlasm_scheme => "macosx",
1566 shared_ldflag => "-arch x86_64 -dynamiclib",
1571 # It takes three prior-set environment variables to make it work:
1573 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
1574 # CROSS_TOP=/where/SDKs/are
1575 # CROSS_SDK=iPhoneOSx.y.sdk
1577 # Exact paths vary with Xcode releases, but for couple of last ones
1578 # they would look like this:
1580 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
1581 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
1582 # CROSS_SDK=iPhoneOS.sdk
1584 "iphoneos-cross" => {
1585 inherit_from => [ "darwin-common" ],
1586 cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1590 inherit_from => [ "darwin-common", asm("armv4_asm") ],
1591 # It should be possible to go below iOS 6 and even add -arch armv6,
1592 # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
1594 cflags => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1596 perlasm_scheme => "ios32",
1599 inherit_from => [ "darwin-common", asm("aarch64_asm") ],
1600 cflags => add("-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1602 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1603 perlasm_scheme => "ios64",
1608 inherit_from => [ "BASE_unix" ],
1609 inherit_from => [ asm("x86_elf_asm") ],
1611 cflags => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
1612 threads("-pthread")),
1613 ex_libs => add("-ldl"),
1614 bn_ops => "BN_LLONG",
1615 thread_scheme => "pthreads",
1616 dso_scheme => "dlfcn",
1617 shared_target => "linux-shared",
1618 shared_cflag => "-fPIC",
1619 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1622 ##### VxWorks for various targets
1623 "vxworks-ppc60x" => {
1624 inherit_from => [ "BASE_unix" ],
1626 cflags => "-D_REENTRANT -mrtp -mhard-float -mstrict-align -fno-implicit-fp -DPPC32_fp60x -O2 -fstrength-reduce -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip",
1627 sys_id => "VXWORKS",
1628 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),
1630 "vxworks-ppcgen" => {
1631 inherit_from => [ "BASE_unix" ],
1633 cflags => "-D_REENTRANT -mrtp -msoft-float -mstrict-align -O1 -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip",
1634 sys_id => "VXWORKS",
1635 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),
1637 "vxworks-ppc405" => {
1638 inherit_from => [ "BASE_unix" ],
1640 cflags => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h",
1641 sys_id => "VXWORKS",
1644 "vxworks-ppc750" => {
1645 inherit_from => [ "BASE_unix" ],
1647 cflags => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG)",
1648 sys_id => "VXWORKS",
1651 "vxworks-ppc750-debug" => {
1652 inherit_from => [ "BASE_unix" ],
1654 cflags => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DPEDANTIC -DDEBUG -g",
1655 sys_id => "VXWORKS",
1658 "vxworks-ppc860" => {
1659 inherit_from => [ "BASE_unix" ],
1661 cflags => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h",
1662 sys_id => "VXWORKS",
1665 "vxworks-simlinux" => {
1666 inherit_from => [ "BASE_unix" ],
1668 cflags => "-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DL_ENDIAN -DCPU=SIMLINUX -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/h -I\$(WIND_BASE)/target/h/wrn/coreip -DOPENSSL_NO_HW_PADLOCK",
1669 sys_id => "VXWORKS",
1671 ranlib => "ranlibpentium",
1674 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
1676 cflags => combine("-mrtp -mips2 -O -G 0 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DCPU=MIPS32 -msoft-float -mno-branch-likely -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/h/wrn/coreip",
1677 threads("-D_REENTRANT")),
1678 sys_id => "VXWORKS",
1679 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),
1680 thread_scheme => "pthreads",
1681 perlasm_scheme => "o32",
1682 ranlib => "ranlibmips",
1687 inherit_from => [ "BASE_unix" ],
1689 cflags => combine("\$(CFLAGS)",
1690 threads("-D_REENTRANT")),
1691 plib_lflags => "\$(LDFLAGS)",
1692 ex_libs => add("\$(LDLIBS)"),
1693 bn_ops => "BN_LLONG",
1694 thread_scheme => "pthreads",
1695 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1696 shared_target => "linux-shared",
1697 shared_cflag => "-fPIC",
1698 shared_ldflag => "-shared",
1699 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1700 ranlib => "$ENV{'RANLIB'}",
1702 "uClinux-dist64" => {
1703 inherit_from => [ "BASE_unix" ],
1705 cflags => combine("\$(CFLAGS)",
1706 threads("-D_REENTRANT")),
1707 plib_lflags => "\$(LDFLAGS)",
1708 ex_libs => add("\$(LDLIBS)"),
1709 bn_ops => "SIXTY_FOUR_BIT_LONG",
1710 thread_scheme => "pthreads",
1711 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1712 shared_target => "linux-shared",
1713 shared_cflag => "-fPIC",
1714 shared_ldflag => "-shared",
1715 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1716 ranlib => "$ENV{'RANLIB'}",
1721 inherit_from => [ "BASE_VMS" ],
1724 cflags => picker(default => "/STANDARD=RELAXED/NOLIST/PREFIX=ALL",
1725 debug => "/NOOPTIMIZE/DEBUG",
1726 release => "/OPTIMIZE/NODEBUG"),
1727 lflags => picker(default => "/MAP",
1728 debug => "/DEBUG/TRACEBACK",
1729 release => "/NODEBUG/NOTRACEBACK"),
1730 lib_cflags => add("/NAMES=(AS_IS,SHORTENED)"),
1731 dso_cflags => add("/NAMES=(AS_IS,SHORTENED)"),
1732 shared_target => "vms-shared",
1733 dso_scheme => "vms",
1734 thread_scheme => "pthreads",
1736 apps_aux_src => "vms_decc_init.c",
1740 inherit_from => [ "vms-generic" ],
1741 cflags => add(sub { my @warnings =
1742 @{vms_info(0)->{disable_warns}};
1744 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1747 return vms_info(0)->{def_zlib}
1748 ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : ();
1750 ex_libs => add(sub { return vms_info(0)->{zlib} || (); }),
1751 pointer_size => sub { return vms_info(0)->{pointer_size} },
1753 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1754 #release_aflags => "/OPTIMIZE/NODEBUG",
1755 bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1757 "vms-alpha-p32" => {
1758 inherit_from => [ "vms-generic" ],
1760 add("/POINTER_SIZE=32",
1761 sub { my @warnings =
1762 @{vms_info(32)->{disable_warns}};
1764 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1768 return vms_info(32)->{def_zlib}
1769 ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : ();
1771 ex_libs => add(sub { return vms_info(32)->{zlib} || (); }),
1772 pointer_size => sub { return vms_info(32)->{pointer_size} },
1774 "vms-alpha-p64" => {
1775 inherit_from => [ "vms-generic" ],
1777 add("/POINTER_SIZE=64=ARGV",
1778 sub { my @warnings =
1779 @{vms_info(64)->{disable_warns}};
1781 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1785 return vms_info(64)->{def_zlib}
1786 ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : ();
1788 ex_libs => add(sub { return vms_info(64)->{zlib} || (); }),
1789 pointer_size => sub { return vms_info(64)->{pointer_size} },
1792 inherit_from => [ "vms-generic" ],
1793 cflags => add(sub { my @warnings =
1794 @{vms_info(0)->{disable_warns}};
1796 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1799 return vms_info(0)->{def_zlib}
1800 ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : ();
1802 ex_libs => add(sub { return vms_info(0)->{zlib} || (); }),
1803 pointer_size => sub { return vms_info(0)->{pointer_size} },
1805 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1806 #release_aflags => "/OPTIMIZE/NODEBUG",
1807 bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1810 inherit_from => [ "vms-generic" ],
1812 add("/POINTER_SIZE=32",
1813 sub { my @warnings =
1814 @{vms_info(32)->{disable_warns}};
1816 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1820 return vms_info(32)->{def_zlib}
1821 ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : ();
1823 ex_libs => add(sub { return vms_info(32)->{zlib} || (); }),
1824 pointer_size => sub { return vms_info(32)->{pointer_size} },
1827 inherit_from => [ "vms-generic" ],
1829 add("/POINTER_SIZE=64=ARGV",
1830 sub { my @warnings =
1831 @{vms_info(64)->{disable_warns}};
1833 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1837 return vms_info(64)->{def_zlib}
1838 ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : ();
1840 ex_libs => add(sub { return vms_info(64)->{zlib} || (); }),
1841 pointer_size => sub { return vms_info(64)->{pointer_size} },