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