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