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");
18 $vc_win64a_info = { as => "{unknown}",
23 return $vc_win64a_info;
26 my $vc_win32_info = {};
28 unless (%$vc_win32_info) {
29 my $ver=`nasm -v 2>NUL`;
30 my $vew=`nasmw -v 2>NUL`;
31 if ($ver ne "" || $vew ne "") {
32 $vc_win32_info = { as => $ver ge $vew ? "nasm" : "nasmw",
33 asflags => "-f win32",
35 perlasm_scheme => "win32n" };
36 } elsif ($disabled{asm}) {
37 $vc_win32_info = { as => "ml",
38 asflags => "/nologo /Cp /coff /c /Cx /Zi",
40 perlasm_scheme => "win32" };
42 $die->("NASM not found - please read INSTALL and NOTES.WIN for further details\n");
43 $vc_win32_info = { as => "{unknown}",
46 perlasm_scheme => "win32" };
49 return $vc_win32_info;
52 my $vc_wince_info = {};
54 unless (%$vc_wince_info) {
56 $die->('%OSVERSION% is not defined') if (!defined($ENV{'OSVERSION'}));
57 $die->('%PLATFORM% is not defined') if (!defined($ENV{'PLATFORM'}));
58 $die->('%TARGETCPU% is not defined') if (!defined($ENV{'TARGETCPU'}));
61 # Idea behind this is to mimic flags set by eVC++ IDE...
63 my $wcevers = $ENV{'OSVERSION'}; # WCENNN
66 if ($wcevers =~ /^WCE([1-9])([0-9]{2})$/) {
68 $wceverdotnum = "$1.$2";
70 $die->('%OSVERSION% value is insane');
71 $wcevernum = "{unknown}";
72 $wceverdotnum = "{unknown}";
74 my $wcecdefs = "-D_WIN32_WCE=$wcevernum -DUNDER_CE=$wcevernum"; # -D_WIN32_WCE=NNN
75 my $wcelflag = "/subsystem:windowsce,$wceverdotnum"; # ...,N.NN
77 my $wceplatf = $ENV{'PLATFORM'};
79 $wceplatf =~ tr/a-z0-9 /A-Z0-9_/;
80 $wcecdefs .= " -DWCE_PLATFORM_$wceplatf";
82 my $wcetgt = $ENV{'TARGETCPU'}; # just shorter name...
83 SWITCH: for($wcetgt) {
84 /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_";
85 $wcelflag.=" /machine:X86"; last; };
86 /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
87 $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/);
88 $wcecdefs.=" -QRarch4T -QRinterwork-return";
89 $wcelflag.=" /machine:THUMB"; last; };
90 /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
91 $wcelflag.=" /machine:ARM"; last; };
92 /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
93 $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32";
94 $wcelflag.=" /machine:MIPSFPU"; last; };
95 /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
96 $wcecdefs.=" -DMIPSII -QMmips16";
97 $wcelflag.=" /machine:MIPS16"; last; };
98 /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
99 $wcecdefs.=" -QMmips2";
100 $wcelflag.=" /machine:MIPS"; last; };
101 /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000";
102 $wcelflag.=" /machine:MIPS"; last; };
103 /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx";
104 $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/);
105 $wcelflag.=" /machine:$wcetgt"; last; };
106 { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_";
107 $wcelflag.=" /machine:$wcetgt"; last; };
110 $vc_wince_info = { cflags => $wcecdefs,
111 lflags => $wcelflag };
113 return $vc_wince_info;
116 # Helper functions for the VMS configs
119 unless (%$vms_info) {
120 my $pointer_size = shift;
121 my $pointer_size_str = $pointer_size == 0 ? "" : "$pointer_size";
123 $vms_info->{disable_warns} = [ ];
124 $vms_info->{pointer_size} = $pointer_size_str;
125 if ($pointer_size == 64) {
126 `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;
128 push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3";
132 unless ($disabled{zlib}) {
133 my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str;
134 if (defined($disabled{"zlib-dynamic"})) {
135 $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE";
137 $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib;
138 # In case the --with-zlib-lib value contains something like
139 # /SHARE or /LIB or so at the end, remove it.
140 $vms_info->{def_zlib} =~ s|/.*$||g;
149 #### Basic configs that should work on any 32-bit box
152 cflags => picker(debug => "-O0 -g",
154 thread_scheme => "(unknown)",
155 bn_ops => "BN_LLONG",
160 thread_scheme => "(unknown)",
163 #### VOS Configurations
165 inherit_from => [ "BASE_unix" ],
167 cflags => picker(default => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
170 thread_scheme => "(unknown)",
172 lflags => "-Wl,-map",
173 bn_ops => "BN_LLONG",
174 shared_extension => ".so",
177 #### Solaris configurations
178 "solaris-common" => {
179 inherit_from => [ "BASE_unix" ],
181 cflags => "-DFILIO_H",
182 ex_libs => add("-lresolv -lsocket -lnsl -ldl"),
183 dso_scheme => "dlfcn",
184 thread_scheme => "pthreads",
185 shared_target => "solaris-shared",
186 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
188 #### Solaris x86 with GNU C setups
189 "solaris-x86-gcc" => {
190 # NB. GNU C has to be configured to use GNU assembler, and not
191 # /usr/ccs/bin/as. Failure to comply will result in compile
192 # failures [at least] in 32-bit build.
193 inherit_from => [ "solaris-common", asm("x86_elf_asm") ],
195 cflags => add_before(picker(default => "-Wall -DL_ENDIAN",
197 release => "-O3 -fomit-frame-pointer"),
198 threads("-pthread")),
199 bn_ops => "BN_LLONG",
200 shared_cflag => "-fPIC",
201 shared_ldflag => "-shared -static-libgcc",
203 "solaris64-x86_64-gcc" => {
204 # -shared -static-libgcc might appear controversial, but modules
205 # taken from static libgcc do not have relocations and linking
206 # them into our shared objects doesn't have any negative side
207 # effects. On the contrary, doing so makes it possible to use
208 # gcc shared build with Sun C. Given that gcc generates faster
209 # code [thanks to inline assembler], I would actually recommend
210 # to consider using gcc shared build even with vendor compiler:-)
211 # <appro@fy.chalmers.se>
212 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
214 cflags => add_before(picker(default => "-m64 -Wall -DL_ENDIAN",
217 threads("-pthread")),
218 bn_ops => "SIXTY_FOUR_BIT_LONG",
219 perlasm_scheme => "elf",
220 shared_cflag => "-fPIC",
221 shared_ldflag => "-m64 -shared -static-libgcc",
225 #### Solaris x86 with Sun C setups
226 # There used to be solaris-x86-cc target, but it was removed,
227 # primarily because vendor assembler can't assemble our modules
228 # with -KPIC flag. As result it, assembly support, was not even
229 # available as option. But its lack means lack of side-channel
230 # resistant code, which is incompatible with security by todays
231 # standards. Fortunately gcc is readily available prepackaged
232 # option, which we can firmly point at...
234 # On related note, solaris64-x86_64-cc target won't compile code
235 # paths utilizing AVX and post-Haswell instruction extensions.
236 # Consider switching to solaris64-x86_64-gcc even here...
238 "solaris64-x86_64-cc" => {
239 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
241 cflags => add_before(picker(default => "-xarch=generic64 -xstrconst -Xa -DL_ENDIAN",
243 release => "-xO5 -xdepend -xbuiltin"),
244 threads("-D_REENTRANT")),
245 thread_scheme => "pthreads",
246 lflags => add("-xarch=generic64",threads("-mt")),
247 ex_libs => add(threads("-lpthread")),
248 bn_ops => "SIXTY_FOUR_BIT_LONG",
249 perlasm_scheme => "elf",
250 shared_cflag => "-KPIC",
251 shared_ldflag => "-xarch=generic64 -G -dy -z text",
255 #### SPARC Solaris with GNU C setups
256 "solaris-sparcv7-gcc" => {
257 inherit_from => [ "solaris-common" ],
259 cflags => add_before(picker(default => "-Wall -DB_ENDIAN -DBN_DIV2W",
262 threads("-pthread")),
263 bn_ops => "BN_LLONG RC4_CHAR",
264 shared_cflag => "-fPIC",
265 shared_ldflag => "-shared",
267 "solaris-sparcv8-gcc" => {
268 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
269 cflags => add_before("-mcpu=v8"),
271 "solaris-sparcv9-gcc" => {
272 # -m32 should be safe to add as long as driver recognizes
274 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
275 cflags => add_before("-m32 -mcpu=ultrasparc"),
277 "solaris64-sparcv9-gcc" => {
278 inherit_from => [ "solaris-sparcv9-gcc" ],
279 cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
280 bn_ops => "BN_LLONG RC4_CHAR",
281 shared_ldflag => "-m64 -shared",
285 #### SPARC Solaris with Sun C setups
286 # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
287 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
288 # SC5.0 note: Compiler common patch 107357-01 or later is required!
289 "solaris-sparcv7-cc" => {
290 inherit_from => [ "solaris-common" ],
292 cflags => add_before(picker(default => "-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W",
294 release => "-xO5 -xdepend"),
295 threads("-D_REENTRANT")),
296 lflags => add(threads("-mt")),
297 ex_libs => add(threads("-lpthread")),
298 bn_ops => "BN_LLONG RC4_CHAR",
299 shared_cflag => "-KPIC",
300 shared_ldflag => "-G -dy -z text",
303 "solaris-sparcv8-cc" => {
304 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
305 cflags => add_before("-xarch=v8"),
307 "solaris-sparcv9-cc" => {
308 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
309 cflags => add_before("-xarch=v8plus"),
311 "solaris64-sparcv9-cc" => {
312 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
313 cflags => add_before("-xarch=v9"),
314 lflags => add_before("-xarch=v9"),
315 bn_ops => "BN_LLONG RC4_CHAR",
316 shared_ldflag => "-xarch=v9 -G -dy -z text",
320 #### IRIX 6.x configs
321 # Only N32 and N64 ABIs are supported.
322 "irix-mips3-gcc" => {
323 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
325 cflags => combine(picker(default => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W",
328 threads("-D_SGI_MP_SOURCE")),
329 ex_libs => add(threads("-lpthread")),
330 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
331 thread_scheme => "pthreads",
332 perlasm_scheme => "n32",
333 dso_scheme => "dlfcn",
334 shared_target => "irix-shared",
335 shared_ldflag => "-mabi=n32",
336 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
340 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
342 cflags => combine(picker(default => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
345 threads("-D_SGI_MP_SOURCE")),
346 ex_libs => add(threads("-lpthread")),
347 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
348 thread_scheme => "pthreads",
349 perlasm_scheme => "n32",
350 dso_scheme => "dlfcn",
351 shared_target => "irix-shared",
352 shared_ldflag => "-n32",
353 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
357 "irix64-mips4-gcc" => {
358 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
360 cflags => combine(picker(default => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W",
363 threads("-D_SGI_MP_SOURCE")),
364 ex_libs => add(threads("-lpthread")),
365 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
366 thread_scheme => "pthreads",
367 perlasm_scheme => "64",
368 dso_scheme => "dlfcn",
369 shared_target => "irix-shared",
370 shared_ldflag => "-mabi=64",
371 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
374 "irix64-mips4-cc" => {
375 inherit_from => [ "BASE_unix", asm("mips64_asm") ],
377 cflags => combine(picker(default => "-64 -mips4 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
380 threads("-D_SGI_MP_SOURCE")),
381 ex_libs => add(threads("-lpthread")),
382 bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
383 thread_scheme => "pthreads",
384 perlasm_scheme => "64",
385 dso_scheme => "dlfcn",
386 shared_target => "irix-shared",
387 shared_ldflag => "-64",
388 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
392 #### Unified HP-UX ANSI C configs.
394 # - Originally we were optimizing at +O4 level. It should be noted
395 # that the only difference between +O3 and +O4 is global inter-
396 # procedural analysis. As it has to be performed during the link
397 # stage the compiler leaves behind certain pseudo-code in lib*.a
398 # which might be release or even patch level specific. Generating
399 # the machine code for and analyzing the *whole* program appears
400 # to be *extremely* memory demanding while the performance gain is
401 # actually questionable. The situation is intensified by the default
402 # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
403 # which is way too low for +O4. In other words, doesn't +O3 make
405 # - Keep in mind that the HP compiler by default generates code
406 # suitable for execution on the host you're currently compiling at.
407 # If the toolkit is meant to be used on various PA-RISC processors
408 # consider './Configure hpux-parisc-[g]cc +DAportable'.
409 # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
410 # 32-bit message digests. (For the moment of this writing) HP C
411 # doesn't seem to "digest" too many local variables (they make "him"
412 # chew forever:-). For more details look-up MD32_XARRAY comment in
413 # crypto/sha/sha_lcl.h.
414 # - originally there were 32-bit hpux-parisc2-* targets. They were
415 # scrapped, because a) they were not interchangeable with other 32-bit
416 # targets; b) performance-critical 32-bit assembly modules implement
417 # even PA-RISC 2.0-specific code paths, which are chosen at run-time,
418 # thus adequate performance is provided even with PA-RISC 1.1 build.
419 # <appro@fy.chalmers.se>
420 "hpux-parisc-gcc" => {
421 inherit_from => [ "BASE_unix" ],
423 cflags => combine(picker(default => "-DB_ENDIAN -DBN_DIV2W",
426 threads("-pthread")),
427 ex_libs => add("-Wl,+s -ldld"),
428 bn_ops => "BN_LLONG",
429 thread_scheme => "pthreads",
431 shared_target => "hpux-shared",
432 shared_cflag => "-fPIC",
433 shared_ldflag => "-shared",
434 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
436 "hpux-parisc1_1-gcc" => {
437 inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ],
438 multilib => "/pa1.1",
440 "hpux64-parisc2-gcc" => {
441 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
443 cflags => combine(picker(default => "-DB_ENDIAN",
446 threads("-D_REENTRANT")),
447 ex_libs => add("-ldl"),
448 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
449 thread_scheme => "pthreads",
450 dso_scheme => "dlfcn",
451 shared_target => "hpux-shared",
452 shared_cflag => "-fpic",
453 shared_ldflag => "-shared",
454 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
455 multilib => "/pa20_64",
458 # More attempts at unified 10.X and 11.X targets for HP C compiler.
460 # Chris Ruemmler <ruemmler@cup.hp.com>
461 # Kevin Steves <ks@hp.se>
462 "hpux-parisc-cc" => {
463 inherit_from => [ "BASE_unix" ],
465 cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
466 debug => "+O0 +d -g",
468 threads("-D_REENTRANT")),
469 ex_libs => add("-Wl,+s -ldld",threads("-lpthread")),
470 bn_ops => "RC4_CHAR",
471 thread_scheme => "pthreads",
473 shared_target => "hpux-shared",
474 shared_cflag => "+Z",
475 shared_ldflag => "-b",
476 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
478 "hpux-parisc1_1-cc" => {
479 inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ],
480 cflags => add_before("+DA1.1"),
481 multilib => "/pa1.1",
483 "hpux64-parisc2-cc" => {
484 inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
486 cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY",
487 debug => "+O0 +d -g",
489 threads("-D_REENTRANT")),
490 ex_libs => add("-ldl",threads("-lpthread")),
491 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
492 thread_scheme => "pthreads",
493 dso_scheme => "dlfcn",
494 shared_target => "hpux-shared",
495 shared_cflag => "+Z",
496 shared_ldflag => "+DD64 -b",
497 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
498 multilib => "/pa20_64",
501 # HP/UX IA-64 targets
503 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
505 cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z -DB_ENDIAN",
506 debug => "+O0 +d -g",
508 threads("-D_REENTRANT")),
509 ex_libs => add("-ldl",threads("-lpthread")),
510 bn_ops => "SIXTY_FOUR_BIT",
511 thread_scheme => "pthreads",
512 dso_scheme => "dlfcn",
513 shared_target => "hpux-shared",
514 shared_cflag => "+Z",
515 shared_ldflag => "+DD32 -b",
516 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
517 multilib => "/hpux32",
519 # Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted
520 # with debugging of the following config.
521 "hpux64-ia64-cc" => {
522 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
524 cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z -DB_ENDIAN",
525 debug => "+O0 +d -g",
527 threads("-D_REENTRANT")),
528 ex_libs => add("-ldl", threads("-lpthread")),
529 bn_ops => "SIXTY_FOUR_BIT_LONG",
530 thread_scheme => "pthreads",
531 dso_scheme => "dlfcn",
532 shared_target => "hpux-shared",
533 shared_cflag => "+Z",
534 shared_ldflag => "+DD64 -b",
535 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
536 multilib => "/hpux64",
540 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
542 cflags => combine(picker(default => "-DB_ENDIAN",
545 threads("-pthread")),
546 ex_libs => add("-ldl"),
547 bn_ops => "SIXTY_FOUR_BIT",
548 thread_scheme => "pthreads",
549 dso_scheme => "dlfcn",
550 shared_target => "hpux-shared",
551 shared_cflag => "-fpic",
552 shared_ldflag => "-shared",
553 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
554 multilib => "/hpux32",
556 "hpux64-ia64-gcc" => {
557 inherit_from => [ "BASE_unix", asm("ia64_asm") ],
559 cflags => combine(picker(default => "-mlp64 -DB_ENDIAN",
562 threads("-pthread")),
563 ex_libs => add("-ldl"),
564 bn_ops => "SIXTY_FOUR_BIT_LONG",
565 thread_scheme => "pthreads",
566 dso_scheme => "dlfcn",
567 shared_target => "hpux-shared",
568 shared_cflag => "-fpic",
569 shared_ldflag => "-mlp64 -shared",
570 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
571 multilib => "/hpux64",
574 #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
576 inherit_from => [ "BASE_unix" ],
578 cflags => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB",
580 ex_libs => add("-L/SYSLOG/PUB -lsyslog -lsocket -lcurses"),
581 thread_scheme => "(unknown)",
582 bn_ops => "BN_LLONG",
585 #### DEC Alpha Tru64 targets. Tru64 is marketing name for OSF/1 version 4
586 #### and forward. In reality 'uname -s' still returns "OSF1". Originally
587 #### there were even osf1-* configs targeting prior versions provided,
588 #### but not anymore...
589 "tru64-alpha-gcc" => {
590 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
592 cflags => combine("-std=c9x -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -O3",
593 threads("-pthread")),
594 ex_libs => "-lrt", # for mlock(2)
595 bn_ops => "SIXTY_FOUR_BIT_LONG",
596 thread_scheme => "pthreads",
597 dso_scheme => "dlfcn",
598 shared_target => "alpha-osf1-shared",
599 shared_extension => ".so",
601 "tru64-alpha-cc" => {
602 inherit_from => [ "BASE_unix", asm("alpha_asm") ],
604 cflags => combine("-std1 -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -tune host -fast -readonly_strings",
605 threads("-pthread")),
606 ex_libs => "-lrt", # for mlock(2)
607 bn_ops => "SIXTY_FOUR_BIT_LONG",
608 thread_scheme => "pthreads",
609 dso_scheme => "dlfcn",
610 shared_target => "alpha-osf1-shared",
611 shared_ldflag => "-msym",
612 shared_extension => ".so",
616 #### Variety of LINUX:-)
618 # *-generic* is endian-neutral target, but ./config is free to
619 # throw in -D[BL]_ENDIAN, whichever appropriate...
620 "linux-generic32" => {
621 inherit_from => [ "BASE_unix" ],
624 cflags => combine(picker(default => "-Wall",
627 threads("-pthread")),
628 ex_libs => add("-ldl"),
629 bn_ops => "BN_LLONG RC4_CHAR",
630 thread_scheme => "pthreads",
631 dso_scheme => "dlfcn",
632 shared_target => "linux-shared",
633 shared_cflag => "-fPIC -DOPENSSL_USE_NODELETE",
634 shared_ldflag => "-Wl,-znodelete",
635 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
637 "linux-generic64" => {
638 inherit_from => [ "linux-generic32" ],
639 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
643 inherit_from => [ "linux-generic32", asm("ppc32_asm") ],
644 perlasm_scheme => "linux32",
647 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
648 cflags => add("-m64 -DB_ENDIAN"),
649 perlasm_scheme => "linux64",
650 shared_ldflag => add("-m64"),
654 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
655 cflags => add("-m64 -DL_ENDIAN"),
656 perlasm_scheme => "linux64le",
657 shared_ldflag => add("-m64"),
661 ################################################################
662 # Note that -march is not among compiler options in linux-armv4
663 # target description. Not specifying one is intentional to give
666 # a) rely on your compiler default by not specifying one;
667 # b) specify your target platform explicitly for optimal
668 # performance, e.g. -march=armv6 or -march=armv7-a;
669 # c) build "universal" binary that targets *range* of platforms
670 # by specifying minimum and maximum supported architecture;
672 # As for c) option. It actually makes no sense to specify
673 # maximum to be less than ARMv7, because it's the least
674 # requirement for run-time switch between platform-specific
675 # code paths. And without run-time switch performance would be
676 # equivalent to one for minimum. Secondly, there are some
677 # natural limitations that you'd have to accept and respect.
678 # Most notably you can *not* build "universal" binary for
679 # big-endian platform. This is because ARMv7 processor always
680 # picks instructions in little-endian order. Another similar
681 # limitation is that -mthumb can't "cross" -march=armv6t2
682 # boundary, because that's where it became Thumb-2. Well, this
683 # limitation is a bit artificial, because it's not really
684 # impossible, but it's deemed too tricky to support. And of
685 # course you have to be sure that your binutils are actually
686 # up to the task of handling maximum target platform. With all
687 # this in mind here is an example of how to configure
690 # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
692 inherit_from => [ "linux-generic32", asm("armv4_asm") ],
693 perlasm_scheme => "linux32",
696 inherit_from => [ "linux-generic64", asm("aarch64_asm") ],
697 perlasm_scheme => "linux64",
699 "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32
700 inherit_from => [ "linux-generic32", asm("aarch64_asm") ],
701 cflags => add("-mabi=ilp32"),
702 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
703 perlasm_scheme => "linux64",
704 shared_ldflag => add("-mabi=ilp32"),
708 # Configure script adds minimally required -march for assembly
709 # support, if no -march was specified at command line.
710 inherit_from => [ "linux-generic32", asm("mips32_asm") ],
711 cflags => add("-mabi=32 -DBN_DIV3W"),
712 perlasm_scheme => "o32",
713 shared_ldflag => add("-mabi=32"),
715 # mips32 and mips64 below refer to contemporary MIPS Architecture
716 # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
718 inherit_from => [ "linux-generic32", asm("mips64_asm") ],
719 cflags => add("-mabi=n32 -DBN_DIV3W"),
720 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
721 perlasm_scheme => "n32",
722 shared_ldflag => add("-mabi=n32"),
725 "linux64-mips64" => {
726 inherit_from => [ "linux-generic64", asm("mips64_asm") ],
727 cflags => add("-mabi=64 -DBN_DIV3W"),
728 perlasm_scheme => "64",
729 shared_ldflag => add("-mabi=64"),
733 #### IA-32 targets...
734 #### These two targets are a bit aged and are to be used on older Linux
735 #### machines where gcc doesn't understand -m32 and -m64
737 inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
738 cflags => add(picker(default => "-DL_ENDIAN",
739 release => "-fomit-frame-pointer")),
740 bn_ops => "BN_LLONG",
743 inherit_from => [ "BASE_unix", asm("x86_asm") ],
745 cflags => add(picker(default => "-DL_ENDIAN -Wall",
747 release => "-O3 -fomit-frame-pointer")),
748 bn_ops => "BN_LLONG",
749 thread_scheme => "(unknown)",
750 perlasm_scheme => "a.out",
753 #### X86 / X86_64 targets
755 inherit_from => [ "linux-generic32", asm("x86_asm") ],
756 cflags => add(picker(default => "-m32 -DL_ENDIAN",
757 release => "-fomit-frame-pointer")),
758 bn_ops => "BN_LLONG",
759 perlasm_scheme => "elf",
760 shared_ldflag => add("-m32"),
762 "linux-x86-clang" => {
763 inherit_from => [ "linux-x86" ],
766 cflags => add("-Wextra -Qunused-arguments"),
769 inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
770 cflags => add("-m64 -DL_ENDIAN"),
771 bn_ops => "SIXTY_FOUR_BIT_LONG",
772 perlasm_scheme => "elf",
773 shared_ldflag => add("-m64"),
776 "linux-x86_64-clang" => {
777 inherit_from => [ "linux-x86_64" ],
780 cflags => add("-Wextra -Qunused-arguments"),
783 inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
784 cflags => add("-mx32 -DL_ENDIAN"),
785 bn_ops => "SIXTY_FOUR_BIT",
786 perlasm_scheme => "elf32",
787 shared_ldflag => add("-mx32"),
792 inherit_from => [ "linux-generic64", asm("ia64_asm") ],
793 bn_ops => "SIXTY_FOUR_BIT_LONG",
797 inherit_from => [ "linux-generic64", asm("s390x_asm") ],
798 cflags => add("-m64 -DB_ENDIAN"),
799 perlasm_scheme => "64",
800 shared_ldflag => add("-m64"),
804 #### So called "highgprs" target for z/Architecture CPUs
805 # "Highgprs" is kernel feature first implemented in Linux
806 # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
807 # significant bits of general purpose registers not only
808 # upon 32-bit process context switch, but even on
809 # asynchronous signal delivery to such process. This makes
810 # it possible to deploy 64-bit instructions even in legacy
811 # application context and achieve better [or should we say
812 # adequate] performance. The build is binary compatible with
813 # linux-generic32, and the idea is to be able to install the
814 # resulting libcrypto.so alongside generic one, e.g. as
815 # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
816 # linker to autodiscover. Unfortunately it doesn't work just
817 # yet, because of couple of bugs in glibc
818 # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
820 inherit_from => [ "linux-generic32", asm("s390x_asm") ],
821 cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"),
822 bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; },
823 perlasm_scheme => "31",
824 shared_ldflag => add("-m31"),
825 multilib => "/highgprs",
828 #### SPARC Linux setups
829 # Ray Miller <ray.miller@computing-services.oxford.ac.uk> has
830 # patiently assisted with debugging of following two configs.
832 inherit_from => [ "linux-generic32", asm("sparcv8_asm") ],
833 cflags => add("-mcpu=v8 -DB_ENDIAN -DBN_DIV2W"),
836 # it's a real mess with -mcpu=ultrasparc option under Linux,
837 # but -Wa,-Av8plus should do the trick no matter what.
838 inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
839 cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W"),
840 shared_ldflag => add("-m32"),
842 "linux64-sparcv9" => {
843 # GCC 3.1 is a requirement
844 inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
845 cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"),
846 bn_ops => "BN_LLONG RC4_CHAR",
847 shared_ldflag => add("-m64"),
851 "linux-alpha-gcc" => {
852 inherit_from => [ "linux-generic64", asm("alpha_asm") ],
853 cflags => add("-DL_ENDIAN"),
854 bn_ops => "SIXTY_FOUR_BIT_LONG",
856 "linux-c64xplus" => {
857 inherit_from => [ "BASE_unix" ],
858 # TI_CGT_C6000_7.3.x is a requirement
860 cflags => combine("--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT",
861 threads("-D_REENTRANT")),
862 bn_ops => "BN_LLONG",
863 cpuid_asm_src => "c64xpluscpuid.s",
864 bn_asm_src => "asm/bn-c64xplus.asm c64xplus-gf2m.s",
865 aes_asm_src => "aes-c64xplus.s aes_cbc.c aes-ctr.fake",
866 sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s",
867 rc4_asm_src => "rc4-c64xplus.s",
868 modes_asm_src => "ghash-c64xplus.s",
869 chacha_asm_src => "chacha-c64xplus.s",
870 poly1305_asm_src => "poly1305-c64xplus.s",
871 thread_scheme => "pthreads",
872 perlasm_scheme => "void",
873 dso_scheme => "dlfcn",
874 shared_target => "linux-shared",
875 shared_cflag => "--pic",
876 shared_ldflag => add("-z --sysv --shared"),
877 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
881 #### Android: linux-* but without pointers to headers and libs.
883 # It takes pair of prior-set environment variables to make it work:
885 # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<arch>
886 # CROSS_COMPILE=<prefix>
888 # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
889 # For example to compile for ICS and ARM with NDK 10d, you'd:
891 # ANDROID_NDK=/some/where/android-ndk-10d
892 # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
893 # CROSS_COMPILE=arm-linux-adroideabi-
894 # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/bin
897 inherit_from => [ "linux-generic32" ],
898 # Special note about unconditional -fPIC and -pie. The underlying
899 # reason is that Lollipop refuses to run non-PIE. But what about
900 # older systems and NDKs? -fPIC was never problem, so the only
901 # concern is -pie. Older toolchains, e.g. r4, appear to handle it
902 # and binaries turn mostly functional. "Mostly" means that oldest
903 # Androids, such as Froyo, fail to handle executable, but newer
904 # systems are perfectly capable of executing binaries targeting
905 # Froyo. Keep in mind that in the nutshell Android builds are
906 # about JNI, i.e. shared libraries, not applications.
907 cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")),
908 bin_cflags => "-pie",
911 inherit_from => [ "android", asm("x86_asm") ],
912 cflags => add(picker(release => "-fomit-frame-pointer")),
913 bn_ops => "BN_LLONG",
914 perlasm_scheme => "android",
916 ################################################################
917 # Contemporary Android applications can provide multiple JNI
918 # providers in .apk, targeting multiple architectures. Among
919 # them there is "place" for two ARM flavours: generic eabi and
920 # armv7-a/hard-float. However, it should be noted that OpenSSL's
921 # ability to engage NEON is not constrained by ABI choice, nor
922 # is your ability to call OpenSSL from your application code
923 # compiled with floating-point ABI other than default 'soft'.
924 # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
925 # This means that choice of ARM libraries you provide in .apk
926 # is driven by application needs. For example if application
927 # itself benefits from NEON or is floating-point intensive, then
928 # it might be appropriate to provide both libraries. Otherwise
929 # just generic eabi would do. But in latter case it would be
932 # ./Configure android-armeabi -D__ARM_MAX_ARCH__=8
934 # in order to build "universal" binary and allow OpenSSL take
935 # advantage of NEON when it's available.
937 "android-armeabi" => {
938 inherit_from => [ "android", asm("armv4_asm") ],
941 inherit_from => [ "android", asm("mips32_asm") ],
942 perlasm_scheme => "o32",
946 inherit_from => [ "linux-generic64" ],
947 cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")),
948 bin_cflags => "-pie",
950 "android64-aarch64" => {
951 inherit_from => [ "android64", asm("aarch64_asm") ],
952 perlasm_scheme => "linux64",
954 "android64-x86_64" => {
955 inherit_from => [ "android64", asm("x86_64_asm") ],
956 perlasm_scheme => "elf",
958 "android64-mips64" => {
959 ############################################################
960 # You are more than likely have to specify target processor
961 # on ./Configure command line. Trouble is that toolchain's
962 # default is MIPS64r6 (at least in r10d), but there are no
963 # such processors around (or they are too rare to spot one).
964 # Actual problem is that MIPS64r6 is binary incompatible
965 # with previous MIPS ISA versions, in sense that unlike
966 # prior versions original MIPS binary code will fail.
968 inherit_from => [ "android64", asm("mips64_asm") ],
969 perlasm_scheme => "64",
974 # As for thread cflag. Idea is to maintain "collective" set of
975 # flags, which would cover all BSD flavors. -pthread applies
976 # to them all, but is treated differently. OpenBSD expands is
977 # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
978 # expands it as -lc_r, which has to be accompanied by explicit
979 # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
980 # expands it as -lc_r, which seems to be sufficient?
981 inherit_from => [ "BASE_unix" ],
983 cflags => combine(picker(default => "-Wall",
986 threads("-pthread -D_THREAD_SAFE -D_REENTRANT")),
987 bn_ops => "BN_LLONG",
988 thread_scheme => "pthreads",
989 dso_scheme => "dlfcn",
990 shared_target => "bsd-gcc-shared",
991 shared_cflag => "-fPIC",
992 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
995 inherit_from => [ "BSD-generic32" ],
996 bn_ops => "SIXTY_FOUR_BIT_LONG",
1000 inherit_from => [ "BSD-generic32", asm("x86_asm") ],
1001 cflags => add(picker(default => "-DL_ENDIAN",
1002 release => "-fomit-frame-pointer")),
1003 bn_ops => "BN_LLONG",
1004 shared_target => "bsd-shared",
1005 perlasm_scheme => "a.out",
1008 inherit_from => [ "BSD-x86" ],
1009 perlasm_scheme => "elf",
1013 inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ],
1014 cflags => add("-mcpu=v8 -DB_ENDIAN"),
1017 # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
1018 # simply *happens* to work around a compiler bug in gcc 3.3.3,
1019 # triggered by RIPEMD160 code.
1020 inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ],
1021 cflags => add("-DB_ENDIAN -DMD32_REG_T=int"),
1022 bn_ops => "BN_LLONG",
1026 inherit_from => [ "BSD-generic64", asm("ia64_asm") ],
1027 cflags => add_before("-DL_ENDIAN"),
1028 bn_ops => "SIXTY_FOUR_BIT_LONG",
1032 inherit_from => [ "BSD-generic64", asm("x86_64_asm") ],
1033 cflags => add_before("-DL_ENDIAN"),
1034 bn_ops => "SIXTY_FOUR_BIT_LONG",
1035 perlasm_scheme => "elf",
1039 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1041 cflags => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -Wall",
1042 ex_libs => add("-ldl"),
1043 bn_ops => "BN_LLONG",
1044 thread_scheme => "(unknown)",
1045 dso_scheme => "dlfcn",
1046 shared_target => "bsd-gcc-shared",
1047 shared_cflag => "-fPIC",
1048 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1052 inherit_from => [ "BASE_unix" ],
1054 cflags => "-O -Wall",
1055 unistd => "<libc.h>",
1056 bn_ops => "BN_LLONG",
1057 thread_scheme => "(unknown)",
1060 inherit_from => [ "BASE_unix" ],
1062 cflags => "-O3 -Wall",
1063 unistd => "<libc.h>",
1064 bn_ops => "BN_LLONG",
1065 thread_scheme => "(unknown)",
1070 inherit_from => [ "BASE_unix" ],
1072 cflags => "-DL_ENDIAN -DTERMIO",
1073 thread_scheme => "(unknown)",
1076 inherit_from => [ "BASE_unix" ],
1078 ex_libs => add("-lsocket"),
1079 dso_scheme => "dlfcn",
1080 shared_target => "bsd-gcc-shared",
1081 shared_cflag => "-fPIC",
1082 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1085 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1087 cflags => "-DL_ENDIAN -O2 -Wall",
1088 ex_libs => add("-lsocket"),
1089 dso_scheme => "dlfcn",
1090 shared_target => "bsd-gcc-shared",
1091 shared_cflag => "-fPIC",
1092 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1095 #### SCO/Caldera targets.
1097 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
1098 # Now we only have blended unixware-* as it's the only one used by ./config.
1099 # If you want to optimize for particular microarchitecture, bypass ./config
1100 # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
1101 # Note that not all targets include assembler support. Mostly because of
1102 # lack of motivation to support out-of-date platforms with out-of-date
1103 # compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
1104 # patiently assisted to debug most of it.
1106 # UnixWare 2.0x fails destest with -O.
1108 inherit_from => [ "BASE_unix" ],
1110 cflags => combine("-DFILIO_H -DNO_STRINGS_H",
1111 threads("-Kthread")),
1112 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1113 thread_scheme => "uithreads",
1116 inherit_from => [ "BASE_unix" ],
1118 cflags => combine("-O -DFILIO_H",
1119 threads("-Kthread")),
1120 ex_libs => add("-lsocket -lnsl -lresolv -lx"),
1121 thread_scheme => "uithreads",
1124 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1126 cflags => combine("-O -DFILIO_H -Kalloca",
1127 threads("-Kthread")),
1128 ex_libs => add("-lsocket -lnsl"),
1129 thread_scheme => "uithreads",
1130 bn_ops => "BN_LLONG",
1131 perlasm_scheme => "elf-1",
1132 dso_scheme => "dlfcn",
1133 shared_target => "svr5-shared",
1134 shared_cflag => "-Kpic",
1135 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1137 "unixware-7-gcc" => {
1138 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1140 cflags => combine("-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -Wall",
1141 threads("-D_REENTRANT")),
1142 ex_libs => add("-lsocket -lnsl"),
1143 bn_ops => "BN_LLONG",
1144 thread_scheme => "pthreads",
1145 perlasm_scheme => "elf-1",
1146 dso_scheme => "dlfcn",
1147 shared_target => "gnu-shared",
1148 shared_cflag => "-fPIC",
1149 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1151 # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
1153 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1156 ex_libs => add("-lsocket -lnsl"),
1157 thread_scheme => "(unknown)",
1158 perlasm_scheme => "elf-1",
1159 dso_scheme => "dlfcn",
1160 shared_target => "svr3-shared",
1161 shared_cflag => "-Kpic",
1162 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1165 inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
1167 cflags => "-O3 -fomit-frame-pointer",
1168 ex_libs => add("-lsocket -lnsl"),
1169 bn_ops => "BN_LLONG",
1170 thread_scheme => "(unknown)",
1171 perlasm_scheme => "elf-1",
1172 dso_scheme => "dlfcn",
1173 shared_target => "svr3-shared",
1174 shared_cflag => "-fPIC",
1175 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1179 # Below targets assume AIX >=5. Caveat lector. If you are accustomed
1180 # to control compilation "bitness" by setting $OBJECT_MODE environment
1181 # variable, then you should know that in OpenSSL case it's considered
1182 # only in ./config. Once configured, build procedure remains "deaf" to
1183 # current value of $OBJECT_MODE.
1185 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1187 cflags => combine(picker(default => "-DB_ENDIAN",
1190 threads("-pthread")),
1192 bn_ops => "BN_LLONG RC4_CHAR",
1193 thread_scheme => "pthreads",
1194 perlasm_scheme => "aix32",
1195 dso_scheme => "dlfcn",
1196 shared_target => "aix-shared",
1197 shared_ldflag => "-shared -static-libgcc -Wl,-G",
1198 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1202 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1204 cflags => combine(picker(default => "-maix64 -DB_ENDIAN",
1207 threads("-pthread")),
1209 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1210 thread_scheme => "pthreads",
1211 perlasm_scheme => "aix64",
1212 dso_scheme => "dlfcn",
1213 shared_target => "aix-shared",
1214 shared_ldflag => "-maix64 -shared -static-libgcc -Wl,-G",
1215 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1219 inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
1221 cflags => combine(picker(default => "-q32 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1224 threads("-qthreaded -D_THREAD_SAFE")),
1226 bn_ops => "BN_LLONG RC4_CHAR",
1227 thread_scheme => "pthreads",
1228 ex_libs => threads("-lpthreads"),
1229 perlasm_scheme => "aix32",
1230 dso_scheme => "dlfcn",
1231 shared_target => "aix-shared",
1232 shared_ldflag => "-q32 -G",
1233 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1237 inherit_from => [ "BASE_unix", asm("ppc64_asm") ],
1239 cflags => combine(picker(default => "-q64 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1242 threads("-qthreaded -D_THREAD_SAFE")),
1244 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1245 thread_scheme => "pthreads",
1246 ex_libs => threads("-lpthreads"),
1247 perlasm_scheme => "aix64",
1248 dso_scheme => "dlfcn",
1249 shared_target => "aix-shared",
1250 shared_ldflag => "-q64 -G",
1251 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1255 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
1257 inherit_from => [ "BASE_unix" ],
1259 cflags => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC",
1260 ex_libs => add("-lsocket -lnsl"),
1261 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1262 thread_scheme => "(unknown)",
1265 # OS/390 Unix an EBCDIC-based Unix system on IBM mainframe
1266 # You need to compile using the c89.sh wrapper in the tools directory, because the
1267 # IBM compiler does not like the -L switch after any object modules.
1270 inherit_from => [ "BASE_unix" ],
1272 cflags => "-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE",
1273 bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
1274 thread_scheme => "(unknown)",
1277 #### Visual C targets
1279 # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
1281 # Note about -wd4090, disable warning C4090. This warning returns false
1282 # positives in some situations. Disabling it altogether masks both
1283 # legitimate and false cases, but as we compile on multiple platforms,
1284 # we rely on other compilers to catch legitimate cases.
1286 # Also note that we force threads no matter what. Configuring "no-threads"
1289 inherit_from => [ "BASE_Windows" ],
1292 cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
1293 defines => add(sub { my @defs = ();
1294 unless ($disabled{"zlib-dynamic"}) {
1296 $withargs{zlib_lib} // "ZLIB1";
1299 'LIBZ="' . $zlib . '"');
1304 lib_cflags => add("/Zi /Fdossl_static"),
1305 dso_cflags => "/Zi /Fddso",
1306 bin_cflags => "/Zi /Fdapp",
1307 lflags => add("/debug"),
1308 shared_ldflag => "/dll",
1309 shared_target => "win-shared", # meaningless except it gives Configure a hint
1310 thread_scheme => "winthreads",
1311 dso_scheme => "win32",
1312 apps_aux_src => add("win32_init.c"),
1314 "VC-noCE-common" => {
1315 inherit_from => [ "VC-common" ],
1317 cflags => add(picker(default => "-DUNICODE -D_UNICODE",
1320 ($disabled{shared} ? "" : "/MDd")
1321 ." /Od -DDEBUG -D_DEBUG";
1325 ($disabled{shared} ? "" : "/MD")
1328 lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }),
1329 # Following might/should appears controversial, i.e. defining
1330 # /MDd without evaluating $disabled{shared}. It works in
1331 # non-shared build because static library is compiled with /Zl
1332 # and bares no reference to specific RTL. And it works in
1333 # shared build because multiple /MDd options are not prohibited.
1334 # But why /MDd in static build? Well, basically this is just a
1335 # reference point, which allows to catch eventual errors that
1336 # would prevent those who want to wrap OpenSSL into own .DLL.
1337 # Why not /MD in release build then? Well, some are likely to
1338 # prefer [non-debug] openssl.exe to be free from Micorosoft RTL
1340 bin_cflags => add(picker(debug => "/MDd",
1341 release => sub { $disabled{shared} ? "/MT" : () },
1343 bin_lflags => add("/subsystem:console /opt:ref"),
1344 ex_libs => add(sub {
1346 push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
1347 push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
1348 return join(" ", @ex_libs);
1351 "VC-WIN64-common" => {
1352 inherit_from => [ "VC-noCE-common" ],
1354 ex_libs => add(sub {
1356 push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
1357 return join(" ", @_, @ex_libs);
1359 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1360 build_scheme => add("VC-W64", { separator => undef }),
1363 inherit_from => [ "VC-WIN64-common", asm("ia64_asm"),
1364 sub { $disabled{shared} ? () : "ia64_uplink" } ],
1366 asflags => "-d debug",
1369 bn_asm_src => sub { return undef unless @_;
1370 my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; },
1371 perlasm_scheme => "ias",
1372 multilib => "-ia64",
1375 inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"),
1376 sub { $disabled{shared} ? () : "x86_64_uplink" } ],
1377 as => sub { vc_win64a_info()->{as} },
1378 asflags => sub { vc_win64a_info()->{asflags} },
1379 asoutflag => sub { vc_win64a_info()->{asoutflag} },
1381 bn_asm_src => sub { return undef unless @_;
1382 my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
1383 perlasm_scheme => "auto",
1387 # x86 Win32 target defaults to ANSI API, if you want UNICODE,
1388 # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
1389 inherit_from => [ "VC-noCE-common", asm("x86_asm"),
1390 sub { $disabled{shared} ? () : "uplink_common" } ],
1391 as => sub { vc_win32_info()->{as} },
1392 asflags => sub { vc_win32_info()->{asflags} },
1393 asoutflag => sub { vc_win32_info()->{asoutflag} },
1394 ex_libs => add(sub {
1396 # WIN32 UNICODE build gets linked with unicows.lib for
1397 # backward compatibility with Win9x.
1398 push @ex_libs, 'unicows.lib'
1399 if (grep { $_ eq "UNICODE" } @user_defines);
1400 return join(" ", @ex_libs, @_);
1403 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1404 perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} },
1405 build_scheme => add("VC-W32", { separator => undef }),
1408 inherit_from => [ "VC-common" ],
1410 asflags => "/nologo /Cp /coff /c /Cx /Zi",
1415 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',
1416 sub { vc_wince_info()->{cflags}; },
1417 sub { defined($ENV{'WCECOMPAT'})
1418 ? '-I$(WCECOMPAT)/include' : (); },
1419 sub { defined($ENV{'PORTSDK_LIBPATH'})
1420 ? '-I$(PORTSDK_LIBPATH)/../../include' : (); },
1421 sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14
1422 ? ($disabled{shared} ? " /MT" : " /MD")
1424 debug => "/Od -DDEBUG -D_DEBUG",
1426 lflags => combine("/nologo /opt:ref",
1427 sub { vc_wince_info()->{lflags}; },
1428 sub { defined($ENV{PORTSDK_LIBPATH})
1429 ? "/entry:mainCRTstartup" : (); }),
1431 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1432 ex_libs => add(sub {
1434 push @ex_libs, 'ws2.lib' unless $disabled{sock};
1435 push @ex_libs, 'crypt32.lib';
1436 if (defined($ENV{WCECOMPAT})) {
1437 my $x = '$(WCECOMPAT)/lib';
1438 if (-f "$x/$ENV{TARGETCPU}/wcecompatex.lib") {
1439 $x .= '/$(TARGETCPU)/wcecompatex.lib';
1441 $x .= '/wcecompatex.lib';
1445 push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
1446 if (defined($ENV{'PORTSDK_LIBPATH'}));
1447 push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
1448 if ($ENV{'TARGETCPU'} eq "X86");
1451 build_scheme => add("VC-WCE", { separator => undef }),
1456 inherit_from => [ "BASE_unix", asm("x86_asm"),
1457 sub { $disabled{shared} ? () : "x86_uplink" } ],
1459 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
1461 release => "-O3 -fomit-frame-pointer"),
1463 sys_id => "MINGW32",
1464 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1465 bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
1466 thread_scheme => "winthreads",
1467 perlasm_scheme => "coff",
1468 dso_scheme => "win32",
1469 shared_target => "mingw-shared",
1470 shared_cflag => add("-D_WINDLL"),
1471 shared_ldflag => "-static-libgcc",
1472 shared_rcflag => "--target=pe-i386",
1473 shared_extension => ".dll",
1475 apps_aux_src => add("win32_init.c"),
1478 # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1479 # .dll compiled with one compiler with application compiled with
1480 # another compiler. It's possible to engage Applink support in
1481 # mingw64 build, but it's not done, because till mingw64
1482 # supports structured exception handling, one can't seriously
1483 # consider its binaries for using with non-mingw64 run-time
1484 # environment. And as mingw64 is always consistent with itself,
1485 # Applink is never engaged and can as well be omitted.
1486 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1488 cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall",
1492 sys_id => "MINGW64",
1493 ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
1494 bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1495 thread_scheme => "winthreads",
1496 perlasm_scheme => "mingw64",
1497 dso_scheme => "win32",
1498 shared_target => "mingw-shared",
1499 shared_cflag => add("-D_WINDLL"),
1500 shared_ldflag => "-static-libgcc",
1501 shared_rcflag => "--target=pe-x86-64",
1502 shared_extension => ".dll",
1504 apps_aux_src => add("win32_init.c"),
1509 inherit_from => [ "BASE_unix" ],
1511 cflags => "-DL_ENDIAN -O",
1517 inherit_from => [ "BASE_unix" ],
1519 cflags => "-DTERMIOS -DL_ENDIAN -O -Wall",
1521 bn_ops => "BN_LLONG",
1522 dso_scheme => "win32",
1527 inherit_from => [ "BASE_unix", asm("x86_asm") ],
1529 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1531 release => "-O3 -fomit-frame-pointer"),
1533 bn_ops => "BN_LLONG",
1534 thread_scheme => "pthread",
1535 perlasm_scheme => "coff",
1536 dso_scheme => "dlfcn",
1537 shared_target => "cygwin-shared",
1538 shared_cflag => "-D_WINDLL",
1539 shared_ldflag => "-shared",
1540 shared_extension => ".dll",
1542 "Cygwin-x86_64" => {
1543 inherit_from => [ "BASE_unix", asm("x86_64_asm") ],
1545 cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall",
1549 bn_ops => "SIXTY_FOUR_BIT_LONG",
1550 thread_scheme => "pthread",
1551 perlasm_scheme => "mingw64",
1552 dso_scheme => "dlfcn",
1553 shared_target => "cygwin-shared",
1554 shared_cflag => "-D_WINDLL",
1555 shared_ldflag => "-shared",
1556 shared_extension => ".dll",
1558 # Backward compatibility for those using this target
1560 inherit_from => [ "Cygwin-x86" ]
1562 # In case someone constructs the Cygwin target name themself
1564 inherit_from => [ "Cygwin-x86" ]
1567 inherit_from => [ "Cygwin-x86" ]
1570 inherit_from => [ "Cygwin-x86" ]
1573 inherit_from => [ "Cygwin-x86" ]
1576 ##### MacOS X (a.k.a. Darwin) setup
1577 "darwin-common" => {
1578 inherit_from => [ "BASE_unix" ],
1581 cflags => combine(picker(default => "",
1584 threads("-D_REENTRANT")),
1586 plib_lflags => "-Wl,-search_paths_first",
1587 bn_ops => "BN_LLONG RC4_CHAR",
1588 thread_scheme => "pthreads",
1589 perlasm_scheme => "osx32",
1590 dso_scheme => "dlfcn",
1591 ranlib => "ranlib -c",
1592 shared_target => "darwin-shared",
1593 shared_cflag => "-fPIC",
1594 shared_ldflag => "-dynamiclib",
1595 shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
1597 # Option "freeze" such as -std=gnu9x can't negatively interfere
1598 # with future defaults for below two targets, because MacOS X
1599 # for PPC has no future, it was discontinued by vendor in 2009.
1600 "darwin-ppc-cc" => {
1601 inherit_from => [ "darwin-common", asm("ppc32_asm") ],
1602 cflags => add("-arch ppc -std=gnu9x -DB_ENDIAN -Wa,-force_cpusubtype_ALL"),
1603 perlasm_scheme => "osx32",
1604 shared_ldflag => "-arch ppc -dynamiclib",
1606 "darwin64-ppc-cc" => {
1607 inherit_from => [ "darwin-common", asm("ppc64_asm") ],
1608 cflags => add("-arch ppc64 -std=gnu9x -DB_ENDIAN"),
1609 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1610 perlasm_scheme => "osx64",
1611 shared_ldflag => "-arch ppc64 -dynamiclib",
1613 "darwin-i386-cc" => {
1614 inherit_from => [ "darwin-common", asm("x86_asm") ],
1615 cflags => add(picker(default => "-arch i386 -DL_ENDIAN",
1616 release => "-fomit-frame-pointer")),
1617 bn_ops => "BN_LLONG RC4_INT",
1618 perlasm_scheme => "macosx",
1619 shared_ldflag => "-arch i386 -dynamiclib",
1621 "darwin64-x86_64-cc" => {
1622 inherit_from => [ "darwin-common", asm("x86_64_asm") ],
1623 cflags => add("-arch x86_64 -DL_ENDIAN -Wall"),
1624 bn_ops => "SIXTY_FOUR_BIT_LONG",
1625 perlasm_scheme => "macosx",
1626 shared_ldflag => "-arch x86_64 -dynamiclib",
1631 # It takes three prior-set environment variables to make it work:
1633 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
1634 # CROSS_TOP=/where/SDKs/are
1635 # CROSS_SDK=iPhoneOSx.y.sdk
1637 # Exact paths vary with Xcode releases, but for couple of last ones
1638 # they would look like this:
1640 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
1641 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
1642 # CROSS_SDK=iPhoneOS.sdk
1644 "iphoneos-cross" => {
1645 inherit_from => [ "darwin-common" ],
1646 cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1650 inherit_from => [ "darwin-common", asm("armv4_asm") ],
1651 # It should be possible to go below iOS 6 and even add -arch armv6,
1652 # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
1654 cflags => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1656 perlasm_scheme => "ios32",
1659 inherit_from => [ "darwin-common", asm("aarch64_asm") ],
1660 cflags => add("-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1662 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1663 perlasm_scheme => "ios64",
1668 inherit_from => [ "BASE_unix" ],
1669 inherit_from => [ asm("x86_elf_asm") ],
1671 cflags => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
1672 threads("-pthread")),
1673 ex_libs => add("-ldl"),
1674 bn_ops => "BN_LLONG",
1675 thread_scheme => "pthreads",
1676 dso_scheme => "dlfcn",
1677 shared_target => "linux-shared",
1678 shared_cflag => "-fPIC",
1679 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1682 ##### VxWorks for various targets
1683 "vxworks-ppc60x" => {
1684 inherit_from => [ "BASE_unix" ],
1686 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",
1687 sys_id => "VXWORKS",
1688 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),
1690 "vxworks-ppcgen" => {
1691 inherit_from => [ "BASE_unix" ],
1693 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",
1694 sys_id => "VXWORKS",
1695 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),
1697 "vxworks-ppc405" => {
1698 inherit_from => [ "BASE_unix" ],
1700 cflags => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h",
1701 sys_id => "VXWORKS",
1704 "vxworks-ppc750" => {
1705 inherit_from => [ "BASE_unix" ],
1707 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)",
1708 sys_id => "VXWORKS",
1711 "vxworks-ppc750-debug" => {
1712 inherit_from => [ "BASE_unix" ],
1714 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",
1715 sys_id => "VXWORKS",
1718 "vxworks-ppc860" => {
1719 inherit_from => [ "BASE_unix" ],
1721 cflags => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h",
1722 sys_id => "VXWORKS",
1725 "vxworks-simlinux" => {
1726 inherit_from => [ "BASE_unix" ],
1728 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",
1729 sys_id => "VXWORKS",
1731 ranlib => "ranlibpentium",
1734 inherit_from => [ "BASE_unix", asm("mips32_asm") ],
1736 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",
1737 threads("-D_REENTRANT")),
1738 sys_id => "VXWORKS",
1739 ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),
1740 thread_scheme => "pthreads",
1741 perlasm_scheme => "o32",
1742 ranlib => "ranlibmips",
1747 inherit_from => [ "BASE_unix" ],
1749 cflags => combine("\$(CFLAGS)",
1750 threads("-D_REENTRANT")),
1751 plib_lflags => "\$(LDFLAGS)",
1752 ex_libs => add("\$(LDLIBS)"),
1753 bn_ops => "BN_LLONG",
1754 thread_scheme => "pthreads",
1755 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1756 shared_target => "linux-shared",
1757 shared_cflag => "-fPIC",
1758 shared_ldflag => "-shared",
1759 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1760 ranlib => "$ENV{'RANLIB'}",
1762 "uClinux-dist64" => {
1763 inherit_from => [ "BASE_unix" ],
1765 cflags => combine("\$(CFLAGS)",
1766 threads("-D_REENTRANT")),
1767 plib_lflags => "\$(LDFLAGS)",
1768 ex_libs => add("\$(LDLIBS)"),
1769 bn_ops => "SIXTY_FOUR_BIT_LONG",
1770 thread_scheme => "pthreads",
1771 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1772 shared_target => "linux-shared",
1773 shared_cflag => "-fPIC",
1774 shared_ldflag => "-shared",
1775 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1776 ranlib => "$ENV{'RANLIB'}",
1781 inherit_from => [ "BASE_VMS" ],
1784 cflags => picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL",
1785 debug => "/NOOPTIMIZE/DEBUG",
1786 release => "/OPTIMIZE/NODEBUG"),
1787 defines => add("OPENSSL_USE_NODELETE"),
1788 lflags => picker(default => "/MAP",
1789 debug => "/DEBUG/TRACEBACK",
1790 release => "/NODEBUG/NOTRACEBACK"),
1791 lib_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
1792 # no_inst_bin_cflags is used instead of bin_cflags by descrip.mms.tmpl
1793 # for object files belonging to selected internal programs
1794 no_inst_bin_cflags => "/NAMES=(AS_IS,SHORTENED)",
1795 shared_target => "vms-shared",
1796 dso_scheme => "vms",
1797 thread_scheme => "pthreads",
1799 apps_aux_src => "vms_decc_init.c vms_term_sock.c",
1803 inherit_from => [ "vms-generic" ],
1804 cflags => add(sub { my @warnings =
1805 @{vms_info(0)->{disable_warns}};
1807 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1810 return vms_info(0)->{def_zlib}
1811 ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : ();
1813 ex_libs => add(sub { return vms_info(0)->{zlib} || (); }),
1814 pointer_size => sub { return vms_info(0)->{pointer_size} },
1816 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1817 #release_aflags => "/OPTIMIZE/NODEBUG",
1818 bn_opts => "SIXTY_FOUR_BIT RC4_INT",
1820 "vms-alpha-p32" => {
1821 inherit_from => [ "vms-generic" ],
1823 add("/POINTER_SIZE=32",
1824 sub { my @warnings =
1825 @{vms_info(32)->{disable_warns}};
1827 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1831 return vms_info(32)->{def_zlib}
1832 ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : ();
1834 ex_libs => add(sub { return vms_info(32)->{zlib} || (); }),
1835 pointer_size => sub { return vms_info(32)->{pointer_size} },
1837 "vms-alpha-p64" => {
1838 inherit_from => [ "vms-generic" ],
1840 add("/POINTER_SIZE=64=ARGV",
1841 sub { my @warnings =
1842 @{vms_info(64)->{disable_warns}};
1844 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1848 return vms_info(64)->{def_zlib}
1849 ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : ();
1851 ex_libs => add(sub { return vms_info(64)->{zlib} || (); }),
1852 pointer_size => sub { return vms_info(64)->{pointer_size} },
1855 inherit_from => [ "vms-generic" ],
1856 cflags => add(sub { my @warnings =
1857 @{vms_info(0)->{disable_warns}};
1859 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1862 return vms_info(0)->{def_zlib}
1863 ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : ();
1865 ex_libs => add(sub { return vms_info(0)->{zlib} || (); }),
1866 pointer_size => sub { return vms_info(0)->{pointer_size} },
1868 #debug_aflags => "/NOOPTIMIZE/DEBUG",
1869 #release_aflags => "/OPTIMIZE/NODEBUG",
1870 bn_opts => "SIXTY_FOUR_BIT RC4_INT",
1873 inherit_from => [ "vms-generic" ],
1875 add("/POINTER_SIZE=32",
1876 sub { my @warnings =
1877 @{vms_info(32)->{disable_warns}};
1879 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1883 return vms_info(32)->{def_zlib}
1884 ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : ();
1886 ex_libs => add(sub { return vms_info(32)->{zlib} || (); }),
1887 pointer_size => sub { return vms_info(32)->{pointer_size} },
1890 inherit_from => [ "vms-generic" ],
1892 add("/POINTER_SIZE=64=ARGV",
1893 sub { my @warnings =
1894 @{vms_info(64)->{disable_warns}};
1896 ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
1900 return vms_info(64)->{def_zlib}
1901 ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : ();
1903 ex_libs => add(sub { return vms_info(64)->{zlib} || (); }),
1904 pointer_size => sub { return vms_info(64)->{pointer_size} },