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