6e5e71a7855077177d5b26267ab366834cc9c874
[openssl.git] / Configurations / 10-main.conf
1 ## -*- mode: perl; -*-
2 ## Standard openssl configuration targets.
3
4 %targets = (
5
6 #### Basic configs that should work on any 32-bit box
7     "gcc" => {
8         cc               => "gcc",
9         cflags           => "",
10         debug_cflags     => "-O0 -g",
11         release_cflags   => "-O3",
12         thread_cflag     => "(unknown)",
13         bn_ops           => "BN_LLONG",
14     },
15     "cc" => {
16         cc               => "cc",
17         cflags           => "-O",
18         thread_cflag     => "(unknown)",
19     },
20
21 #### VOS Configurations
22     "vos-gcc" => {
23         cc               => "gcc",
24         cflags           => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
25         debug_cflags     => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG",
26         release_cflags   => "-O3",
27         thread_cflag     => "(unknown)",
28         sys_id           => "VOS",
29         lflags           => "-Wl,-map",
30         bn_ops           => "BN_LLONG",
31         shared_extension => ".so",
32     },
33
34 #### Solaris configurations
35     "solaris-common" => {
36         template         => 1,
37         cflags           => "-DFILIO_H",
38         ex_libs          => "-lresolv -lsocket -lnsl -ldl",
39         dso_scheme       => "dlfcn",
40         shared_target    => "solaris-shared",
41         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
42     },
43 #### Solaris x86 with GNU C setups
44     "solaris-x86-gcc" => {
45         # -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have
46         # to do it here because whenever GNU C instantiates an assembler
47         # template it surrounds it with #APP #NO_APP comment pair which
48         # (at least Solaris 7_x86) /usr/ccs/bin/as fails to assemble
49         # with "Illegal mnemonic" error message.
50         inherit_from     => [ "solaris-common", asm("x86_elf_asm") ],
51         cc               => "gcc",
52         cflags           => add_before("-Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM"),
53         debug_cflags     => "-O0 -g",
54         release_cflags   => "-O3 -fomit-frame-pointer",
55         thread_cflag     => "-pthread",
56         bn_ops           => "BN_LLONG",
57         shared_cflag     => "-fPIC",
58         shared_ldflag    => "-shared",
59     },
60     "solaris64-x86_64-gcc" => {
61         # -shared -static-libgcc might appear controversial, but modules
62         # taken from static libgcc do not have relocations and linking
63         # them into our shared objects doesn't have any negative side
64         # effects. On the contrary, doing so makes it possible to use
65         # gcc shared build with Sun C. Given that gcc generates faster
66         # code [thanks to inline assembler], I would actually recommend
67         # to consider using gcc shared build even with vendor compiler:-)
68         #                                       <appro@fy.chalmers.se>
69         inherit_from     => [ "solaris-common", asm("x86_64_asm") ],
70         cc               => "gcc",
71         cflags           => add_before("-m64 -Wall -DL_ENDIAN"),
72         debug_cflags     => "-O0 -g",
73         release_cflags   => "-O3",
74         thread_cflag     => "-pthread",
75         bn_ops           => "SIXTY_FOUR_BIT_LONG",
76         perlasm_scheme   => "elf",
77         shared_cflag     => "-fPIC",
78         shared_ldflag    => "-m64 -shared -static-libgcc",
79         multilib         => "/64",
80     },
81
82 #### Solaris x86 with Sun C setups
83     "solaris-x86-cc" => {
84         inherit_from     => [ "solaris-common" ],
85         cc               => "cc",
86         cflags           => add_before("-xarch=generic -xstrconst -Xa -DL_ENDIAN"),
87         debug_cflags     => "-g",
88         release_cflags   => "-xO5 -xregs=frameptr -xdepend -xbuiltin",
89         thread_cflag     => "-D_REENTRANT",
90         lflags           => add("-mt"),
91         ex_libs          => add("-lpthread"),
92         bn_ops           => "BN_LLONG RC4_CHAR",
93         shared_cflag     => "-KPIC",
94         shared_ldflag    => "-G -dy -z text",
95     },
96     "solaris64-x86_64-cc" => {
97         inherit_from     => [ "solaris-common", asm("x86_64_asm") ],
98         cc               => "cc",
99         cflags           => add_before("-xarch=generic64 -xstrconst -Xa -DL_ENDIAN"),
100         debug_cflags     => "-g",
101         release_cflags   => "-xO5 -xdepend -xbuiltin",
102         thread_cflag     => "-D_REENTRANT",
103         lflags           => add("-mt"),
104         ex_libs          => add("-lpthread"),
105         bn_ops           => "SIXTY_FOUR_BIT_LONG",
106         perlasm_scheme   => "elf",
107         shared_cflag     => "-KPIC",
108         shared_ldflag    => "-xarch=generic64 -G -dy -z text",
109         multilib         => "/64",
110     },
111
112 #### SPARC Solaris with GNU C setups
113     "solaris-sparcv7-gcc" => {
114         inherit_from     => [ "solaris-common" ],
115         cc               => "gcc",
116         cflags           => add_before("-Wall -DB_ENDIAN -DBN_DIV2W"),
117         debug_cflags     => "-O0 -g",
118         release_cflags   => "-O3",
119         thread_cflag     => "-pthread",
120         bn_ops           => "BN_LLONG RC4_CHAR",
121         shared_cflag     => "-fPIC",
122         shared_ldflag    => "-shared",
123     },
124     "solaris-sparcv8-gcc" => {
125         inherit_from     => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
126         cflags           => add_before("-mcpu=v8"),
127     },
128     "solaris-sparcv9-gcc" => {
129         # -m32 should be safe to add as long as driver recognizes
130         # -mcpu=ultrasparc
131         inherit_from     => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
132         cflags           => add_before("-m32 -mcpu=ultrasparc"),
133         debug_cflags     => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -O -g -pedantic -ansi -Wshadow -Wno-long-long -D__EXTENSIONS__",
134     },
135     "solaris64-sparcv9-gcc" => {
136         inherit_from     => [ "solaris-sparcv9-gcc" ],
137         cflags           => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
138         bn_ops           => "BN_LLONG RC4_CHAR",
139         shared_ldflag    => "-m64 -shared",
140         multilib         => "/64",
141     },
142
143 #### SPARC Solaris with Sun C setups
144 # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
145 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
146 # SC5.0 note: Compiler common patch 107357-01 or later is required!
147     "solaris-sparcv7-cc" => {
148         inherit_from     => [ "solaris-common" ],
149         cc               => "cc",
150         cflags           => add_before("-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W"),
151         debug_cflags     => "-g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG",
152         release_cflags   => "-xO5 -xdepend",
153         thread_cflag     => "-D_REENTRANT",
154         lflags           => add("-mt"),
155         ex_libs          => add("-lpthread"),
156         bn_ops           => "BN_LLONG RC4_CHAR",
157         shared_cflag     => "-KPIC",
158         shared_ldflag    => "-G -dy -z text",
159     },
160 ####
161     "solaris-sparcv8-cc" => {
162         inherit_from     => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
163         cflags           => add_before("-xarch=v8"),
164     },
165     "solaris-sparcv9-cc" => {
166         inherit_from     => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
167         cflags           => add_before("-xarch=v8plus -xtarget=ultra"),
168     },
169     "solaris64-sparcv9-cc" => {
170         inherit_from     => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
171         cflags           => add_before("-xarch=v9 -xtarget=ultra"),
172         bn_ops           => "BN_LLONG RC4_CHAR",
173         shared_ldflag    => "-xarch=v9 -G -dy -z text",
174         multilib         => "/64",
175     },
176
177 #### IRIX 5.x configs
178 # -mips2 flag is added by ./config when appropriate.
179     "irix-gcc" => {
180         inherit_from     => [ asm("mips32_asm") ],
181         cc               => "gcc",
182         cflags           => "-DB_ENDIAN",
183         debug_cflags     => "-g -O0",
184         release_cflags   => "-O3",
185         thread_cflag     => "(unknown)",
186         bn_ops           => "BN_LLONG RC4_CHAR",
187         perlasm_scheme   => "o32",
188         dso_scheme       => "dlfcn",
189         shared_target    => "irix-shared",
190         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
191     },
192     "irix-cc" => {
193         inherit_from     => [ asm("mips32_asm") ],
194         cc               => "cc",
195         cflags           => "-use_readonly_const -DB_ENDIAN",
196         debug_cflags     => "-g -O0",
197         release_cflags   => "-O2",
198         thread_cflag     => "(unknown)",
199         bn_ops           => "BN_LLONG RC4_CHAR",
200         perlasm_scheme   => "o32",
201         dso_scheme       => "dlfcn",
202         shared_target    => "irix-shared",
203         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
204     },
205 #### IRIX 6.x configs
206 # Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
207 # './Configure irix-cc -o32' manually.
208     "irix-mips3-gcc" => {
209         inherit_from     => [ asm("mips64_asm") ],
210         cc               => "gcc",
211         cflags           => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W",
212         debug_cflags     => "-g -O0",
213         release_cflags   => "-O3",
214         thread_cflag     => "-D_SGI_MP_SOURCE -pthread",
215         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT",
216         perlasm_scheme   => "n32",
217         dso_scheme       => "dlfcn",
218         shared_target    => "irix-shared",
219         shared_ldflag    => "-mabi=n32",
220         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
221         multilib         => "32",
222     },
223     "irix-mips3-cc" => {
224         inherit_from     => [ asm("mips64_asm") ],
225         cc               => "cc",
226         cflags           => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
227         debug_cflags     => "-g -O0",
228         release_cflags   => "-O2",
229         thread_cflag     => "-D_SGI_MP_SOURCE",
230         ex_libs          => "-lpthread",
231         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT",
232         perlasm_scheme   => "n32",
233         dso_scheme       => "dlfcn",
234         shared_target    => "irix-shared",
235         shared_ldflag    => "-n32",
236         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
237         multilib         => "32",
238     },
239     # N64 ABI builds.
240     "irix64-mips4-gcc" => {
241         inherit_from     => [ asm("mips64_asm") ],
242         cc               => "gcc",
243         cflags           => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W",
244         debug_cflags     => "-g -O0",
245         release_cflags   => "-O3",
246         thread_cflag     => "-D_SGI_MP_SOURCE",
247         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
248         perlasm_scheme   => "64",
249         dso_scheme       => "dlfcn",
250         shared_target    => "irix-shared",
251         shared_ldflag    => "-mabi=64",
252         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
253         multilib         => "64",
254     },
255     "irix64-mips4-cc" => {
256         inherit_from     => [ asm("mips64_asm") ],
257         cc               => "cc",
258         cflags           => "-64 -mips4 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
259         debug_cflags     => "-g -O0",
260         release_cflags   => "-O2",
261         thread_cflag     => "-D_SGI_MP_SOURCE",
262         ex_libs          => "-lpthread",
263         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
264         perlasm_scheme   => "64",
265         dso_scheme       => "dlfcn",
266         shared_target    => "irix-shared",
267         shared_ldflag    => "-64",
268         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
269         multilib         => "64",
270     },
271
272 #### Unified HP-UX ANSI C configs.
273 # Special notes:
274 # - Originally we were optimizing at +O4 level. It should be noted
275 #   that the only difference between +O3 and +O4 is global inter-
276 #   procedural analysis. As it has to be performed during the link
277 #   stage the compiler leaves behind certain pseudo-code in lib*.a
278 #   which might be release or even patch level specific. Generating
279 #   the machine code for and analyzing the *whole* program appears
280 #   to be *extremely* memory demanding while the performance gain is
281 #   actually questionable. The situation is intensified by the default
282 #   HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
283 #   which is way too low for +O4. In other words, doesn't +O3 make
284 #   more sense?
285 # - Keep in mind that the HP compiler by default generates code
286 #   suitable for execution on the host you're currently compiling at.
287 #   If the toolkit is ment to be used on various PA-RISC processors
288 #   consider './Configure hpux-parisc-[g]cc +DAportable'.
289 # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
290 #   32-bit message digests. (For the moment of this writing) HP C
291 #   doesn't seem to "digest" too many local variables (they make "him"
292 #   chew forever:-). For more details look-up MD32_XARRAY comment in
293 #   crypto/sha/sha_lcl.h.
294 # - originally there were 32-bit hpux-parisc2-* targets. They were
295 #   scrapped, because a) they were not interchangable with other 32-bit
296 #   targets; a) when critical 32-bit assembly modules detect if they
297 #   are executed on PA-RISC 2.0 and thus adequate performance is
298 #   provided. 
299 #                                       <appro@fy.chalmers.se>
300     "hpux-parisc-gcc" => {
301         cc               => "gcc",
302         cflags           => "-DB_ENDIAN -DBN_DIV2W",
303         debug_cflags     => "-O0 -g",
304         release_cflags   => "-O3",
305         thread_cflag     => "-pthread",
306         ex_libs          => "-Wl,+s -ldld",
307         bn_ops           => "BN_LLONG",
308         dso_scheme       => "dl",
309         shared_target    => "hpux-shared",
310         shared_cflag     => "-fPIC",
311         shared_ldflag    => "-shared",
312         shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
313     },
314     "hpux-parisc1_1-gcc" => {
315         inherit_from     => [ "hpux-parisc-gcc", asm("parisc11_asm") ],
316         multilib         => "/pa1.1",
317     },
318     "hpux64-parisc2-gcc" => {
319         inherit_from     => [ asm("parisc20_64_asm") ],
320         cc               => "gcc",
321         cflags           => "-DB_ENDIAN",
322         debug_cflags     => "-O0 -g",
323         release_cflags   => "-O3",
324         thread_cflag     => "-D_REENTRANT",
325         ex_libs          => "-ldl",
326         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
327         dso_scheme       => "dlfcn",
328         shared_target    => "hpux-shared",
329         shared_cflag     => "-fpic",
330         shared_ldflag    => "-shared",
331         shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
332         multilib         => "/pa20_64",
333     },
334
335     # More attempts at unified 10.X and 11.X targets for HP C compiler.
336     #
337     # Chris Ruemmler <ruemmler@cup.hp.com>
338     # Kevin Steves <ks@hp.se>
339     "hpux-parisc-cc" => {
340         cc               => "cc",
341         cflags           => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
342         debug_cflags      => "+O0 +d -g",
343         release_cflags   => "+O3",
344         thread_cflag     => "-D_REENTRANT",
345         ex_libs          => "-Wl,+s -ldld -lpthread",
346         bn_ops           => "RC4_CHAR",
347         dso_scheme       => "dl",
348         shared_target    => "hpux-shared",
349         shared_cflag     => "+Z",
350         shared_ldflag    => "-b",
351         shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
352     },
353     "hpux-parisc1_1-cc" => {
354         inherit_from     => [ "hpux-parisc-cc", asm("parisc11_asm") ],
355         cflags           => add_before("+DA1.1"),
356         multilib         => "/pa1.1",
357     },
358     "hpux64-parisc2-cc" => {
359         inherit_from     => [ asm("parisc20_64_asm") ],
360         cc               => "cc",
361         cflags           => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY",
362         debug_cflags      => "+O0 +d -g",
363         release_cflags   => "+O3",
364         thread_cflag     => "-D_REENTRANT",
365         ex_libs          => "-ldl -lpthread",
366         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
367         dso_scheme       => "dlfcn",
368         shared_target    => "hpux-shared",
369         shared_cflag     => "+Z",
370         shared_ldflag    => "+DD64 -b",
371         shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
372         multilib         => "/pa20_64",
373     },
374
375     # HP/UX IA-64 targets
376     "hpux-ia64-cc" => {
377         inherit_from     => [ asm("ia64_asm") ],
378         cc               => "cc",
379         cflags           => "-Ae +DD32 +Olit=all -z -DB_ENDIAN",
380         debug_cflags     => "+O0 +d -g",
381         release_cflags   => "+O2",
382         thread_cflag     => "-D_REENTRANT",
383         ex_libs          => "-ldl -lpthread",
384         bn_ops           => "SIXTY_FOUR_BIT",
385         dso_scheme       => "dlfcn",
386         shared_target    => "hpux-shared",
387         shared_cflag     => "+Z",
388         shared_ldflag    => "+DD32 -b",
389         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
390         multilib         => "/hpux32",
391     },
392     # Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted
393     # with debugging of the following config.
394     "hpux64-ia64-cc" => {
395         inherit_from     => [ asm("ia64_asm") ],
396         cc               => "cc",
397         cflags           => "-Ae +DD64 +Olit=all -z -DB_ENDIAN",
398         debug_cflags     => "+O0 +d -g",
399         release_cflags   => "+O3",
400         thread_cflag     => "-D_REENTRANT",
401         ex_libs          => "-ldl -lpthread",
402         bn_ops           => "SIXTY_FOUR_BIT_LONG",
403         dso_scheme       => "dlfcn",
404         shared_target    => "hpux-shared",
405         shared_cflag     => "+Z",
406         shared_ldflag    => "+DD64 -b",
407         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
408         multilib         => "/hpux64",
409     },
410     # GCC builds...
411     "hpux-ia64-gcc" => {
412         inherit_from     => [ asm("ia64_asm") ],
413         cc               => "gcc",
414         cflags           => "-DB_ENDIAN",
415         debug_cflags     => "-O0 -g",
416         release_cflags   => "-O3",
417         thread_cflag     => "-pthread",
418         ex_libs          => "-ldl",
419         bn_ops           => "SIXTY_FOUR_BIT",
420         dso_scheme       => "dlfcn",
421         shared_target    => "hpux-shared",
422         shared_cflag     => "-fpic",
423         shared_ldflag    => "-shared",
424         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
425         multilib         => "/hpux32",
426     },
427     "hpux64-ia64-gcc" => {
428         inherit_from     => [ asm("ia64_asm") ],
429         cc               => "gcc",
430         cflags           => "-mlp64 -DB_ENDIAN",
431         debug_cflags     => "-O0 -g",
432         release_cflags   => "-O3",
433         thread_cflag     => "-pthread",
434         ex_libs          => "-ldl",
435         bn_ops           => "SIXTY_FOUR_BIT_LONG",
436         dso_scheme       => "dlfcn",
437         shared_target    => "hpux-shared",
438         shared_cflag     => "-fpic",
439         shared_ldflag    => "-mlp64 -shared",
440         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
441         multilib         => "/hpux64",
442     },
443
444 #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
445     "MPE/iX-gcc" => {
446         cc               => "gcc",
447         cflags           => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB",
448         thread_cflag     => "(unknown)",
449         sys_id           => "MPE",
450         ex_libs          => "-L/SYSLOG/PUB -lsyslog -lsocket -lcurses",
451         bn_ops           => "BN_LLONG",
452     },
453
454 #### DEC Alpha OSF/1/Tru64 targets.
455     "osf1-alpha-gcc" => {
456         inherit_from     => [ asm("alpha_asm") ],
457         cc               => "gcc",
458         cflags           => "-O3",
459         thread_cflag     => "(unknown)",
460         bn_ops           => "SIXTY_FOUR_BIT_LONG",
461         dso_scheme       => "dlfcn",
462         shared_target    => "alpha-osf1-shared",
463         shared_extension => ".so",
464     },
465     "osf1-alpha-cc" => {
466         inherit_from     => [ asm("alpha_asm") ],
467         cc               => "cc",
468         cflags           => "-std1 -tune host -O4 -readonly_strings",
469         thread_cflag     => "(unknown)",
470         bn_ops           => "SIXTY_FOUR_BIT_LONG",
471         dso_scheme       => "dlfcn",
472         shared_target    => "alpha-osf1-shared",
473         shared_extension => ".so",
474     },
475     "tru64-alpha-cc" => {
476         inherit_from     => [ asm("alpha_asm") ],
477         cc               => "cc",
478         cflags           => "-std1 -tune host -fast -readonly_strings",
479         thread_cflag     => "-pthread",
480         bn_ops           => "SIXTY_FOUR_BIT_LONG",
481         dso_scheme       => "dlfcn",
482         shared_target    => "alpha-osf1-shared",
483         shared_ldflag    => "-msym",
484         shared_extension => ".so",
485     },
486
487 ####
488 #### Variety of LINUX:-)
489 ####
490 # *-generic* is endian-neutral target, but ./config is free to
491 # throw in -D[BL]_ENDIAN, whichever appropriate...
492     "linux-generic32" => {
493         cc               => "gcc",
494         cflags           => "-Wall",
495         debug_cflags     => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG",
496         release_cflags   => "-O3",
497         thread_cflag     => "-pthread",
498         ex_libs          => "-ldl",
499         bn_ops           => "BN_LLONG RC4_CHAR",
500         dso_scheme       => "dlfcn",
501         shared_target    => "linux-shared",
502         shared_cflag     => "-fPIC",
503         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
504     },
505     "linux-generic64" => {
506         inherit_from     => [ "linux-generic32" ],
507         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
508     },
509
510     "linux-ppc" => {
511         inherit_from     => [ "linux-generic32", asm("ppc32_asm") ],
512         perlasm_scheme   => "linux32",
513     },
514     "linux-ppc64" => {
515         inherit_from     => [ "linux-generic64", asm("ppc64_asm") ],
516         cflags           => "-m64 -Wall -DB_ENDIAN",
517         perlasm_scheme   => "linux64",
518         shared_ldflag    => "-m64",
519         multilib         => "64",
520     },
521     "linux-ppc64le" => {
522         inherit_from     => [ "linux-generic64", asm("ppc64_asm") ],
523         cflags           => "-m64 -Wall -DL_ENDIAN",
524         perlasm_scheme   => "linux64le",
525         shared_ldflag    => "-m64",
526     },
527
528     "linux-armv4" => {
529         ################################################################
530         # Note that -march is not among compiler options in linux-armv4
531         # target description. Not specifying one is intentional to give
532         # you choice to:
533         #
534         # a) rely on your compiler default by not specifying one;
535         # b) specify your target platform explicitly for optimal
536         # performance, e.g. -march=armv6 or -march=armv7-a;
537         # c) build "universal" binary that targets *range* of platforms
538         # by specifying minimum and maximum supported architecture;
539         #
540         # As for c) option. It actually makes no sense to specify
541         # maximum to be less than ARMv7, because it's the least
542         # requirement for run-time switch between platform-specific
543         # code paths. And without run-time switch performance would be
544         # equivalent to one for minimum. Secondly, there are some
545         # natural limitations that you'd have to accept and respect.
546         # Most notably you can *not* build "universal" binary for
547         # big-endian platform. This is because ARMv7 processor always
548         # picks instructions in little-endian order. Another similar
549         # limitation is that -mthumb can't "cross" -march=armv6t2
550         # boundary, because that's where it became Thumb-2. Well, this
551         # limitation is a bit artificial, because it's not really
552         # impossible, but it's deemed too tricky to support. And of
553         # course you have to be sure that your binutils are actually
554         # up to the task of handling maximum target platform. With all
555         # this in mind here is an example of how to configure
556         # "universal" build:
557         #
558         # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
559         #
560         inherit_from     => [ "linux-generic32", asm("armv4_asm") ],
561         perlasm_scheme   => "linux32",
562     },
563     "linux-aarch64" => {
564         inherit_from     => [ "linux-generic64", asm("aarch64_asm") ],
565         perlasm_scheme   => "linux64",
566     },
567     "linux-arm64ilp32" => {  # https://wiki.linaro.org/Platform/arm64-ilp32
568         inherit_from     => [ "linux-generic32", asm("aarch64_asm") ],
569         cflags           => "-mabi=ilp32 -Wall",
570         bn_ops           => "SIXTY_FOUR_BIT RC4_CHAR",
571         perlasm_scheme   => "linux64",
572         shared_ldflag    => "-mabi=ilp32",
573     },
574
575     "linux-mips32" => {
576         # Configure script adds minimally required -march for assembly
577         # support, if no -march was specified at command line.
578         inherit_from     => [ "linux-generic32", asm("mips32_asm") ],
579         cflags           => "-mabi=32 -Wall -DBN_DIV3W",
580         perlasm_scheme   => "o32",
581         shared_ldflag    => "-mabi=32",
582     },
583     # mips32 and mips64 below refer to contemporary MIPS Architecture
584     # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
585     "linux-mips64" => {
586         inherit_from     => [ "linux-generic32", asm("mips64_asm") ],
587         cflags           => "-mabi=n32 -Wall -DBN_DIV3W",
588         bn_ops           => "SIXTY_FOUR_BIT RC4_CHAR",
589         perlasm_scheme   => "n32",
590         shared_ldflag    => "-mabi=n32",
591         multilib         => "32",
592     },
593     "linux64-mips64" => {
594         inherit_from     => [ "linux-generic64", asm("mips64_asm") ],
595         cflags           => "-mabi=64 -O3 -Wall -DBN_DIV3W",
596         perlasm_scheme   => "64",
597         shared_ldflag    => "-mabi=64",
598         multilib         => "64",
599     },
600
601     #### IA-32 targets...
602     "linux-elf" => {
603         inherit_from     => [ "linux-generic32", asm("x86_elf_asm") ],
604         cc               => "gcc",
605         cflags           => "-DL_ENDIAN -Wall",
606         debug_cflags     => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG",
607         release_cflags   => "-O3 -fomit-frame-pointer",
608         debug_ex_libs    => "-lefence",
609         bn_ops           => "BN_LLONG",
610     },
611     "linux-aout" => {
612         inherit_from     => [ asm("x86_asm") ],
613         cc               => "gcc",
614         cflags           => "-DL_ENDIAN -Wall",
615         debug_cflags     => "-O0 -g",
616         release_cflags   => "-O3 -fomit-frame-pointer",
617         thread_cflag     => "(unknown)",
618         bn_ops           => "BN_LLONG",
619         perlasm_scheme   => "a.out",
620     },
621
622     "linux-x86_64" => {
623         inherit_from     => [ "linux-generic64", asm("x86_64_asm") ],
624         cflags           => "-m64 -DL_ENDIAN -Wall",
625         bn_ops           => "SIXTY_FOUR_BIT_LONG",
626         perlasm_scheme   => "elf",
627         shared_ldflag    => "-m64",
628         multilib         => "64",
629     },
630     "linux-x86_64-clang" => {
631         inherit_from     => [ "linux-x86_64" ],
632         cc               => "clang",
633         cflags           => "-m64 -DL_ENDIAN -Wall -Wextra -Qunused-arguments",
634     },
635     "linux-x32" => {
636         inherit_from     => [ "linux-generic32", asm("x86_64_asm") ],
637         cflags           => "-mx32 -DL_ENDIAN -Wall",
638         bn_ops           => "SIXTY_FOUR_BIT",
639         perlasm_scheme   => "elf",
640         shared_ldflag    => "-mx32",
641         multilib         => "x32",
642     },
643
644     "linux-ia64" => {
645         inherit_from     => [ "linux-generic64", asm("ia64_asm") ],
646         bn_ops           => "SIXTY_FOUR_BIT_LONG",
647     },
648
649     "linux64-s390x" => {
650         inherit_from     => [ "linux-generic64", asm("s390x_asm") ],
651         cflags           => "-m64 -Wall -DB_ENDIAN",
652         perlasm_scheme   => "64",
653         shared_ldflag    => "-m64",
654         multilib         => "64",
655     },
656     "linux32-s390x" => {
657         #### So called "highgprs" target for z/Architecture CPUs
658         # "Highgprs" is kernel feature first implemented in Linux
659         # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
660         # significant bits of general purpose registers not only
661         # upon 32-bit process context switch, but even on
662         # asynchronous signal delivery to such process. This makes
663         # it possible to deploy 64-bit instructions even in legacy
664         # application context and achieve better [or should we say
665         # adequate] performance. The build is binary compatible with
666         # linux-generic32, and the idea is to be able to install the
667         # resulting libcrypto.so alongside generic one, e.g. as
668         # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
669         # linker to autodiscover. Unfortunately it doesn't work just
670         # yet, because of couple of bugs in glibc
671         # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
672         #
673         inherit_from     => [ "linux-generic32", asm("s390x_asm") ],
674         cflags           => "-m31 -Wall -Wa,-mzarch -DB_ENDIAN",
675         bn_obj           => sub { my $r=join(" ",@_); $r=~s/bn\-s390x/bn_asm/; $r; },
676         perlasm_scheme   => "31",
677         shared_ldflag    => "-m31",
678         multilib         => "/highgprs",
679     },
680
681     #### SPARC Linux setups
682     # Ray Miller <ray.miller@computing-services.oxford.ac.uk> has
683     # patiently assisted with debugging of following two configs.
684     "linux-sparcv8" => {
685         inherit_from     => [ "linux-generic32", asm("sparcv8_asm") ],
686         cflags           => "-mcpu=v8 -Wall -DB_ENDIAN -DBN_DIV2W",
687     },
688     "linux-sparcv9" => {
689         # it's a real mess with -mcpu=ultrasparc option under Linux,
690         # but -Wa,-Av8plus should do the trick no matter what.
691         inherit_from     => [ "linux-generic32", asm("sparcv9_asm") ],
692         cflags           => "-m32 -mcpu=ultrasparc -Wall -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W",
693         shared_ldflag    => "-m32",
694     },
695     "linux64-sparcv9" => {
696         # GCC 3.1 is a requirement
697         inherit_from     => [ "linux-generic64", asm("sparcv9_asm") ],
698         cflags           => "-m64 -mcpu=ultrasparc -Wall -DB_ENDIAN",
699         bn_ops           => "BN_LLONG RC4_CHAR",
700         shared_ldflag    => "-m64",
701         multilib         => "64",
702     },
703
704     "linux-alpha-gcc" => {
705         inherit_from     => [ "linux-generic64", asm("alpha_asm") ],
706         cflags           => "-DL_ENDIAN",
707         bn_ops           => "SIXTY_FOUR_BIT_LONG",
708     },
709     "linux-c64xplus" => {
710         # TI_CGT_C6000_7.3.x is a requirement
711         cc               => "cl6x",
712         cflags           => "--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT",
713         thread_cflag     => "-D_REENTRANT",
714         bn_ops           => "BN_LLONG",
715         cpuid_asm_src    => "c64xpluscpuid.s",
716         bn_asm_src       => "asm/bn-c64xplus.asm c64xplus-gf2m.s",
717         aes_asm_src      => "aes-c64xplus.s aes_cbc.c aes-ctr.fake",
718         sha1_asm_src     => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s",
719         rc4_asm_src      => "rc4-c64xplus.s",
720         modes_asm_src    => "ghash-c64xplus.s",
721         chacha_asm_src   => "chacha-c64xplus.s",
722         poly1305_asm_src => "poly1305-c64xplus.s",
723         perlasm_scheme   => "void",
724         dso_scheme       => "dlfcn",
725         shared_target    => "linux-shared",
726         shared_cflag     => "--pic",
727         shared_ldflag    => "-z --sysv --shared",
728         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
729         ranlib           => "true",
730     },
731
732 #### Android: linux-* but without pointers to headers and libs.
733     #
734     # It takes pair of prior-set environment variables to make it work:
735     #
736     # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<
737     # CROSS_COMPILE=<prefix>
738     #
739     # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
740     # For example to compile for ICS and ARM with NDK 10d, you'd:
741     #
742     # ANDROID_NDK=/some/where/android-ndk-10d
743     # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
744     # CROSS_COMPILE=arm-linux-adroideabi-
745     # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/
746     #
747     "android" => {
748         inherit_from     => [ "linux-generic32" ],
749         # Special note about unconditional -fPIC and -pie. The underlying
750         # reason is that Lollipop refuses to run non-PIE. But what about
751         # older systems and NDKs? -fPIC was never problem, so the only
752         # concern if -pie. Older toolchains, e.g. r4, appear to handle it
753         # and binaries turn mostly functional. "Mostly" means that oldest
754         # Androids, such as Froyo, fail to handle executable, but newer
755         # systems are perfectly capable of executing binaries targeting
756         # Froyo. Keep in mind that in the nutshell Android builds are
757         # about JNI, i.e. shared libraries, not applications.
758         cflags           => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
759         debug_cflags     => "-O0 -g",
760         lflags           => "-pie",
761         ex_libs          => "-ldl",
762         shared_cflag     => "",
763     },
764     "android-x86" => {
765         inherit_from     => [ "android", asm("x86_asm") ],
766         release_cflags   => "-O3 -fomit-frame-pointer",
767         bn_ops           => "BN_LLONG",
768         perlasm_scheme   => "android",
769     },
770     ################################################################
771     # Contemporary Android applications can provide multiple JNI
772     # providers in .apk, targeting multiple architectures. Among
773     # them there is "place" for two ARM flavours: generic eabi and
774     # armv7-a/hard-float. However, it should be noted that OpenSSL's
775     # ability to engage NEON is not constrained by ABI choice, nor
776     # is your ability to call OpenSSL from your application code
777     # compiled with floating-point ABI other than default 'soft'.
778     # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
779     # This means that choice of ARM libraries you provide in .apk
780     # is driven by application needs. For example if application
781     # itself benefits from NEON or is floating-point intensive, then
782     # it might be appropriate to provide both libraries. Otherwise
783     # just generic eabi would do. But in latter case it would be
784     # appropriate to
785     #
786     #   ./Configure android-armeabi -D__ARM_MAX_ARCH__=8
787     #
788     # in order to build "universal" binary and allow OpenSSL take
789     # advantage of NEON when it's available.
790     #
791     "android-armeabi" => {
792         inherit_from     => [ "android", asm("armv4_asm") ],
793     },
794     "android-mips" => {
795         inherit_from     => [ "android", asm("mips32_asm") ],
796         perlasm_scheme   => "o32",
797     },
798
799     "android64" => {
800         inherit_from     => [ "linux-generic64" ],
801         cflags           => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
802         debug_cflags     => "-O0 -g",
803         lflags           => "-pie",
804         ex_libs          => "-ldl",
805         shared_cflag     => "",
806     },
807     "android64-aarch64" => {
808         inherit_from     => [ "android64", asm("aarch64_asm") ],
809         perlasm_scheme   => "linux64",
810     },
811
812 #### *BSD
813     "BSD-generic32" => {
814         # As for thread_cflag. Idea is to maintain "collective" set of
815         # flags, which would cover all BSD flavors. -pthread applies
816         # to them all, but is treated differently. OpenBSD expands is
817         # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
818         # expands it as -lc_r, which has to be accompanied by explicit
819         # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
820         # expands it as -lc_r, which seems to be sufficient?
821         cc               => "cc",
822         cflags           => "-Wall",
823         debug_cflags     => "-O0 -g",
824         release_cflags   => "-O3",
825         thread_cflag     => "-pthread -D_THREAD_SAFE -D_REENTRANT",
826         bn_ops           => "BN_LLONG",
827         dso_scheme       => "dlfcn",
828         shared_target    => "bsd-gcc-shared",
829         shared_cflag     => "-fPIC",
830         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
831     },
832     "BSD-generic64" => {
833         inherit_from     => [ "BSD-generic32" ],
834         bn_ops           => "SIXTY_FOUR_BIT_LONG",
835     },
836
837     "BSD-x86" => {
838         inherit_from     => [ "BSD-generic32", asm("x86_asm") ],
839         cflags           => "-DL_ENDIAN -Wall",
840         release_cflags   => "-O3 -fomit-frame-pointer",
841         bn_ops           => "BN_LLONG",
842         shared_target    => "bsd-shared",
843         perlasm_scheme   => "a.out",
844     },
845     "BSD-x86-elf" => {
846         inherit_from     => [ "BSD-x86" ],
847         perlasm_scheme   => "elf",
848     },
849
850     "BSD-sparcv8" => {
851         inherit_from     => [ "BSD-generic32", asm("sparcv8_asm") ],
852         cflags           => "-mcpu=v8 -Wall -DB_ENDIAN",
853     },
854     "BSD-sparc64" => {
855         # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
856         # simply *happens* to work around a compiler bug in gcc 3.3.3,
857         # triggered by RIPEMD160 code.
858         inherit_from     => [ "BSD-generic64", asm("sparcv9_asm") ],
859         cflags           => "-DB_ENDIAN -DMD32_REG_T=int -Wall",
860         bn_ops           => "BN_LLONG",
861     },
862
863     "BSD-ia64" => {
864         inherit_from     => [ "BSD-generic64", asm("ia64_asm") ],
865         cflags           => "-DL_ENDIAN -Wall",
866         bn_ops           => "SIXTY_FOUR_BIT_LONG",
867     },
868
869     "BSD-x86_64" => {
870         inherit_from     => [ "BSD-generic64", asm("x86_64_asm") ],
871         cflags           => "-DL_ENDIAN -Wall",
872         bn_ops           => "SIXTY_FOUR_BIT_LONG",
873         perlasm_scheme   => "elf",
874     },
875
876     "bsdi-elf-gcc" => {
877         inherit_from     => [ asm("x86_elf_asm") ],
878         cc               => "gcc",
879         cflags           => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -Wall",
880         thread_cflag     => "(unknown)",
881         ex_libs          => "-ldl",
882         bn_ops           => "BN_LLONG",
883         dso_scheme       => "dlfcn",
884         shared_target    => "bsd-gcc-shared",
885         shared_cflag     => "-fPIC",
886         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
887     },
888
889     "nextstep" => {
890         cc               => "cc",
891         cflags           => "-O -Wall",
892         unistd           => "<libc.h>",
893         thread_cflag     => "(unknown)",
894         bn_ops           => "BN_LLONG",
895     },
896     "nextstep3.3" => {
897         cc               => "cc",
898         cflags           => "-O3 -Wall",
899         unistd           => "<libc.h>",
900         thread_cflag     => "(unknown)",
901         bn_ops           => "BN_LLONG",
902     },
903
904 # QNX
905     "qnx4" => {
906         cc               => "cc",
907         cflags           => "-DL_ENDIAN -DTERMIO",
908         thread_cflag     => "(unknown)",
909     },
910     "QNX6" => {
911         cc               => "gcc",
912         ex_libs          => "-lsocket",
913         dso_scheme       => "dlfcn",
914         shared_target    => "bsd-gcc-shared",
915         shared_cflag     => "-fPIC",
916         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
917     },
918     "QNX6-i386" => {
919         inherit_from     => [ asm("x86_elf_asm") ],
920         cc               => "gcc",
921         cflags           => "-DL_ENDIAN -O2 -Wall",
922         ex_libs          => "-lsocket",
923         dso_scheme       => "dlfcn",
924         shared_target    => "bsd-gcc-shared",
925         shared_cflag     => "-fPIC",
926         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
927     },
928
929 #### SCO/Caldera targets.
930 #
931 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
932 # Now we only have blended unixware-* as it's the only one used by ./config.
933 # If you want to optimize for particular microarchitecture, bypass ./config
934 # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
935 # Note that not all targets include assembler support. Mostly because of
936 # lack of motivation to support out-of-date platforms with out-of-date
937 # compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
938 # patiently assisted to debug most of it.
939 #
940 # UnixWare 2.0x fails destest with -O.
941     "unixware-2.0" => {
942         cc               => "cc",
943         cflags           => "-DFILIO_H -DNO_STRINGS_H",
944         thread_cflag     => "-Kthread",
945         ex_libs          => "-lsocket -lnsl -lresolv -lx",
946     },
947     "unixware-2.1" => {
948         cc               => "cc",
949         cflags           => "-O -DFILIO_H",
950         thread_cflag     => "-Kthread",
951         ex_libs          => "-lsocket -lnsl -lresolv -lx",
952     },
953     "unixware-7" => {
954         inherit_from     => [ asm("x86_elf_asm") ],
955         cc               => "cc",
956         cflags           => "-O -DFILIO_H -Kalloca",
957         thread_cflag     => "-Kthread",
958         ex_libs          => "-lsocket -lnsl",
959         bn_ops           => "BN_LLONG",
960         perlasm_scheme   => "elf-1",
961         dso_scheme       => "dlfcn",
962         shared_target    => "svr5-shared",
963         shared_cflag     => "-Kpic",
964         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
965     },
966     "unixware-7-gcc" => {
967         inherit_from     => [ asm("x86_elf_asm") ],
968         cc               => "gcc",
969         cflags           => "-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -Wall",
970         thread_cflag     => "-D_REENTRANT",
971         ex_libs          => "-lsocket -lnsl",
972         bn_ops           => "BN_LLONG",
973         perlasm_scheme   => "elf-1",
974         dso_scheme       => "dlfcn",
975         shared_target    => "gnu-shared",
976         shared_cflag     => "-fPIC",
977         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
978     },
979 # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
980     "sco5-cc" => {
981         inherit_from     => [ asm("x86_elf_asm") ],
982         cc               => "cc",
983         cflags           => "-belf",
984         thread_cflag     => "(unknown)",
985         ex_libs          => "-lsocket -lnsl",
986         perlasm_scheme   => "elf-1",
987         dso_scheme       => "dlfcn",
988         shared_target    => "svr3-shared",
989         shared_cflag     => "-Kpic",
990         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
991     },
992     "sco5-gcc" => {
993         inherit_from     => [ asm("x86_elf_asm") ],
994         cc               => "gcc",
995         cflags           => "-O3 -fomit-frame-pointer",
996         thread_cflag     => "(unknown)",
997         ex_libs          => "-lsocket -lnsl",
998         bn_ops           => "BN_LLONG",
999         perlasm_scheme   => "elf-1",
1000         dso_scheme       => "dlfcn",
1001         shared_target    => "svr3-shared",
1002         shared_cflag     => "-fPIC",
1003         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1004     },
1005
1006 #### IBM's AIX.
1007     "aix-gcc" => {
1008         inherit_from     => [ asm("ppc32_asm") ],
1009         cc               => "gcc",
1010         cflags           => "-DB_ENDIAN",
1011         debug_cflags     => "-O0 -g",
1012         release_cflags   => "-O",
1013         thread_cflag     => "-pthread",
1014         sys_id           => "AIX",
1015         bn_ops           => "BN_LLONG RC4_CHAR",
1016         perlasm_scheme   => "aix32",
1017         dso_scheme       => "dlfcn",
1018         shared_target    => "aix-shared",
1019         shared_ldflag    => "-shared -Wl,-G",
1020         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1021         arflags          => "-X32",
1022     },
1023     "aix64-gcc" => {
1024         inherit_from     => [ asm("ppc64_asm") ],
1025         cc               => "gcc",
1026         cflags           => "-maix64 -DB_ENDIAN",
1027         debug_cflags     => "-O0 -g",
1028         release_cflags   => "-O",
1029         thread_cflag     => "-pthread",
1030         sys_id           => "AIX",
1031         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1032         perlasm_scheme   => "aix64",
1033         dso_scheme       => "dlfcn",
1034         shared_target    => "aix-shared",
1035         shared_ldflag    => "-maix64 -shared -Wl,-G",
1036         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1037         arflags          => "-X64",
1038     },
1039     # Below targets assume AIX 5. Idea is to effectively disregard
1040     # $OBJECT_MODE at build time. $OBJECT_MODE is respected at
1041     # ./config stage!
1042     "aix-cc" => {
1043         inherit_from     => [ asm("ppc32_asm") ],
1044         cc               => "cc",
1045         cflags           => "-q32 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1046         debug_cflags     => "",
1047         release_cflags   => "-O",
1048         thread_cflag     => "-qthreaded -D_THREAD_SAFE",
1049         sys_id           => "AIX",
1050         bn_ops           => "BN_LLONG RC4_CHAR",
1051         perlasm_scheme   => "aix32",
1052         dso_scheme       => "dlfcn",
1053         shared_target    => "aix-shared",
1054         shared_ldflag    => "-q32 -G",
1055         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1056         arflags          => "-X 32",
1057     },
1058     "aix64-cc" => {
1059         inherit_from     => [ asm("ppc64_asm") ],
1060         cc               => "cc",
1061         cflags           => "-q64 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1062         debug_cflags     => "",
1063         release_cflags   => "-O",
1064         thread_cflag     => "-qthreaded -D_THREAD_SAFE",
1065         sys_id           => "AIX",
1066         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1067         perlasm_scheme   => "aix64",
1068         dso_scheme       => "dlfcn",
1069         shared_target    => "aix-shared",
1070         shared_ldflag    => "-q64 -G",
1071         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1072         arflags          => "-X 64",
1073     },
1074
1075 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
1076     "BS2000-OSD" => {
1077         cc               => "c89",
1078         cflags           => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC",
1079         thread_cflag     => "(unknown)",
1080         ex_libs          => "-lsocket -lnsl",
1081         bn_ops           => "THIRTY_TWO_BIT RC4_CHAR",
1082     },
1083
1084 # OS/390 Unix an EBCDIC-based Unix system on IBM mainframe
1085 # You need to compile using the c89.sh wrapper in the tools directory, because the
1086 # IBM compiler does not like the -L switch after any object modules.
1087 #
1088     "OS390-Unix" => {
1089         cc               => "c89.sh",
1090         cflags           => "-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H  -D_ALL_SOURCE",
1091         thread_cflag     => "(unknown)",
1092         bn_ops           => "THIRTY_TWO_BIT RC4_CHAR",
1093     },
1094
1095 #### Visual C targets
1096 #
1097 # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
1098 #
1099 # Note about -wd4090, disable warning C4090. This warning returns false
1100 # positives in some situations. Disabling it altogether masks both
1101 # legitimate and false cases, but as we compile on multiple platforms,
1102 # we rely on other compilers to catch legitimate cases.
1103     "VC-common" => {
1104         template         => 1,
1105         cc               => "cl",
1106         cflags           => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
1107         dso_scheme       => "win32",
1108         build_scheme     => "mk1mf",
1109     },
1110     "VC-WIN64I" => {
1111         inherit_from     => [ "VC-common", asm("ia64_asm") ],
1112         cflags           => add("-DUNICODE -D_UNICODE"),
1113         sys_id           => "WIN64I",
1114         bn_ops           => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1115         bn_obj           => sub { my $r=join(" ",@_); $r=~s/bn\-//; $r; },
1116         rc4_obj          => "",
1117         perlasm_scheme   => "ias",
1118         build_scheme     => [ "mk1mf", "VC-W64" ],
1119     },
1120     "VC-WIN64A" => {
1121         inherit_from     => [ "VC-common", asm("x86_64_asm") ],
1122         cflags           => add("-DUNICODE -D_UNICODE"),
1123         sys_id           => "WIN64A",
1124         bn_ops           => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1125         bn_obj           => sub { my $r=join(" ",@_); $r=~s/x86_64\-gcc/bn_asm/; $r; },
1126         perlasm_scheme   => "auto",
1127         build_scheme     => [ "mk1mf", "VC-W64" ],
1128     },
1129     "VC-WIN32" => {
1130         # x86 Win32 target defaults to ANSI API, if you want UNICODE,
1131         # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
1132         inherit_from     => [ "VC-common", asm("x86_asm") ],
1133         sys_id           => "WIN32",
1134         bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
1135         perlasm_scheme   => "win32n",
1136         build_scheme     => [ "mk1mf", "VC-W32" ],
1137     },
1138     "VC-CE" => {
1139         cc               => "cl",
1140         sys_id           => "WINCE",
1141         bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
1142         dso_scheme       => "win32",
1143         build_scheme     => [ "mk1mf", "VC-WCE" ],
1144     },
1145
1146 #### Borland C++ 4.5
1147     "BC-32" => {
1148         cc               => "bcc32",
1149         sys_id           => "WIN32",
1150         bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
1151         dso_scheme       => "win32",
1152         build_scheme     => [ "mk1mf", "BC" ],
1153     },
1154
1155 #### MinGW
1156     "mingw" => {
1157         inherit_from     => [ asm("x86_asm"),
1158                               sub { $disabled{shared} ? () : "x86_uplink" } ],
1159         cc               => "gcc",
1160         cflags           => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
1161         debug_cflags     => "-g -O0",
1162         release_cflags   => "-O3 -fomit-frame-pointer",
1163         thread_cflag     => "-D_MT",
1164         sys_id           => "MINGW32",
1165         ex_libs          => "-lws2_32 -lgdi32 -lcrypt32",
1166         bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
1167         perlasm_scheme   => "coff",
1168         dso_scheme       => "win32",
1169         shared_target    => "mingw-shared",
1170         shared_cflag     => add("-D_WINDLL"),
1171         shared_ldflag    => "-static-libgcc",
1172         shared_rcflag    => "--target=pe-i386",
1173         shared_extension => ".dll",
1174         multilib         => "",
1175     },
1176     "mingw64" => {
1177         # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1178         # .dll compiled with one compiler with application compiled with
1179         # another compiler. It's possible to engage Applink support in
1180         # mingw64 build, but it's not done, because till mingw64
1181         # supports structured exception handling, one can't seriously
1182         # consider its binaries for using with non-mingw64 run-time
1183         # environment. And as mingw64 is always consistent with itself,
1184         # Applink is never engaged and can as well be omitted.
1185         inherit_from     => [ asm("x86_64_asm") ],
1186         cc               => "gcc",
1187         cflags           => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall",
1188         debug_cflags     => "-g -O0",
1189         release_cflags   => "-O3",
1190         thread_cflag     => "-D_MT",
1191         sys_id           => "MINGW64",
1192         ex_libs          => "-lws2_32 -lgdi32 -lcrypt32",
1193         bn_ops           => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
1194         perlasm_scheme   => "mingw64",
1195         dso_scheme       => "win32",
1196         shared_target    => "mingw-shared",
1197         shared_cflag     => add("-D_WINDLL"),
1198         shared_ldflag    => "-static-libgcc",
1199         shared_rcflag    => "--target=pe-x86-64",
1200         shared_extension => ".dll",
1201         multilib         => "64",
1202     },
1203
1204 #### UEFI
1205     "UEFI" => {
1206         cc               => "cc",
1207         cflags           => "-DL_ENDIAN -O",
1208         sys_id           => "UEFI",
1209     },
1210
1211 #### UWIN
1212     "UWIN" => {
1213         cc               => "cc",
1214         cflags           => "-DTERMIOS -DL_ENDIAN -O -Wall",
1215         sys_id           => "UWIN",
1216         bn_ops           => "BN_LLONG",
1217         dso_scheme       => "win32",
1218     },
1219
1220 #### Cygwin
1221     "Cygwin-x86" => {
1222         inherit_from     => [ asm("x86_asm") ],
1223         cc               => "gcc",
1224         cflags           => "-DTERMIOS -DL_ENDIAN -Wall",
1225         debug_cflags     => "-g -O0",
1226         release_cflags   => "-O3 -fomit-frame-pointer",
1227         sys_id           => "CYGWIN",
1228         bn_ops           => "BN_LLONG",
1229         perlasm_scheme   => "coff",
1230         dso_scheme       => "dlfcn",
1231         shared_target    => "cygwin-shared",
1232         shared_cflag     => "-D_WINDLL",
1233         shared_ldflag    => "-shared",
1234         shared_extension => ".dll",
1235     },
1236     "Cygwin-x86_64" => {
1237         inherit_from     => [ asm("x86_64_asm") ],
1238         cc               => "gcc",
1239         cflags           => "-DTERMIOS -DL_ENDIAN -Wall",
1240         debug_cflags     => "-g -O0",
1241         release_cflags   => "-O3",
1242         sys_id           => "CYGWIN",
1243         bn_ops           => "SIXTY_FOUR_BIT_LONG",
1244         perlasm_scheme   => "mingw64",
1245         dso_scheme       => "dlfcn",
1246         shared_target    => "cygwin-shared",
1247         shared_cflag     => "-D_WINDLL",
1248         shared_ldflag    => "-shared",
1249         shared_extension => ".dll",
1250     },
1251     # Backward compatibility for those using this target
1252     "Cygwin" => {
1253         inherit_from     => [ "Cygwin-x86" ]
1254     },
1255     # In case someone constructs the Cygwin target name themself
1256     "Cygwin-i386" => {
1257         inherit_from     => [ "Cygwin-x86" ]
1258     },
1259     "Cygwin-i486" => {
1260         inherit_from     => [ "Cygwin-x86" ]
1261     },
1262     "Cygwin-i586" => {
1263         inherit_from     => [ "Cygwin-x86" ]
1264     },
1265     "Cygwin-i686" => {
1266         inherit_from     => [ "Cygwin-x86" ]
1267     },
1268
1269 #### NetWare from David Ward (dsward@novell.com)
1270 # requires either MetroWerks NLM development tools, or gcc / nlmconv
1271 # NetWare defaults socket bio to WinSock sockets. However,
1272 # the builds can be configured to use BSD sockets instead.
1273 # netware-clib => legacy CLib c-runtime support
1274     "netware-clib" => {
1275         cc               => "mwccnlm",
1276         build_scheme     => [ "mk1mf", "netware" ],
1277     },
1278     "netware-clib-bsdsock" => {
1279         cc               => "mwccnlm",
1280         build_scheme     => [ "mk1mf", "netware" ],
1281     },
1282     "netware-clib-gcc" => {
1283         cc               => "i586-netware-gcc",
1284         cflags           => "-nostdinc -I/ndk/nwsdk/include/nlm -I/ndk/ws295sdk/include -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYS_NETWARE -O2 -Wall",
1285     },
1286     "netware-clib-bsdsock-gcc" => {
1287         cc               => "i586-netware-gcc",
1288         cflags           => "-nostdinc -I/ndk/nwsdk/include/nlm -DNETWARE_BSDSOCK -DNETDB_USE_INTERNET -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYS_NETWARE -O2 -Wall",
1289     },
1290     # netware-libc => LibC/NKS support
1291     "netware-libc" => {
1292         cc               => "mwccnlm",
1293         bn_ops           => "BN_LLONG",
1294         build_scheme     => [ "mk1mf", "netware" ],
1295     },
1296     "netware-libc-bsdsock" => {
1297         cc               => "mwccnlm",
1298         bn_ops           => "BN_LLONG",
1299         build_scheme     => [ "mk1mf", "netware" ],
1300     },
1301     "netware-libc-gcc" => {
1302         cc               => "i586-netware-gcc",
1303         cflags           => "-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYS_NETWARE -DTERMIO -O2 -Wall",
1304         bn_ops           => "BN_LLONG",
1305     },
1306     "netware-libc-bsdsock-gcc" => {
1307         cc               => "i586-netware-gcc",
1308         cflags           => "-nostdinc -I/ndk/libc/include -DNETWARE_BSDSOCK -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYS_NETWARE -DTERMIO -O2 -Wall",
1309         bn_ops           => "BN_LLONG",
1310     },
1311
1312 #### DJGPP
1313     "DJGPP" => {
1314         inherit_from     => [ asm("x86_asm") ],
1315         cc               => "gcc",
1316         cflags           => "-I/dev/env/WATT_ROOT/inc -DTERMIO -DL_ENDIAN -fomit-frame-pointer -O2 -Wall",
1317         sys_id           => "MSDOS",
1318         ex_libs          => "-L/dev/env/WATT_ROOT/lib -lwatt",
1319         bn_ops           => "BN_LLONG",
1320         perlasm_scheme   => "a.out",
1321     },
1322
1323 #### Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
1324     "ultrix-cc" => {
1325         cc               => "cc",
1326         cflags           => "-std1 -O -Olimit 2500 -DL_ENDIAN",
1327         thread_cflag     => "(unknown)",
1328     },
1329     "ultrix-gcc" => {
1330         cc               => "gcc",
1331         cflags           => "-O3 -DL_ENDIAN",
1332         thread_cflag     => "(unknown)",
1333         bn_ops           => "BN_LLONG",
1334     },
1335 # K&R C is no longer supported; you need gcc on old Ultrix installations
1336 ##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
1337
1338 ##### MacOS X (a.k.a. Darwin) setup
1339     "darwin-common" => {
1340         template         => 1,
1341         cc               => "cc",
1342         cflags           => "",
1343         debug_cflags     => "-g -O0",
1344         release_cflags   => "-O3",
1345         thread_cflag     => "-D_REENTRANT",
1346         sys_id           => "MACOSX",
1347         plib_lflags      => "-Wl,-search_paths_first",
1348         bn_ops           => "BN_LLONG RC4_CHAR",
1349         perlasm_scheme   => "osx32",
1350         dso_scheme       => "dlfcn",
1351         shared_target    => "darwin-shared",
1352         shared_cflag     => "-fPIC -fno-common",
1353         shared_ldflag    => "-dynamiclib",
1354         shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
1355     },
1356     "darwin-ppc-cc" => {
1357         inherit_from     => [ "darwin-common", asm("ppc32_asm") ],
1358         cflags           => "-arch ppc -DB_ENDIAN -Wa,-force_cpusubtype_ALL",
1359         perlasm_scheme   => "osx32",
1360         shared_ldflag    => "-arch ppc -dynamiclib",
1361     },
1362     "darwin64-ppc-cc" => {
1363         inherit_from     => [ "darwin-common", asm("ppc64_asm") ],
1364         cflags           => "-arch ppc64 -DB_ENDIAN",
1365         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1366         perlasm_scheme   => "osx64",
1367         shared_ldflag    => "-arch ppc64 -dynamiclib",
1368     },
1369     "darwin-i386-cc" => {
1370         inherit_from     => [ "darwin-common", asm("x86_asm") ],
1371         cflags           => "-arch i386 -DL_ENDIAN",
1372         release_cflags   => "-O3 -fomit-frame-pointer",
1373         bn_ops           => "BN_LLONG RC4_INT",
1374         perlasm_scheme   => "macosx",
1375         shared_ldflag    => "-arch i386 -dynamiclib",
1376     },
1377     "darwin64-x86_64-cc" => {
1378         inherit_from     => [ "darwin-common", asm("x86_64_asm") ],
1379         cflags           => "-arch x86_64 -DL_ENDIAN -Wall",
1380         bn_ops           => "SIXTY_FOUR_BIT_LONG",
1381         perlasm_scheme   => "macosx",
1382         shared_ldflag    => "-arch x86_64 -dynamiclib",
1383     },
1384
1385 #### iPhoneOS/iOS
1386 #
1387 # It takes three prior-set environment variables to make it work:
1388 #
1389 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
1390 # CROSS_TOP=/where/SDKs/are
1391 # CROSS_SDK=iPhoneOSx.y.sdk
1392 #
1393 # Exact paths vary with Xcode releases, but for couple of last ones
1394 # they would look like this:
1395 #
1396 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
1397 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
1398 # CROSS_SDK=iPhoneOS.sdk
1399 #
1400     "iphoneos-cross" => {
1401         inherit_from     => [ "darwin-common" ],
1402         cflags           => "-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common",
1403         sys_id           => "iOS",
1404     },
1405     "ios-cross" => {
1406         inherit_from     => [ "darwin-common", asm("armv4_asm") ],
1407         # It should be possible to go below iOS 6 and even add -arch armv6,
1408         # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
1409         # at this point.
1410         cflags           => "-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common",
1411         sys_id           => "iOS",
1412         perlasm_scheme   => "ios32",
1413     },
1414     "ios64-cross" => {
1415         inherit_from     => [ "darwin-common", asm("aarch64_asm") ],
1416         cflags           => "-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common",
1417         sys_id           => "iOS",
1418         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1419         perlasm_scheme   => "ios64",
1420     },
1421
1422 ##### GNU Hurd
1423     "hurd-x86" => {
1424         inherit_from     => [ asm("x86_elf_asm") ],
1425         cc               => "gcc",
1426         cflags           => "-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
1427         thread_cflag     => "-pthread",
1428         ex_libs          => "-ldl",
1429         bn_ops           => "BN_LLONG",
1430         dso_scheme       => "dlfcn",
1431         shared_target    => "linux-shared",
1432         shared_cflag     => "-fPIC",
1433     },
1434
1435 ##### OS/2 EMX
1436     "OS2-EMX" => {
1437         cc               => "gcc",
1438     },
1439
1440 ##### VxWorks for various targets
1441     "vxworks-ppc60x" => {
1442         cc               => "ccppc",
1443         cflags           => "-D_REENTRANT -mrtp -mhard-float -mstrict-align -fno-implicit-fp -DPPC32_fp60x -O2 -fstrength-reduce -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip",
1444         sys_id           => "VXWORKS",
1445         ex_libs          => "-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common",
1446     },
1447     "vxworks-ppcgen" => {
1448         cc               => "ccppc",
1449         cflags           => "-D_REENTRANT -mrtp -msoft-float -mstrict-align -O1 -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip",
1450         sys_id           => "VXWORKS",
1451         ex_libs          => "-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon",
1452     },
1453     "vxworks-ppc405" => {
1454         cc               => "ccppc",
1455         cflags           => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h",
1456         sys_id           => "VXWORKS",
1457         lflags           => "-r",
1458     },
1459     "vxworks-ppc750" => {
1460         cc               => "ccppc",
1461         cflags           => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG)",
1462         sys_id           => "VXWORKS",
1463         lflags           => "-r",
1464     },
1465     "vxworks-ppc750-debug" => {
1466         cc               => "ccppc",
1467         cflags           => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g",
1468         sys_id           => "VXWORKS",
1469         lflags           => "-r",
1470     },
1471     "vxworks-ppc860" => {
1472         cc               => "ccppc",
1473         cflags           => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h",
1474         sys_id           => "VXWORKS",
1475         lflags           => "-r",
1476     },
1477     "vxworks-simlinux" => {
1478         cc               => "ccpentium",
1479         cflags           => "-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DL_ENDIAN -DCPU=SIMLINUX -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/h -I\$(WIND_BASE)/target/h/wrn/coreip -DOPENSSL_NO_HW_PADLOCK",
1480         sys_id           => "VXWORKS",
1481         lflags           => "-r",
1482         ranlib           => "ranlibpentium",
1483     },
1484     "vxworks-mips" => {
1485         inherit_from     => [ asm("mips32_asm") ],
1486         cc               => "ccmips",
1487         cflags           => "-mrtp -mips2 -O -G 0 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DCPU=MIPS32 -msoft-float -mno-branch-likely -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/h/wrn/coreip",
1488         thread_cflag     => "-D_REENTRANT",
1489         sys_id           => "VXWORKS",
1490         ex_libs          => "-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon",
1491         perlasm_scheme   => "o32",
1492         ranlib           => "ranlibmips",
1493     },
1494
1495 #### uClinux
1496     "uClinux-dist" => {
1497         cc               => "$ENV{'CC'}",
1498         cflags           => "\$(CFLAGS)",
1499         thread_cflag     => "-D_REENTRANT",
1500         plib_lflags      => "\$(LDFLAGS)",
1501         ex_libs          => "\$(LDLIBS)",
1502         bn_ops           => "BN_LLONG",
1503         dso_scheme       => "$ENV{'LIBSSL_dlfcn'}",
1504         shared_target    => "linux-shared",
1505         shared_cflag     => "-fPIC",
1506         shared_ldflag    => "-shared",
1507         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1508         ranlib           => "$ENV{'RANLIB'}",
1509     },
1510     "uClinux-dist64" => {
1511         cc               => "$ENV{'CC'}",
1512         cflags           => "\$(CFLAGS)",
1513         thread_cflag     => "-D_REENTRANT",
1514         plib_lflags      => "\$(LDFLAGS)",
1515         ex_libs          => "\$(LDLIBS)",
1516         bn_ops           => "SIXTY_FOUR_BIT_LONG",
1517         dso_scheme       => "$ENV{'LIBSSL_dlfcn'}",
1518         shared_target    => "linux-shared",
1519         shared_cflag     => "-fPIC",
1520         shared_ldflag    => "-shared",
1521         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1522         ranlib           => "$ENV{'RANLIB'}",
1523     },
1524
1525     ##### VMS
1526     "vms-generic" => {
1527         template         => 1,
1528         cc               => "CC/DECC",
1529         cflags           => "/STANDARD=RELAXED/NOLIST/PREFIX=ALL/NAMES=(AS_IS,SHORTENED)",
1530         debug_cflags     => "/NOOPTIMIZE/DEBUG",
1531         release_cflags   => "/OPTIMIZE/NODEBUG",
1532         lflags           => "/MAP",
1533         debug_lflags     => "/DEBUG/TRACEBACK",
1534         release_lflags   => "/NODEBUG/NOTRACEBACK",
1535         shared_target    => "vms-shared",
1536
1537         apps_aux_src     => "vms_decc_init.c",
1538         build_file       => "descrip.mms",
1539         build_scheme     => [ "unified", "VMS" ],
1540     },
1541
1542     # VMS on VAX is *unsupported*
1543     #"vms-asm" => {
1544     #   template          => 1,
1545     #   bn_obj            => "[.asm]vms.obj vms-helper.obj"
1546     #},
1547     #"vms-vax" => {
1548     #   inherit_from      => [ "vms-generic", asm("vms-asm") ],
1549     #   as                => "MACRO",
1550     #   debug_aflags      => "/NOOPTIMIZE/DEBUG",
1551     #   release_aflags    => "/OPTIMIZE/NODEBUG",
1552     #   bn_opts           => "THIRTY_TWO_BIT RC4_CHAR RC4_CHUNK DES_PTR BF_PTR",
1553     #},
1554     "vms-alpha" => {
1555         inherit_from     => [ "vms-generic" ],
1556         #as               => "???",
1557         #debug_aflags     => "/NOOPTIMIZE/DEBUG",
1558         #release_aflags   => "/OPTIMIZE/NODEBUG",
1559         bn_opts          => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1560     },
1561     "vms-alpha-P32" => {
1562         inherit_from     => [ "vms-alpha" ],
1563         cflags           => add("/POINTER_SIZE=32"),
1564     },
1565     "vms-alpha-P64" => {
1566         inherit_from     => [ "vms-alpha" ],
1567         cflags           => add("/POINTER_SIZE=64"),
1568     },
1569     "vms-ia64" => {
1570         inherit_from     => [ "vms-generic" ],
1571         #as               => "I4S",
1572         #debug_aflags     => "/NOOPTIMIZE/DEBUG",
1573         #release_aflags   => "/OPTIMIZE/NODEBUG",
1574         bn_opts          => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
1575     },
1576     "vms-ia64-P32" => {
1577         inherit_from     => [ "vms-ia64" ],
1578         cflags           => add("/POINTER_SIZE=32"),
1579     },
1580     "vms-ia64-P64" => {
1581         inherit_from     => [ "vms-ia64" ],
1582         cflags           => add("/POINTER_SIZE=64"),
1583     },
1584
1585 );