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