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