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