2 ## Standard openssl configuration targets.
4 ## If you edit this file, run this command before committing
5 ## make -f Makefile.in TABLE
6 ## This file is interpolated by the Configure script.
10 #### Basic configs that should work on any 32-bit box
14 debug_cflags => "-O0 -g",
15 release_cflags => "-O3",
16 thread_cflag => "(unknown)",
22 thread_cflag => "(unknown)",
25 #### VOS Configurations
28 cflags => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
29 debug_cflags => "-O0 -g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG",
30 release_cflags => "-O3",
31 thread_cflag => "(unknown)",
35 shared_extension => ".so",
38 #### Solaros configirations
41 cflags => "-DFILIO_H",
42 lflags => "-lsocket -lnsl -ldl",
43 dso_scheme => "dlfcn",
44 shared_target => "solaris-shared",
45 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
47 #### Solaris x86 with GNU C setups
48 "solaris-x86-gcc" => {
49 # -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have
50 # to do it here because whenever GNU C instantiates an assembler
51 # template it surrounds it with #APP #NO_APP comment pair which
52 # (at least Solaris 7_x86) /usr/ccs/bin/as fails to assemble
53 # with "Illegal mnemonic" error message.
54 inherit_from => [ "solaris-common", asm("x86_elf_asm") ],
56 cflags => sub { join(" ","-march=pentium -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM",@_) },
57 debug_cflags => "-O0 -g",
58 release_cflags => "-O3 -fomit-frame-pointer",
59 thread_cflag => "-pthread",
60 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
61 shared_cflag => "-fPIC",
62 shared_ldflag => "-shared",
64 "solaris64-x86_64-gcc" => {
65 # -shared -static-libgcc might appear controversial, but modules
66 # taken from static libgcc do not have relocations and linking
67 # them into our shared objects doesn't have any negative side
68 # effects. On the contrary, doing so makes it possible to use
69 # gcc shared build with Sun C. Given that gcc generates faster
70 # code [thanks to inline assembler], I would actually recommend
71 # to consider using gcc shared build even with vendor compiler:-)
72 # <appro@fy.chalmers.se>
73 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
75 cflags => sub { join(" ","-m64 -Wall -DL_ENDIAN",@_) },
76 debug_cflags => "-O0 -g",
77 release_cflags => "-O3",
78 thread_cflag => "-pthread",
79 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
80 perlasm_scheme => "elf",
81 shared_cflag => "-fPIC",
82 shared_ldflag => "-m64 -shared -static-libgcc",
86 #### Solaris x86 with Sun C setups
88 inherit_from => [ "solaris-common" ],
90 cflags => sub { join(" ","-xarch=generic -xstrconst -Xa -DL_ENDIAN",@_) },
92 release_cflags => "-xO5 -xregs=frameptr -xdepend -xbuiltin",
93 thread_cflag => "-D_REENTRANT",
94 lflags => sub { join(" ",@_,"-mt -lpthread") },
95 bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR",
96 shared_cflag => "-KPIC",
97 shared_ldflag => "-G -dy -z text",
99 "solaris64-x86_64-cc" => {
100 inherit_from => [ "solaris-common", asm("x86_64_asm") ],
102 cflags => sub { join(" ","-xarch=generic64 -xstrconst -Xa -DL_ENDIAN",@_) },
103 debug_cflags => "-g",
104 release_cflags => "-xO5 -xdepend -xbuiltin",
105 thread_cflag => "-D_REENTRANT",
106 lflags => sub { join(" ",@_,"-mt -lpthread") },
107 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
108 perlasm_scheme => "elf",
109 shared_cflag => "-KPIC",
110 shared_ldflag => "-xarch=generic64 -G -dy -z text",
114 #### SPARC Solaris with GNU C setups
115 "solaris-sparcv7-gcc" => {
116 inherit_from => [ "solaris-common" ],
118 cflags => sub { join(" ","-Wall -DB_ENDIAN -DBN_DIV2W",@_) },
119 debug_cflags => "-O0 -g",
120 release_cflags => "-O3",
121 thread_cflag => "-pthread",
122 bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR",
123 shared_cflag => "-fPIC",
124 shared_ldflag => "-shared",
126 "solaris-sparcv8-gcc" => {
127 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
128 cflags => add_before(" ", "-mcpu=v8"),
130 "solaris-sparcv9-gcc" => {
131 # -m32 should be safe to add as long as driver recognizes
133 inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
134 cflags => add_before(" ", "-m32 -mcpu=ultrasparc"),
135 debug_cflags => "-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -O -g -pedantic -ansi -Wshadow -Wno-long-long -D__EXTENSIONS__",
137 "solaris64-sparcv9-gcc" => {
138 inherit_from => [ "solaris-sparcv9-gcc" ],
139 cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
140 bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR",
141 shared_ldflag => "-m64 -shared",
145 #### SPARC Solaris with Sun C setups
146 # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
147 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
148 # SC5.0 note: Compiler common patch 107357-01 or later is required!
149 "solaris-sparcv7-cc" => {
150 inherit_from => [ "solaris-common" ],
152 cflags => sub { join(" ","-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W",@_) },
153 debug_cflags => "-g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG",
154 release_cflags => "-xO5 -xdepend",
155 thread_cflag => "-D_REENTRANT",
156 lflags => sub { join(" ",@_,"-mt -lpthread") },
157 bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR",
158 shared_cflag => "-KPIC",
159 shared_ldflag => "-G -dy -z text",
162 "solaris-sparcv8-cc" => {
163 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
164 cflags => add_before(" ", "-xarch=v8"),
166 "solaris-sparcv9-cc" => {
167 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
168 cflags => add_before(" ", "-xarch=v8plus -xtarget=ultra"),
170 "solaris64-sparcv9-cc" => {
171 inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
172 cflags => add_before(" ", "-xarch=v9 -xtarget=ultra"),
173 bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR",
174 shared_ldflag => "-xarch=v9 -G -dy -z text",
178 #### IRIX 5.x configs
179 # -mips2 flag is added by ./config when appropriate.
181 inherit_from => [ asm("mips32_asm") ],
183 cflags => "-DB_ENDIAN",
184 debug_cflags => "-g -O0",
185 release_cflags => "-O3",
186 thread_cflag => "(unknown)",
187 bn_ops => "BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK DES_UNROLL DES_RISC2 DES_PTR BF_PTR",
188 perlasm_scheme => "o32",
189 dso_scheme => "dlfcn",
190 shared_target => "irix-shared",
191 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
194 inherit_from => [ asm("mips32_asm") ],
196 cflags => "-use_readonly_const -DB_ENDIAN",
197 debug_cflags => "-g -O0",
198 release_cflags => "-O2",
199 thread_cflag => "(unknown)",
200 bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR",
201 perlasm_scheme => "o32",
202 dso_scheme => "dlfcn",
203 shared_target => "irix-shared",
204 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
206 #### IRIX 6.x configs
207 # Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
208 # './Configure irix-cc -o32' manually.
209 "irix-mips3-gcc" => {
210 inherit_from => [ asm("mips64_asm") ],
212 cflags => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W",
213 debug_cflags => "-g -O0",
214 release_cflags => "-O3",
215 thread_cflag => "-D_SGI_MP_SOURCE -pthread",
216 bn_ops => "MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT",
217 perlasm_scheme => "n32",
218 dso_scheme => "dlfcn",
219 shared_target => "irix-shared",
220 shared_ldflag => "-mabi=n32",
221 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
225 inherit_from => [ asm("mips64_asm") ],
227 cflags => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
228 debug_cflags => "-g -O0",
229 release_cflags => "-O2",
230 thread_cflag => "-D_SGI_MP_SOURCE",
231 lflags => "-lpthread",
232 bn_ops => "DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT",
233 perlasm_scheme => "n32",
234 dso_scheme => "dlfcn",
235 shared_target => "irix-shared",
236 shared_ldflag => "-n32",
237 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
241 "irix64-mips4-gcc" => {
242 inherit_from => [ asm("mips64_asm") ],
244 cflags => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W",
245 debug_cflags => "-g -O0",
246 release_cflags => "-O3",
247 thread_cflag => "-D_SGI_MP_SOURCE",
248 bn_ops => "RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG",
249 perlasm_scheme => "64",
250 dso_scheme => "dlfcn",
251 shared_target => "irix-shared",
252 shared_ldflag => "-mabi=64",
253 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
256 "irix64-mips4-cc" => {
257 inherit_from => [ asm("mips64_asm") ],
259 cflags => "-64 -mips4 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
260 debug_cflags => "-g -O0",
261 release_cflags => "-O2",
262 thread_cflag => "-D_SGI_MP_SOURCE",
263 lflags => "-lpthread",
264 bn_ops => "RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG",
265 perlasm_scheme => "64",
266 dso_scheme => "dlfcn",
267 shared_target => "irix-shared",
268 shared_ldflag => "-64",
269 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
273 #### Unified HP-UX ANSI C configs.
275 # - Originally we were optimizing at +O4 level. It should be noted
276 # that the only difference between +O3 and +O4 is global inter-
277 # procedural analysis. As it has to be performed during the link
278 # stage the compiler leaves behind certain pseudo-code in lib*.a
279 # which might be release or even patch level specific. Generating
280 # the machine code for and analyzing the *whole* program appears
281 # to be *extremely* memory demanding while the performance gain is
282 # actually questionable. The situation is intensified by the default
283 # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
284 # which is way too low for +O4. In other words, doesn't +O3 make
286 # - Keep in mind that the HP compiler by default generates code
287 # suitable for execution on the host you're currently compiling at.
288 # If the toolkit is ment to be used on various PA-RISC processors
289 # consider './Configure hpux-parisc-[g]cc +DAportable'.
290 # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
291 # 32-bit message digests. (For the moment of this writing) HP C
292 # doesn't seem to "digest" too many local variables (they make "him"
293 # chew forever:-). For more details look-up MD32_XARRAY comment in
294 # crypto/sha/sha_lcl.h.
295 # - originally there were 32-bit hpux-parisc2-* targets. They were
296 # scrapped, because a) they were not interchangable with other 32-bit
297 # targets; a) when critical 32-bit assembly modules detect if they
298 # are executed on PA-RISC 2.0 and thus adequate performance is
300 # <appro@fy.chalmers.se>
301 "hpux-parisc-gcc" => {
303 cflags => "-DB_ENDIAN -DBN_DIV2W",
304 debug_cflags => "-O0 -g",
305 release_cflags => "-O3",
306 thread_cflag => "-pthread",
307 lflags => "-Wl,+s -ldld",
308 bn_ops => "BN_LLONG DES_PTR DES_UNROLL DES_RISC1",
310 shared_target => "hpux-shared",
311 shared_cflag => "-fPIC",
312 shared_ldflag => "-shared",
313 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
315 "hpux-parisc1_1-gcc" => {
316 inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ],
317 multilib => "/pa1.1",
319 "hpux64-parisc2-gcc" => {
320 inherit_from => [ asm("parisc20_64_asm") ],
322 cflags => "-DB_ENDIAN",
323 debug_cflags => "-O0 -g",
324 release_cflags => "-O3",
325 thread_cflag => "-D_REENTRANT",
327 bn_ops => "SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT",
328 dso_scheme => "dlfcn",
329 shared_target => "hpux-shared",
330 shared_cflag => "-fpic",
331 shared_ldflag => "-shared",
332 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
333 multilib => "/pa20_64",
336 # More attempts at unified 10.X and 11.X targets for HP C compiler.
338 # Chris Ruemmler <ruemmler@cup.hp.com>
339 # Kevin Steves <ks@hp.se>
340 "hpux-parisc-cc" => {
342 cflags => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
343 debug_cflags => "+O0 +d -g",
344 release_cflags => "+O3",
345 thread_cflag => "-D_REENTRANT",
346 lflags => "-Wl,+s -ldld -lpthread",
347 bn_ops => "MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT",
349 shared_target => "hpux-shared",
350 shared_cflag => "+Z",
351 shared_ldflag => "-b",
352 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
354 "hpux-parisc1_1-cc" => {
355 inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ],
356 cflags => add_before(" ", "+DA1.1"),
357 multilib => "/pa1.1",
359 "hpux64-parisc2-cc" => {
360 inherit_from => [ asm("parisc20_64_asm") ],
362 cflags => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY",
363 debug_cflags => "+O0 +d -g",
364 release_cflags => "+O3",
365 thread_cflag => "-D_REENTRANT",
366 lflags => "-ldl -lpthread",
367 bn_ops => "SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT",
368 dso_scheme => "dlfcn",
369 shared_target => "hpux-shared",
370 shared_cflag => "+Z",
371 shared_ldflag => "+DD64 -b",
372 shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
373 multilib => "/pa20_64",
376 # HP/UX IA-64 targets
378 inherit_from => [ asm("ia64_asm") ],
380 cflags => "-Ae +DD32 +Olit=all -z -DB_ENDIAN",
381 debug_cflags => "+O0 +d -g",
382 release_cflags => "+O2",
383 thread_cflag => "-D_REENTRANT",
384 lflags => "-ldl -lpthread",
385 bn_ops => "SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT",
386 dso_scheme => "dlfcn",
387 shared_target => "hpux-shared",
388 shared_cflag => "+Z",
389 shared_ldflag => "+DD32 -b",
390 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
391 multilib => "/hpux32",
393 # Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted
394 # with debugging of the following config.
395 "hpux64-ia64-cc" => {
396 inherit_from => [ asm("ia64_asm") ],
398 cflags => "-Ae +DD64 +Olit=all -z -DB_ENDIAN",
399 debug_cflags => "+O0 +d -g",
400 release_cflags => "+O3",
401 thread_cflag => "-D_REENTRANT",
402 lflags => "-ldl -lpthread",
403 bn_ops => "SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT",
404 dso_scheme => "dlfcn",
405 shared_target => "hpux-shared",
406 shared_cflag => "+Z",
407 shared_ldflag => "+DD64 -b",
408 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
409 multilib => "/hpux64",
413 inherit_from => [ asm("ia64_asm") ],
415 cflags => "-DB_ENDIAN",
416 debug_cflags => "-O0 -g",
417 release_cflags => "-O3",
418 thread_cflag => "-pthread",
420 bn_ops => "SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT",
421 dso_scheme => "dlfcn",
422 shared_target => "hpux-shared",
423 shared_cflag => "-fpic",
424 shared_ldflag => "-shared",
425 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
426 multilib => "/hpux32",
428 "hpux64-ia64-gcc" => {
429 inherit_from => [ asm("ia64_asm") ],
431 cflags => "-mlp64 -DB_ENDIAN",
432 debug_cflags => "-O0 -g",
433 release_cflags => "-O3",
434 thread_cflag => "-pthread",
436 bn_ops => "SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT",
437 dso_scheme => "dlfcn",
438 shared_target => "hpux-shared",
439 shared_cflag => "-fpic",
440 shared_ldflag => "-mlp64 -shared",
441 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
442 multilib => "/hpux64",
445 #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
448 cflags => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB",
449 thread_cflag => "(unknown)",
451 lflags => "-L/SYSLOG/PUB -lsyslog -lsocket -lcurses",
452 bn_ops => "BN_LLONG DES_PTR DES_UNROLL DES_RISC1",
455 #### DEC Alpha OSF/1/Tru64 targets.
457 # "What's in a name? That which we call a rose
458 # By any other word would smell as sweet."
460 # - William Shakespeare, "Romeo & Juliet", Act II, scene II.
462 # For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version
464 "osf1-alpha-gcc" => {
465 inherit_from => [ asm("alpha_asm") ],
468 thread_cflag => "(unknown)",
469 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1",
470 dso_scheme => "dlfcn",
471 shared_target => "alpha-osf1-shared",
472 shared_extension => ".so",
475 inherit_from => [ asm("alpha_asm") ],
477 cflags => "-std1 -tune host -O4 -readonly_strings",
478 thread_cflag => "(unknown)",
479 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK",
480 dso_scheme => "dlfcn",
481 shared_target => "alpha-osf1-shared",
482 shared_extension => ".so",
484 "tru64-alpha-cc" => {
485 inherit_from => [ asm("alpha_asm") ],
487 cflags => "-std1 -tune host -fast -readonly_strings",
488 thread_cflag => "-pthread",
489 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK",
490 dso_scheme => "dlfcn",
491 shared_target => "alpha-osf1-shared",
492 shared_ldflag => "-msym",
493 shared_extension => ".so",
497 #### Variety of LINUX:-)
499 # *-generic* is endian-neutral target, but ./config is free to
500 # throw in -D[BL]_ENDIAN, whichever appropriate...
501 "linux-generic32" => {
504 debug_cflags => "-O0 -g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG",
505 release_cflags => "-O3",
506 thread_cflag => "-pthread",
508 bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR",
509 dso_scheme => "dlfcn",
510 shared_target => "linux-shared",
511 shared_cflag => "-fPIC",
512 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
514 "linux-generic64" => {
515 inherit_from => [ "linux-generic32" ],
516 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR",
520 inherit_from => [ "linux-generic32", asm("ppc32_asm") ],
521 perlasm_scheme => "linux32",
524 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
525 cflags => "-m64 -Wall -DB_ENDIAN",
526 perlasm_scheme => "linux64",
527 shared_ldflag => "-m64",
531 inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
532 cflags => "-m64 -Wall -DL_ENDIAN",
533 perlasm_scheme => "linux64le",
534 shared_ldflag => "-m64",
538 ################################################################
539 # Note that -march is not among compiler options in linux-armv4
540 # target description. Not specifying one is intentional to give
543 # a) rely on your compiler default by not specifying one;
544 # b) specify your target platform explicitly for optimal
545 # performance, e.g. -march=armv6 or -march=armv7-a;
546 # c) build "universal" binary that targets *range* of platforms
547 # by specifying minimum and maximum supported architecture;
549 # As for c) option. It actually makes no sense to specify
550 # maximum to be less than ARMv7, because it's the least
551 # requirement for run-time switch between platform-specific
552 # code paths. And without run-time switch performance would be
553 # equivalent to one for minimum. Secondly, there are some
554 # natural limitations that you'd have to accept and respect.
555 # Most notably you can *not* build "universal" binary for
556 # big-endian platform. This is because ARMv7 processor always
557 # picks instructions in little-endian order. Another similar
558 # limitation is that -mthumb can't "cross" -march=armv6t2
559 # boundary, because that's where it became Thumb-2. Well, this
560 # limitation is a bit artificial, because it's not really
561 # impossible, but it's deemed too tricky to support. And of
562 # course you have to be sure that your binutils are actually
563 # up to the task of handling maximum target platform. With all
564 # this in mind here is an example of how to configure
567 # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
569 inherit_from => [ "linux-generic32", asm("armv4_asm") ],
570 perlasm_scheme => "linux32",
573 inherit_from => [ "linux-generic64", asm("aarch64_asm") ],
574 perlasm_scheme => "linux64",
576 "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32
577 inherit_from => [ "linux-generic32", asm("aarch64_asm") ],
578 cflags => "-mabi=ilp32 -Wall",
579 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR",
580 perlasm_scheme => "linux64",
581 shared_ldflag => "-mabi=ilp32",
585 # Configure script adds minimally required -march for assembly
586 # support, if no -march was specified at command line.
587 inherit_from => [ "linux-generic32", asm("mips32_asm") ],
588 cflags => "-mabi=32 -Wall -DBN_DIV3W",
589 perlasm_scheme => "o32",
590 shared_ldflag => "-mabi=32",
592 # mips32 and mips64 below refer to contemporary MIPS Architecture
593 # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
595 inherit_from => [ "linux-generic32", asm("mips64_asm") ],
596 cflags => "-mabi=n32 -Wall -DBN_DIV3W",
597 bn_ops => "SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR",
598 perlasm_scheme => "n32",
599 shared_ldflag => "-mabi=n32",
602 "linux64-mips64" => {
603 inherit_from => [ "linux-generic64", asm("mips64_asm") ],
604 cflags => "-mabi=64 -O3 -Wall -DBN_DIV3W",
605 perlasm_scheme => "64",
606 shared_ldflag => "-mabi=64",
610 #### IA-32 targets...
612 inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
614 cflags => "-march=i486 -DL_ENDIAN -Wall",
615 debug_cflags => "-O0 -g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG",
616 release_cflags => "-O3 -fomit-frame-pointer",
617 debug_lflags => "-lefence",
618 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
621 inherit_from => [ asm("x86_asm") ],
623 cflags => "-DL_ENDIAN -march=i486 -Wall",
624 debug_cflags => "-O0 -g",
625 release_cflags => "-O3 -fomit-frame-pointer",
626 thread_cflag => "(unknown)",
627 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
628 perlasm_scheme => "a.out",
632 inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
633 cflags => "-m64 -DL_ENDIAN -Wall",
634 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
635 perlasm_scheme => "elf",
636 shared_ldflag => "-m64",
639 "linux-x86_64-clang" => {
640 inherit_from => [ "linux-x86_64" ],
642 cflags => "-m64 -DL_ENDIAN -Wall -Wextra -Qunused-arguments",
645 inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
646 cflags => "-mx32 -DL_ENDIAN -Wall",
647 bn_ops => "SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT DES_UNROLL",
648 perlasm_scheme => "elf",
649 shared_ldflag => "-mx32",
654 inherit_from => [ "linux-generic64", asm("ia64_asm") ],
655 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT",
659 inherit_from => [ "linux-generic64", asm("s390x_asm") ],
660 cflags => "-m64 -Wall -DB_ENDIAN",
661 perlasm_scheme => "64",
662 shared_ldflag => "-m64",
666 #### So called "highgprs" target for z/Architecture CPUs
667 # "Highgprs" is kernel feature first implemented in Linux
668 # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
669 # significant bits of general purpose registers not only
670 # upon 32-bit process context switch, but even on
671 # asynchronous signal delivery to such process. This makes
672 # it possible to deploy 64-bit instructions even in legacy
673 # application context and achieve better [or should we say
674 # adequate] performance. The build is binary compatible with
675 # linux-generic32, and the idea is to be able to install the
676 # resulting libcrypto.so alongside generic one, e.g. as
677 # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
678 # linker to autodiscover. Unfortunately it doesn't work just
679 # yet, because of couple of bugs in glibc
680 # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
682 inherit_from => [ "linux-generic32", asm("s390x_asm") ],
683 cflags => "-m31 -Wall -Wa,-mzarch -DB_ENDIAN",
684 bn_obj => sub { my $r=join(" ",@_); $r=~s/bn\-s390x/bn_asm/; $r; },
685 perlasm_scheme => "31",
686 shared_ldflag => "-m31",
687 multilib => "/highgprs",
690 #### SPARC Linux setups
691 # Ray Miller <ray.miller@computing-services.oxford.ac.uk> has
692 # patiently assisted with debugging of following two configs.
694 inherit_from => [ "linux-generic32", asm("sparcv8_asm") ],
695 cflags => "-mcpu=v8 -Wall -DB_ENDIAN -DBN_DIV2W",
698 # it's a real mess with -mcpu=ultrasparc option under Linux,
699 # but -Wa,-Av8plus should do the trick no matter what.
700 inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
701 cflags => "-m32 -mcpu=ultrasparc -Wall -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W",
702 shared_ldflag => "-m32",
704 "linux64-sparcv9" => {
705 # GCC 3.1 is a requirement
706 inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
707 cflags => "-m64 -mcpu=ultrasparc -Wall -DB_ENDIAN",
708 bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR",
709 shared_ldflag => "-m64",
713 "linux-alpha-gcc" => {
714 inherit_from => [ "linux-generic64", asm("alpha_asm") ],
715 cflags => "-DL_ENDIAN",
716 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL",
718 "linux-c64xplus" => {
719 # TI_CGT_C6000_7.3.x is a requirement
721 cflags => "--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT",
722 thread_cflag => "-D_REENTRANT",
723 bn_ops => "BN_LLONG",
724 cpuid_obj => "c64xpluscpuid.o",
725 bn_obj => "bn-c64xplus.o c64xplus-gf2m.o",
726 aes_obj => "aes-c64xplus.o aes_cbc.o aes_ctr.o",
727 sha1_obj => "sha1-c64xplus.o sha256-c64xplus.o sha512-c64xplus.o",
728 rc4_obj => "rc4-c64xplus.o",
729 modes_obj => "ghash-c64xplus.o",
730 perlasm_scheme => "void",
731 dso_scheme => "dlfcn",
732 shared_target => "linux-shared",
733 shared_cflag => "--pic",
734 shared_ldflag => "-z --sysv --shared",
735 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
739 #### Android: linux-* but without pointers to headers and libs.
741 # It takes pair of prior-set environment variables to make it work:
743 # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<
744 # CROSS_COMPILE=<prefix>
746 # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
747 # For example to compile for ICS and ARM with NDK 10d, you'd:
749 # ANDROID_NDK=/some/where/android-ndk-10d
750 # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
751 # CROSS_COMPILE=arm-linux-adroideabi-
752 # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/
755 inherit_from => [ "linux-generic32" ],
756 # Special note about unconditional -fPIC and -pie. The underlying
757 # reason is that Lollipop refuses to run non-PIE. But what about
758 # older systems and NDKs? -fPIC was never problem, so the only
759 # concern if -pie. Older toolchains, e.g. r4, appear to handle it
760 # and binaries turn mostly functional. "Mostly" means that oldest
761 # Androids, such as Froyo, fail to handle executable, but newer
762 # systems are perfectly capable of executing binaries targeting
763 # Froyo. Keep in mind that in the nutshell Android builds are
764 # about JNI, i.e. shared libraries, not applications.
765 cflags => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
766 debug_cflags => "-O0 -g",
767 lflags => "-pie%-ldl",
771 inherit_from => [ "android", asm("x86_asm") ],
772 release_cflags => "-O3 -fomit-frame-pointer",
773 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
774 perlasm_scheme => "android",
776 ################################################################
777 # Contemporary Android applications can provide multiple JNI
778 # providers in .apk, targeting multiple architectures. Among
779 # them there is "place" for two ARM flavours: generic eabi and
780 # armv7-a/hard-float. However, it should be noted that OpenSSL's
781 # ability to engage NEON is not constrained by ABI choice, nor
782 # is your ability to call OpenSSL from your application code
783 # compiled with floating-point ABI other than default 'soft'.
784 # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
785 # This means that choice of ARM libraries you provide in .apk
786 # is driven by application needs. For example if application
787 # itself benefits from NEON or is floating-point intensive, then
788 # it might be appropriate to provide both libraries. Otherwise
789 # just generic eabi would do. But in latter case it would be
792 # ./Configure android-armeabi -D__ARM_MAX_ARCH__=8
794 # in order to build "universal" binary and allow OpenSSL take
795 # advantage of NEON when it's available.
797 "android-armeabi" => {
798 inherit_from => [ "android", asm("armv4_asm") ],
801 inherit_from => [ "android-armeabi" ],
802 cflags => add_before(" ", "-march=armv7-a"),
805 inherit_from => [ "android", asm("mips32_asm") ],
806 perlasm_scheme => "o32",
810 inherit_from => [ "linux-generic64" ],
811 cflags => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
812 debug_cflags => "-O0 -g",
813 lflags => "-pie%-ldl",
816 "android64-aarch64" => {
817 inherit_from => [ "android64", asm("aarch64_asm") ],
818 perlasm_scheme => "linux64",
823 # As for thread_cflag. Idea is to maintain "collective" set of
824 # flags, which would cover all BSD flavors. -pthread applies
825 # to them all, but is treated differently. OpenBSD expands is
826 # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
827 # expands it as -lc_r, which has to be accompanied by explicit
828 # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
829 # expands it as -lc_r, which seems to be sufficient?
832 debug_cflags => "-O0 -g",
833 release_cflags => "-O3",
834 thread_cflag => "-pthread -D_THREAD_SAFE -D_REENTRANT",
835 bn_ops => "BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL",
836 dso_scheme => "dlfcn",
837 shared_target => "bsd-gcc-shared",
838 shared_cflag => "-fPIC",
839 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
842 inherit_from => [ "BSD-generic32" ],
843 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
847 inherit_from => [ "BSD-generic32", asm("x86_asm") ],
848 cflags => "-DL_ENDIAN -Wall",
849 release_cflags => "-O3 -fomit-frame-pointer",
850 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
851 shared_target => "bsd-shared",
852 perlasm_scheme => "a.out",
855 inherit_from => [ "BSD-x86" ],
856 perlasm_scheme => "elf",
860 inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ],
861 cflags => "-mcpu=v8 -Wall -DB_ENDIAN",
864 # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
865 # simply *happens* to work around a compiler bug in gcc 3.3.3,
866 # triggered by RIPEMD160 code.
867 inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ],
868 cflags => "-DB_ENDIAN -DMD32_REG_T=int -Wall",
869 bn_ops => "BN_LLONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR",
873 inherit_from => [ "BSD-generic64", asm("ia64_asm") ],
874 cflags => "-DL_ENDIAN -Wall",
875 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT",
879 inherit_from => [ "BSD-generic64", asm("x86_64_asm") ],
880 cflags => "-DL_ENDIAN -Wall",
881 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
882 perlasm_scheme => "elf",
886 inherit_from => [ asm("x86_elf_asm") ],
888 cflags => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall",
889 thread_cflag => "(unknown)",
891 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
892 dso_scheme => "dlfcn",
893 shared_target => "bsd-gcc-shared",
894 shared_cflag => "-fPIC",
895 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
900 cflags => "-O -Wall",
901 unistd => "<libc.h>",
902 thread_cflag => "(unknown)",
903 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
907 cflags => "-O3 -Wall",
908 unistd => "<libc.h>",
909 thread_cflag => "(unknown)",
910 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
916 cflags => "-DL_ENDIAN -DTERMIO",
917 thread_cflag => "(unknown)",
918 bn_ops => "${x86_gcc_des} ${x86_gcc_opts}",
922 lflags => "-lsocket",
923 dso_scheme => "dlfcn",
924 shared_target => "bsd-gcc-shared",
925 shared_cflag => "-fPIC",
926 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
929 inherit_from => [ asm("x86_elf_asm") ],
931 cflags => "-DL_ENDIAN -O2 -Wall",
932 lflags => "-lsocket",
933 bn_ops => "${x86_gcc_des} ${x86_gcc_opts}",
934 dso_scheme => "dlfcn",
935 shared_target => "bsd-gcc-shared",
936 shared_cflag => "-fPIC",
937 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
940 #### SCO/Caldera targets.
942 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
943 # Now we only have blended unixware-* as it's the only one used by ./config.
944 # If you want to optimize for particular microarchitecture, bypass ./config
945 # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
946 # Note that not all targets include assembler support. Mostly because of
947 # lack of motivation to support out-of-date platforms with out-of-date
948 # compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
949 # patiently assisted to debug most of it.
951 # UnixWare 2.0x fails destest with -O.
954 cflags => "-DFILIO_H -DNO_STRINGS_H",
955 thread_cflag => "-Kthread",
956 lflags => "-lsocket -lnsl -lresolv -lx",
957 bn_ops => "${x86_gcc_des} ${x86_gcc_opts}",
961 cflags => "-O -DFILIO_H",
962 thread_cflag => "-Kthread",
963 lflags => "-lsocket -lnsl -lresolv -lx",
964 bn_ops => "${x86_gcc_des} ${x86_gcc_opts}",
967 inherit_from => [ asm("x86_elf_asm") ],
969 cflags => "-O -DFILIO_H -Kalloca",
970 thread_cflag => "-Kthread",
971 lflags => "-lsocket -lnsl",
972 bn_ops => "BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}",
973 perlasm_scheme => "elf-1",
974 dso_scheme => "dlfcn",
975 shared_target => "svr5-shared",
976 shared_cflag => "-Kpic",
977 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
979 "unixware-7-gcc" => {
980 inherit_from => [ asm("x86_elf_asm") ],
982 cflags => "-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -march=pentium -Wall",
983 thread_cflag => "-D_REENTRANT",
984 lflags => "-lsocket -lnsl",
985 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
986 perlasm_scheme => "elf-1",
987 dso_scheme => "dlfcn",
988 shared_target => "gnu-shared",
989 shared_cflag => "-fPIC",
990 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
992 # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
994 inherit_from => [ asm("x86_elf_asm") ],
997 thread_cflag => "(unknown)",
998 lflags => "-lsocket -lnsl",
999 bn_ops => "${x86_gcc_des} ${x86_gcc_opts}",
1000 perlasm_scheme => "elf-1",
1001 dso_scheme => "dlfcn",
1002 shared_target => "svr3-shared",
1003 shared_cflag => "-Kpic",
1004 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1007 inherit_from => [ asm("x86_elf_asm") ],
1009 cflags => "-O3 -fomit-frame-pointer",
1010 thread_cflag => "(unknown)",
1011 lflags => "-lsocket -lnsl",
1012 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
1013 perlasm_scheme => "elf-1",
1014 dso_scheme => "dlfcn",
1015 shared_target => "svr3-shared",
1016 shared_cflag => "-fPIC",
1017 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1022 inherit_from => [ asm("ppc32_asm") ],
1024 cflags => "-DB_ENDIAN",
1025 debug_cflags => "-O0 -g",
1026 release_cflags => "-O",
1027 thread_cflag => "-pthread",
1029 bn_ops => "BN_LLONG RC4_CHAR",
1030 perlasm_scheme => "aix32",
1031 dso_scheme => "dlfcn",
1032 shared_target => "aix-shared",
1033 shared_ldflag => "-shared -Wl,-G",
1034 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1038 inherit_from => [ asm("ppc64_asm") ],
1040 cflags => "-maix64 -DB_ENDIAN",
1041 debug_cflags => "-O0 -g",
1042 release_cflags => "-O",
1043 thread_cflag => "-pthread",
1045 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1046 perlasm_scheme => "aix64",
1047 dso_scheme => "dlfcn",
1048 shared_target => "aix-shared",
1049 shared_ldflag => "-maix64 -shared -Wl,-G",
1050 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1053 # Below targets assume AIX 5. Idea is to effectively disregard
1054 # $OBJECT_MODE at build time. $OBJECT_MODE is respected at
1057 inherit_from => [ asm("ppc32_asm") ],
1059 cflags => "-q32 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1061 release_cflags => "-O",
1062 thread_cflag => "-qthreaded -D_THREAD_SAFE",
1064 bn_ops => "BN_LLONG RC4_CHAR",
1065 perlasm_scheme => "aix32",
1066 dso_scheme => "dlfcn",
1067 shared_target => "aix-shared",
1068 shared_ldflag => "-q32 -G",
1069 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1073 inherit_from => [ asm("ppc64_asm") ],
1075 cflags => "-q64 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
1077 release_cflags => "-O",
1078 thread_cflag => "-qthreaded -D_THREAD_SAFE",
1080 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
1081 perlasm_scheme => "aix64",
1082 dso_scheme => "dlfcn",
1083 shared_target => "aix-shared",
1084 shared_ldflag => "-q64 -G",
1085 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1089 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
1092 cflags => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC",
1093 thread_cflag => "(unknown)",
1094 lflags => "-lsocket -lnsl",
1095 bn_ops => "THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR",
1098 # OS/390 Unix an EBCDIC-based Unix system on IBM mainframe
1099 # You need to compile using the c89.sh wrapper in the tools directory, because the
1100 # IBM compiler does not like the -L switch after any object modules.
1104 cflags => "-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE",
1105 thread_cflag => "(unknown)",
1106 bn_ops => "THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR",
1109 #### Visual C targets
1111 # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
1113 # Note about -wd4090, disable warning C4090. This warning returns false
1114 # positives in some situations. Disabling it altogether masks both
1115 # legitimate and false cases, but as we compile on multiple platforms,
1116 # we rely on other compilers to catch legitimate cases.
1120 cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
1121 dso_scheme => "win32",
1122 build_scheme => "mk1mf",
1125 inherit_from => [ "VC-common", asm("ia64_asm") ],
1126 cflags => add(" ", "-DUNICODE -D_UNICODE"),
1128 bn_ops => "SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN",
1129 bn_obj => sub { my $r=join(" ",@_); $r=~s/bn\-//; $r; },
1131 perlasm_scheme => "ias",
1132 build_scheme => [ "mk1mf", "VC-W64" ],
1135 inherit_from => [ "VC-common", asm("x86_64_asm") ],
1136 cflags => add(" ", "-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/x86_64\-gcc/bn_asm/; $r; },
1140 perlasm_scheme => "auto",
1141 build_scheme => [ "mk1mf", "VC-W64" ],
1144 # x86 Win32 target defaults to ANSI API, if you want UNICODE,
1145 # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
1146 inherit_from => [ "VC-common", asm("x86_asm") ],
1148 bn_ops => "BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}",
1149 perlasm_scheme => "win32n",
1150 build_scheme => [ "mk1mf", "VC-W32" ],
1155 bn_ops => "BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}",
1156 dso_scheme => "win32",
1157 build_scheme => [ "mk1mf", "VC-WCE" ],
1160 #### Borland C++ 4.5
1164 bn_ops => "BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN",
1165 dso_scheme => "win32",
1166 build_scheme => [ "mk1mf", "BC" ],
1171 inherit_from => [ asm("x86_asm") ],
1173 cflags => "-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -march=i486 -Wall",
1174 debug_cflags => "-g -O0",
1175 release_cflags => "-O3 -fomit-frame-pointer",
1176 thread_cflag => "-D_MT",
1177 sys_id => "MINGW32",
1178 lflags => "-lws2_32 -lgdi32 -lcrypt32",
1179 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN",
1180 perlasm_scheme => "coff",
1181 dso_scheme => "win32",
1182 shared_target => "cygwin-shared",
1183 shared_cflag => "-D_WINDLL -DOPENSSL_USE_APPLINK",
1184 shared_ldflag => "-mno-cygwin",
1185 shared_extension => ".dll.a",
1188 # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1189 # .dll compiled with one compiler with application compiled with
1190 # another compiler. It's possible to engage Applink support in
1191 # mingw64 build, but it's not done, because till mingw64
1192 # supports structured exception handling, one can't seriously
1193 # consider its binaries for using with non-mingw64 run-time
1194 # environment. And as mingw64 is always consistent with itself,
1195 # Applink is never engaged and can as well be omitted.
1196 inherit_from => [ asm("x86_64_asm") ],
1198 cflags => "-mno-cygwin -DL_ENDIAN -Wall -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE",
1199 debug_cflags => "-g -O0",
1200 release_cflags => "-O3",
1201 thread_cflag => "-D_MT",
1202 sys_id => "MINGW64",
1203 lflags => "-lws2_32 -lgdi32 -lcrypt32",
1204 bn_ops => "SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN",
1205 perlasm_scheme => "mingw64",
1206 dso_scheme => "win32",
1207 shared_target => "cygwin-shared",
1208 shared_cflag => "-D_WINDLL",
1209 shared_ldflag => "-mno-cygwin",
1210 shared_extension => ".dll.a",
1216 cflags => "-DL_ENDIAN -O",
1223 cflags => "-DTERMIOS -DL_ENDIAN -O -Wall",
1225 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
1226 dso_scheme => "win32",
1231 inherit_from => [ asm("x86_asm") ],
1233 cflags => "-DTERMIOS -DL_ENDIAN -Wall",
1234 debug_cflags => "-g -O0",
1235 release_cflags => "-O3 -fomit-frame-pointer",
1237 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
1238 perlasm_scheme => "coff",
1239 dso_scheme => "dlfcn",
1240 shared_target => "cygwin-shared",
1241 shared_cflag => "-D_WINDLL",
1242 shared_ldflag => "-shared",
1243 shared_extension => ".dll.a",
1245 "Cygwin-x86_64" => {
1246 inherit_from => [ asm("x86_64_asm") ],
1248 cflags => "-DTERMIOS -DL_ENDIAN -Wall",
1249 debug_cflags => "-g -O0",
1250 release_cflags => "-O3",
1252 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
1253 perlasm_scheme => "mingw64",
1254 dso_scheme => "dlfcn",
1255 shared_target => "cygwin-shared",
1256 shared_cflag => "-D_WINDLL",
1257 shared_ldflag => "-shared",
1258 shared_extension => ".dll.a",
1260 # Backward compatibility for those using this target
1262 inherit_from => [ "Cygwin-x86" ]
1264 # In case someone constructs the Cygwin target name themself
1266 inherit_from => [ "Cygwin-x86" ]
1269 inherit_from => [ "Cygwin-x86" ]
1272 inherit_from => [ "Cygwin-x86" ]
1275 inherit_from => [ "Cygwin-x86" ]
1278 #### NetWare from David Ward (dsward@novell.com)
1279 # requires either MetroWerks NLM development tools, or gcc / nlmconv
1280 # NetWare defaults socket bio to WinSock sockets. However,
1281 # the builds can be configured to use BSD sockets instead.
1282 # netware-clib => legacy CLib c-runtime support
1285 bn_ops => "${x86_gcc_opts}",
1286 build_scheme => [ "mk1mf", "netware" ],
1288 "netware-clib-bsdsock" => {
1290 bn_ops => "${x86_gcc_opts}",
1291 build_scheme => [ "mk1mf", "netware" ],
1293 "netware-clib-gcc" => {
1294 cc => "i586-netware-gcc",
1295 cflags => "-nostdinc -I/ndk/nwsdk/include/nlm -I/ndk/ws295sdk/include -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYS_NETWARE -O2 -Wall",
1296 bn_ops => "${x86_gcc_opts}",
1298 "netware-clib-bsdsock-gcc" => {
1299 cc => "i586-netware-gcc",
1300 cflags => "-nostdinc -I/ndk/nwsdk/include/nlm -DNETWARE_BSDSOCK -DNETDB_USE_INTERNET -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYS_NETWARE -O2 -Wall",
1301 bn_ops => "${x86_gcc_opts}",
1303 # netware-libc => LibC/NKS support
1306 bn_ops => "BN_LLONG ${x86_gcc_opts}",
1307 build_scheme => [ "mk1mf", "netware" ],
1309 "netware-libc-bsdsock" => {
1311 bn_ops => "BN_LLONG ${x86_gcc_opts}",
1312 build_scheme => [ "mk1mf", "netware" ],
1314 "netware-libc-gcc" => {
1315 cc => "i586-netware-gcc",
1316 cflags => "-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYS_NETWARE -DTERMIO -O2 -Wall",
1317 bn_ops => "BN_LLONG ${x86_gcc_opts}",
1319 "netware-libc-bsdsock-gcc" => {
1320 cc => "i586-netware-gcc",
1321 cflags => "-nostdinc -I/ndk/libc/include -DNETWARE_BSDSOCK -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYS_NETWARE -DTERMIO -O2 -Wall",
1322 bn_ops => "BN_LLONG ${x86_gcc_opts}",
1327 inherit_from => [ asm("x86_asm") ],
1329 cflags => "-I/dev/env/WATT_ROOT/inc -DTERMIO -DL_ENDIAN -fomit-frame-pointer -O2 -Wall",
1331 lflags => "-L/dev/env/WATT_ROOT/lib -lwatt",
1332 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
1333 perlasm_scheme => "a.out",
1336 #### Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
1339 cflags => "-std1 -O -Olimit 2500 -DL_ENDIAN",
1340 thread_cflag => "(unknown)",
1344 cflags => "-O3 -DL_ENDIAN",
1345 thread_cflag => "(unknown)",
1346 bn_ops => "BN_LLONG",
1348 # K&R C is no longer supported; you need gcc on old Ultrix installations
1349 ##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
1351 ##### MacOS X (a.k.a. Darwin) setup
1352 "darwin-common" => {
1356 debug_cflags => "-g -O0",
1357 release_cflags => "-O3",
1358 thread_cflag => "-D_REENTRANT",
1360 lflags => "-Wl,-search_paths_first%",
1361 bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR",
1362 perlasm_scheme => "osx32",
1363 dso_scheme => "dlfcn",
1364 shared_target => "darwin-shared",
1365 shared_cflag => "-fPIC -fno-common",
1366 shared_ldflag => "-dynamiclib",
1367 shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
1369 "darwin-ppc-cc" => {
1370 inherit_from => [ "darwin-common", asm("ppc32_asm") ],
1371 cflags => "-arch ppc -DB_ENDIAN -Wa,-force_cpusubtype_ALL",
1372 perlasm_scheme => "osx32",
1373 shared_ldflag => "-arch ppc -dynamiclib",
1375 "darwin64-ppc-cc" => {
1376 inherit_from => [ "darwin-common", asm("ppc64_asm") ],
1377 cflags => "-arch ppc64 -DB_ENDIAN",
1378 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR",
1379 perlasm_scheme => "osx64",
1380 shared_ldflag => "-arch ppc64 -dynamiclib",
1382 "darwin-i386-cc" => {
1383 inherit_from => [ "darwin-common", asm("x86_asm") ],
1384 cflags => "-arch i386 -DL_ENDIAN",
1385 release_cflags => "-O3 -fomit-frame-pointer",
1386 bn_ops => "BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR",
1387 perlasm_scheme => "macosx",
1388 shared_ldflag => "-arch i386 -dynamiclib",
1390 "darwin64-x86_64-cc" => {
1391 inherit_from => [ "darwin-common", asm("x86_64_asm") ],
1392 cflags => "-arch x86_64 -DL_ENDIAN -Wall",
1393 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
1394 perlasm_scheme => "macosx",
1395 shared_ldflag => "-arch x86_64 -dynamiclib",
1400 # It takes three prior-set environment variables to make it work:
1402 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
1403 # CROSS_TOP=/where/SDKs/are
1404 # CROSS_SDK=iPhoneOSx.y.sdk
1406 # Exact paths vary with Xcode releases, but for couple of last ones
1407 # they would look like this:
1409 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
1410 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
1411 # CROSS_SDK=iPhoneOS.sdk
1413 "iphoneos-cross" => {
1414 inherit_from => [ "darwin-common" ],
1415 cflags => "-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common",
1419 inherit_from => [ "darwin-common", asm("armv4_asm") ],
1420 # It should be possible to go below iOS 6 and even add -arch armv6,
1421 # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
1423 cflags => "-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common",
1425 perlasm_scheme => "ios32",
1428 inherit_from => [ "darwin-common", asm("aarch64_asm") ],
1429 cflags => "-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common",
1431 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR",
1432 perlasm_scheme => "ios64",
1437 inherit_from => [ asm("x86_elf_asm") ],
1439 cflags => "-DL_ENDIAN -O3 -fomit-frame-pointer -march=i486 -Wall",
1440 thread_cflag => "-pthread",
1442 bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
1443 dso_scheme => "dlfcn",
1444 shared_target => "linux-shared",
1445 shared_cflag => "-fPIC",
1453 ##### VxWorks for various targets
1454 "vxworks-ppc60x" => {
1456 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",
1457 sys_id => "VXWORKS",
1458 lflags => "-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common",
1460 "vxworks-ppcgen" => {
1462 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",
1463 sys_id => "VXWORKS",
1464 lflags => "-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon",
1466 "vxworks-ppc405" => {
1468 cflags => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h",
1469 sys_id => "VXWORKS",
1472 "vxworks-ppc750" => {
1474 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)",
1475 sys_id => "VXWORKS",
1478 "vxworks-ppc750-debug" => {
1480 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 -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g",
1481 sys_id => "VXWORKS",
1484 "vxworks-ppc860" => {
1486 cflags => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h",
1487 sys_id => "VXWORKS",
1490 "vxworks-simlinux" => {
1492 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",
1493 sys_id => "VXWORKS",
1495 ranlib => "ranlibpentium",
1498 inherit_from => [ asm("mips32_asm") ],
1500 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",
1501 thread_cflag => "-D_REENTRANT",
1502 sys_id => "VXWORKS",
1503 lflags => "-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon",
1504 perlasm_scheme => "o32",
1505 ranlib => "ranlibmips",
1511 cflags => "\$(CFLAGS)",
1512 thread_cflag => "-D_REENTRANT",
1513 lflags => "\$(LDFLAGS) \$(LDLIBS)",
1514 bn_ops => "BN_LLONG",
1515 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1516 shared_target => "linux-shared",
1517 shared_cflag => "-fPIC",
1518 shared_ldflag => "-shared",
1519 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1520 ranlib => "$ENV{'RANLIB'}",
1522 "uClinux-dist64" => {
1524 cflags => "\$(CFLAGS)",
1525 thread_cflag => "-D_REENTRANT",
1526 lflags => "\$(LDFLAGS) \$(LDLIBS)",
1527 bn_ops => "SIXTY_FOUR_BIT_LONG",
1528 dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
1529 shared_target => "linux-shared",
1530 shared_cflag => "-fPIC",
1531 shared_ldflag => "-shared",
1532 shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
1533 ranlib => "$ENV{'RANLIB'}",