2 ## Standard openssl configuration targets.
6 return sub { add($opts{default} || (),
7 $opts{$config{build_type}} || ())->(); }
12 return sub { add($disabled{threads} ? () : @flags)->(); }
17 return sub { add(@stuff)->(); }
20 # Helper functions for the Windows configs
21 my $vc_win64a_info = {};
23 unless (%$vc_win64a_info) {
24 if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) {
25 $vc_win64a_info = { as => "nasm",
26 asflags => "-f win64 -DNEAR -Ox -g",
29 $vc_win64a_info = { as => "ml64",
30 asflags => "/c /Cp /Cx /Zi",
34 return $vc_win64a_info;
37 my $vc_wince_info = {};
39 unless (%$vc_wince_info) {
41 die '%OSVERSION% is not defined' if (!defined($ENV{'OSVERSION'}));
42 die '%PLATFORM% is not defined' if (!defined($ENV{'PLATFORM'}));
43 die '%TARGETCPU% is not defined' if (!defined($ENV{'TARGETCPU'}));
46 # Idea behind this is to mimic flags set by eVC++ IDE...
48 my $wcevers = $ENV{'OSVERSION'}; # WCENNN
49 die '%OSVERSION% value is insane'
50 if ($wcevers !~ /^WCE([1-9])([0-9]{2})$/);
51 my $wcecdefs = "-D_WIN32_WCE=$1$2 -DUNDER_CE=$1$2"; # -D_WIN32_WCE=NNN
52 my $wcelflag = "/subsystem:windowsce,$1.$2"; # ...,N.NN
54 my $wceplatf = $ENV{'PLATFORM'};
56 $wceplatf =~ tr/a-z0-9 /A-Z0-9_/;
57 $wcecdefs .= " -DWCE_PLATFORM_$wceplatf";
59 my $wcetgt = $ENV{'TARGETCPU'}; # just shorter name...
60 SWITCH: for($wcetgt) {
61 /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_";
62 $wcelflag.=" /machine:X86"; last; };
63 /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
64 $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/);
65 $wcecdefs.=" -QRarch4T -QRinterwork-return";
66 $wcelflag.=" /machine:THUMB"; last; };
67 /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
68 $wcelflag.=" /machine:ARM"; last; };
69 /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
70 $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32";
71 $wcelflag.=" /machine:MIPSFPU"; last; };
72 /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
73 $wcecdefs.=" -DMIPSII -QMmips16";
74 $wcelflag.=" /machine:MIPS16"; last; };
75 /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
76 $wcecdefs.=" -QMmips2";
77 $wcelflag.=" /machine:MIPS"; last; };
78 /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000";
79 $wcelflag.=" /machine:MIPS"; last; };
80 /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx";
81 $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/);
82 $wcelflag.=" /machine:$wcetgt"; last; };
83 { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_";
84 $wcelflag.=" /machine:$wcetgt"; last; };
87 $vc_wince_info = { cflags => $wcecdefs,
88 lflags => $wcelflag };
90 return $vc_wince_info;
96 #### Basic configs that should work on any 32-bit box
99 cflags => picker(debug => "-O0 -g",
101 thread_scheme => "(unknown)",
102 bn_ops => "BN_LLONG",
107 thread_scheme => "(unknown)",
110 #### VOS Configurations
112 inherit_from => [ "BASE_unix" ],
114 cflags => picker(default => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
115 debug => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG",
117 thread_scheme => "(unknown)",
119 lflags => "-Wl,-map",
120 bn_ops => "BN_LLONG",
121 shared_extension => ".so",
124 #### Solaris configurations
125 "solaris-common" => {
126 inherit_from => [ "BASE_unix" ],
128 cflags => "-DFILIO_H",
129 ex_libs => add("-lresolv -lsocket -lnsl -ldl"),
130 dso_scheme => "dlfcn",
131 thread_scheme => "pthreads",
132 shared_target => "solaris-shared",
133 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
135 #### Solaris x86 with GNU C setups
136 "solaris-x86-gcc" => {
137 # -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have
138 # to do it here because whenever GNU C instantiates an assembler
139 # template it surrounds it with #APP #NO_APP comment pair which
140 # (at least Solaris 7_x86) /usr/ccs/bin/as fails to assemble
141 # with "Illegal mnemonic" error message.
142 inherit_from => [ "solaris-common", asm("x86_elf_asm") ],
144 cflags => add_before(picker(default => "-Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM",
146 release => "-O3 -fomit-frame-pointer"),
147 threads("-pthread")),
148 bn_ops => "BN_LLONG",
149 shared_cflag => "-fPIC",
150 shared_ldflag => "-shared",
152 "solaris64-x86_64-gcc" => {
153 # -shared -static-libgcc might appear controversial, but modules
154 # taken from static libgcc do not have relocations and linking
155 # them into our shared objects doesn't have any negative side
156 # effects. On the contrary, doing so makes it possible to use
157 # gcc shared build with Sun C. Given that gcc generates faster
158 # code [thanks to inline assembler], I would actually recommend
159 # to consider using gcc shared build even with vendor compiler:-)
160 # <appro@fy.chalmers.se>
161 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
163 cflags => add_before(picker(default => "-m64 -Wall -DL_ENDIAN",
166 threads("-pthread")),
167 bn_ops => "SIXTY_FOUR_BIT_LONG",
168 perlasm_scheme => "elf",
169 shared_cflag => "-fPIC",
170 shared_ldflag => "-m64 -shared -static-libgcc",
174 #### Solaris x86 with Sun C setups
175 "solaris-x86-cc" => {
176 inherit_from => [ "solaris-common" ],
178 cflags => add_before(picker(default => "-xarch=generic -xstrconst -Xa -DL_ENDIAN",
180 release => "-xO5 -xregs=frameptr -xdepend -xbuiltin"),
181 threads("-D_REENTRANT")),
182 lflags => add(threads("-mt")),
183 ex_libs => add(threads("-lpthread")),
184 bn_ops => "BN_LLONG RC4_CHAR",
185 shared_cflag => "-KPIC",
186 shared_ldflag => "-G -dy -z text",
188 "solaris64-x86_64-cc" => {
189 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
191 cflags => add_before(picker(default => "-xarch=generic64 -xstrconst -Xa -DL_ENDIAN",
193 release => "-xO5 -xdepend -xbuiltin"),
194 threads("-D_REENTRANT")),
195 thread_scheme => "pthreads",
196 lflags => add(threads("-mt")),
197 ex_libs => add(threads("-lpthread")),
198 bn_ops => "SIXTY_FOUR_BIT_LONG",
199 perlasm_scheme => "elf",
200 shared_cflag => "-KPIC",
201 shared_ldflag => "-xarch=generic64 -G -dy -z text",
205 #### SPARC Solaris with GNU C setups
206 "solaris-sparcv7-gcc" => {
207 inherit_from => [ "solaris-common" ],
209 cflags => add_before(picker(default => "-Wall -DB_ENDIAN -DBN_DIV2W",
212 threads("-pthread")),
213 bn_ops => "BN_LLONG RC4_CHAR",
214 shared_cflag => "-fPIC",
215 shared_ldflag => "-shared",
217 "solaris-sparcv8-gcc" => {
218 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
219 cflags => add_before("-mcpu=v8"),
221 "solaris-sparcv9-gcc" => {
222 # -m32 should be safe to add as long as driver recognizes
224 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
225 cflags => add_before(picker(default => "-m32 -mcpu=ultrasparc",
226 debug => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -O -g -pedantic -ansi -Wshadow -Wno-long-long -D__EXTENSIONS__")),
228 "solaris64-sparcv9-gcc" => {
229 inherit_from => [ "solaris-sparcv9-gcc" ],
230 cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
231 bn_ops => "BN_LLONG RC4_CHAR",
232 shared_ldflag => "-m64 -shared",
236 #### SPARC Solaris with Sun C setups
237 # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
238 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
239 # SC5.0 note: Compiler common patch 107357-01 or later is required!
240 "solaris-sparcv7-cc" => {
241 inherit_from => [ "solaris-common" ],
243 cflags => add_before(picker(default => "-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W",
244 debug => "-g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG",
245 release => "-xO5 -xdepend"),
246 threads("-D_REENTRANT")),
247 lflags => add(threads("-mt")),
248 ex_libs => add(threads("-lpthread")),
249 bn_ops => "BN_LLONG RC4_CHAR",
250 shared_cflag => "-KPIC",
251 shared_ldflag => "-G -dy -z text",
254 "solaris-sparcv8-cc" => {
255 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
256 cflags => add_before("-xarch=v8"),
258 "solaris-sparcv9-cc" => {
259 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
260 cflags => add_before("-xarch=v8plus -xtarget=ultra"),
262 "solaris64-sparcv9-cc" => {
263 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
264 cflags => add_before("-xarch=v9 -xtarget=ultra"),
265 bn_ops => "BN_LLONG RC4_CHAR",
266 shared_ldflag => "-xarch=v9 -G -dy -z text",
270 #### IRIX 5.x configs
271 # -mips2 flag is added by ./config when appropriate.
273 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
275 cflags => picker(default => "-DB_ENDIAN",
278 bn_ops => "BN_LLONG RC4_CHAR",
279 thread_scheme => "(unknown)",
280 perlasm_scheme => "o32",
281 dso_scheme => "dlfcn",
282 shared_target => "irix-shared",
283 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
286 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
288 cflags => picker(default => "-use_readonly_const -DB_ENDIAN",
291 bn_ops => "BN_LLONG RC4_CHAR",
292 thread_scheme => "(unknown)",
293 perlasm_scheme => "o32",
294 dso_scheme => "dlfcn",
295 shared_target => "irix-shared",
296 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
298 #### IRIX 6.x configs
299 # Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
300 # './Configure irix-cc -o32' manually.
301 "irix-mips3-gcc" => {
302 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
304 cflags => combine(picker(default => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W",
307 threads("-D_SGI_MP_SOURCE -pthread")),
308 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
309 thread_scheme => "pthreads",
310 perlasm_scheme => "n32",
311 dso_scheme => "dlfcn",
312 shared_target => "irix-shared",
313 shared_ldflag => "-mabi=n32",
314 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
318 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
320 cflags => combine(picker(default => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
323 threads("-D_SGI_MP_SOURCE")),
324 ex_libs => add(threads("-lpthread")),
325 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
326 thread_scheme => "pthreads",
327 perlasm_scheme => "n32",
328 dso_scheme => "dlfcn",
329 shared_target => "irix-shared",
330 shared_ldflag => "-n32",
331 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
335 "irix64-mips4-gcc" => {
336 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
338 cflags => combine(picker(default => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W",
341 threads("-D_SGI_MP_SOURCE")),
342 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
343 thread_scheme => "pthreads",
344 perlasm_scheme => "64",
345 dso_scheme => "dlfcn",
346 shared_target => "irix-shared",
347 shared_ldflag => "-mabi=64",
348 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
351 "irix64-mips4-cc" => {
352 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
354 cflags => combine(picker(default => "-64 -mips4 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
357 threads("-D_SGI_MP_SOURCE")),
358 ex_libs => add(threads("-lpthread")),
359 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
360 thread_scheme => "pthreads",
361 perlasm_scheme => "64",
362 dso_scheme => "dlfcn",
363 shared_target => "irix-shared",
364 shared_ldflag => "-64",
365 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
369 #### Unified HP-UX ANSI C configs.
371 # - Originally we were optimizing at +O4 level. It should be noted
372 # that the only difference between +O3 and +O4 is global inter-
373 # procedural analysis. As it has to be performed during the link
374 # stage the compiler leaves behind certain pseudo-code in lib*.a
375 # which might be release or even patch level specific. Generating
376 # the machine code for and analyzing the *whole* program appears
377 # to be *extremely* memory demanding while the performance gain is
378 # actually questionable. The situation is intensified by the default
379 # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
380 # which is way too low for +O4. In other words, doesn't +O3 make
382 # - Keep in mind that the HP compiler by default generates code
383 # suitable for execution on the host you're currently compiling at.
384 # If the toolkit is meant to be used on various PA-RISC processors
385 # consider './Configure hpux-parisc-[g]cc +DAportable'.
386 # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
387 # 32-bit message digests. (For the moment of this writing) HP C
388 # doesn't seem to "digest" too many local variables (they make "him"
389 # chew forever:-). For more details look-up MD32_XARRAY comment in
390 # crypto/sha/sha_lcl.h.
391 # - originally there were 32-bit hpux-parisc2-* targets. They were
392 # scrapped, because a) they were not interchangeable with other 32-bit
393 # targets; a) when critical 32-bit assembly modules detect if they
394 # are executed on PA-RISC 2.0 and thus adequate performance is
396 # <appro@fy.chalmers.se>
397 "hpux-parisc-gcc" => {
398 inherit_from => [ "BASE_unix" ],
400 cflags => combine(picker(default => "-DB_ENDIAN -DBN_DIV2W",
403 threads("-pthread")),
404 ex_libs => add("-Wl,+s -ldld"),
405 bn_ops => "BN_LLONG",
406 thread_scheme => "pthreads",
408 shared_target => "hpux-shared",
409 shared_cflag => "-fPIC",
410 shared_ldflag => "-shared",
411 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
413 "hpux-parisc1_1-gcc" => {
414 inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ],
415 multilib => "/pa1.1",
417 "hpux64-parisc2-gcc" => {
418 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
420 cflags => combine(picker(default => "-DB_ENDIAN",
423 threads("-D_REENTRANT")),
424 ex_libs => add("-ldl"),
425 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
426 thread_scheme => "pthreads",
427 dso_scheme => "dlfcn",
428 shared_target => "hpux-shared",
429 shared_cflag => "-fpic",
430 shared_ldflag => "-shared",
431 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
432 multilib => "/pa20_64",
435 # More attempts at unified 10.X and 11.X targets for HP C compiler.
437 # Chris Ruemmler <ruemmler@cup.hp.com>
438 # Kevin Steves <ks@hp.se>
439 "hpux-parisc-cc" => {
440 inherit_from => [ "BASE_unix" ],
442 cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
443 debug => "+O0 +d -g",
445 threads("-D_REENTRANT")),
446 ex_libs => add("-Wl,+s -ldld",threads("-lpthread")),
447 bn_ops => "RC4_CHAR",
448 thread_scheme => "pthreads",
450 shared_target => "hpux-shared",
451 shared_cflag => "+Z",
452 shared_ldflag => "-b",
453 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
455 "hpux-parisc1_1-cc" => {
456 inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ],
457 cflags => add_before("+DA1.1"),
458 multilib => "/pa1.1",
460 "hpux64-parisc2-cc" => {
461 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
463 cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY",
464 debug => "+O0 +d -g",
466 threads("-D_REENTRANT")),
467 ex_libs => add("-ldl",threads("-lpthread")),
468 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
469 thread_scheme => "pthreads",
470 dso_scheme => "dlfcn",
471 shared_target => "hpux-shared",
472 shared_cflag => "+Z",
473 shared_ldflag => "+DD64 -b",
474 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
475 multilib => "/pa20_64",
478 # HP/UX IA-64 targets
480 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
482 cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z -DB_ENDIAN",
483 debug => "+O0 +d -g",
485 threads("-D_REENTRANT")),
486 ex_libs => add("-ldl",threads("-lpthread")),
487 bn_ops => "SIXTY_FOUR_BIT",
488 thread_scheme => "pthreads",
489 dso_scheme => "dlfcn",
490 shared_target => "hpux-shared",
491 shared_cflag => "+Z",
492 shared_ldflag => "+DD32 -b",
493 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
494 multilib => "/hpux32",
496 # Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted
497 # with debugging of the following config.
498 "hpux64-ia64-cc" => {
499 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
501 cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z -DB_ENDIAN",
502 debug => "+O0 +d -g",
504 threads("-D_REENTRANT")),
505 ex_libs => add("-ldl", threads("-lpthread")),
506 bn_ops => "SIXTY_FOUR_BIT_LONG",
507 thread_scheme => "pthreads",
508 dso_scheme => "dlfcn",
509 shared_target => "hpux-shared",
510 shared_cflag => "+Z",
511 shared_ldflag => "+DD64 -b",
512 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
513 multilib => "/hpux64",
517 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
519 cflags => combine(picker(default => "-DB_ENDIAN",
522 threads("-pthread")),
523 ex_libs => add("-ldl"),
524 bn_ops => "SIXTY_FOUR_BIT",
525 thread_scheme => "pthreads",
526 dso_scheme => "dlfcn",
527 shared_target => "hpux-shared",
528 shared_cflag => "-fpic",
529 shared_ldflag => "-shared",
530 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
531 multilib => "/hpux32",
533 "hpux64-ia64-gcc" => {
534 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
536 cflags => combine(picker(default => "-mlp64 -DB_ENDIAN",
539 threads("-pthread")),
540 ex_libs => add("-ldl"),
541 bn_ops => "SIXTY_FOUR_BIT_LONG",
542 thread_scheme => "pthreads",
543 dso_scheme => "dlfcn",
544 shared_target => "hpux-shared",
545 shared_cflag => "-fpic",
546 shared_ldflag => "-mlp64 -shared",
547 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
548 multilib => "/hpux64",
551 #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
553 inherit_from => [ "BASE_unix" ],
555 cflags => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB",
557 ex_libs => add("-L/SYSLOG/PUB -lsyslog -lsocket -lcurses"),
558 thread_scheme => "(unknown)",
559 bn_ops => "BN_LLONG",
562 #### DEC Alpha OSF/1/Tru64 targets.
563 "osf1-alpha-gcc" => {
564 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
567 bn_ops => "SIXTY_FOUR_BIT_LONG",
568 thread_scheme => "(unknown)",
569 dso_scheme => "dlfcn",
570 shared_target => "alpha-osf1-shared",
571 shared_extension => ".so",
574 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
576 cflags => "-std1 -tune host -O4 -readonly_strings",
577 bn_ops => "SIXTY_FOUR_BIT_LONG",
578 thread_scheme => "(unknown)",
579 dso_scheme => "dlfcn",
580 shared_target => "alpha-osf1-shared",
581 shared_extension => ".so",
583 "tru64-alpha-cc" => {
584 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
586 cflags => combine("-std1 -tune host -fast -readonly_strings",
587 threads("-pthread")),
588 bn_ops => "SIXTY_FOUR_BIT_LONG",
589 thread_scheme => "pthreads",
590 dso_scheme => "dlfcn",
591 shared_target => "alpha-osf1-shared",
592 shared_ldflag => "-msym",
593 shared_extension => ".so",
597 #### Variety of LINUX:-)
599 # *-generic* is endian-neutral target, but ./config is free to
600 # throw in -D[BL]_ENDIAN, whichever appropriate...
601 "linux-generic32" => {
602 inherit_from => [ "BASE_unix" ],
604 cflags => combine(picker(default => "-Wall",
605 debug => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG",
607 threads("-pthread")),
608 ex_libs => add("-ldl"),
609 bn_ops => "BN_LLONG RC4_CHAR",
610 thread_scheme => "pthreads",
611 dso_scheme => "dlfcn",
612 shared_target => "linux-shared",
613 shared_cflag => "-fPIC",
614 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
616 "linux-generic64" => {
617 inherit_from => [ "linux-generic32" ],
618 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
622 inherit_from => [ "linux-generic32", asm("ppc32_asm") ],
623 perlasm_scheme => "linux32",
626 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
627 cflags => add("-m64 -DB_ENDIAN"),
628 perlasm_scheme => "linux64",
629 shared_ldflag => "-m64",
633 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
634 cflags => add("-m64 -DL_ENDIAN"),
635 perlasm_scheme => "linux64le",
636 shared_ldflag => "-m64",
640 ################################################################
641 # Note that -march is not among compiler options in linux-armv4
642 # target description. Not specifying one is intentional to give
645 # a) rely on your compiler default by not specifying one;
646 # b) specify your target platform explicitly for optimal
647 # performance, e.g. -march=armv6 or -march=armv7-a;
648 # c) build "universal" binary that targets *range* of platforms
649 # by specifying minimum and maximum supported architecture;
651 # As for c) option. It actually makes no sense to specify
652 # maximum to be less than ARMv7, because it's the least
653 # requirement for run-time switch between platform-specific
654 # code paths. And without run-time switch performance would be
655 # equivalent to one for minimum. Secondly, there are some
656 # natural limitations that you'd have to accept and respect.
657 # Most notably you can *not* build "universal" binary for
658 # big-endian platform. This is because ARMv7 processor always
659 # picks instructions in little-endian order. Another similar
660 # limitation is that -mthumb can't "cross" -march=armv6t2
661 # boundary, because that's where it became Thumb-2. Well, this
662 # limitation is a bit artificial, because it's not really
663 # impossible, but it's deemed too tricky to support. And of
664 # course you have to be sure that your binutils are actually
665 # up to the task of handling maximum target platform. With all
666 # this in mind here is an example of how to configure
669 # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
671 inherit_from => [ "linux-generic32", asm("armv4_asm") ],
672 perlasm_scheme => "linux32",
675 inherit_from => [ "linux-generic64", asm("aarch64_asm") ],
676 perlasm_scheme => "linux64",
678 "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32
679 inherit_from => [ "linux-generic32", asm("aarch64_asm") ],
680 cflags => add("-mabi=ilp32"),
681 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
682 perlasm_scheme => "linux64",
683 shared_ldflag => "-mabi=ilp32",
687 # Configure script adds minimally required -march for assembly
688 # support, if no -march was specified at command line.
689 inherit_from => [ "linux-generic32", asm("mips32_asm") ],
690 cflags => add("-mabi=32 -DBN_DIV3W"),
691 perlasm_scheme => "o32",
692 shared_ldflag => "-mabi=32",
694 # mips32 and mips64 below refer to contemporary MIPS Architecture
695 # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
697 inherit_from => [ "linux-generic32", asm("mips64_asm") ],
698 cflags => add("-mabi=n32 -DBN_DIV3W"),
699 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
700 perlasm_scheme => "n32",
701 shared_ldflag => "-mabi=n32",
704 "linux64-mips64" => {
705 inherit_from => [ "linux-generic64", asm("mips64_asm") ],
706 cflags => add("-mabi=64 -DBN_DIV3W"),
707 perlasm_scheme => "64",
708 shared_ldflag => "-mabi=64",
712 #### IA-32 targets...
714 inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
715 cflags => add(picker(default => "-DL_ENDIAN",
716 release => "-fomit-frame-pointer")),
717 ex_libs => add(picker(debug => "-lefence")),
718 bn_ops => "BN_LLONG",
721 inherit_from => [ "BASE_unix", asm("x86_asm") ],
723 cflags => add(picker(default => "-DL_ENDIAN -Wall",
725 release => "-O3 -fomit-frame-pointer")),
726 bn_ops => "BN_LLONG",
727 thread_scheme => "(unknown)",
728 perlasm_scheme => "a.out",
732 inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
733 cflags => add("-m64 -DL_ENDIAN"),
734 bn_ops => "SIXTY_FOUR_BIT_LONG",
735 perlasm_scheme => "elf",
736 shared_ldflag => "-m64",
739 "linux-x86_64-clang" => {
740 inherit_from => [ "linux-x86_64" ],
742 cflags => add("-Wextra -Qunused-arguments"),
745 inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
746 cflags => add("-mx32 -DL_ENDIAN"),
747 bn_ops => "SIXTY_FOUR_BIT",
748 perlasm_scheme => "elf32",
749 shared_ldflag => "-mx32",
754 inherit_from => [ "linux-generic64", asm("ia64_asm") ],
755 bn_ops => "SIXTY_FOUR_BIT_LONG",
759 inherit_from => [ "linux-generic64", asm("s390x_asm") ],
760 cflags => add("-m64 -DB_ENDIAN"),
761 perlasm_scheme => "64",
762 shared_ldflag => "-m64",
766 #### So called "highgprs" target for z/Architecture CPUs
767 # "Highgprs" is kernel feature first implemented in Linux
768 # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
769 # significant bits of general purpose registers not only
770 # upon 32-bit process context switch, but even on
771 # asynchronous signal delivery to such process. This makes
772 # it possible to deploy 64-bit instructions even in legacy
773 # application context and achieve better [or should we say
774 # adequate] performance. The build is binary compatible with
775 # linux-generic32, and the idea is to be able to install the
776 # resulting libcrypto.so alongside generic one, e.g. as
777 # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
778 # linker to autodiscover. Unfortunately it doesn't work just
779 # yet, because of couple of bugs in glibc
780 # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
782 inherit_from => [ "linux-generic32", asm("s390x_asm") ],
783 cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"),
784 bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; },
785 perlasm_scheme => "31",
786 shared_ldflag => "-m31",
787 multilib => "/highgprs",
790 #### SPARC Linux setups
791 # Ray Miller <ray.miller@computing-services.oxford.ac.uk> has
792 # patiently assisted with debugging of following two configs.
794 inherit_from => [ "linux-generic32", asm("sparcv8_asm") ],
795 cflags => add("-mcpu=v8 -DB_ENDIAN -DBN_DIV2W"),
798 # it's a real mess with -mcpu=ultrasparc option under Linux,
799 # but -Wa,-Av8plus should do the trick no matter what.
800 inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
801 cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W"),
802 shared_ldflag => "-m32",
804 "linux64-sparcv9" => {
805 # GCC 3.1 is a requirement
806 inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
807 cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"),
808 bn_ops => "BN_LLONG RC4_CHAR",
809 shared_ldflag => "-m64",
813 "linux-alpha-gcc" => {
814 inherit_from => [ "linux-generic64", asm("alpha_asm") ],
815 cflags => add("-DL_ENDIAN"),
816 bn_ops => "SIXTY_FOUR_BIT_LONG",
818 "linux-c64xplus" => {
819 inherit_from => [ "BASE_unix" ],
820 # TI_CGT_C6000_7.3.x is a requirement
822 cflags => combine("--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT",
823 threads("-D_REENTRANT")),
824 bn_ops => "BN_LLONG",
825 cpuid_asm_src => "c64xpluscpuid.s",
826 bn_asm_src => "asm/bn-c64xplus.asm c64xplus-gf2m.s",
827 aes_asm_src => "aes-c64xplus.s aes_cbc.c aes-ctr.fake",
828 sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s",
829 rc4_asm_src => "rc4-c64xplus.s",
830 modes_asm_src => "ghash-c64xplus.s",
831 chacha_asm_src => "chacha-c64xplus.s",
832 poly1305_asm_src => "poly1305-c64xplus.s",
833 thread_scheme => "pthreads",
834 perlasm_scheme => "void",
835 dso_scheme => "dlfcn",
836 shared_target => "linux-shared",
837 shared_cflag => "--pic",
838 shared_ldflag => "-z --sysv --shared",
839 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
843 #### Android: linux-* but without pointers to headers and libs.
845 # It takes pair of prior-set environment variables to make it work:
847 # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<
848 # CROSS_COMPILE=<prefix>
850 # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
851 # For example to compile for ICS and ARM with NDK 10d, you'd:
853 # ANDROID_NDK=/some/where/android-ndk-10d
854 # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
855 # CROSS_COMPILE=arm-linux-adroideabi-
856 # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/
859 inherit_from => [ "linux-generic32" ],
860 # Special note about unconditional -fPIC and -pie. The underlying
861 # reason is that Lollipop refuses to run non-PIE. But what about
862 # older systems and NDKs? -fPIC was never problem, so the only
863 # concern if -pie. Older toolchains, e.g. r4, appear to handle it
864 # and binaries turn mostly functional. "Mostly" means that oldest
865 # Androids, such as Froyo, fail to handle executable, but newer
866 # systems are perfectly capable of executing binaries targeting
867 # Froyo. Keep in mind that in the nutshell Android builds are
868 # about JNI, i.e. shared libraries, not applications.
869 cflags => picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
876 inherit_from => [ "android", asm("x86_asm") ],
877 cflags => add(picker(release => "-fomit-frame-pointer")),
878 bn_ops => "BN_LLONG",
879 perlasm_scheme => "android",
881 ################################################################
882 # Contemporary Android applications can provide multiple JNI
883 # providers in .apk, targeting multiple architectures. Among
884 # them there is "place" for two ARM flavours: generic eabi and
885 # armv7-a/hard-float. However, it should be noted that OpenSSL's
886 # ability to engage NEON is not constrained by ABI choice, nor
887 # is your ability to call OpenSSL from your application code
888 # compiled with floating-point ABI other than default 'soft'.
889 # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
890 # This means that choice of ARM libraries you provide in .apk
891 # is driven by application needs. For example if application
892 # itself benefits from NEON or is floating-point intensive, then
893 # it might be appropriate to provide both libraries. Otherwise
894 # just generic eabi would do. But in latter case it would be
897 # ./Configure android-armeabi -D__ARM_MAX_ARCH__=8
899 # in order to build "universal" binary and allow OpenSSL take
900 # advantage of NEON when it's available.
902 "android-armeabi" => {
903 inherit_from => [ "android", asm("armv4_asm") ],
906 inherit_from => [ "android", asm("mips32_asm") ],
907 perlasm_scheme => "o32",
911 inherit_from => [ "linux-generic64" ],
912 cflags => picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
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",
1241 lib_cflags => sub { join(" ",
1242 ($disabled{shared} ? "/Zl" : ()),
1244 dso_cflags => "/Zi",
1245 bin_cflags => "/Zi /Fdapp",
1246 lflags => add("/debug"),
1247 shared_cflag => "-D_WINDLL",
1248 shared_ldflag => "/dll",
1249 shared_target => "win-shared", # meaningless except it gives Configure a hint
1250 thread_scheme => "winthreads",
1251 dso_scheme => "win32",
1253 "VC-noCE-common" => {
1254 inherit_from => [ "VC-common", "uplink_common" ],
1255 cflags => add(picker(default => "-DUNICODE -D_UNICODE",
1258 ($disabled{shared} ? "/MT" : "/MD")
1259 ."d /Od -DDEBUG -D_DEBUG";
1263 ($disabled{shared} ? "/MT" : "/MD")
1266 bin_lflags => add("/subsystem:console /opt:ref"),
1269 push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
1270 push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
1271 return join(" ", @ex_libs);
1274 "VC-WIN64-common" => {
1275 inherit_from => [ "VC-noCE-common" ],
1278 push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
1279 return join(" ", @_, @ex_libs);
1281 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1282 build_scheme => add("VC-W64", { separator => undef }),
1285 inherit_from => [ "VC-WIN64-common", asm("ia64_asm") ],
1287 asflags => "-d debug",
1291 perlasm_scheme => "ias",
1294 inherit_from => [ "VC-WIN64-common", asm("x86_64_asm") ],
1295 as => sub { vc_win64a_info()->{as} },
1296 asflags => sub { vc_win64a_info()->{asflags} },
1297 asoutflag => sub { vc_win64a_info()->{asoutflag} },
1299 bn_asm_src => sub { return undef unless @_;
1300 my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
1301 perlasm_scheme => "auto",
1304 # x86 Win32 target defaults to ANSI API, if you want UNICODE,
1305 # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
1306 inherit_from => [ "VC-noCE-common", asm("x86_asm") ],
1307 as => sub { my $ver=`nasm -v 2>NUL`;
1308 my $vew=`nasmw -v 2>NUL`;
1309 return $ver ge $vew ? "nasm" : "nasmw" },
1310 asflags => "-f win32",
1314 # WIN32 UNICODE build gets linked with unicows.lib for
1315 # backward compatibility with Win9x.
1316 push @ex_libs, 'unicows.lib'
1317 if (grep { $_ eq "UNICODE" } @user_defines);
1318 return join(" ", @ex_libs, @_);
1321 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1322 perlasm_scheme => "win32n",
1323 build_scheme => add("VC-W32", { separator => undef }),
1326 inherit_from => [ "VC-common" ],
1328 asflags => "/nologo /Cp /coff /c /Cx /Zi",
1333 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',
1334 sub { vc_wince_info()->{cflags}; },
1335 sub { defined($ENV{'WCECOMPAT'})
1336 ? '-I$(WCECOMPAT)/include' : (); },
1337 sub { defined($ENV{'PORTSDK_LIBPATH'})
1338 ? '-I$(PORTSDK_LIBPATH)/../../include' : (); },
1339 sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14
1340 ? ($disabled{shared} ? " /MT" : " /MD")
1342 debug => "/Od -DDEBUG -D_DEBUG",
1344 lflags => combine("/nologo /opt:ref",
1345 sub { vc_wince_info()->{lflags}; },
1346 sub { defined($ENV{PORTSDK_LIBPATH})
1347 ? "/entry:mainCRTstartup" : (); }),
1349 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1352 push @ex_libs, 'ws2.lib' unless $disabled{sock};
1353 push @ex_libs, 'crypt32.lib';
1354 if (defined($ENV{WCECOMPAT})) {
1355 my $x = '$(WCECOMPAT)/lib';
1356 if (-f "$x/$ENV{TARGETCPU}/wcecompatex.lib") {
1357 $x .= '/$(TARGETCPU)/wcecompatex.lib';
1359 $x .= '/wcecompatex.lib';
1363 push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
1364 if (defined($ENV{'PORTSDK_LIBPATH'}));
1365 push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
1366 if ($ENV{'TARGETCPU'} eq "X86");
1369 build_scheme => add("VC-WCE", { separator => undef }),
1374 inherit_from => [ "BASE_unix", asm("x86_asm"),
1375 sub { $disabled{shared} ? () : "x86_uplink" } ],
1377 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
1379 release => "-O3 -fomit-frame-pointer"),
1381 sys_id => "MINGW32",
1382 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1383 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1384 thread_scheme => "winthreads",
1385 perlasm_scheme => "coff",
1386 dso_scheme => "win32",
1387 shared_target => "mingw-shared",
1388 shared_cflag => add("-D_WINDLL"),
1389 shared_ldflag => "-static-libgcc",
1390 shared_rcflag => "--target=pe-i386",
1391 shared_extension => ".dll",
1395 # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1396 # .dll compiled with one compiler with application compiled with
1397 # another compiler. It's possible to engage Applink support in
1398 # mingw64 build, but it's not done, because till mingw64
1399 # supports structured exception handling, one can't seriously
1400 # consider its binaries for using with non-mingw64 run-time
1401 # environment. And as mingw64 is always consistent with itself,
1402 # Applink is never engaged and can as well be omitted.
1403 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1405 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall",
1409 sys_id => "MINGW64",
1410 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1411 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1412 thread_scheme => "winthreads",
1413 perlasm_scheme => "mingw64",
1414 dso_scheme => "win32",
1415 shared_target => "mingw-shared",
1416 shared_cflag => add("-D_WINDLL"),
1417 shared_ldflag => "-static-libgcc",
1418 shared_rcflag => "--target=pe-x86-64",
1419 shared_extension => ".dll",
1425 inherit_from => [ "BASE_unix" ],
1427 cflags => "-DL_ENDIAN -O",
1433 inherit_from => [ "BASE_unix" ],
1435 cflags => "-DTERMIOS -DL_ENDIAN -O -Wall",
1437 bn_ops => "BN_LLONG",
1438 dso_scheme => "win32",
1443 inherit_from => [ "BASE_unix", asm("x86_asm") ],
1445 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1447 release => "-O3 -fomit-frame-pointer"),
1449 bn_ops => "BN_LLONG",
1450 thread_scheme => "pthread",
1451 perlasm_scheme => "coff",
1452 dso_scheme => "dlfcn",
1453 shared_target => "cygwin-shared",
1454 shared_cflag => "-D_WINDLL",
1455 shared_ldflag => "-shared",
1456 shared_extension => ".dll",
1458 "Cygwin-x86_64" => {
1459 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1461 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1465 bn_ops => "SIXTY_FOUR_BIT_LONG",
1466 thread_scheme => "pthread",
1467 perlasm_scheme => "mingw64",
1468 dso_scheme => "dlfcn",
1469 shared_target => "cygwin-shared",
1470 shared_cflag => "-D_WINDLL",
1471 shared_ldflag => "-shared",
1472 shared_extension => ".dll",
1474 # Backward compatibility for those using this target
1476 inherit_from => [ "Cygwin-x86" ]
1478 # In case someone constructs the Cygwin target name themself
1480 inherit_from => [ "Cygwin-x86" ]
1483 inherit_from => [ "Cygwin-x86" ]
1486 inherit_from => [ "Cygwin-x86" ]
1489 inherit_from => [ "Cygwin-x86" ]
1492 #### NetWare from David Ward (dsward@novell.com)
1493 # requires either MetroWerks NLM development tools, or gcc / nlmconv
1494 # NetWare defaults socket bio to WinSock sockets. However,
1495 # the builds can be configured to use BSD sockets instead.
1496 # netware-clib => legacy CLib c-runtime support
1498 inherit_from => [ "BASE_Windows" ],
1500 build_scheme => add("netware", { separator => undef }),
1502 "netware-clib-bsdsock" => {
1503 inherit_from => [ "BASE_Windows" ],
1505 build_scheme => add("netware", { separator => undef }),
1507 "netware-clib-gcc" => {
1508 inherit_from => [ "BASE_unix" ],
1509 cc => "i586-netware-gcc",
1510 cflags => "-nostdinc -I/ndk/nwsdk/include/nlm -I/ndk/ws295sdk/include -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYS_NETWARE -O2 -Wall",
1512 "netware-clib-bsdsock-gcc" => {
1513 inherit_from => [ "BASE_unix" ],
1514 cc => "i586-netware-gcc",
1515 cflags => "-nostdinc -I/ndk/nwsdk/include/nlm -DNETWARE_BSDSOCK -DNETDB_USE_INTERNET -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYS_NETWARE -O2 -Wall",
1517 # netware-libc => LibC/NKS support
1519 inherit_from => [ "BASE_Windows" ],
1521 bn_ops => "BN_LLONG",
1522 build_scheme => add("netware", { separator => undef }),
1524 "netware-libc-bsdsock" => {
1525 inherit_from => [ "BASE_Windows" ],
1527 bn_ops => "BN_LLONG",
1528 build_scheme => add("netware", { separator => undef }),
1530 "netware-libc-gcc" => {
1531 inherit_from => [ "BASE_unix" ],
1532 cc => "i586-netware-gcc",
1533 cflags => "-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYS_NETWARE -DTERMIO -O2 -Wall",
1534 bn_ops => "BN_LLONG",
1536 "netware-libc-bsdsock-gcc" => {
1537 inherit_from => [ "BASE_unix" ],
1538 cc => "i586-netware-gcc",
1539 cflags => "-nostdinc -I/ndk/libc/include -DNETWARE_BSDSOCK -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYS_NETWARE -DTERMIO -O2 -Wall",
1540 bn_ops => "BN_LLONG",
1545 inherit_from => [ asm("x86_asm") ],
1547 cflags => "-I/dev/env/WATT_ROOT/inc -DTERMIO -DL_ENDIAN -fomit-frame-pointer -O2 -Wall",
1549 ex_libs => add("-L/dev/env/WATT_ROOT/lib -lwatt"),
1550 bn_ops => "BN_LLONG",
1551 perlasm_scheme => "a.out",
1554 #### Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
1556 inherit_from => [ "BASE_unix" ],
1558 cflags => "-std1 -O -Olimit 2500 -DL_ENDIAN",
1559 thread_scheme => "(unknown)",
1562 inherit_from => [ "BASE_unix" ],
1564 cflags => "-O3 -DL_ENDIAN",
1565 bn_ops => "BN_LLONG",
1566 thread_scheme => "(unknown)",
1568 # K&R C is no longer supported; you need gcc on old Ultrix installations
1569 ##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
1571 ##### MacOS X (a.k.a. Darwin) setup
1572 "darwin-common" => {
1573 inherit_from => [ "BASE_unix" ],
1576 cflags => combine(picker(default => "",
1579 threads("-D_REENTRANT")),
1581 plib_lflags => "-Wl,-search_paths_first",
1582 bn_ops => "BN_LLONG RC4_CHAR",
1583 thread_scheme => "pthreads",
1584 perlasm_scheme => "osx32",
1585 dso_scheme => "dlfcn",
1586 ranlib => "ranlib -c",
1587 shared_target => "darwin-shared",
1588 shared_cflag => "-fPIC",
1589 shared_ldflag => "-dynamiclib",
1590 shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
1592 "darwin-ppc-cc" => {
1593 inherit_from => [ "darwin-common", asm("ppc32_asm") ],
1594 cflags => add("-arch ppc -DB_ENDIAN -Wa,-force_cpusubtype_ALL"),
1595 perlasm_scheme => "osx32",
1596 shared_ldflag => "-arch ppc -dynamiclib",
1598 "darwin64-ppc-cc" => {
1599 inherit_from => [ "darwin-common", asm("ppc64_asm") ],
1600 cflags => add("-arch ppc64 -DB_ENDIAN"),
1601 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1602 perlasm_scheme => "osx64",
1603 shared_ldflag => "-arch ppc64 -dynamiclib",
1605 "darwin-i386-cc" => {
1606 inherit_from => [ "darwin-common", asm("x86_asm") ],
1607 cflags => add(picker(default => "-arch i386 -DL_ENDIAN",
1608 release => "-fomit-frame-pointer")),
1609 bn_ops => "BN_LLONG RC4_INT",
1610 perlasm_scheme => "macosx",
1611 shared_ldflag => "-arch i386 -dynamiclib",
1613 "darwin64-x86_64-cc" => {
1614 inherit_from => [ "darwin-common", asm("x86_64_asm") ],
1615 cflags => add("-arch x86_64 -DL_ENDIAN -Wall"),
1616 bn_ops => "SIXTY_FOUR_BIT_LONG",
1617 perlasm_scheme => "macosx",
1618 shared_ldflag => "-arch x86_64 -dynamiclib",
1623 # It takes three prior-set environment variables to make it work:
1625 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
1626 # CROSS_TOP=/where/SDKs/are
1627 # CROSS_SDK=iPhoneOSx.y.sdk
1629 # Exact paths vary with Xcode releases, but for couple of last ones
1630 # they would look like this:
1632 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
1633 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
1634 # CROSS_SDK=iPhoneOS.sdk
1636 "iphoneos-cross" => {
1637 inherit_from => [ "darwin-common" ],
1638 cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1642 inherit_from => [ "darwin-common", asm("armv4_asm") ],
1643 # It should be possible to go below iOS 6 and even add -arch armv6,
1644 # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
1646 cflags => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1648 perlasm_scheme => "ios32",
1651 inherit_from => [ "darwin-common", asm("aarch64_asm") ],
1652 cflags => add("-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1654 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1655 perlasm_scheme => "ios64",
1660 inherit_from => [ "BASE_unix" ],
1661 inherit_from => [ asm("x86_elf_asm") ],
1663 cflags => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
1664 threads("-pthread")),
1665 ex_libs => add("-ldl"),
1666 bn_ops => "BN_LLONG",
1667 thread_scheme => "pthreads",
1668 dso_scheme => "dlfcn",
1669 shared_target => "linux-shared",
1670 shared_cflag => "-fPIC",
1675 inherit_from => [ "BASE_unix" ],
1679 ##### VxWorks for various targets
1680 "vxworks-ppc60x" => {
1681 inherit_from => [ "BASE_unix" ],
1683 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",
1684 sys_id => "VXWORKS",
1685 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),
1687 "vxworks-ppcgen" => {
1688 inherit_from => [ "BASE_unix" ],
1690 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",
1691 sys_id => "VXWORKS",
1692 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),
1694 "vxworks-ppc405" => {
1695 inherit_from => [ "BASE_unix" ],
1697 cflags => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h",
1698 sys_id => "VXWORKS",
1701 "vxworks-ppc750" => {
1702 inherit_from => [ "BASE_unix" ],
1704 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)",
1705 sys_id => "VXWORKS",
1708 "vxworks-ppc750-debug" => {
1709 inherit_from => [ "BASE_unix" ],
1711 cflags => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g",
1712 sys_id => "VXWORKS",
1715 "vxworks-ppc860" => {
1716 inherit_from => [ "BASE_unix" ],
1718 cflags => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h",
1719 sys_id => "VXWORKS",
1722 "vxworks-simlinux" => {
1723 inherit_from => [ "BASE_unix" ],
1725 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",
1726 sys_id => "VXWORKS",
1728 ranlib => "ranlibpentium",
1731 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
1733 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",
1734 threads("-D_REENTRANT")),
1735 sys_id => "VXWORKS",
1736 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),
1737 thread_scheme => "pthreads",
1738 perlasm_scheme => "o32",
1739 ranlib => "ranlibmips",
1744 inherit_from => [ "BASE_unix" ],
1746 cflags => combine("\$(CFLAGS)",
1747 threads("-D_REENTRANT")),
1748 plib_lflags => "\$(LDFLAGS)",
1749 ex_libs => add("\$(LDLIBS)"),
1750 bn_ops => "BN_LLONG",
1751 thread_scheme => "pthreads",
1752 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1753 shared_target => "linux-shared",
1754 shared_cflag => "-fPIC",
1755 shared_ldflag => "-shared",
1756 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1757 ranlib => "$ENV{'RANLIB'}",
1759 "uClinux-dist64" => {
1760 inherit_from => [ "BASE_unix" ],
1762 cflags => combine("\$(CFLAGS)",
1763 threads("-D_REENTRANT")),
1764 plib_lflags => "\$(LDFLAGS)",
1765 ex_libs => add("\$(LDLIBS)"),
1766 bn_ops => "SIXTY_FOUR_BIT_LONG",
1767 thread_scheme => "pthreads",
1768 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1769 shared_target => "linux-shared",
1770 shared_cflag => "-fPIC",
1771 shared_ldflag => "-shared",
1772 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1773 ranlib => "$ENV{'RANLIB'}",
1778 inherit_from => [ "BASE_VMS" ],
1781 cflags => picker(default => "/STANDARD=RELAXED/NOLIST/PREFIX=ALL/NAMES=(AS_IS,SHORTENED)",
1782 debug => "/NOOPTIMIZE/DEBUG",
1783 release => "/OPTIMIZE/NODEBUG"),
1784 lflags => picker(default => "/MAP",
1785 debug => "/DEBUG/TRACEBACK",
1786 release => "/NODEBUG/NOTRACEBACK"),
1787 shared_target => "vms-shared",
1788 thread_scheme => "pthreads",
1790 apps_aux_src => "vms_decc_init.c",
1793 # VMS on VAX is *unsupported*
1796 # bn_obj => "[.asm]vms.obj vms-helper.obj"
1799 # inherit_from => [ "vms-generic", asm("vms-asm") ],
1801 # debug_aflags => "/NOOPTIMIZE/DEBUG",
1802 # release_aflags => "/OPTIMIZE/NODEBUG",
1803 # bn_opts => "THIRTY_TWO_BIT RC4_CHAR RC4_CHUNK DES_PTR BF_PTR",
1806 inherit_from => [ "vms-generic" ],
1808 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1809 #release_aflags => "/OPTIMIZE/NODEBUG",
1810 bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1812 "vms-alpha-P32" => {
1813 inherit_from => [ "vms-alpha" ],
1814 cflags => add("/POINTER_SIZE=32"),
1815 ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
1817 "vms-alpha-P64" => {
1818 inherit_from => [ "vms-alpha" ],
1819 cflags => add("/POINTER_SIZE=64"),
1820 ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
1823 inherit_from => [ "vms-generic" ],
1825 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1826 #release_aflags => "/OPTIMIZE/NODEBUG",
1827 bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1830 inherit_from => [ "vms-ia64" ],
1831 cflags => add("/POINTER_SIZE=32"),
1832 ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
1835 inherit_from => [ "vms-ia64" ],
1836 cflags => add("/POINTER_SIZE=64"),
1837 ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },