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