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