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