69439e4c8e9d7a08d8860ed4fccfb3b72496bfca
[openssl.git] / Configurations / 10-main.conf
1 ## -*- mode: perl; -*-
2 ## Standard openssl configuration targets.
3
4 # Helper functions for the Windows configs
5 my $vc_win64a_info = {};
6 sub 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   => "-g",
11                                 asflags   => "-Ox -f win64 -DNEAR",
12                                 asoutflag => "-o " };
13         } elsif ($disabled{asm}) {
14             $vc_win64a_info = { AS        => "ml64",
15                                 ASFLAGS   => "/Zi",
16                                 asflags   => "/c /Cp /Cx",
17                                 asoutflag => "/Fo" };
18         } else {
19             $die->("NASM not found - please read INSTALL and NOTES.WIN for further details\n");
20             $vc_win64a_info = { AS        => "{unknown}",
21                                 ASFLAGS   => "",
22                                 asflags   => "",
23                                 asoutflag => "" };
24         }
25     }
26     return $vc_win64a_info;
27 }
28
29 my $vc_win32_info = {};
30 sub vc_win32_info {
31     unless (%$vc_win32_info) {
32         my $ver=`nasm -v 2>NUL`;
33         my $vew=`nasmw -v 2>NUL`;
34         if ($ver ne "" || $vew ne "") {
35             $vc_win32_info = { AS        => $ver ge $vew ? "nasm" : "nasmw",
36                                ASFLAGS   => "",
37                                asflags   => "-f win32",
38                                asoutflag => "-o ",
39                                perlasm_scheme => "win32n" };
40         } elsif ($disabled{asm}) {
41             $vc_win32_info = { AS        => "ml",
42                                ASFLAGS   => "/nologo /Zi",
43                                asflags   => "/Cp /coff /c /Cx",
44                                asoutflag => "/Fo",
45                                perlasm_scheme => "win32" };
46         } else {
47             $die->("NASM not found - please read INSTALL and NOTES.WIN for further details\n");
48             $vc_win32_info = { AS        => "{unknown}",
49                                ASFLAGS   => "",
50                                asflags   => "",
51                                asoutflag => "",
52                                perlasm_scheme => "win32" };
53         }
54     }
55     return $vc_win32_info;
56 }
57
58 my $vc_wince_info = {};
59 sub vc_wince_info {
60     unless (%$vc_wince_info) {
61         # sanity check
62         $die->('%OSVERSION% is not defined') if (!defined(env('OSVERSION')));
63         $die->('%PLATFORM% is not defined')  if (!defined(env('PLATFORM')));
64         $die->('%TARGETCPU% is not defined') if (!defined(env('TARGETCPU')));
65
66         #
67         # Idea behind this is to mimic flags set by eVC++ IDE...
68         #
69         my $wcevers = env('OSVERSION');                     # WCENNN
70         my $wcevernum;
71         my $wceverdotnum;
72         if ($wcevers =~ /^WCE([1-9])([0-9]{2})$/) {
73             $wcevernum = "$1$2";
74             $wceverdotnum = "$1.$2";
75         } else {
76             $die->('%OSVERSION% value is insane');
77             $wcevernum = "{unknown}";
78             $wceverdotnum = "{unknown}";
79         }
80         my $wcecdefs = "-D_WIN32_WCE=$wcevernum -DUNDER_CE=$wcevernum"; # -D_WIN32_WCE=NNN
81         my $wcelflag = "/subsystem:windowsce,$wceverdotnum";        # ...,N.NN
82
83         my $wceplatf =  env('PLATFORM');
84
85         $wceplatf =~ tr/a-z0-9 /A-Z0-9_/;
86         $wcecdefs .= " -DWCE_PLATFORM_$wceplatf";
87
88         my $wcetgt = env('TARGETCPU');                      # just shorter name...
89       SWITCH: for($wcetgt) {
90           /^X86/        && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_";
91                                 $wcelflag.=" /machine:X86";     last; };
92           /^ARMV4[IT]/  && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
93                                 $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/);
94                                 $wcecdefs.=" -QRarch4T -QRinterwork-return";
95                                 $wcelflag.=" /machine:THUMB";   last; };
96           /^ARM/        && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
97                                 $wcelflag.=" /machine:ARM";     last; };
98           /^MIPSIV/     && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
99                                 $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32";
100                                 $wcelflag.=" /machine:MIPSFPU"; last; };
101           /^MIPS16/     && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
102                                 $wcecdefs.=" -DMIPSII -QMmips16";
103                                 $wcelflag.=" /machine:MIPS16";  last; };
104           /^MIPSII/     && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
105                                 $wcecdefs.=" -QMmips2";
106                                 $wcelflag.=" /machine:MIPS";    last; };
107           /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000";
108                                 $wcelflag.=" /machine:MIPS";    last; };
109           /^SH[0-9]/    && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx";
110                                 $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/);
111                                 $wcelflag.=" /machine:$wcetgt"; last; };
112           { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_";
113             $wcelflag.=" /machine:$wcetgt";                     last; };
114       }
115
116         $vc_wince_info = { cppflags => $wcecdefs,
117                            lflags => $wcelflag };
118     }
119     return $vc_wince_info;
120 }
121
122 # Helper functions for the VMS configs
123 my $vms_info = {};
124 sub vms_info {
125     my $pointer_size_str = $config{target} =~ m|-p(\d+)$| ? $1 : "";
126
127     # For the case where Configure iterate through all config targets, such
128     # as when listing them and their details, we reset info if the pointer
129     # size changes.
130     if (%$vms_info && $vms_info->{pointer_size} ne $pointer_size_str) {
131         $vms_info = {};
132     }
133
134     unless (%$vms_info) {
135         $vms_info->{disable_warns} = [ ];
136         $vms_info->{pointer_size} = $pointer_size_str;
137         if ($pointer_size_str eq "64") {
138             `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;
139             if ($? == 0) {
140                 push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3";
141             }
142         }
143
144         unless ($disabled{zlib}) {
145             my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str;
146             if (defined($disabled{"zlib-dynamic"})) {
147                 $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE";
148             } else {
149                 $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib;
150                 # In case the --with-zlib-lib value contains something like
151                 # /SHARE or /LIB or so at the end, remove it.
152                 $vms_info->{def_zlib} =~ s|/.*$||g;
153             }
154         }
155
156         if ($config{target} =~ /-ia64/) {
157             `PIPE ias -H 2> NL:`;
158             if ($? == 0) {
159                 $vms_info->{AS} = "ias";
160                 $vms_info->{ASFLAGS} = '-d debug';
161                 $vms_info->{asflags} = '"-N" vms_upcase';
162                 $vms_info->{asoutflag} = "-o ";
163                 $vms_info->{perlasm_scheme} = "ias";
164             }
165         }
166     }
167     return $vms_info;
168 }
169
170 my %targets = (
171
172 #### Basic configs that should work on any 32-bit box
173     "gcc" => {
174         inherit_from     => [ "BASE_unix" ],
175         CC               => "gcc",
176         CFLAGS           => picker(debug   => "-O0 -g",
177                                    release => "-O3"),
178         thread_scheme    => "(unknown)",
179         bn_ops           => "BN_LLONG",
180     },
181     "cc" => {
182         inherit_from     => [ "BASE_unix" ],
183         CC               => "cc",
184         CFLAGS           => "-O",
185         thread_scheme    => "(unknown)",
186     },
187
188 #### VOS Configurations
189     "vos-gcc" => {
190         inherit_from     => [ "BASE_unix" ],
191         CC               => "gcc",
192         CFLAGS           => picker(default => "-Wall",
193                                    debug   => "-O0 -g",
194                                    release => "-O3"),
195         cppflags         => "-D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
196         thread_scheme    => "(unknown)",
197         sys_id           => "VOS",
198         lflags           => add("-Wl,-map"),
199         bn_ops           => "BN_LLONG",
200         shared_extension => ".so",
201     },
202
203 #### Solaris configurations
204     "solaris-common" => {
205         inherit_from     => [ "BASE_unix" ],
206         template         => 1,
207         cppflags         => "-DFILIO_H",
208         ex_libs          => add("-lsocket -lnsl -ldl"),
209         dso_scheme       => "dlfcn",
210         thread_scheme    => "pthreads",
211         shared_target    => "solaris-shared",
212         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
213     },
214 #### Solaris x86 with GNU C setups
215     "solaris-x86-gcc" => {
216         # NB. GNU C has to be configured to use GNU assembler, and not
217         # /usr/ccs/bin/as. Failure to comply will result in compile
218         # failures [at least] in 32-bit build.
219         inherit_from     => [ "solaris-common", asm("x86_elf_asm") ],
220         CC               => "gcc",
221         CFLAGS           => add_before(picker(default => "-Wall",
222                                               debug   => "-O0 -g",
223                                               release => "-O3 -fomit-frame-pointer")),
224         cflags           => add(threads("-pthread")),
225         cppflags         => add("-DL_ENDIAN"),
226         ex_libs          => add(threads("-pthread")),
227         bn_ops           => "BN_LLONG",
228         shared_cflag     => "-fPIC",
229         shared_ldflag    => "-shared -static-libgcc",
230     },
231     "solaris64-x86_64-gcc" => {
232         # -shared -static-libgcc might appear controversial, but modules
233         # taken from static libgcc do not have relocations and linking
234         # them into our shared objects doesn't have any negative side
235         # effects. On the contrary, doing so makes it possible to use
236         # gcc shared build with Sun C. Given that gcc generates faster
237         # code [thanks to inline assembler], I would actually recommend
238         # to consider using gcc shared build even with vendor compiler:-)
239         #                        -- <appro@openssl.org>
240         inherit_from     => [ "solaris-common", asm("x86_64_asm") ],
241         CC               => "gcc",
242         CFLAGS           => add_before(picker(default => "-Wall",
243                                               debug   => "-O0 -g",
244                                               release => "-O3")),
245         cflags           => add_before("-m64", threads("-pthread")),
246         cppflags         => add("-DL_ENDIAN"),
247         ex_libs          => add(threads("-pthread")),
248         bn_ops           => "SIXTY_FOUR_BIT_LONG",
249         perlasm_scheme   => "elf",
250         shared_cflag     => "-fPIC",
251         shared_ldflag    => "-shared -static-libgcc",
252         multilib         => "/64",
253     },
254
255 #### Solaris x86 with Sun C setups
256     # There used to be solaris-x86-cc target, but it was removed,
257     # primarily because vendor assembler can't assemble our modules
258     # with -KPIC flag. As result it, assembly support, was not even
259     # available as option. But its lack means lack of side-channel
260     # resistant code, which is incompatible with security by todays
261     # standards. Fortunately gcc is readily available prepackaged
262     # option, which we can firmly point at...
263     #
264     # On related note, solaris64-x86_64-cc target won't compile code
265     # paths utilizing AVX and post-Haswell instruction extensions.
266     # Consider switching to solaris64-x86_64-gcc even here...
267     #
268     "solaris64-x86_64-cc" => {
269         inherit_from     => [ "solaris-common", asm("x86_64_asm") ],
270         CC               => "cc",
271         CFLAGS           => add_before(picker(debug   => "-g",
272                                               release => "-xO5 -xdepend -xbuiltin")),
273         cflags           => add_before("-xarch=generic64 -xstrconst -Xa"),
274         cppflags         => add("-DL_ENDIAN", threads("-D_REENTRANT")),
275         thread_scheme    => "pthreads",
276         lflags           => add(threads("-mt")),
277         ex_libs          => add(threads("-lpthread")),
278         bn_ops           => "SIXTY_FOUR_BIT_LONG",
279         perlasm_scheme   => "elf",
280         shared_cflag     => "-KPIC",
281         shared_ldflag    => "-G -dy -z text",
282         multilib         => "/64",
283     },
284
285 #### SPARC Solaris with GNU C setups
286     "solaris-sparcv7-gcc" => {
287         inherit_from     => [ "solaris-common" ],
288         CC               => "gcc",
289         CFLAGS           => add_before(picker(default => "-Wall",
290                                               debug   => "-O0 -g",
291                                               release => "-O3")),
292         cflags           => add(threads("-pthread")),
293         cppflags         => add("-DB_ENDIAN -DBN_DIV2W"),
294         ex_libs          => add(threads("-pthread")),
295         bn_ops           => "BN_LLONG RC4_CHAR",
296         shared_cflag     => "-fPIC",
297         shared_ldflag    => "-shared",
298     },
299     "solaris-sparcv8-gcc" => {
300         inherit_from     => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
301         cflags           => add_before("-mcpu=v8"),
302     },
303     "solaris-sparcv9-gcc" => {
304         # -m32 should be safe to add as long as driver recognizes
305         # -mcpu=ultrasparc
306         inherit_from     => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
307         cflags           => add_before("-m32 -mcpu=ultrasparc"),
308     },
309     "solaris64-sparcv9-gcc" => {
310         inherit_from     => [ "solaris-sparcv9-gcc" ],
311         cflags           => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
312         bn_ops           => "BN_LLONG RC4_CHAR",
313         multilib         => "/64",
314     },
315
316 #### SPARC Solaris with Sun C setups
317 # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
318 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
319 # SC5.0 note: Compiler common patch 107357-01 or later is required!
320     "solaris-sparcv7-cc" => {
321         inherit_from     => [ "solaris-common" ],
322         CC               => "cc",
323         CFLAGS           => add_before(picker(debug   => "-g",
324                                               release => "-xO5 -xdepend")),
325         cflags           => add_before("-xstrconst -Xa"),
326         cppflags         => add("-DB_ENDIAN -DBN_DIV2W",
327                                 threads("-D_REENTRANT")),
328         lflags           => add(threads("-mt")),
329         ex_libs          => add(threads("-lpthread")),
330         bn_ops           => "BN_LLONG RC4_CHAR",
331         shared_cflag     => "-KPIC",
332         shared_ldflag    => "-G -dy -z text",
333     },
334 ####
335     "solaris-sparcv8-cc" => {
336         inherit_from     => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
337         cflags           => add_before("-xarch=v8"),
338     },
339     "solaris-sparcv9-cc" => {
340         inherit_from     => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
341         cflags           => add_before("-xarch=v8plus"),
342     },
343     "solaris64-sparcv9-cc" => {
344         inherit_from     => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
345         cflags           => add_before("-xarch=v9"),
346         bn_ops           => "BN_LLONG RC4_CHAR",
347         multilib         => "/64",
348     },
349
350 #### IRIX 6.x configs
351 # Only N32 and N64 ABIs are supported.
352     "irix-mips3-gcc" => {
353         inherit_from     => [ "BASE_unix", asm("mips64_asm") ],
354         CC               => "gcc",
355         CFLAGS           => picker(debug   => "-g -O0",
356                                    release => "-O3"),
357         cflags           => "-mabi=n32",
358         cppflags         => combine("-DB_ENDIAN -DBN_DIV3W",
359                                     threads("-D_SGI_MP_SOURCE")),
360         ex_libs          => add(threads("-lpthread")),
361         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT",
362         thread_scheme    => "pthreads",
363         perlasm_scheme   => "n32",
364         dso_scheme       => "dlfcn",
365         shared_target    => "irix-shared",
366         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
367         multilib         => "32",
368     },
369     "irix-mips3-cc" => {
370         inherit_from     => [ "BASE_unix", asm("mips64_asm") ],
371         CC               => "cc",
372         CFLAGS           => picker(debug   => "-g -O0",
373                                    release => "-O2"),
374         cflags           => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared",
375         cppflags         => combine("-DB_ENDIAN -DBN_DIV3W",
376                                     threads("-D_SGI_MP_SOURCE")),
377         ex_libs          => add(threads("-lpthread")),
378         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT",
379         thread_scheme    => "pthreads",
380         perlasm_scheme   => "n32",
381         dso_scheme       => "dlfcn",
382         shared_target    => "irix-shared",
383         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
384         multilib         => "32",
385     },
386     # N64 ABI builds.
387     "irix64-mips4-gcc" => {
388         inherit_from     => [ "BASE_unix", asm("mips64_asm") ],
389         CC               => "gcc",
390         CFLAGS           => picker(debug   => "-g -O0",
391                                    release => "-O3"),
392         cflags           => "-mabi=64 -mips4",
393         cppflags         => combine("-DB_ENDIAN -DBN_DIV3W",
394                                     threads("-D_SGI_MP_SOURCE")),
395         ex_libs          => add(threads("-lpthread")),
396         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
397         thread_scheme    => "pthreads",
398         perlasm_scheme   => "64",
399         dso_scheme       => "dlfcn",
400         shared_target    => "irix-shared",
401         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
402         multilib         => "64",
403     },
404     "irix64-mips4-cc" => {
405         inherit_from     => [ "BASE_unix", asm("mips64_asm") ],
406         CC               => "cc",
407         CFLAGS           => picker(debug   => "-g -O0",
408                                    release => "-O2"),
409         cppflags         => threads("-D_SGI_MP_SOURCE"),
410         cflags           => "-64 -mips4 -use_readonly_const -G0 -rdata_shared",
411         cppflags         => combine("-DB_ENDIAN -DBN_DIV3W",
412                                     threads("-D_SGI_MP_SOURCE")),
413         ex_libs          => threads("-lpthread"),
414         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
415         thread_scheme    => "pthreads",
416         perlasm_scheme   => "64",
417         dso_scheme       => "dlfcn",
418         shared_target    => "irix-shared",
419         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
420         multilib         => "64",
421     },
422
423 #### Unified HP-UX ANSI C configs.
424 # Special notes:
425 # - Originally we were optimizing at +O4 level. It should be noted
426 #   that the only difference between +O3 and +O4 is global inter-
427 #   procedural analysis. As it has to be performed during the link
428 #   stage the compiler leaves behind certain pseudo-code in lib*.a
429 #   which might be release or even patch level specific. Generating
430 #   the machine code for and analyzing the *whole* program appears
431 #   to be *extremely* memory demanding while the performance gain is
432 #   actually questionable. The situation is intensified by the default
433 #   HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
434 #   which is way too low for +O4. In other words, doesn't +O3 make
435 #   more sense?
436 # - Keep in mind that the HP compiler by default generates code
437 #   suitable for execution on the host you're currently compiling at.
438 #   If the toolkit is meant to be used on various PA-RISC processors
439 #   consider './Configure hpux-parisc-[g]cc +DAportable'.
440 # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
441 #   32-bit message digests. (For the moment of this writing) HP C
442 #   doesn't seem to "digest" too many local variables (they make "him"
443 #   chew forever:-). For more details look-up MD32_XARRAY comment in
444 #   crypto/sha/sha_lcl.h.
445 # - originally there were 32-bit hpux-parisc2-* targets. They were
446 #   scrapped, because a) they were not interchangeable with other 32-bit
447 #   targets; b) performance-critical 32-bit assembly modules implement
448 #   even PA-RISC 2.0-specific code paths, which are chosen at run-time,
449 #   thus adequate performance is provided even with PA-RISC 1.1 build.
450     "hpux-parisc-gcc" => {
451         inherit_from     => [ "BASE_unix" ],
452         CC               => "gcc",
453         CFLAGS           => picker(debug   => "-O0 -g",
454                                    release => "-O3"),
455         cflags           => add(threads("-pthread")),
456         cppflags         => "-DB_ENDIAN -DBN_DIV2W",
457         ex_libs          => add("-Wl,+s -ldld", threads("-pthread")),
458         bn_ops           => "BN_LLONG",
459         thread_scheme    => "pthreads",
460         dso_scheme       => "dl",
461         shared_target    => "hpux-shared",
462         shared_cflag     => "-fPIC",
463         shared_ldflag    => "-shared",
464         shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
465     },
466     "hpux-parisc1_1-gcc" => {
467         inherit_from     => [ "hpux-parisc-gcc", asm("parisc11_asm") ],
468         multilib         => "/pa1.1",
469     },
470     "hpux64-parisc2-gcc" => {
471         inherit_from     => [ "BASE_unix", asm("parisc20_64_asm") ],
472         CC               => "gcc",
473         CFLAGS           => combine(picker(debug   => "-O0 -g",
474                                            release => "-O3")),
475         cppflags         => combine("-DB_ENDIAN", threads("-D_REENTRANT")),
476         ex_libs          => add("-ldl"),
477         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
478         thread_scheme    => "pthreads",
479         dso_scheme       => "dlfcn",
480         shared_target    => "hpux-shared",
481         shared_cflag     => "-fpic",
482         shared_ldflag    => "-shared",
483         shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
484         multilib         => "/pa20_64",
485     },
486
487     # More attempts at unified 10.X and 11.X targets for HP C compiler.
488     "hpux-parisc-cc" => {
489         inherit_from     => [ "BASE_unix" ],
490         CC               => "cc",
491         CFLAGS           => picker(debug   => "+O0 +d -g",
492                                    release => "+O3"),
493         cflags           => "+Optrs_strongly_typed -Ae +ESlit",
494         cppflags         => combine("-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
495                                     threads("-D_REENTRANT")),
496         ex_libs          => add("-Wl,+s -ldld",threads("-lpthread")),
497         bn_ops           => "RC4_CHAR",
498         thread_scheme    => "pthreads",
499         dso_scheme       => "dl",
500         shared_target    => "hpux-shared",
501         shared_cflag     => "+Z",
502         shared_ldflag    => "-b",
503         shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
504     },
505     "hpux-parisc1_1-cc" => {
506         inherit_from     => [ "hpux-parisc-cc", asm("parisc11_asm") ],
507         cflags           => add_before("+DA1.1"),
508         multilib         => "/pa1.1",
509     },
510     "hpux64-parisc2-cc" => {
511         inherit_from     => [ "BASE_unix", asm("parisc20_64_asm") ],
512         CC               => "cc",
513         CFLAGS           => picker(debug   => "+O0 +d -g",
514                                    release => "+O3") ,
515         cflags           => "+DD64 +Optrs_strongly_typed -Ae +ESlit",
516         cppflags         => combine("-DB_ENDIAN -DMD32_XARRAY",
517                                     threads("-D_REENTRANT")),
518         ex_libs          => add("-ldl",threads("-lpthread")),
519         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
520         thread_scheme    => "pthreads",
521         dso_scheme       => "dlfcn",
522         shared_target    => "hpux-shared",
523         shared_cflag     => "+Z",
524         shared_ldflag    => "-b",
525         shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
526         multilib         => "/pa20_64",
527     },
528
529     # HP/UX IA-64 targets
530     "hpux-ia64-cc" => {
531         inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
532         CC               => "cc",
533         CFLAGS           => picker(debug   => "+O0 +d -g",
534                                    release => "+O2"),
535         cflags           => "-Ae +DD32 +Olit=all -z",
536         cppflags         => combine("-DB_ENDIAN", threads("-D_REENTRANT")),
537         ex_libs          => add("-ldl",threads("-lpthread")),
538         bn_ops           => "SIXTY_FOUR_BIT",
539         thread_scheme    => "pthreads",
540         dso_scheme       => "dlfcn",
541         shared_target    => "hpux-shared",
542         shared_cflag     => "+Z",
543         shared_ldflag    => "-b",
544         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
545         multilib         => "/hpux32",
546     },
547     "hpux64-ia64-cc" => {
548         inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
549         CC               => "cc",
550         CFLAGS           => picker(debug   => "+O0 +d -g",
551                                    release => "+O3"),
552         cflags           => "-Ae +DD64 +Olit=all -z",
553         cppflags         => combine("-DB_ENDIAN", threads("-D_REENTRANT")),
554         ex_libs          => add("-ldl", threads("-lpthread")),
555         bn_ops           => "SIXTY_FOUR_BIT_LONG",
556         thread_scheme    => "pthreads",
557         dso_scheme       => "dlfcn",
558         shared_target    => "hpux-shared",
559         shared_cflag     => "+Z",
560         shared_ldflag    => "-b",
561         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
562         multilib         => "/hpux64",
563     },
564     # GCC builds...
565     "hpux-ia64-gcc" => {
566         inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
567         CC               => "gcc",
568         CFLAGS           => picker(debug   => "-O0 -g",
569                                    release => "-O3"),
570         cflags           => add(threads("-pthread")),
571         cppflags         => "-DB_ENDIAN",
572         ex_libs          => add("-ldl", threads("-pthread")),
573         bn_ops           => "SIXTY_FOUR_BIT",
574         thread_scheme    => "pthreads",
575         dso_scheme       => "dlfcn",
576         shared_target    => "hpux-shared",
577         shared_cflag     => "-fpic",
578         shared_ldflag    => "-shared",
579         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
580         multilib         => "/hpux32",
581     },
582     "hpux64-ia64-gcc" => {
583         inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
584         CC               => "gcc",
585         CFLAGS           => picker(debug   => "-O0 -g",
586                                    release => "-O3"),
587         cflags           => combine("-mlp64", threads("-pthread")),
588         cppflags         => "-DB_ENDIAN",
589         ex_libs          => add("-ldl", threads("-pthread")),
590         bn_ops           => "SIXTY_FOUR_BIT_LONG",
591         thread_scheme    => "pthreads",
592         dso_scheme       => "dlfcn",
593         shared_target    => "hpux-shared",
594         shared_cflag     => "-fpic",
595         shared_ldflag    => "-shared",
596         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
597         multilib         => "/hpux64",
598     },
599
600 #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
601     "MPE/iX-gcc" => {
602         inherit_from     => [ "BASE_unix" ],
603         CC               => "gcc",
604         CFLAGS           => "-O3",
605         cppflags         => "-D_ENDIAN -DBN_DIV2W -D_POSIX_SOURCE -D_SOCKET_SOURCE",
606         includes         => add("/SYSLOG/PUB"),
607         sys_id           => "MPE",
608         lflags           => add("-L/SYSLOG/PUB"),
609         ex_libs          => add("-lsyslog -lsocket -lcurses"),
610         thread_scheme    => "(unknown)",
611         bn_ops           => "BN_LLONG",
612     },
613
614 #### DEC Alpha Tru64 targets. Tru64 is marketing name for OSF/1 version 4
615 #### and forward. In reality 'uname -s' still returns "OSF1". Originally
616 #### there were even osf1-* configs targeting prior versions provided,
617 #### but not anymore...
618     "tru64-alpha-gcc" => {
619         inherit_from     => [ "BASE_unix", asm("alpha_asm") ],
620         CC               => "gcc",
621         CFLAGS           => "-O3",
622         cflags           => add("-std=c9x", threads("-pthread")),
623         cppflags         => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE",
624         ex_libs          => add("-lrt", threads("-pthread")), # for mlock(2)
625         bn_ops           => "SIXTY_FOUR_BIT_LONG",
626         thread_scheme    => "pthreads",
627         dso_scheme       => "dlfcn",
628         shared_target    => "alpha-osf1-shared",
629         shared_extension => ".so",
630     },
631     "tru64-alpha-cc" => {
632         inherit_from     => [ "BASE_unix", asm("alpha_asm") ],
633         CC               => "cc",
634         CFLAGS           => "-tune host -fast",
635         cflags           => add("-std1 -readonly_strings",
636                                 threads("-pthread")),
637         cppflags         => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE",
638         ex_libs          => add("-lrt", threads("-pthread")), # for mlock(2)
639         bn_ops           => "SIXTY_FOUR_BIT_LONG",
640         thread_scheme    => "pthreads",
641         dso_scheme       => "dlfcn",
642         shared_target    => "alpha-osf1-shared",
643         shared_ldflag    => "-msym",
644         shared_extension => ".so",
645     },
646
647 ####
648 #### Variety of LINUX:-)
649 ####
650 # *-generic* is endian-neutral target, but ./config is free to
651 # throw in -D[BL]_ENDIAN, whichever appropriate...
652     "linux-generic32" => {
653         inherit_from     => [ "BASE_unix" ],
654         CC               => "gcc",
655         CXX              => "g++",
656         CFLAGS           => picker(default => "-Wall",
657                                    debug   => "-O0 -g",
658                                    release => "-O3"),
659         CXXFLAGS         => picker(default => "-Wall",
660                                    debug   => "-O0 -g",
661                                    release => "-O3"),
662         cflags           => threads("-pthread"),
663         cxxflags         => combine("-std=c++11", threads("-pthread")),
664         cppflags         => "-DOPENSSL_USE_NODELETE",
665         ex_libs          => add("-ldl", threads("-pthread")),
666         bn_ops           => "BN_LLONG RC4_CHAR",
667         thread_scheme    => "pthreads",
668         dso_scheme       => "dlfcn",
669         shared_target    => "linux-shared",
670         shared_cflag     => "-fPIC",
671         shared_ldflag    => "-Wl,-znodelete",
672         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
673     },
674     "linux-generic64" => {
675         inherit_from     => [ "linux-generic32" ],
676         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
677     },
678
679     "linux-ppc" => {
680         inherit_from     => [ "linux-generic32", asm("ppc32_asm") ],
681         perlasm_scheme   => "linux32",
682     },
683     "linux-ppc64" => {
684         inherit_from     => [ "linux-generic64", asm("ppc64_asm") ],
685         cflags           => add("-m64"),
686         cxxflags         => add("-m64"),
687         cppflags         => add("-DB_ENDIAN"),
688         perlasm_scheme   => "linux64",
689         multilib         => "64",
690     },
691     "linux-ppc64le" => {
692         inherit_from     => [ "linux-generic64", asm("ppc64_asm") ],
693         cflags           => add("-m64"),
694         cxxflags         => add("-m64"),
695         cppflags         => add("-DL_ENDIAN"),
696         perlasm_scheme   => "linux64le",
697     },
698
699     "linux-armv4" => {
700         ################################################################
701         # Note that -march is not among compiler options in linux-armv4
702         # target description. Not specifying one is intentional to give
703         # you choice to:
704         #
705         # a) rely on your compiler default by not specifying one;
706         # b) specify your target platform explicitly for optimal
707         # performance, e.g. -march=armv6 or -march=armv7-a;
708         # c) build "universal" binary that targets *range* of platforms
709         # by specifying minimum and maximum supported architecture;
710         #
711         # As for c) option. It actually makes no sense to specify
712         # maximum to be less than ARMv7, because it's the least
713         # requirement for run-time switch between platform-specific
714         # code paths. And without run-time switch performance would be
715         # equivalent to one for minimum. Secondly, there are some
716         # natural limitations that you'd have to accept and respect.
717         # Most notably you can *not* build "universal" binary for
718         # big-endian platform. This is because ARMv7 processor always
719         # picks instructions in little-endian order. Another similar
720         # limitation is that -mthumb can't "cross" -march=armv6t2
721         # boundary, because that's where it became Thumb-2. Well, this
722         # limitation is a bit artificial, because it's not really
723         # impossible, but it's deemed too tricky to support. And of
724         # course you have to be sure that your binutils are actually
725         # up to the task of handling maximum target platform. With all
726         # this in mind here is an example of how to configure
727         # "universal" build:
728         #
729         # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
730         #
731         inherit_from     => [ "linux-generic32", asm("armv4_asm") ],
732         perlasm_scheme   => "linux32",
733     },
734     "linux-aarch64" => {
735         inherit_from     => [ "linux-generic64", asm("aarch64_asm") ],
736         perlasm_scheme   => "linux64",
737     },
738     "linux-arm64ilp32" => {  # https://wiki.linaro.org/Platform/arm64-ilp32
739         inherit_from     => [ "linux-generic32", asm("aarch64_asm") ],
740         cflags           => add("-mabi=ilp32"),
741         cxxflags         => add("-mabi=ilp32"),
742         bn_ops           => "SIXTY_FOUR_BIT RC4_CHAR",
743         perlasm_scheme   => "linux64",
744     },
745
746     "linux-mips32" => {
747         # Configure script adds minimally required -march for assembly
748         # support, if no -march was specified at command line.
749         inherit_from     => [ "linux-generic32", asm("mips32_asm") ],
750         cflags           => add("-mabi=32"),
751         cxxflags         => add("-mabi=32"),
752         cppflags         => add("-DBN_DIV3W"),
753         perlasm_scheme   => "o32",
754     },
755     # mips32 and mips64 below refer to contemporary MIPS Architecture
756     # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
757     "linux-mips64" => {
758         inherit_from     => [ "linux-generic32", asm("mips64_asm") ],
759         cflags           => add("-mabi=n32"),
760         cxxflags         => add("-mabi=n32"),
761         cppflags         => add("-DBN_DIV3W"),
762         bn_ops           => "SIXTY_FOUR_BIT RC4_CHAR",
763         perlasm_scheme   => "n32",
764         multilib         => "32",
765     },
766     "linux64-mips64" => {
767         inherit_from     => [ "linux-generic64", asm("mips64_asm") ],
768         cflags           => add("-mabi=64"),
769         cxxflags         => add("-mabi=64"),
770         cppflags         => add("-DBN_DIV3W"),
771         perlasm_scheme   => "64",
772         multilib         => "64",
773     },
774
775     #### IA-32 targets...
776     #### These two targets are a bit aged and are to be used on older Linux
777     #### machines where gcc doesn't understand -m32 and -m64
778     "linux-elf" => {
779         inherit_from     => [ "linux-generic32", asm("x86_elf_asm") ],
780         CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
781         cppflags         => add("-DL_ENDIAN"),
782         bn_ops           => "BN_LLONG",
783     },
784     "linux-aout" => {
785         inherit_from     => [ "BASE_unix", asm("x86_asm") ],
786         CC               => "gcc",
787         CFLAGS           => add(picker(default => "-Wall",
788                                        debug   => "-O0 -g",
789                                        release => "-O3 -fomit-frame-pointer")),
790         cppflags         => add("-DL_ENDIAN"),
791         bn_ops           => "BN_LLONG",
792         thread_scheme    => "(unknown)",
793         perlasm_scheme   => "a.out",
794     },
795
796     #### X86 / X86_64 targets
797     "linux-x86" => {
798         inherit_from     => [ "linux-generic32", asm("x86_asm") ],
799         CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
800         cflags           => add("-m32"),
801         cxxflags         => add("-m32"),
802         cppflags         => add("-DL_ENDIAN"),
803         bn_ops           => "BN_LLONG",
804         perlasm_scheme   => "elf",
805     },
806     "linux-x86-clang" => {
807         inherit_from     => [ "linux-x86" ],
808         CC               => "clang",
809         CXX              => "clang++",
810         CFLAGS           => add("-Wextra"),
811     },
812     "linux-x86_64" => {
813         inherit_from     => [ "linux-generic64", asm("x86_64_asm") ],
814         cflags           => add("-m64"),
815         cxxflags         => add("-m64"),
816         cppflags         => add("-DL_ENDIAN"),
817         bn_ops           => "SIXTY_FOUR_BIT_LONG",
818         perlasm_scheme   => "elf",
819         multilib         => "64",
820     },
821     "linux-x86_64-clang" => {
822         inherit_from     => [ "linux-x86_64" ],
823         CC               => "clang",
824         CXX              => "clang++",
825         CFLAGS           => add("-Wextra"),
826     },
827     "linux-x32" => {
828         inherit_from     => [ "linux-generic32", asm("x86_64_asm") ],
829         cflags           => add("-mx32"),
830         cxxflags         => add("-mx32"),
831         cppflags         => add("-DL_ENDIAN"),
832         bn_ops           => "SIXTY_FOUR_BIT",
833         perlasm_scheme   => "elf32",
834         multilib         => "x32",
835     },
836
837     "linux-ia64" => {
838         inherit_from     => [ "linux-generic64", asm("ia64_asm") ],
839         bn_ops           => "SIXTY_FOUR_BIT_LONG",
840     },
841
842     "linux64-s390x" => {
843         inherit_from     => [ "linux-generic64", asm("s390x_asm") ],
844         cflags           => add("-m64"),
845         cxxflags         => add("-m64"),
846         cppflags         => add("-DB_ENDIAN"),
847         perlasm_scheme   => "64",
848         multilib         => "64",
849     },
850     "linux32-s390x" => {
851         #### So called "highgprs" target for z/Architecture CPUs
852         # "Highgprs" is kernel feature first implemented in Linux
853         # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
854         # significant bits of general purpose registers not only
855         # upon 32-bit process context switch, but even on
856         # asynchronous signal delivery to such process. This makes
857         # it possible to deploy 64-bit instructions even in legacy
858         # application context and achieve better [or should we say
859         # adequate] performance. The build is binary compatible with
860         # linux-generic32, and the idea is to be able to install the
861         # resulting libcrypto.so alongside generic one, e.g. as
862         # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
863         # linker to autodiscover. Unfortunately it doesn't work just
864         # yet, because of couple of bugs in glibc
865         # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
866         #
867         inherit_from     => [ "linux-generic32", asm("s390x_asm") ],
868         cflags           => add("-m31 -Wa,-mzarch"),
869         cxxflags         => add("-m31 -Wa,-mzarch"),
870         cppflags         => add("-DB_ENDIAN"),
871         bn_asm_src       => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; },
872         perlasm_scheme   => "31",
873         multilib         => "/highgprs",
874     },
875
876     #### SPARC Linux setups
877     "linux-sparcv8" => {
878         inherit_from     => [ "linux-generic32", asm("sparcv8_asm") ],
879         cflags           => add("-mcpu=v8"),
880         cxxflags         => add("-mcpu=v8"),
881         lib_cppflags     => add("-DB_ENDIAN -DBN_DIV2W"),
882     },
883     "linux-sparcv9" => {
884         # it's a real mess with -mcpu=ultrasparc option under Linux,
885         # but -Wa,-Av8plus should do the trick no matter what.
886         inherit_from     => [ "linux-generic32", asm("sparcv9_asm") ],
887         cflags           => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"),
888         cxxflags         => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"),
889         lib_cppflags     => add("-DB_ENDIAN -DBN_DIV2W"),
890     },
891     "linux64-sparcv9" => {
892         # GCC 3.1 is a requirement
893         inherit_from     => [ "linux-generic64", asm("sparcv9_asm") ],
894         cflags           => add("-m64 -mcpu=ultrasparc"),
895         cxxflags         => add("-m64 -mcpu=ultrasparc"),
896         lib_cppflags     => add("-DB_ENDIAN"),
897         bn_ops           => "BN_LLONG RC4_CHAR",
898         multilib         => "64",
899     },
900
901     "linux-alpha-gcc" => {
902         inherit_from     => [ "linux-generic64", asm("alpha_asm") ],
903         lib_cppflags     => add("-DL_ENDIAN"),
904         bn_ops           => "SIXTY_FOUR_BIT_LONG",
905     },
906     "linux-c64xplus" => {
907         inherit_from     => [ "BASE_unix" ],
908         # TI_CGT_C6000_7.3.x is a requirement
909         CC               => "cl6x",
910         CFLAGS           => "-o2 -ox -ms",
911         cflags           => "--linux -ea=.s -eo=.o -mv6400+ -pden",
912         cxxflags         => "--linux -ea=.s -eo=.o -mv6400+ -pden",
913         cppflags         => combine("-DOPENSSL_SMALL_FOOTPRINT",
914                                     threads("-D_REENTRANT")),
915         bn_ops           => "BN_LLONG",
916         cpuid_asm_src    => "c64xpluscpuid.s",
917         bn_asm_src       => "asm/bn-c64xplus.asm c64xplus-gf2m.s",
918         aes_asm_src      => "aes-c64xplus.s aes_cbc.c aes-ctr.fake",
919         sha1_asm_src     => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s",
920         rc4_asm_src      => "rc4-c64xplus.s",
921         modes_asm_src    => "ghash-c64xplus.s",
922         chacha_asm_src   => "chacha-c64xplus.s",
923         poly1305_asm_src => "poly1305-c64xplus.s",
924         thread_scheme    => "pthreads",
925         perlasm_scheme   => "void",
926         dso_scheme       => "dlfcn",
927         shared_target    => "linux-shared",
928         shared_cflag     => "--pic",
929         shared_ldflag    => add("-z --sysv --shared"),
930         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
931         ranlib           => "true",
932     },
933
934 #### Android: linux-* but without pointers to headers and libs.
935     #
936     # It takes pair of prior-set environment variables to make it work:
937     #
938     # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<arch>
939     # CROSS_COMPILE=<prefix>
940     #
941     # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
942     # For example to compile for ICS and ARM with NDK 10d, you'd:
943     #
944     # ANDROID_NDK=/some/where/android-ndk-10d
945     # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
946     # CROSS_COMPILE=arm-linux-androideabi-
947     # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/bin
948     #
949     "android" => {
950         inherit_from     => [ "linux-generic32" ],
951         # Special note about unconditional -fPIC and -pie. The underlying
952         # reason is that Lollipop refuses to run non-PIE. But what about
953         # older systems and NDKs? -fPIC was never problem, so the only
954         # concern is -pie. Older toolchains, e.g. r4, appear to handle it
955         # and binaries turn mostly functional. "Mostly" means that oldest
956         # Androids, such as Froyo, fail to handle executable, but newer
957         # systems are perfectly capable of executing binaries targeting
958         # Froyo. Keep in mind that in the nutshell Android builds are
959         # about JNI, i.e. shared libraries, not applications.
960         cflags           => add("-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack"),
961         cxxflags         => add("-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack"),
962         bin_cflags       => "-pie",
963     },
964     "android-x86" => {
965         inherit_from     => [ "android", asm("x86_asm") ],
966         CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
967         bn_ops           => "BN_LLONG",
968         perlasm_scheme   => "android",
969     },
970     ################################################################
971     # Contemporary Android applications can provide multiple JNI
972     # providers in .apk, targeting multiple architectures. Among
973     # them there is "place" for two ARM flavours: generic eabi and
974     # armv7-a/hard-float. However, it should be noted that OpenSSL's
975     # ability to engage NEON is not constrained by ABI choice, nor
976     # is your ability to call OpenSSL from your application code
977     # compiled with floating-point ABI other than default 'soft'.
978     # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
979     # This means that choice of ARM libraries you provide in .apk
980     # is driven by application needs. For example if application
981     # itself benefits from NEON or is floating-point intensive, then
982     # it might be appropriate to provide both libraries. Otherwise
983     # just generic eabi would do. But in latter case it would be
984     # appropriate to
985     #
986     #   ./Configure android-armeabi -D__ARM_MAX_ARCH__=8
987     #
988     # in order to build "universal" binary and allow OpenSSL take
989     # advantage of NEON when it's available.
990     #
991     "android-armeabi" => {
992         inherit_from     => [ "android", asm("armv4_asm") ],
993     },
994     "android-mips" => {
995         inherit_from     => [ "android", asm("mips32_asm") ],
996         perlasm_scheme   => "o32",
997     },
998
999     "android64" => {
1000         inherit_from     => [ "linux-generic64" ],
1001         cflags           => add("-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack"),
1002         cxxflags         => add("-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack"),
1003         bin_cflags       => "-pie",
1004     },
1005     "android64-aarch64" => {
1006         inherit_from     => [ "android64", asm("aarch64_asm") ],
1007         perlasm_scheme   => "linux64",
1008     },
1009     "android64-x86_64" => {
1010         inherit_from     => [ "android64", asm("x86_64_asm") ],
1011         perlasm_scheme   => "elf",
1012     },
1013     "android64-mips64" => {
1014         ############################################################
1015         # You are more than likely have to specify target processor
1016         # on ./Configure command line. Trouble is that toolchain's
1017         # default is MIPS64r6 (at least in r10d), but there are no
1018         # such processors around (or they are too rare to spot one).
1019         # Actual problem is that MIPS64r6 is binary incompatible
1020         # with previous MIPS ISA versions, in sense that unlike
1021         # prior versions original MIPS binary code will fail.
1022         #
1023         inherit_from     => [ "android64", asm("mips64_asm") ],
1024         perlasm_scheme   => "64",
1025     },
1026
1027 #### *BSD
1028     "BSD-generic32" => {
1029         # As for thread cflag. Idea is to maintain "collective" set of
1030         # flags, which would cover all BSD flavors. -pthread applies
1031         # to them all, but is treated differently. OpenBSD expands is
1032         # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
1033         # expands it as -lc_r, which has to be accompanied by explicit
1034         # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
1035         # expands it as -lc_r, which seems to be sufficient?
1036         inherit_from     => [ "BASE_unix" ],
1037         CC               => "cc",
1038         CFLAGS           => picker(default => "-Wall",
1039                                    debug   => "-O0 -g",
1040                                    release => "-O3"),
1041         cflags           => threads("-pthread"),
1042         cppflags         => threads("-D_THREAD_SAFE -D_REENTRANT"),
1043         ex_libs          => add(threads("-pthread")),
1044         enable           => add("devcryptoeng"),
1045         bn_ops           => "BN_LLONG",
1046         thread_scheme    => "pthreads",
1047         dso_scheme       => "dlfcn",
1048         shared_target    => "bsd-gcc-shared",
1049         shared_cflag     => "-fPIC",
1050         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1051     },
1052     "BSD-generic64" => {
1053         inherit_from     => [ "BSD-generic32" ],
1054         bn_ops           => "SIXTY_FOUR_BIT_LONG",
1055     },
1056
1057     "BSD-x86" => {
1058         inherit_from     => [ "BSD-generic32", asm("x86_asm") ],
1059         CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
1060         cppflags         => add("-DL_ENDIAN"),
1061         bn_ops           => "BN_LLONG",
1062         shared_target    => "bsd-shared",
1063         perlasm_scheme   => "a.out",
1064     },
1065     "BSD-x86-elf" => {
1066         inherit_from     => [ "BSD-x86" ],
1067         perlasm_scheme   => "elf",
1068     },
1069
1070     "BSD-sparcv8" => {
1071         inherit_from     => [ "BSD-generic32", asm("sparcv8_asm") ],
1072         cflags           => add("-mcpu=v8"),
1073         cppflags         => add("-DB_ENDIAN"),
1074     },
1075     "BSD-sparc64" => {
1076         # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
1077         # simply *happens* to work around a compiler bug in gcc 3.3.3,
1078         # triggered by RIPEMD160 code.
1079         inherit_from     => [ "BSD-generic64", asm("sparcv9_asm") ],
1080         cppflags         => add("-DB_ENDIAN -DMD32_REG_T=int"),
1081         bn_ops           => "BN_LLONG",
1082     },
1083
1084     "BSD-ia64" => {
1085         inherit_from     => [ "BSD-generic64", asm("ia64_asm") ],
1086         cppflags         => add("-DL_ENDIAN"),
1087         bn_ops           => "SIXTY_FOUR_BIT_LONG",
1088     },
1089
1090     "BSD-x86_64" => {
1091         inherit_from     => [ "BSD-generic64", asm("x86_64_asm") ],
1092         cppflags         => add("-DL_ENDIAN"),
1093         bn_ops           => "SIXTY_FOUR_BIT_LONG",
1094         perlasm_scheme   => "elf",
1095     },
1096
1097     "bsdi-elf-gcc" => {
1098         inherit_from     => [ "BASE_unix", asm("x86_elf_asm") ],
1099         CC               => "gcc",
1100         CFLAGS           => "-fomit-frame-pointer -O3 -Wall",
1101         cppflags         => "-DPERL5 -DL_ENDIAN",
1102         ex_libs          => add("-ldl"),
1103         bn_ops           => "BN_LLONG",
1104         thread_scheme    => "(unknown)",
1105         dso_scheme       => "dlfcn",
1106         shared_target    => "bsd-gcc-shared",
1107         shared_cflag     => "-fPIC",
1108         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1109     },
1110
1111     "nextstep" => {
1112         inherit_from     => [ "BASE_unix" ],
1113         CC               => "cc",
1114         CFLAGS           => "-O -Wall",
1115         unistd           => "<libc.h>",
1116         bn_ops           => "BN_LLONG",
1117         thread_scheme    => "(unknown)",
1118     },
1119     "nextstep3.3" => {
1120         inherit_from     => [ "BASE_unix" ],
1121         CC               => "cc",
1122         CFLAGS           => "-O3 -Wall",
1123         unistd           => "<libc.h>",
1124         bn_ops           => "BN_LLONG",
1125         thread_scheme    => "(unknown)",
1126     },
1127
1128 # QNX
1129     "qnx4" => {
1130         inherit_from     => [ "BASE_unix" ],
1131         CC               => "cc",
1132         CFLAGS           => "",
1133         cppflags         => "-DL_ENDIAN -DTERMIO",
1134         thread_scheme    => "(unknown)",
1135     },
1136     "QNX6" => {
1137         inherit_from     => [ "BASE_unix" ],
1138         CC               => "gcc",
1139         ex_libs          => add("-lsocket"),
1140         dso_scheme       => "dlfcn",
1141         shared_target    => "bsd-gcc-shared",
1142         shared_cflag     => "-fPIC",
1143         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1144     },
1145     "QNX6-i386" => {
1146         inherit_from     => [ "BASE_unix", asm("x86_elf_asm") ],
1147         CC               => "gcc",
1148         CFLAGS           => "-O2 -Wall",
1149         cppflags         => "-DL_ENDIAN",
1150         ex_libs          => add("-lsocket"),
1151         dso_scheme       => "dlfcn",
1152         shared_target    => "bsd-gcc-shared",
1153         shared_cflag     => "-fPIC",
1154         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1155     },
1156
1157 #### SCO/Caldera targets.
1158 #
1159 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
1160 # Now we only have blended unixware-* as it's the only one used by ./config.
1161 # If you want to optimize for particular microarchitecture, bypass ./config
1162 # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
1163 # Note that not all targets include assembler support. Mostly because of
1164 # lack of motivation to support out-of-date platforms with out-of-date
1165 # compiler drivers and assemblers.
1166 #
1167 # UnixWare 2.0x fails destest with -O.
1168     "unixware-2.0" => {
1169         inherit_from     => [ "BASE_unix" ],
1170         CC               => "cc",
1171         cflags           => threads("-Kthread"),
1172         cppflags         => "-DFILIO_H -DNO_STRINGS_H",
1173         ex_libs          => add("-lsocket -lnsl -lresolv -lx"),
1174         thread_scheme    => "uithreads",
1175     },
1176     "unixware-2.1" => {
1177         inherit_from     => [ "BASE_unix" ],
1178         CC               => "cc",
1179         CFLAGS           => "-O",
1180         cflags           => threads("-Kthread"),
1181         cppflags         => "-DFILIO_H",
1182         ex_libs          => add("-lsocket -lnsl -lresolv -lx"),
1183         thread_scheme    => "uithreads",
1184     },
1185     "unixware-7" => {
1186         inherit_from     => [ "BASE_unix", asm("x86_elf_asm") ],
1187         CC               => "cc",
1188         CFLAGS           => "-O",
1189         cflags           => combine("-Kalloca", threads("-Kthread")),
1190         cppflags         => "-DFILIO_H",
1191         ex_libs          => add("-lsocket -lnsl"),
1192         thread_scheme    => "uithreads",
1193         bn_ops           => "BN_LLONG",
1194         perlasm_scheme   => "elf-1",
1195         dso_scheme       => "dlfcn",
1196         shared_target    => "svr5-shared",
1197         shared_cflag     => "-Kpic",
1198         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1199     },
1200     "unixware-7-gcc" => {
1201         inherit_from     => [ "BASE_unix", asm("x86_elf_asm") ],
1202         CC               => "gcc",
1203         CFLAGS           => "-O3 -fomit-frame-pointer -Wall",
1204         cppflags         => add("-DL_ENDIAN -DFILIO_H",
1205                                 threads("-D_REENTRANT")),
1206         ex_libs          => add("-lsocket -lnsl"),
1207         bn_ops           => "BN_LLONG",
1208         thread_scheme    => "pthreads",
1209         perlasm_scheme   => "elf-1",
1210         dso_scheme       => "dlfcn",
1211         shared_target    => "gnu-shared",
1212         shared_cflag     => "-fPIC",
1213         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1214     },
1215 # SCO 5 - Ben Laurie says the -O breaks the SCO cc.
1216     "sco5-cc" => {
1217         inherit_from     => [ "BASE_unix", asm("x86_elf_asm") ],
1218         cc               => "cc",
1219         cflags           => "-belf",
1220         ex_libs          => add("-lsocket -lnsl"),
1221         thread_scheme    => "(unknown)",
1222         perlasm_scheme   => "elf-1",
1223         dso_scheme       => "dlfcn",
1224         shared_target    => "svr3-shared",
1225         shared_cflag     => "-Kpic",
1226         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1227     },
1228     "sco5-gcc" => {
1229         inherit_from     => [ "BASE_unix", asm("x86_elf_asm") ],
1230         cc               => "gcc",
1231         cflags           => "-O3 -fomit-frame-pointer",
1232         ex_libs          => add("-lsocket -lnsl"),
1233         bn_ops           => "BN_LLONG",
1234         thread_scheme    => "(unknown)",
1235         perlasm_scheme   => "elf-1",
1236         dso_scheme       => "dlfcn",
1237         shared_target    => "svr3-shared",
1238         shared_cflag     => "-fPIC",
1239         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1240     },
1241
1242 #### IBM's AIX.
1243     # Below targets assume AIX >=5. Caveat lector. If you are accustomed
1244     # to control compilation "bitness" by setting $OBJECT_MODE environment
1245     # variable, then you should know that in OpenSSL case it's considered
1246     # only in ./config. Once configured, build procedure remains "deaf" to
1247     # current value of $OBJECT_MODE.
1248     "aix-gcc" => {
1249         inherit_from     => [ "BASE_unix", asm("ppc32_asm") ],
1250         CC               => "gcc",
1251         CFLAGS           => picker(debug   => "-O0 -g",
1252                                    release => "-O"),
1253         cflags           => add(threads("-pthread")),
1254         cppflags         => "-DB_ENDIAN",
1255         ex_libs          => add(threads("-pthread")),
1256         sys_id           => "AIX",
1257         bn_ops           => "BN_LLONG RC4_CHAR",
1258         thread_scheme    => "pthreads",
1259         perlasm_scheme   => "aix32",
1260         dso_scheme       => "dlfcn",
1261         shared_target    => "aix-shared",
1262         shared_ldflag    => "-shared -static-libgcc -Wl,-G",
1263         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1264         arflags          => "-X32 r",
1265     },
1266     "aix64-gcc" => {
1267         inherit_from     => [ "BASE_unix", asm("ppc64_asm") ],
1268         CC               => "gcc",
1269         CFLAGS           => picker(debug   => "-O0 -g",
1270                                    release => "-O"),
1271         cflags           => combine("-maix64", threads("-pthread")),
1272         cppflags         => "-DB_ENDIAN",
1273         ex_libs          => add(threads("-pthread")),
1274         sys_id           => "AIX",
1275         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1276         thread_scheme    => "pthreads",
1277         perlasm_scheme   => "aix64",
1278         dso_scheme       => "dlfcn",
1279         shared_target    => "aix-shared",
1280         shared_ldflag    => "-shared -static-libgcc -Wl,-G",
1281         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1282         arflags          => "-X64 r",
1283     },
1284     "aix-cc" => {
1285         inherit_from     => [ "BASE_unix", asm("ppc32_asm") ],
1286         CC               => "cc",
1287         CFLAGS           => picker(debug   => "-O0 -g",
1288                                    release => "-O"),
1289         cflags           => combine("-q32 -qmaxmem=16384 -qro -qroconst",
1290                                     threads("-qthreaded")),
1291         cppflags         => combine("-DB_ENDIAN", threads("-D_THREAD_SAFE")),
1292         sys_id           => "AIX",
1293         bn_ops           => "BN_LLONG RC4_CHAR",
1294         thread_scheme    => "pthreads",
1295         ex_libs          => threads("-lpthreads"),
1296         perlasm_scheme   => "aix32",
1297         dso_scheme       => "dlfcn",
1298         shared_target    => "aix-shared",
1299         shared_ldflag    => "-G",
1300         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1301         arflags          => "-X32 r",
1302     },
1303     "aix64-cc" => {
1304         inherit_from     => [ "BASE_unix", asm("ppc64_asm") ],
1305         CC               => "cc",
1306         CFLAGS           => picker(debug   => "-O0 -g",
1307                                    release => "-O"),
1308         cflags           => combine("-q64 -qmaxmem=16384 -qro -qroconst",
1309                                     threads("-qthreaded")),
1310         cppflags         => combine("-DB_ENDIAN", threads("-D_THREAD_SAFE")),
1311         sys_id           => "AIX",
1312         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1313         thread_scheme    => "pthreads",
1314         ex_libs          => threads("-lpthreads"),
1315         perlasm_scheme   => "aix64",
1316         dso_scheme       => "dlfcn",
1317         shared_target    => "aix-shared",
1318         shared_ldflag    => "-G",
1319         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1320         arflags          => "-X64 r",
1321     },
1322
1323 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
1324     "BS2000-OSD" => {
1325         inherit_from     => [ "BASE_unix" ],
1326         CC               => "c89",
1327         CFLAGS           => "-O",
1328         cflags           => "-XLLML -XLLMK -XL",
1329         cppflags         => "-DB_ENDIAN -DCHARSET_EBCDIC",
1330         ex_libs          => add("-lsocket -lnsl"),
1331         bn_ops           => "THIRTY_TWO_BIT RC4_CHAR",
1332         thread_scheme    => "(unknown)",
1333     },
1334
1335 #### Visual C targets
1336 #
1337 # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
1338 #
1339 # Note about -wd4090, disable warning C4090. This warning returns false
1340 # positives in some situations. Disabling it altogether masks both
1341 # legitimate and false cases, but as we compile on multiple platforms,
1342 # we rely on other compilers to catch legitimate cases.
1343 #
1344 # Also note that we force threads no matter what.  Configuring "no-threads"
1345 # is ignored.
1346     "VC-common" => {
1347         inherit_from     => [ "BASE_Windows" ],
1348         template         => 1,
1349         CC               => "cl",
1350         CPP              => '$(CC) /EP /C',
1351         CFLAGS           => "-W3 -wd4090 -nologo",
1352         LDFLAGS          => add("/debug"),
1353         coutflag         => "/Fo",
1354         cflags           => '-Gs0 -GF -Gy',
1355         defines          => add("OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN",
1356                                 "L_ENDIAN", "_CRT_SECURE_NO_DEPRECATE",
1357                                 "_WINSOCK_DEPRECATED_NO_WARNINGS",
1358                                 sub { my @defs = ();
1359                                       unless ($disabled{"zlib-dynamic"}) {
1360                                           my $zlib =
1361                                               $withargs{zlib_lib} // "ZLIB1";
1362                                           push @defs,
1363                                               quotify("perl",
1364                                                       'LIBZ="' . $zlib . '"');
1365                                       }
1366                                       return [ @defs ];
1367                                   }),
1368         lib_cflags       => add("/Zi /Fdossl_static"),
1369         dso_cflags       => "/Zi /Fddso",
1370         bin_cflags       => "/Zi /Fdapp",
1371         shared_ldflag    => "/dll",
1372         shared_target    => "win-shared", # meaningless except it gives Configure a hint
1373         thread_scheme    => "winthreads",
1374         dso_scheme       => "win32",
1375         apps_aux_src     => add("win32_init.c"),
1376     },
1377     "VC-noCE-common" => {
1378         inherit_from     => [ "VC-common" ],
1379         template         => 1,
1380         CFLAGS           => add(picker(debug   => '/Od',
1381                                        release => '/O2')),
1382         cflags           => add(picker(debug   =>
1383                                        sub {
1384                                            ($disabled{shared} ? "" : "/MDd");
1385                                        },
1386                                        release =>
1387                                        sub {
1388                                            ($disabled{shared} ? "" : "/MD");
1389                                        })),
1390         defines          => add(picker(default => [ "UNICODE", "_UNICODE" ],
1391                                        debug   => [ "DEBUG", "_DEBUG" ])),
1392         lib_cflags       => add(sub { $disabled{shared} ? "/MT /Zl" : () }),
1393         # Following might/should appears controversial, i.e. defining
1394         # /MDd without evaluating $disabled{shared}. It works in
1395         # non-shared build because static library is compiled with /Zl
1396         # and bares no reference to specific RTL. And it works in
1397         # shared build because multiple /MDd options are not prohibited.
1398         # But why /MDd in static build? Well, basically this is just a
1399         # reference point, which allows to catch eventual errors that
1400         # would prevent those who want to wrap OpenSSL into own .DLL.
1401         # Why not /MD in release build then? Well, some are likely to
1402         # prefer [non-debug] openssl.exe to be free from Micorosoft RTL
1403         # redistributable.
1404         bin_cflags       => add(picker(debug   => "/MDd",
1405                                        release => sub { $disabled{shared} ? "/MT" : () },
1406                                       )),
1407         bin_lflags       => add("/subsystem:console /opt:ref"),
1408         ex_libs          => add(sub {
1409             my @ex_libs = ();
1410             push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
1411             push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
1412             return join(" ", @ex_libs);
1413         }),
1414     },
1415     "VC-WIN64-common" => {
1416         inherit_from     => [ "VC-noCE-common" ],
1417         template         => 1,
1418         ex_libs          => add(sub {
1419             my @ex_libs = ();
1420             push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
1421             return join(" ", @_, @ex_libs);
1422         }),
1423         bn_ops           => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1424         build_scheme     => add("VC-W64", { separator => undef }),
1425     },
1426     "VC-WIN64I" => {
1427         inherit_from     => [ "VC-WIN64-common", asm("ia64_asm"),
1428                               sub { $disabled{shared} ? () : "ia64_uplink" } ],
1429         AS               => "ias",
1430         ASFLAGS          => "-d debug",
1431         asoutflag        => "-o",
1432         sys_id           => "WIN64I",
1433         bn_asm_src       => sub { return undef unless @_;
1434                                   my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; },
1435         perlasm_scheme   => "ias",
1436         multilib         => "-ia64",
1437     },
1438     "VC-WIN64A" => {
1439         inherit_from     => [ "VC-WIN64-common", asm("x86_64_asm"),
1440                               sub { $disabled{shared} ? () : "x86_64_uplink" } ],
1441         AS               => sub { vc_win64a_info()->{AS} },
1442         ASFLAGS          => sub { vc_win64a_info()->{ASFLAGS} },
1443         asoutflag        => sub { vc_win64a_info()->{asoutflag} },
1444         asflags          => sub { vc_win64a_info()->{asflags} },
1445         sys_id           => "WIN64A",
1446         bn_asm_src       => sub { return undef unless @_;
1447                                   my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
1448         perlasm_scheme   => "auto",
1449         multilib         => "-x64",
1450     },
1451     "VC-WIN32" => {
1452         # x86 Win32 target defaults to ANSI API, if you want UNICODE,
1453         # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
1454         inherit_from     => [ "VC-noCE-common", asm("x86_asm"),
1455                               sub { $disabled{shared} ? () : "uplink_common" } ],
1456         CFLAGS           => add("-WX"),
1457         AS               => sub { vc_win32_info()->{AS} },
1458         ASFLAGS          => sub { vc_win32_info()->{ASFLAGS} },
1459         asoutflag        => sub { vc_win32_info()->{asoutflag} },
1460         asflags          => sub { vc_win32_info()->{asflags} },
1461         ex_libs          => add(sub {
1462             my @ex_libs = ();
1463             # WIN32 UNICODE build gets linked with unicows.lib for
1464             # backward compatibility with Win9x.
1465             push @ex_libs, 'unicows.lib'
1466                 if (grep { $_ eq "UNICODE" } @{$user{CPPDEFINES}});
1467             return join(" ", @ex_libs, @_);
1468         }),
1469         sys_id           => "WIN32",
1470         bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
1471         perlasm_scheme   => sub { vc_win32_info()->{perlasm_scheme} },
1472         build_scheme     => add("VC-W32", { separator => undef }),
1473     },
1474     "VC-CE" => {
1475         inherit_from     => [ "VC-common" ],
1476         AS               => "ml",
1477         ASFLAGS          => "/nologo",
1478         asoutflag        => "/Fo",
1479         asflags          => "/Cp /coff /c /Cx /Zi",
1480         CC               => "cl",
1481         CFLAGS           => picker(default => '/W3 /WX /nologo',
1482                                    debug   => "/Od",
1483                                    release => "/O1i"),
1484         CPPDEFINES       => picker(debug   => [ "DEBUG", "_DEBUG" ]),
1485         LDFLAGS          => add("/nologo /opt:ref"),
1486         cflags           =>
1487             combine('/GF /Gy',
1488                     sub { vc_wince_info()->{cflags}; },
1489                     sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14
1490                               ? ($disabled{shared} ? " /MT" : " /MD")
1491                               : " /MC"; }),
1492         cppflags         => sub { vc_wince_info()->{cppflags}; },
1493         defines          => [ "UNICODE", "_UNICODE", "L_ENDIAN", "DSO_WIN32",
1494                               "NO_CHMOD", "OPENSSL_SMALL_FOOTPRINT",
1495                               "WIN32_LEAN_AND_MEAN" ],
1496         includes         =>
1497             add(combine(sub { defined(env('WCECOMPAT'))
1498                               ? '$(WCECOMPAT)/include' : (); },
1499                         sub { defined(env('PORTSDK_LIBPATH'))
1500                                   ? '$(PORTSDK_LIBPATH)/../../include'
1501                                   : (); })),
1502         lflags           => add(combine(sub { vc_wince_info()->{lflags}; },
1503                                         sub { defined(env('PORTSDK_LIBPATH'))
1504                                                   ? "/entry:mainCRTstartup" : (); })),
1505         sys_id           => "WINCE",
1506         bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
1507         ex_libs          => add(sub {
1508             my @ex_libs = ();
1509             push @ex_libs, 'ws2.lib' unless $disabled{sock};
1510             push @ex_libs, 'crypt32.lib';
1511             if (defined(env('WCECOMPAT'))) {
1512                 my $x = '$(WCECOMPAT)/lib';
1513                 if (-f "$x/env('TARGETCPU')/wcecompatex.lib") {
1514                     $x .= '/$(TARGETCPU)/wcecompatex.lib';
1515                 } else {
1516                     $x .= '/wcecompatex.lib';
1517                 }
1518                 push @ex_libs, $x;
1519             }
1520             push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
1521                 if (defined(env('PORTSDK_LIBPATH')));
1522             push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
1523                 if (env('TARGETCPU') eq "X86");
1524             return @ex_libs;
1525         }),
1526         build_scheme     => add("VC-WCE", { separator => undef }),
1527     },
1528
1529 #### MinGW
1530     "mingw" => {
1531         inherit_from     => [ "BASE_unix", asm("x86_asm"),
1532                               sub { $disabled{shared} ? () : "x86_uplink" } ],
1533         CC               => "gcc",
1534         CFLAGS           => picker(default => "-Wall",
1535                                    debug   => "-g -O0",
1536                                    release => "-O3 -fomit-frame-pointer"),
1537         cflags           => "-m32",
1538         cppflags         => combine("-DL_ENDIAN -DUNICODE -D_UNICODE",
1539                                     "-DWIN32_LEAN_AND_MEAN",
1540                                     threads("-D_MT")),
1541         sys_id           => "MINGW32",
1542         ex_libs          => add("-lws2_32 -lgdi32 -lcrypt32"),
1543         bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
1544         thread_scheme    => "winthreads",
1545         perlasm_scheme   => "coff",
1546         dso_scheme       => "win32",
1547         shared_target    => "mingw-shared",
1548         shared_cppflags  => add("_WINDLL"),
1549         shared_ldflag    => "-static-libgcc",
1550         shared_rcflag    => "--target=pe-i386",
1551         shared_extension => ".dll",
1552         multilib         => "",
1553         apps_aux_src     => add("win32_init.c"),
1554     },
1555     "mingw64" => {
1556         # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1557         # .dll compiled with one compiler with application compiled with
1558         # another compiler. It's possible to engage Applink support in
1559         # mingw64 build, but it's not done, because till mingw64
1560         # supports structured exception handling, one can't seriously
1561         # consider its binaries for using with non-mingw64 run-time
1562         # environment. And as mingw64 is always consistent with itself,
1563         # Applink is never engaged and can as well be omitted.
1564         inherit_from     => [ "BASE_unix", asm("x86_64_asm") ],
1565         CC               => "gcc",
1566         CFLAGS           => picker(default => "-Wall",
1567                                    debug   => "-g -O0",
1568                                    release => "-O3"),
1569         cflags           => "-m64",
1570         cppflags         => combine("-DL_ENDIAN -DUNICODE -D_UNICODE",
1571                                     "-DWIN32_LEAN_AND_MEAN",
1572                                     threads("-D_MT")),
1573         sys_id           => "MINGW64",
1574         ex_libs          => add("-lws2_32 -lgdi32 -lcrypt32"),
1575         bn_ops           => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1576         thread_scheme    => "winthreads",
1577         perlasm_scheme   => "mingw64",
1578         dso_scheme       => "win32",
1579         shared_target    => "mingw-shared",
1580         shared_cppflags  => add("_WINDLL"),
1581         shared_ldflag    => "-static-libgcc",
1582         shared_rcflag    => "--target=pe-x86-64",
1583         shared_extension => ".dll",
1584         multilib         => "64",
1585         apps_aux_src     => add("win32_init.c"),
1586     },
1587
1588 #### UEFI
1589     "UEFI" => {
1590         inherit_from     => [ "BASE_unix" ],
1591         CC               => "cc",
1592         CFLAGS           => "-O",
1593         cppflags         => "-DL_ENDIAN",
1594         sys_id           => "UEFI",
1595     },
1596
1597 #### UWIN
1598     "UWIN" => {
1599         inherit_from     => [ "BASE_unix" ],
1600         CC               => "cc",
1601         CFLAGS           => "-O -Wall",
1602         lib_cppflags     => "-DTERMIOS -DL_ENDIAN",
1603         sys_id           => "UWIN",
1604         bn_ops           => "BN_LLONG",
1605         dso_scheme       => "win32",
1606     },
1607
1608 #### Cygwin
1609     "Cygwin-x86" => {
1610         inherit_from     => [ "BASE_unix", asm("x86_asm") ],
1611         CC               => "gcc",
1612         CFLAGS           => picker(default => "-Wall",
1613                                    debug   => "-g -O0",
1614                                    release => "-O3 -fomit-frame-pointer"),
1615         cppflags         => "-DTERMIOS -DL_ENDIAN",
1616         sys_id           => "CYGWIN",
1617         bn_ops           => "BN_LLONG",
1618         thread_scheme    => "pthread",
1619         perlasm_scheme   => "coff",
1620         dso_scheme       => "dlfcn",
1621         shared_target    => "cygwin-shared",
1622         shared_cppflags  => "-D_WINDLL",
1623         shared_extension => ".dll",
1624     },
1625     "Cygwin-x86_64" => {
1626         inherit_from     => [ "BASE_unix", asm("x86_64_asm") ],
1627         CC               => "gcc",
1628         CFLAGS           => picker(default => "-Wall",
1629                                    debug   => "-g -O0",
1630                                    release => "-O3"),
1631         cppflags         => "-DTERMIOS -DL_ENDIAN",
1632         sys_id           => "CYGWIN",
1633         bn_ops           => "SIXTY_FOUR_BIT_LONG",
1634         thread_scheme    => "pthread",
1635         perlasm_scheme   => "mingw64",
1636         dso_scheme       => "dlfcn",
1637         shared_target    => "cygwin-shared",
1638         shared_cppflags  => "-D_WINDLL",
1639         shared_extension => ".dll",
1640     },
1641     # Backward compatibility for those using this target
1642     "Cygwin" => {
1643         inherit_from     => [ "Cygwin-x86" ]
1644     },
1645     # In case someone constructs the Cygwin target name themself
1646     "Cygwin-i386" => {
1647         inherit_from     => [ "Cygwin-x86" ]
1648     },
1649     "Cygwin-i486" => {
1650         inherit_from     => [ "Cygwin-x86" ]
1651     },
1652     "Cygwin-i586" => {
1653         inherit_from     => [ "Cygwin-x86" ]
1654     },
1655     "Cygwin-i686" => {
1656         inherit_from     => [ "Cygwin-x86" ]
1657     },
1658
1659 ##### MacOS X (a.k.a. Darwin) setup
1660     "darwin-common" => {
1661         inherit_from     => [ "BASE_unix" ],
1662         template         => 1,
1663         CC               => "cc",
1664         CFLAGS           => picker(debug   => "-g -O0",
1665                                    release => "-O3"),
1666         cppflags         => threads("-D_REENTRANT"),
1667         lflags           => "-Wl,-search_paths_first",
1668         sys_id           => "MACOSX",
1669         bn_ops           => "BN_LLONG RC4_CHAR",
1670         thread_scheme    => "pthreads",
1671         perlasm_scheme   => "osx32",
1672         dso_scheme       => "dlfcn",
1673         ranlib           => "ranlib -c",
1674         shared_target    => "darwin-shared",
1675         shared_cflag     => "-fPIC",
1676         shared_extension => ".\$(SHLIB_VERSION_NUMBER).dylib",
1677     },
1678     # Option "freeze" such as -std=gnu9x can't negatively interfere
1679     # with future defaults for below two targets, because MacOS X
1680     # for PPC has no future, it was discontinued by vendor in 2009.
1681     "darwin-ppc-cc" => {
1682         inherit_from     => [ "darwin-common", asm("ppc32_asm") ],
1683         cflags           => add("-arch ppc -std=gnu9x -Wa,-force_cpusubtype_ALL"),
1684         cppflags         => add("-DB_ENDIAN"),
1685         shared_cflag     => add("-fno-common"),
1686         perlasm_scheme   => "osx32",
1687     },
1688     "darwin64-ppc-cc" => {
1689         inherit_from     => [ "darwin-common", asm("ppc64_asm") ],
1690         cflags           => add("-arch ppc64 -std=gnu9x"),
1691         cppflags         => add("-DB_ENDIAN"),
1692         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1693         perlasm_scheme   => "osx64",
1694     },
1695     "darwin-i386-cc" => {
1696         inherit_from     => [ "darwin-common", asm("x86_asm") ],
1697         CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
1698         cflags           => add("-arch i386"),
1699         cppflags         => add("-DL_ENDIAN"),
1700         bn_ops           => "BN_LLONG RC4_INT",
1701         perlasm_scheme   => "macosx",
1702     },
1703     "darwin64-x86_64-cc" => {
1704         inherit_from     => [ "darwin-common", asm("x86_64_asm") ],
1705         CFLAGS           => add("-Wall"),
1706         cflags           => add("-arch x86_64"),
1707         cppflags         => add("-DL_ENDIAN"),
1708         bn_ops           => "SIXTY_FOUR_BIT_LONG",
1709         perlasm_scheme   => "macosx",
1710     },
1711
1712 #### iPhoneOS/iOS
1713 #
1714 # It takes three prior-set environment variables to make it work:
1715 #
1716 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
1717 # CROSS_TOP=/where/SDKs/are
1718 # CROSS_SDK=iPhoneOSx.y.sdk
1719 #
1720 # Exact paths vary with Xcode releases, but for couple of last ones
1721 # they would look like this:
1722 #
1723 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
1724 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
1725 # CROSS_SDK=iPhoneOS.sdk
1726 #
1727     "iphoneos-cross" => {
1728         inherit_from     => [ "darwin-common" ],
1729         cflags           => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1730         sys_id           => "iOS",
1731     },
1732     "ios-cross" => {
1733         inherit_from     => [ "darwin-common", asm("armv4_asm") ],
1734         # It should be possible to go below iOS 6 and even add -arch armv6,
1735         # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
1736         # at this point.
1737         cflags           => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1738         sys_id           => "iOS",
1739         perlasm_scheme   => "ios32",
1740     },
1741     "ios64-cross" => {
1742         inherit_from     => [ "darwin-common", asm("aarch64_asm") ],
1743         cflags           => add("-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
1744         sys_id           => "iOS",
1745         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1746         perlasm_scheme   => "ios64",
1747     },
1748
1749 ##### GNU Hurd
1750     "hurd-x86" => {
1751         inherit_from     => [ "BASE_unix" ],
1752         inherit_from     => [ asm("x86_elf_asm") ],
1753         CC               => "gcc",
1754         CFLAGS           => "-O3 -fomit-frame-pointer -Wall",
1755         cflags           => threads("-pthread"),
1756         cppflags         => "-DL_ENDIAN",
1757         ex_libs          => add("-ldl", threads("-pthread")),
1758         bn_ops           => "BN_LLONG",
1759         thread_scheme    => "pthreads",
1760         dso_scheme       => "dlfcn",
1761         shared_target    => "linux-shared",
1762         shared_cflag     => "-fPIC",
1763         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1764     },
1765
1766 ##### VxWorks for various targets
1767     "vxworks-ppc60x" => {
1768         inherit_from     => [ "BASE_unix" ],
1769         CC               => "ccppc",
1770         CFLAGS           => "-O2 -Wall -fstrength-reduce",
1771         cflags           => "-mrtp -mhard-float -mstrict-align -fno-implicit-fp -fno-builtin -fno-strict-aliasing",
1772         cppflags         => combine("-D_REENTRANT -DPPC32_fp60x -DCPU=PPC32",
1773                                     "_DTOOL_FAMILY=gnu -DTOOL=gnu",
1774                                     "-I\$(WIND_BASE)/target/usr/h",
1775                                     "-I\$(WIND_BASE)/target/usr/h/wrn/coreip"),
1776         sys_id           => "VXWORKS",
1777         lflags           => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),
1778         ex_libs          => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),
1779     },
1780     "vxworks-ppcgen" => {
1781         inherit_from     => [ "BASE_unix" ],
1782         CC               => "ccppc",
1783         CFLAGS           => "-O1 -Wall",
1784         cflags           => "-mrtp -msoft-float -mstrict-align -fno-builtin -fno-strict-aliasing",
1785         cppflags         => combine("-D_REENTRANT -DPPC32 -DCPU=PPC32",
1786                                     "-DTOOL_FAMILY=gnu -DTOOL=gnu",
1787                                     "-I\$(WIND_BASE)/target/usr/h",
1788                                     "-I\$(WIND_BASE)/target/usr/h/wrn/coreip"),
1789         sys_id           => "VXWORKS",
1790         lflags           => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),
1791         ex_libs          => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),
1792     },
1793     "vxworks-ppc405" => {
1794         inherit_from     => [ "BASE_unix" ],
1795         CC               => "ccppc",
1796         CFLAGS           => "-g",
1797         cflags           => "-msoft-float -mlongcall",
1798         cppflags         => combine("-D_REENTRANT -DPPC32 -DCPU=PPC405",
1799                                     "-DTOOL_FAMILY=gnu -DTOOL=gnu",
1800                                     "-I\$(WIND_BASE)/target/h"),
1801         sys_id           => "VXWORKS",
1802         lflags           => add("-r"),
1803     },
1804     "vxworks-ppc750" => {
1805         inherit_from     => [ "BASE_unix" ],
1806         CC               => "ccppc",
1807         CFLAGS           => "-ansi -fvolatile -Wall \$(DEBUG_FLAG)",
1808         cflags           => "-nostdinc -fno-builtin -fno-for-scope -fsigned-char -msoft-float -mlongcall",
1809         cppflags         => combine("-DPPC750 -D_REENTRANT -DCPU=PPC604",
1810                                     "-I\$(WIND_BASE)/target/h"),
1811         sys_id           => "VXWORKS",
1812         lflags           => add("-r"),
1813     },
1814     "vxworks-ppc750-debug" => {
1815         inherit_from     => [ "BASE_unix" ],
1816         CC               => "ccppc",
1817         CFLAGS           => "-ansi -fvolatile -Wall -g",
1818         cflags           => "-nostdinc -fno-builtin -fno-for-scope -fsigned-char -msoft-float -mlongcall",
1819         cppflags         => combine("-DPPC750 -D_REENTRANT -DCPU=PPC604",
1820                                     "-DPEDANTIC -DDEBUG",
1821                                     "-I\$(WIND_BASE)/target/h"),
1822         sys_id           => "VXWORKS",
1823         lflags           => add("-r"),
1824     },
1825     "vxworks-ppc860" => {
1826         inherit_from     => [ "BASE_unix" ],
1827         CC               => "ccppc",
1828         cflags           => "-nostdinc -msoft-float",
1829         cppflags         => combine("-DCPU=PPC860 -DNO_STRINGS_H",
1830                                     "-I\$(WIND_BASE)/target/h"),
1831         sys_id           => "VXWORKS",
1832         lflags           => add("-r"),
1833     },
1834     "vxworks-simlinux" => {
1835         inherit_from     => [ "BASE_unix" ],
1836         CC               => "ccpentium",
1837         cflags           => "-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -fno-builtin -fno-defer-pop",
1838         cppflags         => combine("-D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\"",
1839                                     "-DL_ENDIAN -DCPU=SIMLINUX -DNO_STRINGS_H",
1840                                     "-DTOOL_FAMILY=gnu -DTOOL=gnu",
1841                                     "-DOPENSSL_NO_HW_PADLOCK",
1842                                     "-I\$(WIND_BASE)/target/h",
1843                                     "-I\$(WIND_BASE)/target/h/wrn/coreip"),
1844         sys_id           => "VXWORKS",
1845         lflags           => add("-r"),
1846         ranlib           => "ranlibpentium",
1847     },
1848     "vxworks-mips" => {
1849         inherit_from     => [ "BASE_unix", asm("mips32_asm") ],
1850         CC               => "ccmips",
1851         CFLAGS           => "-O -G 0",
1852         cflags           => "-mrtp -mips2 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -msoft-float -mno-branch-likely -fno-builtin -fno-defer-pop",
1853         cppflags         => combine("-D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\"",
1854                                     "-DCPU=MIPS32 -DNO_STRINGS_H",
1855                                     "-DTOOL_FAMILY=gnu -DTOOL=gnu",
1856                                     "-DOPENSSL_NO_HW_PADLOCK",
1857                                     threads("-D_REENTRANT"),
1858                                     "-I\$(WIND_BASE)/target/h",
1859                                     "-I\$(WIND_BASE)/target/h/wrn/coreip"),
1860         sys_id           => "VXWORKS",
1861         lflags           => add("-L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),
1862         ex_libs          => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),
1863         thread_scheme    => "pthreads",
1864         perlasm_scheme   => "o32",
1865         ranlib           => "ranlibmips",
1866     },
1867
1868 #### uClinux
1869     "uClinux-dist" => {
1870         inherit_from     => [ "BASE_unix" ],
1871         CC               => sub { env('CC') },
1872         cppflags         => threads("-D_REENTRANT"),
1873         ex_libs          => add("\$(LDLIBS)"),
1874         bn_ops           => "BN_LLONG",
1875         thread_scheme    => "pthreads",
1876         dso_scheme       => sub { env('LIBSSL_dlfcn') },
1877         shared_target    => "linux-shared",
1878         shared_cflag     => "-fPIC",
1879         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1880         ranlib           => sub { env('RANLIB') },
1881     },
1882     "uClinux-dist64" => {
1883         inherit_from     => [ "BASE_unix" ],
1884         CC               => sub { env('CC') },
1885         cppflags         => threads("-D_REENTRANT"),
1886         ex_libs          => add("\$(LDLIBS)"),
1887         bn_ops           => "SIXTY_FOUR_BIT_LONG",
1888         thread_scheme    => "pthreads",
1889         dso_scheme       => sub { env('LIBSSL_dlfcn') },
1890         shared_target    => "linux-shared",
1891         shared_cflag     => "-fPIC",
1892         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
1893         ranlib           => sub { env('RANLIB') },
1894     },
1895
1896     ##### VMS
1897     # Most things happen in vms-generic.
1898     # Note that vms_info extracts the pointer size from the end of
1899     # the target name, and will assume that anything matching /-p\d+$/
1900     # indicates the pointer size setting for the desired target.
1901     "vms-generic" => {
1902         inherit_from     => [ "BASE_VMS" ],
1903         template         => 1,
1904         CC               => "CC/DECC",
1905         CPP              => '$(CC)/PREPROCESS_ONLY=SYS$OUTPUT:',
1906         CFLAGS           =>
1907             combine(picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL",
1908                            debug   => "/NOOPTIMIZE/DEBUG",
1909                            release => "/OPTIMIZE/NODEBUG"),
1910                     sub { my @warnings =
1911                               @{vms_info()->{disable_warns}};
1912                           @warnings
1913                               ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
1914         defines          =>
1915             add("OPENSSL_USE_NODELETE",
1916                 sub {
1917                     return vms_info()->{def_zlib}
1918                         ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : ();
1919                 }),
1920         lflags           => picker(default => "/MAP='F\$PARSE(\".MAP\",\"\$\@\")'",
1921                                    debug   => "/DEBUG/TRACEBACK",
1922                                    release => "/NODEBUG/NOTRACEBACK"),
1923         lib_cflags       => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
1924         # no_inst_lib_cflags is used instead of lib_cflags by descrip.mms.tmpl
1925         # for object files belonging to selected internal libraries
1926         no_inst_lib_cflags => "",
1927         ex_libs          => add(sub { return vms_info()->{zlib} || (); }),
1928         shared_target    => "vms-shared",
1929         dso_scheme       => "vms",
1930         thread_scheme    => "pthreads",
1931
1932         AS               => sub { vms_info()->{AS} },
1933         ASFLAGS          => sub { vms_info()->{ASFLAGS} },
1934         asoutflag        => sub { vms_info()->{asoutflag} },
1935         asflags          => sub { vms_info()->{asflags} },
1936         perlasm_scheme   => sub { vms_info()->{perlasm_scheme} },
1937
1938         apps_aux_src     => "vms_term_sock.c",
1939         apps_init_src    => "vms_decc_init.c",
1940     },
1941
1942     # From HELP CC/POINTER_SIZE:
1943     #
1944     # ----------
1945     # LONG[=ARGV] The compiler assumes 64-bit pointers. If the ARGV option to
1946     #             LONG or 64 is present, the main argument argv will be an
1947     #             array of long pointers instead of an array of short pointers.
1948     #
1949     # 64[=ARGV]   Same as LONG.
1950     # ----------
1951     #
1952     # We don't want the hassle of dealing with 32-bit pointers with argv, so
1953     # we force it to have 64-bit pointers, see the added cflags in the -p64
1954     # config targets below.
1955
1956     "vms-alpha" => {
1957         inherit_from     => [ "vms-generic" ],
1958         bn_ops           => "SIXTY_FOUR_BIT RC4_INT",
1959         pointer_size     => "",
1960     },
1961     "vms-alpha-p32" => {
1962         inherit_from     => [ "vms-alpha" ],
1963         cflags           => add("/POINTER_SIZE=32"),
1964         pointer_size     => "32",
1965     },
1966     "vms-alpha-p64" => {
1967         inherit_from     => [ "vms-alpha" ],
1968         cflags           => add("/POINTER_SIZE=64=ARGV"),
1969         pointer_size     => "64",
1970     },
1971     "vms-ia64" => {
1972         inherit_from     => [ "vms-generic",
1973                               sub { vms_info()->{as}
1974                                         ? asm("ia64_asm")->() : () } ],
1975         bn_ops           => "SIXTY_FOUR_BIT RC4_INT",
1976         pointer_size     => "",
1977
1978         modes_asm_src    => "", # Because ghash-ia64.s doesn't work on VMS
1979     },
1980     "vms-ia64-p32" => {
1981         inherit_from     => [ "vms-ia64" ],
1982         cflags           => add("/POINTER_SIZE=32"),
1983         pointer_size     => "32",
1984     },
1985     "vms-ia64-p64" => {
1986         inherit_from     => [ "vms-ia64" ],
1987         cflags           => add("/POINTER_SIZE=64=ARGV"),
1988         pointer_size     => "64",
1989     },
1990
1991 );