]>
Commit | Line | Data |
---|---|---|
f4d8f037 | 1 | ## -*- mode: perl; -*- |
f09e7ca9 | 2 | ## Standard openssl configuration targets. |
f09e7ca9 | 3 | |
2fe73036 RL |
4 | # Helper functions for the Windows configs |
5 | my $vc_win64a_info = {}; | |
6 | sub vc_win64a_info { | |
7 | unless (%$vc_win64a_info) { | |
8 | if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) { | |
9 | $vc_win64a_info = { as => "nasm", | |
10 | asflags => "-f win64 -DNEAR -Ox -g", | |
11 | asoutflag => "-o" }; | |
43800958 | 12 | } elsif ($disabled{asm}) { |
2fe73036 RL |
13 | $vc_win64a_info = { as => "ml64", |
14 | asflags => "/c /Cp /Cx /Zi", | |
15 | asoutflag => "/Fo" }; | |
43800958 | 16 | } else { |
d63c12c6 RL |
17 | $die->("NASM not found - please read INSTALL and NOTES.WIN for further details\n"); |
18 | $vc_win64a_info = { as => "{unknown}", | |
19 | asflags => "", | |
20 | asoutflag => "" }; | |
2fe73036 RL |
21 | } |
22 | } | |
23 | return $vc_win64a_info; | |
24 | } | |
25 | ||
43800958 RL |
26 | my $vc_win32_info = {}; |
27 | sub vc_win32_info { | |
28 | unless (%$vc_win32_info) { | |
29 | my $ver=`nasm -v 2>NUL`; | |
30 | my $vew=`nasmw -v 2>NUL`; | |
31 | if ($ver ne "" || $vew ne "") { | |
32 | $vc_win32_info = { as => $ver ge $vew ? "nasm" : "nasmw", | |
33 | asflags => "-f win32", | |
34 | asoutflag => "-o", | |
35 | perlasm_scheme => "win32n" }; | |
36 | } elsif ($disabled{asm}) { | |
37 | $vc_win32_info = { as => "ml", | |
38 | asflags => "/nologo /Cp /coff /c /Cx /Zi", | |
39 | asoutflag => "/Fo", | |
40 | perlasm_scheme => "win32" }; | |
41 | } else { | |
d63c12c6 RL |
42 | $die->("NASM not found - please read INSTALL and NOTES.WIN for further details\n"); |
43 | $vc_win32_info = { as => "{unknown}", | |
44 | asflags => "", | |
45 | asoutflag => "", | |
46 | perlasm_scheme => "win32" }; | |
43800958 RL |
47 | } |
48 | } | |
49 | return $vc_win32_info; | |
50 | } | |
51 | ||
2fe73036 RL |
52 | my $vc_wince_info = {}; |
53 | sub vc_wince_info { | |
54 | unless (%$vc_wince_info) { | |
55 | # sanity check | |
d63c12c6 RL |
56 | $die->('%OSVERSION% is not defined') if (!defined($ENV{'OSVERSION'})); |
57 | $die->('%PLATFORM% is not defined') if (!defined($ENV{'PLATFORM'})); | |
58 | $die->('%TARGETCPU% is not defined') if (!defined($ENV{'TARGETCPU'})); | |
2fe73036 RL |
59 | |
60 | # | |
61 | # Idea behind this is to mimic flags set by eVC++ IDE... | |
62 | # | |
63 | my $wcevers = $ENV{'OSVERSION'}; # WCENNN | |
d63c12c6 RL |
64 | my $wcevernum; |
65 | my $wceverdotnum; | |
66 | if ($wcevers =~ /^WCE([1-9])([0-9]{2})$/) { | |
67 | $wcevernum = "$1$2"; | |
68 | $wceverdotnum = "$1.$2"; | |
69 | } else { | |
70 | $die->('%OSVERSION% value is insane'); | |
71 | $wcevernum = "{unknown}"; | |
72 | $wceverdotnum = "{unknown}"; | |
73 | } | |
74 | my $wcecdefs = "-D_WIN32_WCE=$wcevernum -DUNDER_CE=$wcevernum"; # -D_WIN32_WCE=NNN | |
75 | my $wcelflag = "/subsystem:windowsce,$wceverdotnum"; # ...,N.NN | |
2fe73036 RL |
76 | |
77 | my $wceplatf = $ENV{'PLATFORM'}; | |
01d99976 RL |
78 | |
79 | $wceplatf =~ tr/a-z0-9 /A-Z0-9_/; | |
80 | $wcecdefs .= " -DWCE_PLATFORM_$wceplatf"; | |
2fe73036 RL |
81 | |
82 | my $wcetgt = $ENV{'TARGETCPU'}; # just shorter name... | |
83 | SWITCH: for($wcetgt) { | |
84 | /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_"; | |
85 | $wcelflag.=" /machine:X86"; last; }; | |
86 | /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; | |
87 | $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/); | |
88 | $wcecdefs.=" -QRarch4T -QRinterwork-return"; | |
89 | $wcelflag.=" /machine:THUMB"; last; }; | |
90 | /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; | |
91 | $wcelflag.=" /machine:ARM"; last; }; | |
92 | /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | |
93 | $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32"; | |
94 | $wcelflag.=" /machine:MIPSFPU"; last; }; | |
95 | /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | |
96 | $wcecdefs.=" -DMIPSII -QMmips16"; | |
97 | $wcelflag.=" /machine:MIPS16"; last; }; | |
98 | /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | |
99 | $wcecdefs.=" -QMmips2"; | |
100 | $wcelflag.=" /machine:MIPS"; last; }; | |
101 | /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000"; | |
102 | $wcelflag.=" /machine:MIPS"; last; }; | |
103 | /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx"; | |
104 | $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/); | |
105 | $wcelflag.=" /machine:$wcetgt"; last; }; | |
106 | { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_"; | |
107 | $wcelflag.=" /machine:$wcetgt"; last; }; | |
108 | } | |
109 | ||
110 | $vc_wince_info = { cflags => $wcecdefs, | |
111 | lflags => $wcelflag }; | |
112 | } | |
113 | return $vc_wince_info; | |
114 | } | |
115 | ||
5fe5bc30 RL |
116 | # Helper functions for the VMS configs |
117 | my $vms_info = {}; | |
118 | sub vms_info { | |
119 | unless (%$vms_info) { | |
0c9b1534 RL |
120 | my $pointer_size = shift; |
121 | my $pointer_size_str = $pointer_size == 0 ? "" : "$pointer_size"; | |
122 | ||
123 | $vms_info->{disable_warns} = [ ]; | |
7878e536 | 124 | $vms_info->{pointer_size} = $pointer_size_str; |
0c9b1534 RL |
125 | if ($pointer_size == 64) { |
126 | `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`; | |
127 | if ($? == 0) { | |
128 | push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3"; | |
129 | } | |
130 | } | |
62890f47 RL |
131 | |
132 | unless ($disabled{zlib}) { | |
0c9b1534 | 133 | my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str; |
62890f47 | 134 | if (defined($disabled{"zlib-dynamic"})) { |
0c9b1534 | 135 | $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE"; |
62890f47 | 136 | } else { |
0c9b1534 RL |
137 | $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib; |
138 | # In case the --with-zlib-lib value contains something like | |
139 | # /SHARE or /LIB or so at the end, remove it. | |
140 | $vms_info->{def_zlib} =~ s|/.*$||g; | |
62890f47 RL |
141 | } |
142 | } | |
5fe5bc30 RL |
143 | } |
144 | return $vms_info; | |
145 | } | |
2fe73036 | 146 | |
f09e7ca9 RS |
147 | %targets = ( |
148 | ||
7ead0c89 | 149 | #### Basic configs that should work on any 32-bit box |
5e1b2353 RL |
150 | "gcc" => { |
151 | cc => "gcc", | |
8864f0de RL |
152 | cflags => picker(debug => "-O0 -g", |
153 | release => "-O3"), | |
9c62a279 | 154 | thread_scheme => "(unknown)", |
5e1b2353 RL |
155 | bn_ops => "BN_LLONG", |
156 | }, | |
157 | "cc" => { | |
158 | cc => "cc", | |
159 | cflags => "-O", | |
9c62a279 | 160 | thread_scheme => "(unknown)", |
5e1b2353 | 161 | }, |
f09e7ca9 | 162 | |
7ead0c89 | 163 | #### VOS Configurations |
5e1b2353 | 164 | "vos-gcc" => { |
d2b2221a | 165 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 166 | cc => "gcc", |
8864f0de | 167 | cflags => picker(default => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN", |
463a7b8c | 168 | debug => "-O0 -g", |
8864f0de | 169 | release => "-O3"), |
9c62a279 | 170 | thread_scheme => "(unknown)", |
5e1b2353 RL |
171 | sys_id => "VOS", |
172 | lflags => "-Wl,-map", | |
173 | bn_ops => "BN_LLONG", | |
174 | shared_extension => ".so", | |
175 | }, | |
f09e7ca9 | 176 | |
29d09327 | 177 | #### Solaris configurations |
f6739c3d | 178 | "solaris-common" => { |
d2b2221a | 179 | inherit_from => [ "BASE_unix" ], |
f6739c3d AP |
180 | template => 1, |
181 | cflags => "-DFILIO_H", | |
8cfc21f5 | 182 | ex_libs => add("-lsocket -lnsl -ldl"), |
f6739c3d | 183 | dso_scheme => "dlfcn", |
9c62a279 | 184 | thread_scheme => "pthreads", |
f6739c3d AP |
185 | shared_target => "solaris-shared", |
186 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
187 | }, | |
f09e7ca9 | 188 | #### Solaris x86 with GNU C setups |
5e1b2353 | 189 | "solaris-x86-gcc" => { |
fe9e5b9c AP |
190 | # NB. GNU C has to be configured to use GNU assembler, and not |
191 | # /usr/ccs/bin/as. Failure to comply will result in compile | |
192 | # failures [at least] in 32-bit build. | |
f6739c3d | 193 | inherit_from => [ "solaris-common", asm("x86_elf_asm") ], |
7ead0c89 | 194 | cc => "gcc", |
1e19eacd | 195 | cflags => add_before(picker(default => "-Wall -DL_ENDIAN", |
8864f0de | 196 | debug => "-O0 -g", |
9c62a279 RL |
197 | release => "-O3 -fomit-frame-pointer"), |
198 | threads("-pthread")), | |
a01dab94 | 199 | bn_ops => "BN_LLONG", |
5e1b2353 | 200 | shared_cflag => "-fPIC", |
216a0cc4 | 201 | shared_ldflag => "-shared -static-libgcc", |
5e1b2353 | 202 | }, |
5e1b2353 | 203 | "solaris64-x86_64-gcc" => { |
7ead0c89 AP |
204 | # -shared -static-libgcc might appear controversial, but modules |
205 | # taken from static libgcc do not have relocations and linking | |
206 | # them into our shared objects doesn't have any negative side | |
207 | # effects. On the contrary, doing so makes it possible to use | |
208 | # gcc shared build with Sun C. Given that gcc generates faster | |
209 | # code [thanks to inline assembler], I would actually recommend | |
210 | # to consider using gcc shared build even with vendor compiler:-) | |
211 | # <appro@fy.chalmers.se> | |
f6739c3d | 212 | inherit_from => [ "solaris-common", asm("x86_64_asm") ], |
7ead0c89 | 213 | cc => "gcc", |
8864f0de RL |
214 | cflags => add_before(picker(default => "-m64 -Wall -DL_ENDIAN", |
215 | debug => "-O0 -g", | |
9c62a279 RL |
216 | release => "-O3"), |
217 | threads("-pthread")), | |
3e9e810f | 218 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 219 | perlasm_scheme => "elf", |
5e1b2353 RL |
220 | shared_cflag => "-fPIC", |
221 | shared_ldflag => "-m64 -shared -static-libgcc", | |
5e1b2353 RL |
222 | multilib => "/64", |
223 | }, | |
f09e7ca9 RS |
224 | |
225 | #### Solaris x86 with Sun C setups | |
216a0cc4 AP |
226 | # There used to be solaris-x86-cc target, but it was removed, |
227 | # primarily because vendor assembler can't assemble our modules | |
228 | # with -KPIC flag. As result it, assembly support, was not even | |
229 | # available as option. But its lack means lack of side-channel | |
230 | # resistant code, which is incompatible with security by todays | |
231 | # standards. Fortunately gcc is readily available prepackaged | |
232 | # option, which we can firmly point at... | |
233 | # | |
234 | # On related note, solaris64-x86_64-cc target won't compile code | |
235 | # paths utilizing AVX and post-Haswell instruction extensions. | |
236 | # Consider switching to solaris64-x86_64-gcc even here... | |
237 | # | |
5e1b2353 | 238 | "solaris64-x86_64-cc" => { |
f6739c3d | 239 | inherit_from => [ "solaris-common", asm("x86_64_asm") ], |
5e1b2353 | 240 | cc => "cc", |
8864f0de RL |
241 | cflags => add_before(picker(default => "-xarch=generic64 -xstrconst -Xa -DL_ENDIAN", |
242 | debug => "-g", | |
9c62a279 RL |
243 | release => "-xO5 -xdepend -xbuiltin"), |
244 | threads("-D_REENTRANT")), | |
245 | thread_scheme => "pthreads", | |
3188c950 | 246 | lflags => add("-xarch=generic64",threads("-mt")), |
9c62a279 | 247 | ex_libs => add(threads("-lpthread")), |
3e9e810f | 248 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 249 | perlasm_scheme => "elf", |
5e1b2353 | 250 | shared_cflag => "-KPIC", |
7ead0c89 | 251 | shared_ldflag => "-xarch=generic64 -G -dy -z text", |
5e1b2353 RL |
252 | multilib => "/64", |
253 | }, | |
f09e7ca9 RS |
254 | |
255 | #### SPARC Solaris with GNU C setups | |
5e1b2353 | 256 | "solaris-sparcv7-gcc" => { |
f6739c3d | 257 | inherit_from => [ "solaris-common" ], |
5e1b2353 | 258 | cc => "gcc", |
8864f0de RL |
259 | cflags => add_before(picker(default => "-Wall -DB_ENDIAN -DBN_DIV2W", |
260 | debug => "-O0 -g", | |
9c62a279 RL |
261 | release => "-O3"), |
262 | threads("-pthread")), | |
3e9e810f | 263 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 RL |
264 | shared_cflag => "-fPIC", |
265 | shared_ldflag => "-shared", | |
5e1b2353 | 266 | }, |
5e1b2353 | 267 | "solaris-sparcv8-gcc" => { |
7ead0c89 | 268 | inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ], |
bdcd83e1 | 269 | cflags => add_before("-mcpu=v8"), |
5e1b2353 | 270 | }, |
5e1b2353 | 271 | "solaris-sparcv9-gcc" => { |
7ead0c89 | 272 | # -m32 should be safe to add as long as driver recognizes |
f6739c3d | 273 | # -mcpu=ultrasparc |
7ead0c89 | 274 | inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ], |
463a7b8c | 275 | cflags => add_before("-m32 -mcpu=ultrasparc"), |
5e1b2353 RL |
276 | }, |
277 | "solaris64-sparcv9-gcc" => { | |
7ead0c89 | 278 | inherit_from => [ "solaris-sparcv9-gcc" ], |
f6739c3d | 279 | cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; }, |
3e9e810f | 280 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 | 281 | shared_ldflag => "-m64 -shared", |
5e1b2353 RL |
282 | multilib => "/64", |
283 | }, | |
f09e7ca9 RS |
284 | |
285 | #### SPARC Solaris with Sun C setups | |
286 | # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2. | |
287 | # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8 | |
288 | # SC5.0 note: Compiler common patch 107357-01 or later is required! | |
5e1b2353 | 289 | "solaris-sparcv7-cc" => { |
f6739c3d | 290 | inherit_from => [ "solaris-common" ], |
5e1b2353 | 291 | cc => "cc", |
8864f0de | 292 | cflags => add_before(picker(default => "-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W", |
463a7b8c | 293 | debug => "-g", |
9c62a279 RL |
294 | release => "-xO5 -xdepend"), |
295 | threads("-D_REENTRANT")), | |
296 | lflags => add(threads("-mt")), | |
297 | ex_libs => add(threads("-lpthread")), | |
3e9e810f | 298 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 RL |
299 | shared_cflag => "-KPIC", |
300 | shared_ldflag => "-G -dy -z text", | |
5e1b2353 | 301 | }, |
f09e7ca9 | 302 | #### |
5e1b2353 | 303 | "solaris-sparcv8-cc" => { |
7ead0c89 | 304 | inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ], |
bdcd83e1 | 305 | cflags => add_before("-xarch=v8"), |
5e1b2353 RL |
306 | }, |
307 | "solaris-sparcv9-cc" => { | |
7ead0c89 | 308 | inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ], |
fa4618a2 | 309 | cflags => add_before("-xarch=v8plus"), |
5e1b2353 RL |
310 | }, |
311 | "solaris64-sparcv9-cc" => { | |
7ead0c89 | 312 | inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ], |
fa4618a2 | 313 | cflags => add_before("-xarch=v9"), |
3188c950 | 314 | lflags => add_before("-xarch=v9"), |
3e9e810f | 315 | bn_ops => "BN_LLONG RC4_CHAR", |
5e1b2353 | 316 | shared_ldflag => "-xarch=v9 -G -dy -z text", |
5e1b2353 RL |
317 | multilib => "/64", |
318 | }, | |
f09e7ca9 | 319 | |
f09e7ca9 | 320 | #### IRIX 6.x configs |
c21c7830 | 321 | # Only N32 and N64 ABIs are supported. |
5e1b2353 | 322 | "irix-mips3-gcc" => { |
d2b2221a | 323 | inherit_from => [ "BASE_unix", asm("mips64_asm") ], |
5e1b2353 | 324 | cc => "gcc", |
9c62a279 RL |
325 | cflags => combine(picker(default => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W", |
326 | debug => "-g -O0", | |
327 | release => "-O3"), | |
c21c7830 AP |
328 | threads("-D_SGI_MP_SOURCE")), |
329 | ex_libs => add(threads("-lpthread")), | |
3e9e810f | 330 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT", |
9c62a279 | 331 | thread_scheme => "pthreads", |
5e1b2353 RL |
332 | perlasm_scheme => "n32", |
333 | dso_scheme => "dlfcn", | |
334 | shared_target => "irix-shared", | |
335 | shared_ldflag => "-mabi=n32", | |
336 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
337 | multilib => "32", | |
338 | }, | |
339 | "irix-mips3-cc" => { | |
d2b2221a | 340 | inherit_from => [ "BASE_unix", asm("mips64_asm") ], |
5e1b2353 | 341 | cc => "cc", |
9c62a279 RL |
342 | cflags => combine(picker(default => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W", |
343 | debug => "-g -O0", | |
344 | release => "-O2"), | |
345 | threads("-D_SGI_MP_SOURCE")), | |
346 | ex_libs => add(threads("-lpthread")), | |
3e9e810f | 347 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT", |
9c62a279 | 348 | thread_scheme => "pthreads", |
5e1b2353 RL |
349 | perlasm_scheme => "n32", |
350 | dso_scheme => "dlfcn", | |
351 | shared_target => "irix-shared", | |
352 | shared_ldflag => "-n32", | |
353 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
354 | multilib => "32", | |
355 | }, | |
7ead0c89 | 356 | # N64 ABI builds. |
5e1b2353 | 357 | "irix64-mips4-gcc" => { |
d2b2221a | 358 | inherit_from => [ "BASE_unix", asm("mips64_asm") ], |
5e1b2353 | 359 | cc => "gcc", |
9c62a279 RL |
360 | cflags => combine(picker(default => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W", |
361 | debug => "-g -O0", | |
362 | release => "-O3"), | |
363 | threads("-D_SGI_MP_SOURCE")), | |
c21c7830 | 364 | ex_libs => add(threads("-lpthread")), |
3e9e810f | 365 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG", |
9c62a279 | 366 | thread_scheme => "pthreads", |
5e1b2353 RL |
367 | perlasm_scheme => "64", |
368 | dso_scheme => "dlfcn", | |
369 | shared_target => "irix-shared", | |
370 | shared_ldflag => "-mabi=64", | |
371 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
372 | multilib => "64", | |
373 | }, | |
374 | "irix64-mips4-cc" => { | |
d2b2221a | 375 | inherit_from => [ "BASE_unix", asm("mips64_asm") ], |
5e1b2353 | 376 | cc => "cc", |
9c62a279 RL |
377 | cflags => combine(picker(default => "-64 -mips4 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W", |
378 | debug => "-g -O0", | |
379 | release => "-O2"), | |
380 | threads("-D_SGI_MP_SOURCE")), | |
381 | ex_libs => add(threads("-lpthread")), | |
3e9e810f | 382 | bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG", |
9c62a279 | 383 | thread_scheme => "pthreads", |
5e1b2353 RL |
384 | perlasm_scheme => "64", |
385 | dso_scheme => "dlfcn", | |
386 | shared_target => "irix-shared", | |
387 | shared_ldflag => "-64", | |
388 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
389 | multilib => "64", | |
390 | }, | |
f09e7ca9 RS |
391 | |
392 | #### Unified HP-UX ANSI C configs. | |
393 | # Special notes: | |
394 | # - Originally we were optimizing at +O4 level. It should be noted | |
395 | # that the only difference between +O3 and +O4 is global inter- | |
396 | # procedural analysis. As it has to be performed during the link | |
397 | # stage the compiler leaves behind certain pseudo-code in lib*.a | |
398 | # which might be release or even patch level specific. Generating | |
399 | # the machine code for and analyzing the *whole* program appears | |
400 | # to be *extremely* memory demanding while the performance gain is | |
401 | # actually questionable. The situation is intensified by the default | |
402 | # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB | |
403 | # which is way too low for +O4. In other words, doesn't +O3 make | |
404 | # more sense? | |
405 | # - Keep in mind that the HP compiler by default generates code | |
406 | # suitable for execution on the host you're currently compiling at. | |
b6453a68 | 407 | # If the toolkit is meant to be used on various PA-RISC processors |
7ead0c89 | 408 | # consider './Configure hpux-parisc-[g]cc +DAportable'. |
f09e7ca9 RS |
409 | # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in |
410 | # 32-bit message digests. (For the moment of this writing) HP C | |
411 | # doesn't seem to "digest" too many local variables (they make "him" | |
412 | # chew forever:-). For more details look-up MD32_XARRAY comment in | |
413 | # crypto/sha/sha_lcl.h. | |
7ead0c89 | 414 | # - originally there were 32-bit hpux-parisc2-* targets. They were |
b6453a68 | 415 | # scrapped, because a) they were not interchangeable with other 32-bit |
0b919cc5 AP |
416 | # targets; b) performance-critical 32-bit assembly modules implement |
417 | # even PA-RISC 2.0-specific code paths, which are chosen at run-time, | |
418 | # thus adequate performance is provided even with PA-RISC 1.1 build. | |
f09e7ca9 | 419 | # <appro@fy.chalmers.se> |
5e1b2353 | 420 | "hpux-parisc-gcc" => { |
d2b2221a | 421 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 422 | cc => "gcc", |
9c62a279 RL |
423 | cflags => combine(picker(default => "-DB_ENDIAN -DBN_DIV2W", |
424 | debug => "-O0 -g", | |
425 | release => "-O3"), | |
426 | threads("-pthread")), | |
98fdbce0 | 427 | ex_libs => add("-Wl,+s -ldld"), |
3e9e810f | 428 | bn_ops => "BN_LLONG", |
9c62a279 | 429 | thread_scheme => "pthreads", |
5e1b2353 RL |
430 | dso_scheme => "dl", |
431 | shared_target => "hpux-shared", | |
432 | shared_cflag => "-fPIC", | |
433 | shared_ldflag => "-shared", | |
434 | shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
435 | }, | |
436 | "hpux-parisc1_1-gcc" => { | |
7ead0c89 | 437 | inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ], |
5e1b2353 RL |
438 | multilib => "/pa1.1", |
439 | }, | |
5e1b2353 | 440 | "hpux64-parisc2-gcc" => { |
d2b2221a | 441 | inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ], |
5e1b2353 | 442 | cc => "gcc", |
9c62a279 RL |
443 | cflags => combine(picker(default => "-DB_ENDIAN", |
444 | debug => "-O0 -g", | |
445 | release => "-O3"), | |
446 | threads("-D_REENTRANT")), | |
98fdbce0 | 447 | ex_libs => add("-ldl"), |
3e9e810f | 448 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
9c62a279 | 449 | thread_scheme => "pthreads", |
5e1b2353 RL |
450 | dso_scheme => "dlfcn", |
451 | shared_target => "hpux-shared", | |
452 | shared_cflag => "-fpic", | |
453 | shared_ldflag => "-shared", | |
454 | shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
455 | multilib => "/pa20_64", | |
456 | }, | |
f09e7ca9 | 457 | |
7ead0c89 AP |
458 | # More attempts at unified 10.X and 11.X targets for HP C compiler. |
459 | # | |
460 | # Chris Ruemmler <ruemmler@cup.hp.com> | |
461 | # Kevin Steves <ks@hp.se> | |
5e1b2353 | 462 | "hpux-parisc-cc" => { |
d2b2221a | 463 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 464 | cc => "cc", |
9c62a279 RL |
465 | cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY", |
466 | debug => "+O0 +d -g", | |
467 | release => "+O3"), | |
468 | threads("-D_REENTRANT")), | |
469 | ex_libs => add("-Wl,+s -ldld",threads("-lpthread")), | |
3e9e810f | 470 | bn_ops => "RC4_CHAR", |
9c62a279 | 471 | thread_scheme => "pthreads", |
5e1b2353 RL |
472 | dso_scheme => "dl", |
473 | shared_target => "hpux-shared", | |
474 | shared_cflag => "+Z", | |
475 | shared_ldflag => "-b", | |
476 | shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
477 | }, | |
478 | "hpux-parisc1_1-cc" => { | |
7ead0c89 | 479 | inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ], |
bdcd83e1 | 480 | cflags => add_before("+DA1.1"), |
5e1b2353 RL |
481 | multilib => "/pa1.1", |
482 | }, | |
5e1b2353 | 483 | "hpux64-parisc2-cc" => { |
d2b2221a | 484 | inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ], |
5e1b2353 | 485 | cc => "cc", |
9c62a279 RL |
486 | cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY", |
487 | debug => "+O0 +d -g", | |
488 | release => "+O3"), | |
489 | threads("-D_REENTRANT")), | |
490 | ex_libs => add("-ldl",threads("-lpthread")), | |
3e9e810f | 491 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
9c62a279 | 492 | thread_scheme => "pthreads", |
5e1b2353 RL |
493 | dso_scheme => "dlfcn", |
494 | shared_target => "hpux-shared", | |
495 | shared_cflag => "+Z", | |
496 | shared_ldflag => "+DD64 -b", | |
497 | shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
498 | multilib => "/pa20_64", | |
499 | }, | |
f09e7ca9 | 500 | |
7ead0c89 | 501 | # HP/UX IA-64 targets |
5e1b2353 | 502 | "hpux-ia64-cc" => { |
d2b2221a | 503 | inherit_from => [ "BASE_unix", asm("ia64_asm") ], |
5e1b2353 | 504 | cc => "cc", |
9c62a279 RL |
505 | cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z -DB_ENDIAN", |
506 | debug => "+O0 +d -g", | |
507 | release => "+O2"), | |
508 | threads("-D_REENTRANT")), | |
509 | ex_libs => add("-ldl",threads("-lpthread")), | |
3e9e810f | 510 | bn_ops => "SIXTY_FOUR_BIT", |
9c62a279 | 511 | thread_scheme => "pthreads", |
5e1b2353 RL |
512 | dso_scheme => "dlfcn", |
513 | shared_target => "hpux-shared", | |
514 | shared_cflag => "+Z", | |
515 | shared_ldflag => "+DD32 -b", | |
516 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
517 | multilib => "/hpux32", | |
518 | }, | |
7ead0c89 AP |
519 | # Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted |
520 | # with debugging of the following config. | |
5e1b2353 | 521 | "hpux64-ia64-cc" => { |
d2b2221a | 522 | inherit_from => [ "BASE_unix", asm("ia64_asm") ], |
5e1b2353 | 523 | cc => "cc", |
9c62a279 RL |
524 | cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z -DB_ENDIAN", |
525 | debug => "+O0 +d -g", | |
526 | release => "+O3"), | |
527 | threads("-D_REENTRANT")), | |
528 | ex_libs => add("-ldl", threads("-lpthread")), | |
3e9e810f | 529 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
9c62a279 | 530 | thread_scheme => "pthreads", |
5e1b2353 RL |
531 | dso_scheme => "dlfcn", |
532 | shared_target => "hpux-shared", | |
533 | shared_cflag => "+Z", | |
534 | shared_ldflag => "+DD64 -b", | |
535 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
536 | multilib => "/hpux64", | |
537 | }, | |
7ead0c89 | 538 | # GCC builds... |
5e1b2353 | 539 | "hpux-ia64-gcc" => { |
d2b2221a | 540 | inherit_from => [ "BASE_unix", asm("ia64_asm") ], |
5e1b2353 | 541 | cc => "gcc", |
9c62a279 RL |
542 | cflags => combine(picker(default => "-DB_ENDIAN", |
543 | debug => "-O0 -g", | |
544 | release => "-O3"), | |
545 | threads("-pthread")), | |
98fdbce0 | 546 | ex_libs => add("-ldl"), |
3e9e810f | 547 | bn_ops => "SIXTY_FOUR_BIT", |
9c62a279 | 548 | thread_scheme => "pthreads", |
5e1b2353 RL |
549 | dso_scheme => "dlfcn", |
550 | shared_target => "hpux-shared", | |
551 | shared_cflag => "-fpic", | |
552 | shared_ldflag => "-shared", | |
553 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
554 | multilib => "/hpux32", | |
555 | }, | |
556 | "hpux64-ia64-gcc" => { | |
d2b2221a | 557 | inherit_from => [ "BASE_unix", asm("ia64_asm") ], |
5e1b2353 | 558 | cc => "gcc", |
01d99976 RL |
559 | cflags => combine(picker(default => "-mlp64 -DB_ENDIAN", |
560 | debug => "-O0 -g", | |
561 | release => "-O3"), | |
562 | threads("-pthread")), | |
98fdbce0 | 563 | ex_libs => add("-ldl"), |
3e9e810f | 564 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
9c62a279 | 565 | thread_scheme => "pthreads", |
5e1b2353 RL |
566 | dso_scheme => "dlfcn", |
567 | shared_target => "hpux-shared", | |
568 | shared_cflag => "-fpic", | |
569 | shared_ldflag => "-mlp64 -shared", | |
570 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
571 | multilib => "/hpux64", | |
572 | }, | |
f09e7ca9 | 573 | |
f09e7ca9 | 574 | #### HP MPE/iX http://jazz.external.hp.com/src/openssl/ |
5e1b2353 | 575 | "MPE/iX-gcc" => { |
d2b2221a | 576 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
577 | cc => "gcc", |
578 | cflags => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB", | |
5e1b2353 | 579 | sys_id => "MPE", |
98fdbce0 | 580 | ex_libs => add("-L/SYSLOG/PUB -lsyslog -lsocket -lcurses"), |
9c62a279 | 581 | thread_scheme => "(unknown)", |
3e9e810f | 582 | bn_ops => "BN_LLONG", |
5e1b2353 | 583 | }, |
f09e7ca9 | 584 | |
b4de72bf AP |
585 | #### DEC Alpha Tru64 targets. Tru64 is marketing name for OSF/1 version 4 |
586 | #### and forward. In reality 'uname -s' still returns "OSF1". Originally | |
587 | #### there were even osf1-* configs targeting prior versions provided, | |
588 | #### but not anymore... | |
589 | "tru64-alpha-gcc" => { | |
d2b2221a | 590 | inherit_from => [ "BASE_unix", asm("alpha_asm") ], |
5e1b2353 | 591 | cc => "gcc", |
b4de72bf AP |
592 | cflags => combine("-std=c9x -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -O3", |
593 | threads("-pthread")), | |
594 | ex_libs => "-lrt", # for mlock(2) | |
3e9e810f | 595 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
b4de72bf | 596 | thread_scheme => "pthreads", |
5e1b2353 RL |
597 | dso_scheme => "dlfcn", |
598 | shared_target => "alpha-osf1-shared", | |
599 | shared_extension => ".so", | |
600 | }, | |
601 | "tru64-alpha-cc" => { | |
d2b2221a | 602 | inherit_from => [ "BASE_unix", asm("alpha_asm") ], |
5e1b2353 | 603 | cc => "cc", |
b4de72bf | 604 | cflags => combine("-std1 -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -tune host -fast -readonly_strings", |
9c62a279 | 605 | threads("-pthread")), |
b4de72bf | 606 | ex_libs => "-lrt", # for mlock(2) |
3e9e810f | 607 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
9c62a279 | 608 | thread_scheme => "pthreads", |
5e1b2353 RL |
609 | dso_scheme => "dlfcn", |
610 | shared_target => "alpha-osf1-shared", | |
611 | shared_ldflag => "-msym", | |
612 | shared_extension => ".so", | |
613 | }, | |
f09e7ca9 RS |
614 | |
615 | #### | |
616 | #### Variety of LINUX:-) | |
617 | #### | |
618 | # *-generic* is endian-neutral target, but ./config is free to | |
619 | # throw in -D[BL]_ENDIAN, whichever appropriate... | |
5e1b2353 | 620 | "linux-generic32" => { |
d2b2221a | 621 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 622 | cc => "gcc", |
16b42d4d | 623 | cxx => "g++", |
9c62a279 | 624 | cflags => combine(picker(default => "-Wall", |
463a7b8c | 625 | debug => "-O0 -g", |
9c62a279 RL |
626 | release => "-O3"), |
627 | threads("-pthread")), | |
98fdbce0 | 628 | ex_libs => add("-ldl"), |
3e9e810f | 629 | bn_ops => "BN_LLONG RC4_CHAR", |
9c62a279 | 630 | thread_scheme => "pthreads", |
5e1b2353 RL |
631 | dso_scheme => "dlfcn", |
632 | shared_target => "linux-shared", | |
b6d5ba1a | 633 | shared_cflag => "-fPIC -DOPENSSL_USE_NODELETE", |
075e9da0 | 634 | shared_ldflag => "-Wl,-znodelete", |
5e1b2353 RL |
635 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", |
636 | }, | |
7ead0c89 AP |
637 | "linux-generic64" => { |
638 | inherit_from => [ "linux-generic32" ], | |
3e9e810f | 639 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
7ead0c89 AP |
640 | }, |
641 | ||
5e1b2353 | 642 | "linux-ppc" => { |
7ead0c89 | 643 | inherit_from => [ "linux-generic32", asm("ppc32_asm") ], |
5e1b2353 | 644 | perlasm_scheme => "linux32", |
7ead0c89 AP |
645 | }, |
646 | "linux-ppc64" => { | |
647 | inherit_from => [ "linux-generic64", asm("ppc64_asm") ], | |
8864f0de | 648 | cflags => add("-m64 -DB_ENDIAN"), |
7ead0c89 | 649 | perlasm_scheme => "linux64", |
b6d5ba1a | 650 | shared_ldflag => add("-m64"), |
7ead0c89 AP |
651 | multilib => "64", |
652 | }, | |
653 | "linux-ppc64le" => { | |
654 | inherit_from => [ "linux-generic64", asm("ppc64_asm") ], | |
8864f0de | 655 | cflags => add("-m64 -DL_ENDIAN"), |
7ead0c89 | 656 | perlasm_scheme => "linux64le", |
b6d5ba1a | 657 | shared_ldflag => add("-m64"), |
5e1b2353 | 658 | }, |
f09e7ca9 | 659 | |
5e1b2353 | 660 | "linux-armv4" => { |
7ead0c89 AP |
661 | ################################################################ |
662 | # Note that -march is not among compiler options in linux-armv4 | |
663 | # target description. Not specifying one is intentional to give | |
664 | # you choice to: | |
665 | # | |
666 | # a) rely on your compiler default by not specifying one; | |
667 | # b) specify your target platform explicitly for optimal | |
668 | # performance, e.g. -march=armv6 or -march=armv7-a; | |
669 | # c) build "universal" binary that targets *range* of platforms | |
670 | # by specifying minimum and maximum supported architecture; | |
671 | # | |
672 | # As for c) option. It actually makes no sense to specify | |
673 | # maximum to be less than ARMv7, because it's the least | |
674 | # requirement for run-time switch between platform-specific | |
675 | # code paths. And without run-time switch performance would be | |
676 | # equivalent to one for minimum. Secondly, there are some | |
677 | # natural limitations that you'd have to accept and respect. | |
678 | # Most notably you can *not* build "universal" binary for | |
679 | # big-endian platform. This is because ARMv7 processor always | |
680 | # picks instructions in little-endian order. Another similar | |
681 | # limitation is that -mthumb can't "cross" -march=armv6t2 | |
682 | # boundary, because that's where it became Thumb-2. Well, this | |
683 | # limitation is a bit artificial, because it's not really | |
684 | # impossible, but it's deemed too tricky to support. And of | |
685 | # course you have to be sure that your binutils are actually | |
686 | # up to the task of handling maximum target platform. With all | |
687 | # this in mind here is an example of how to configure | |
688 | # "universal" build: | |
689 | # | |
690 | # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8 | |
691 | # | |
692 | inherit_from => [ "linux-generic32", asm("armv4_asm") ], | |
693 | perlasm_scheme => "linux32", | |
5e1b2353 RL |
694 | }, |
695 | "linux-aarch64" => { | |
7ead0c89 | 696 | inherit_from => [ "linux-generic64", asm("aarch64_asm") ], |
5e1b2353 | 697 | perlasm_scheme => "linux64", |
5e1b2353 | 698 | }, |
a93d3e06 AP |
699 | "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32 |
700 | inherit_from => [ "linux-generic32", asm("aarch64_asm") ], | |
8864f0de | 701 | cflags => add("-mabi=ilp32"), |
3e9e810f | 702 | bn_ops => "SIXTY_FOUR_BIT RC4_CHAR", |
a93d3e06 | 703 | perlasm_scheme => "linux64", |
55ab86e4 | 704 | shared_ldflag => add("-mabi=ilp32"), |
a93d3e06 | 705 | }, |
7ead0c89 | 706 | |
5e1b2353 | 707 | "linux-mips32" => { |
7ead0c89 AP |
708 | # Configure script adds minimally required -march for assembly |
709 | # support, if no -march was specified at command line. | |
710 | inherit_from => [ "linux-generic32", asm("mips32_asm") ], | |
8864f0de | 711 | cflags => add("-mabi=32 -DBN_DIV3W"), |
5e1b2353 | 712 | perlasm_scheme => "o32", |
b6d5ba1a | 713 | shared_ldflag => add("-mabi=32"), |
5e1b2353 | 714 | }, |
7ead0c89 AP |
715 | # mips32 and mips64 below refer to contemporary MIPS Architecture |
716 | # specifications, MIPS32 and MIPS64, rather than to kernel bitness. | |
5e1b2353 | 717 | "linux-mips64" => { |
7ead0c89 | 718 | inherit_from => [ "linux-generic32", asm("mips64_asm") ], |
8864f0de | 719 | cflags => add("-mabi=n32 -DBN_DIV3W"), |
3e9e810f | 720 | bn_ops => "SIXTY_FOUR_BIT RC4_CHAR", |
5e1b2353 | 721 | perlasm_scheme => "n32", |
b6d5ba1a | 722 | shared_ldflag => add("-mabi=n32"), |
5e1b2353 RL |
723 | multilib => "32", |
724 | }, | |
725 | "linux64-mips64" => { | |
7ead0c89 | 726 | inherit_from => [ "linux-generic64", asm("mips64_asm") ], |
8864f0de | 727 | cflags => add("-mabi=64 -DBN_DIV3W"), |
5e1b2353 | 728 | perlasm_scheme => "64", |
b6d5ba1a | 729 | shared_ldflag => add("-mabi=64"), |
5e1b2353 RL |
730 | multilib => "64", |
731 | }, | |
7ead0c89 AP |
732 | |
733 | #### IA-32 targets... | |
7fbc0bfd RL |
734 | #### These two targets are a bit aged and are to be used on older Linux |
735 | #### machines where gcc doesn't understand -m32 and -m64 | |
5e1b2353 | 736 | "linux-elf" => { |
7ead0c89 | 737 | inherit_from => [ "linux-generic32", asm("x86_elf_asm") ], |
8864f0de RL |
738 | cflags => add(picker(default => "-DL_ENDIAN", |
739 | release => "-fomit-frame-pointer")), | |
a01dab94 | 740 | bn_ops => "BN_LLONG", |
5e1b2353 RL |
741 | }, |
742 | "linux-aout" => { | |
d2b2221a | 743 | inherit_from => [ "BASE_unix", asm("x86_asm") ], |
5e1b2353 | 744 | cc => "gcc", |
8864f0de RL |
745 | cflags => add(picker(default => "-DL_ENDIAN -Wall", |
746 | debug => "-O0 -g", | |
747 | release => "-O3 -fomit-frame-pointer")), | |
a01dab94 | 748 | bn_ops => "BN_LLONG", |
9c62a279 | 749 | thread_scheme => "(unknown)", |
5e1b2353 RL |
750 | perlasm_scheme => "a.out", |
751 | }, | |
7ead0c89 | 752 | |
7fbc0bfd RL |
753 | #### X86 / X86_64 targets |
754 | "linux-x86" => { | |
755 | inherit_from => [ "linux-generic32", asm("x86_asm") ], | |
756 | cflags => add(picker(default => "-m32 -DL_ENDIAN", | |
757 | release => "-fomit-frame-pointer")), | |
758 | bn_ops => "BN_LLONG", | |
759 | perlasm_scheme => "elf", | |
760 | shared_ldflag => add("-m32"), | |
761 | }, | |
762 | "linux-x86-clang" => { | |
763 | inherit_from => [ "linux-x86" ], | |
764 | cc => "clang", | |
765 | cxx => "clang++", | |
766 | cflags => add("-Wextra -Qunused-arguments"), | |
767 | }, | |
5e1b2353 | 768 | "linux-x86_64" => { |
7ead0c89 | 769 | inherit_from => [ "linux-generic64", asm("x86_64_asm") ], |
8864f0de | 770 | cflags => add("-m64 -DL_ENDIAN"), |
3e9e810f | 771 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 772 | perlasm_scheme => "elf", |
b6d5ba1a | 773 | shared_ldflag => add("-m64"), |
5e1b2353 RL |
774 | multilib => "64", |
775 | }, | |
7ead0c89 AP |
776 | "linux-x86_64-clang" => { |
777 | inherit_from => [ "linux-x86_64" ], | |
778 | cc => "clang", | |
3ff3ee7a | 779 | cxx => "clang++", |
8864f0de | 780 | cflags => add("-Wextra -Qunused-arguments"), |
7ead0c89 | 781 | }, |
5e1b2353 | 782 | "linux-x32" => { |
7ead0c89 | 783 | inherit_from => [ "linux-generic32", asm("x86_64_asm") ], |
8864f0de | 784 | cflags => add("-mx32 -DL_ENDIAN"), |
3e9e810f | 785 | bn_ops => "SIXTY_FOUR_BIT", |
2460c7f1 | 786 | perlasm_scheme => "elf32", |
55ab86e4 | 787 | shared_ldflag => add("-mx32"), |
5e1b2353 RL |
788 | multilib => "x32", |
789 | }, | |
7ead0c89 AP |
790 | |
791 | "linux-ia64" => { | |
792 | inherit_from => [ "linux-generic64", asm("ia64_asm") ], | |
3e9e810f | 793 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
7ead0c89 AP |
794 | }, |
795 | ||
5e1b2353 | 796 | "linux64-s390x" => { |
7ead0c89 | 797 | inherit_from => [ "linux-generic64", asm("s390x_asm") ], |
8864f0de | 798 | cflags => add("-m64 -DB_ENDIAN"), |
5e1b2353 | 799 | perlasm_scheme => "64", |
b6d5ba1a | 800 | shared_ldflag => add("-m64"), |
5e1b2353 RL |
801 | multilib => "64", |
802 | }, | |
5e1b2353 | 803 | "linux32-s390x" => { |
7ead0c89 AP |
804 | #### So called "highgprs" target for z/Architecture CPUs |
805 | # "Highgprs" is kernel feature first implemented in Linux | |
806 | # 2.6.32, see /proc/cpuinfo. The idea is to preserve most | |
807 | # significant bits of general purpose registers not only | |
808 | # upon 32-bit process context switch, but even on | |
809 | # asynchronous signal delivery to such process. This makes | |
810 | # it possible to deploy 64-bit instructions even in legacy | |
811 | # application context and achieve better [or should we say | |
812 | # adequate] performance. The build is binary compatible with | |
813 | # linux-generic32, and the idea is to be able to install the | |
814 | # resulting libcrypto.so alongside generic one, e.g. as | |
815 | # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time | |
816 | # linker to autodiscover. Unfortunately it doesn't work just | |
817 | # yet, because of couple of bugs in glibc | |
818 | # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1... | |
819 | # | |
820 | inherit_from => [ "linux-generic32", asm("s390x_asm") ], | |
8864f0de | 821 | cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"), |
8d51db86 | 822 | bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; }, |
5e1b2353 | 823 | perlasm_scheme => "31", |
b6d5ba1a | 824 | shared_ldflag => add("-m31"), |
5e1b2353 RL |
825 | multilib => "/highgprs", |
826 | }, | |
7ead0c89 AP |
827 | |
828 | #### SPARC Linux setups | |
829 | # Ray Miller <ray.miller@computing-services.oxford.ac.uk> has | |
830 | # patiently assisted with debugging of following two configs. | |
5e1b2353 | 831 | "linux-sparcv8" => { |
7ead0c89 | 832 | inherit_from => [ "linux-generic32", asm("sparcv8_asm") ], |
8864f0de | 833 | cflags => add("-mcpu=v8 -DB_ENDIAN -DBN_DIV2W"), |
5e1b2353 | 834 | }, |
5e1b2353 | 835 | "linux-sparcv9" => { |
7ead0c89 AP |
836 | # it's a real mess with -mcpu=ultrasparc option under Linux, |
837 | # but -Wa,-Av8plus should do the trick no matter what. | |
838 | inherit_from => [ "linux-generic32", asm("sparcv9_asm") ], | |
8864f0de | 839 | cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W"), |
b6d5ba1a | 840 | shared_ldflag => add("-m32"), |
5e1b2353 | 841 | }, |
5e1b2353 | 842 | "linux64-sparcv9" => { |
7ead0c89 AP |
843 | # GCC 3.1 is a requirement |
844 | inherit_from => [ "linux-generic64", asm("sparcv9_asm") ], | |
8864f0de | 845 | cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"), |
3e9e810f | 846 | bn_ops => "BN_LLONG RC4_CHAR", |
b6d5ba1a | 847 | shared_ldflag => add("-m64"), |
5e1b2353 RL |
848 | multilib => "64", |
849 | }, | |
7ead0c89 | 850 | |
5e1b2353 | 851 | "linux-alpha-gcc" => { |
7ead0c89 | 852 | inherit_from => [ "linux-generic64", asm("alpha_asm") ], |
8864f0de | 853 | cflags => add("-DL_ENDIAN"), |
3e9e810f | 854 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 855 | }, |
5e1b2353 | 856 | "linux-c64xplus" => { |
d2b2221a | 857 | inherit_from => [ "BASE_unix" ], |
7ead0c89 | 858 | # TI_CGT_C6000_7.3.x is a requirement |
5e1b2353 | 859 | cc => "cl6x", |
9c62a279 RL |
860 | cflags => combine("--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT", |
861 | threads("-D_REENTRANT")), | |
5e1b2353 | 862 | bn_ops => "BN_LLONG", |
f4e175e4 AP |
863 | cpuid_asm_src => "c64xpluscpuid.s", |
864 | bn_asm_src => "asm/bn-c64xplus.asm c64xplus-gf2m.s", | |
865 | aes_asm_src => "aes-c64xplus.s aes_cbc.c aes-ctr.fake", | |
866 | sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s", | |
867 | rc4_asm_src => "rc4-c64xplus.s", | |
868 | modes_asm_src => "ghash-c64xplus.s", | |
869 | chacha_asm_src => "chacha-c64xplus.s", | |
870 | poly1305_asm_src => "poly1305-c64xplus.s", | |
9c62a279 | 871 | thread_scheme => "pthreads", |
5e1b2353 RL |
872 | perlasm_scheme => "void", |
873 | dso_scheme => "dlfcn", | |
874 | shared_target => "linux-shared", | |
875 | shared_cflag => "--pic", | |
b6d5ba1a | 876 | shared_ldflag => add("-z --sysv --shared"), |
5e1b2353 RL |
877 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", |
878 | ranlib => "true", | |
879 | }, | |
f09e7ca9 | 880 | |
7ead0c89 | 881 | #### Android: linux-* but without pointers to headers and libs. |
449e3f26 AP |
882 | # |
883 | # It takes pair of prior-set environment variables to make it work: | |
884 | # | |
d5a39c12 | 885 | # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<arch> |
449e3f26 AP |
886 | # CROSS_COMPILE=<prefix> |
887 | # | |
888 | # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company. | |
889 | # For example to compile for ICS and ARM with NDK 10d, you'd: | |
890 | # | |
891 | # ANDROID_NDK=/some/where/android-ndk-10d | |
892 | # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm | |
893 | # CROSS_COMPILE=arm-linux-adroideabi- | |
d5a39c12 | 894 | # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/bin |
449e3f26 | 895 | # |
5e1b2353 | 896 | "android" => { |
7ead0c89 | 897 | inherit_from => [ "linux-generic32" ], |
449e3f26 AP |
898 | # Special note about unconditional -fPIC and -pie. The underlying |
899 | # reason is that Lollipop refuses to run non-PIE. But what about | |
900 | # older systems and NDKs? -fPIC was never problem, so the only | |
cba792a1 | 901 | # concern is -pie. Older toolchains, e.g. r4, appear to handle it |
449e3f26 AP |
902 | # and binaries turn mostly functional. "Mostly" means that oldest |
903 | # Androids, such as Froyo, fail to handle executable, but newer | |
904 | # systems are perfectly capable of executing binaries targeting | |
905 | # Froyo. Keep in mind that in the nutshell Android builds are | |
906 | # about JNI, i.e. shared libraries, not applications. | |
cba792a1 AP |
907 | cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")), |
908 | bin_cflags => "-pie", | |
5e1b2353 RL |
909 | }, |
910 | "android-x86" => { | |
7ead0c89 | 911 | inherit_from => [ "android", asm("x86_asm") ], |
8864f0de | 912 | cflags => add(picker(release => "-fomit-frame-pointer")), |
a01dab94 | 913 | bn_ops => "BN_LLONG", |
7ead0c89 | 914 | perlasm_scheme => "android", |
5e1b2353 | 915 | }, |
449e3f26 AP |
916 | ################################################################ |
917 | # Contemporary Android applications can provide multiple JNI | |
918 | # providers in .apk, targeting multiple architectures. Among | |
919 | # them there is "place" for two ARM flavours: generic eabi and | |
920 | # armv7-a/hard-float. However, it should be noted that OpenSSL's | |
921 | # ability to engage NEON is not constrained by ABI choice, nor | |
922 | # is your ability to call OpenSSL from your application code | |
923 | # compiled with floating-point ABI other than default 'soft'. | |
924 | # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.] | |
925 | # This means that choice of ARM libraries you provide in .apk | |
926 | # is driven by application needs. For example if application | |
927 | # itself benefits from NEON or is floating-point intensive, then | |
928 | # it might be appropriate to provide both libraries. Otherwise | |
929 | # just generic eabi would do. But in latter case it would be | |
930 | # appropriate to | |
931 | # | |
932 | # ./Configure android-armeabi -D__ARM_MAX_ARCH__=8 | |
933 | # | |
934 | # in order to build "universal" binary and allow OpenSSL take | |
935 | # advantage of NEON when it's available. | |
936 | # | |
937 | "android-armeabi" => { | |
7ead0c89 | 938 | inherit_from => [ "android", asm("armv4_asm") ], |
449e3f26 | 939 | }, |
5e1b2353 | 940 | "android-mips" => { |
7ead0c89 | 941 | inherit_from => [ "android", asm("mips32_asm") ], |
5e1b2353 | 942 | perlasm_scheme => "o32", |
5e1b2353 | 943 | }, |
f09e7ca9 | 944 | |
5a3d915d AP |
945 | "android64" => { |
946 | inherit_from => [ "linux-generic64" ], | |
cba792a1 AP |
947 | cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")), |
948 | bin_cflags => "-pie", | |
5a3d915d AP |
949 | }, |
950 | "android64-aarch64" => { | |
951 | inherit_from => [ "android64", asm("aarch64_asm") ], | |
952 | perlasm_scheme => "linux64", | |
a4324912 AP |
953 | }, |
954 | "android64-x86_64" => { | |
955 | inherit_from => [ "android64", asm("x86_64_asm") ], | |
956 | perlasm_scheme => "elf", | |
c1ec40ef AP |
957 | }, |
958 | "android64-mips64" => { | |
959 | ############################################################ | |
960 | # You are more than likely have to specify target processor | |
961 | # on ./Configure command line. Trouble is that toolchain's | |
962 | # default is MIPS64r6 (at least in r10d), but there are no | |
963 | # such processors around (or they are too rare to spot one). | |
964 | # Actual problem is that MIPS64r6 is binary incompatible | |
965 | # with previous MIPS ISA versions, in sense that unlike | |
966 | # prior versions original MIPS binary code will fail. | |
967 | # | |
968 | inherit_from => [ "android64", asm("mips64_asm") ], | |
969 | perlasm_scheme => "64", | |
5a3d915d AP |
970 | }, |
971 | ||
1818572d | 972 | #### *BSD |
5e1b2353 | 973 | "BSD-generic32" => { |
9c62a279 | 974 | # As for thread cflag. Idea is to maintain "collective" set of |
1818572d AP |
975 | # flags, which would cover all BSD flavors. -pthread applies |
976 | # to them all, but is treated differently. OpenBSD expands is | |
977 | # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x | |
978 | # expands it as -lc_r, which has to be accompanied by explicit | |
979 | # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x | |
980 | # expands it as -lc_r, which seems to be sufficient? | |
d2b2221a | 981 | inherit_from => [ "BASE_unix" ], |
d237a273 | 982 | cc => "cc", |
9c62a279 RL |
983 | cflags => combine(picker(default => "-Wall", |
984 | debug => "-O0 -g", | |
985 | release => "-O3"), | |
986 | threads("-pthread -D_THREAD_SAFE -D_REENTRANT")), | |
619eb33a | 987 | enable => add("devcryptoeng"), |
3e9e810f | 988 | bn_ops => "BN_LLONG", |
9c62a279 | 989 | thread_scheme => "pthreads", |
5e1b2353 RL |
990 | dso_scheme => "dlfcn", |
991 | shared_target => "bsd-gcc-shared", | |
992 | shared_cflag => "-fPIC", | |
993 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
994 | }, | |
7ead0c89 AP |
995 | "BSD-generic64" => { |
996 | inherit_from => [ "BSD-generic32" ], | |
3e9e810f | 997 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 998 | }, |
7ead0c89 AP |
999 | |
1000 | "BSD-x86" => { | |
1001 | inherit_from => [ "BSD-generic32", asm("x86_asm") ], | |
8864f0de RL |
1002 | cflags => add(picker(default => "-DL_ENDIAN", |
1003 | release => "-fomit-frame-pointer")), | |
a01dab94 | 1004 | bn_ops => "BN_LLONG", |
5e1b2353 | 1005 | shared_target => "bsd-shared", |
7ead0c89 | 1006 | perlasm_scheme => "a.out", |
5e1b2353 | 1007 | }, |
7ead0c89 AP |
1008 | "BSD-x86-elf" => { |
1009 | inherit_from => [ "BSD-x86" ], | |
1010 | perlasm_scheme => "elf", | |
5e1b2353 | 1011 | }, |
f09e7ca9 | 1012 | |
7ead0c89 AP |
1013 | "BSD-sparcv8" => { |
1014 | inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ], | |
8864f0de | 1015 | cflags => add("-mcpu=v8 -DB_ENDIAN"), |
5e1b2353 | 1016 | }, |
5e1b2353 | 1017 | "BSD-sparc64" => { |
7ead0c89 AP |
1018 | # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it |
1019 | # simply *happens* to work around a compiler bug in gcc 3.3.3, | |
1020 | # triggered by RIPEMD160 code. | |
1021 | inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ], | |
8864f0de | 1022 | cflags => add("-DB_ENDIAN -DMD32_REG_T=int"), |
3e9e810f | 1023 | bn_ops => "BN_LLONG", |
5e1b2353 | 1024 | }, |
7ead0c89 | 1025 | |
5e1b2353 | 1026 | "BSD-ia64" => { |
7ead0c89 | 1027 | inherit_from => [ "BSD-generic64", asm("ia64_asm") ], |
8864f0de | 1028 | cflags => add_before("-DL_ENDIAN"), |
3e9e810f | 1029 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 1030 | }, |
7ead0c89 | 1031 | |
5e1b2353 | 1032 | "BSD-x86_64" => { |
7ead0c89 | 1033 | inherit_from => [ "BSD-generic64", asm("x86_64_asm") ], |
8864f0de | 1034 | cflags => add_before("-DL_ENDIAN"), |
3e9e810f | 1035 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 1036 | perlasm_scheme => "elf", |
5e1b2353 | 1037 | }, |
f09e7ca9 | 1038 | |
5e1b2353 | 1039 | "bsdi-elf-gcc" => { |
d2b2221a | 1040 | inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], |
5e1b2353 | 1041 | cc => "gcc", |
893fe73a | 1042 | cflags => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -Wall", |
98fdbce0 | 1043 | ex_libs => add("-ldl"), |
a01dab94 | 1044 | bn_ops => "BN_LLONG", |
9c62a279 | 1045 | thread_scheme => "(unknown)", |
5e1b2353 RL |
1046 | dso_scheme => "dlfcn", |
1047 | shared_target => "bsd-gcc-shared", | |
1048 | shared_cflag => "-fPIC", | |
1049 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
1050 | }, | |
f09e7ca9 | 1051 | |
5e1b2353 | 1052 | "nextstep" => { |
d2b2221a | 1053 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1054 | cc => "cc", |
1055 | cflags => "-O -Wall", | |
1056 | unistd => "<libc.h>", | |
a01dab94 | 1057 | bn_ops => "BN_LLONG", |
9c62a279 | 1058 | thread_scheme => "(unknown)", |
5e1b2353 RL |
1059 | }, |
1060 | "nextstep3.3" => { | |
d2b2221a | 1061 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1062 | cc => "cc", |
1063 | cflags => "-O3 -Wall", | |
1064 | unistd => "<libc.h>", | |
a01dab94 | 1065 | bn_ops => "BN_LLONG", |
9c62a279 | 1066 | thread_scheme => "(unknown)", |
5e1b2353 | 1067 | }, |
f09e7ca9 RS |
1068 | |
1069 | # QNX | |
5e1b2353 | 1070 | "qnx4" => { |
d2b2221a | 1071 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1072 | cc => "cc", |
1073 | cflags => "-DL_ENDIAN -DTERMIO", | |
9c62a279 | 1074 | thread_scheme => "(unknown)", |
5e1b2353 RL |
1075 | }, |
1076 | "QNX6" => { | |
d2b2221a | 1077 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 1078 | cc => "gcc", |
98fdbce0 | 1079 | ex_libs => add("-lsocket"), |
5e1b2353 RL |
1080 | dso_scheme => "dlfcn", |
1081 | shared_target => "bsd-gcc-shared", | |
1082 | shared_cflag => "-fPIC", | |
1083 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
1084 | }, | |
1085 | "QNX6-i386" => { | |
d2b2221a | 1086 | inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], |
5e1b2353 RL |
1087 | cc => "gcc", |
1088 | cflags => "-DL_ENDIAN -O2 -Wall", | |
98fdbce0 | 1089 | ex_libs => add("-lsocket"), |
5e1b2353 RL |
1090 | dso_scheme => "dlfcn", |
1091 | shared_target => "bsd-gcc-shared", | |
1092 | shared_cflag => "-fPIC", | |
1093 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
1094 | }, | |
f09e7ca9 RS |
1095 | |
1096 | #### SCO/Caldera targets. | |
1097 | # | |
1098 | # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc. | |
1099 | # Now we only have blended unixware-* as it's the only one used by ./config. | |
1100 | # If you want to optimize for particular microarchitecture, bypass ./config | |
1101 | # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate. | |
1102 | # Note that not all targets include assembler support. Mostly because of | |
1103 | # lack of motivation to support out-of-date platforms with out-of-date | |
1104 | # compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has | |
1105 | # patiently assisted to debug most of it. | |
1106 | # | |
1107 | # UnixWare 2.0x fails destest with -O. | |
5e1b2353 | 1108 | "unixware-2.0" => { |
d2b2221a | 1109 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 1110 | cc => "cc", |
9c62a279 RL |
1111 | cflags => combine("-DFILIO_H -DNO_STRINGS_H", |
1112 | threads("-Kthread")), | |
98fdbce0 | 1113 | ex_libs => add("-lsocket -lnsl -lresolv -lx"), |
9c62a279 | 1114 | thread_scheme => "uithreads", |
5e1b2353 RL |
1115 | }, |
1116 | "unixware-2.1" => { | |
d2b2221a | 1117 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 1118 | cc => "cc", |
9c62a279 RL |
1119 | cflags => combine("-O -DFILIO_H", |
1120 | threads("-Kthread")), | |
98fdbce0 | 1121 | ex_libs => add("-lsocket -lnsl -lresolv -lx"), |
9c62a279 | 1122 | thread_scheme => "uithreads", |
5e1b2353 RL |
1123 | }, |
1124 | "unixware-7" => { | |
d2b2221a | 1125 | inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], |
5e1b2353 | 1126 | cc => "cc", |
9c62a279 RL |
1127 | cflags => combine("-O -DFILIO_H -Kalloca", |
1128 | threads("-Kthread")), | |
98fdbce0 | 1129 | ex_libs => add("-lsocket -lnsl"), |
9c62a279 | 1130 | thread_scheme => "uithreads", |
a01dab94 | 1131 | bn_ops => "BN_LLONG", |
5e1b2353 RL |
1132 | perlasm_scheme => "elf-1", |
1133 | dso_scheme => "dlfcn", | |
1134 | shared_target => "svr5-shared", | |
1135 | shared_cflag => "-Kpic", | |
1136 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
1137 | }, | |
1138 | "unixware-7-gcc" => { | |
d2b2221a | 1139 | inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], |
5e1b2353 | 1140 | cc => "gcc", |
9c62a279 RL |
1141 | cflags => combine("-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -Wall", |
1142 | threads("-D_REENTRANT")), | |
98fdbce0 | 1143 | ex_libs => add("-lsocket -lnsl"), |
a01dab94 | 1144 | bn_ops => "BN_LLONG", |
9c62a279 | 1145 | thread_scheme => "pthreads", |
5e1b2353 RL |
1146 | perlasm_scheme => "elf-1", |
1147 | dso_scheme => "dlfcn", | |
1148 | shared_target => "gnu-shared", | |
1149 | shared_cflag => "-fPIC", | |
1150 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
1151 | }, | |
f09e7ca9 | 1152 | # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc. |
5e1b2353 | 1153 | "sco5-cc" => { |
d2b2221a | 1154 | inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], |
5e1b2353 RL |
1155 | cc => "cc", |
1156 | cflags => "-belf", | |
98fdbce0 | 1157 | ex_libs => add("-lsocket -lnsl"), |
9c62a279 | 1158 | thread_scheme => "(unknown)", |
5e1b2353 RL |
1159 | perlasm_scheme => "elf-1", |
1160 | dso_scheme => "dlfcn", | |
1161 | shared_target => "svr3-shared", | |
1162 | shared_cflag => "-Kpic", | |
1163 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
1164 | }, | |
1165 | "sco5-gcc" => { | |
d2b2221a | 1166 | inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], |
5e1b2353 RL |
1167 | cc => "gcc", |
1168 | cflags => "-O3 -fomit-frame-pointer", | |
98fdbce0 | 1169 | ex_libs => add("-lsocket -lnsl"), |
a01dab94 | 1170 | bn_ops => "BN_LLONG", |
9c62a279 | 1171 | thread_scheme => "(unknown)", |
5e1b2353 RL |
1172 | perlasm_scheme => "elf-1", |
1173 | dso_scheme => "dlfcn", | |
1174 | shared_target => "svr3-shared", | |
1175 | shared_cflag => "-fPIC", | |
1176 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
1177 | }, | |
f09e7ca9 RS |
1178 | |
1179 | #### IBM's AIX. | |
f780eaad AP |
1180 | # Below targets assume AIX >=5. Caveat lector. If you are accustomed |
1181 | # to control compilation "bitness" by setting $OBJECT_MODE environment | |
1182 | # variable, then you should know that in OpenSSL case it's considered | |
1183 | # only in ./config. Once configured, build procedure remains "deaf" to | |
1184 | # current value of $OBJECT_MODE. | |
5e1b2353 | 1185 | "aix-gcc" => { |
d2b2221a | 1186 | inherit_from => [ "BASE_unix", asm("ppc32_asm") ], |
5e1b2353 | 1187 | cc => "gcc", |
9c62a279 RL |
1188 | cflags => combine(picker(default => "-DB_ENDIAN", |
1189 | debug => "-O0 -g", | |
1190 | release => "-O"), | |
1191 | threads("-pthread")), | |
5e1b2353 RL |
1192 | sys_id => "AIX", |
1193 | bn_ops => "BN_LLONG RC4_CHAR", | |
9c62a279 | 1194 | thread_scheme => "pthreads", |
5e1b2353 RL |
1195 | perlasm_scheme => "aix32", |
1196 | dso_scheme => "dlfcn", | |
1197 | shared_target => "aix-shared", | |
f780eaad | 1198 | shared_ldflag => "-shared -static-libgcc -Wl,-G", |
5e1b2353 RL |
1199 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", |
1200 | arflags => "-X32", | |
1201 | }, | |
1202 | "aix64-gcc" => { | |
d2b2221a | 1203 | inherit_from => [ "BASE_unix", asm("ppc64_asm") ], |
5e1b2353 | 1204 | cc => "gcc", |
9c62a279 RL |
1205 | cflags => combine(picker(default => "-maix64 -DB_ENDIAN", |
1206 | debug => "-O0 -g", | |
1207 | release => "-O"), | |
1208 | threads("-pthread")), | |
5e1b2353 RL |
1209 | sys_id => "AIX", |
1210 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", | |
9c62a279 | 1211 | thread_scheme => "pthreads", |
5e1b2353 RL |
1212 | perlasm_scheme => "aix64", |
1213 | dso_scheme => "dlfcn", | |
1214 | shared_target => "aix-shared", | |
f780eaad | 1215 | shared_ldflag => "-maix64 -shared -static-libgcc -Wl,-G", |
5e1b2353 RL |
1216 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", |
1217 | arflags => "-X64", | |
1218 | }, | |
5e1b2353 | 1219 | "aix-cc" => { |
d2b2221a | 1220 | inherit_from => [ "BASE_unix", asm("ppc32_asm") ], |
5e1b2353 | 1221 | cc => "cc", |
9c62a279 RL |
1222 | cflags => combine(picker(default => "-q32 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst", |
1223 | debug => "-O0 -g", | |
1224 | release => "-O"), | |
1225 | threads("-qthreaded -D_THREAD_SAFE")), | |
5e1b2353 RL |
1226 | sys_id => "AIX", |
1227 | bn_ops => "BN_LLONG RC4_CHAR", | |
9c62a279 | 1228 | thread_scheme => "pthreads", |
f780eaad | 1229 | ex_libs => threads("-lpthreads"), |
5e1b2353 RL |
1230 | perlasm_scheme => "aix32", |
1231 | dso_scheme => "dlfcn", | |
1232 | shared_target => "aix-shared", | |
1233 | shared_ldflag => "-q32 -G", | |
1234 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
1235 | arflags => "-X 32", | |
1236 | }, | |
1237 | "aix64-cc" => { | |
d2b2221a | 1238 | inherit_from => [ "BASE_unix", asm("ppc64_asm") ], |
5e1b2353 | 1239 | cc => "cc", |
9c62a279 RL |
1240 | cflags => combine(picker(default => "-q64 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst", |
1241 | debug => "-O0 -g", | |
1242 | release => "-O"), | |
1243 | threads("-qthreaded -D_THREAD_SAFE")), | |
5e1b2353 RL |
1244 | sys_id => "AIX", |
1245 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", | |
9c62a279 | 1246 | thread_scheme => "pthreads", |
f780eaad | 1247 | ex_libs => threads("-lpthreads"), |
5e1b2353 RL |
1248 | perlasm_scheme => "aix64", |
1249 | dso_scheme => "dlfcn", | |
1250 | shared_target => "aix-shared", | |
1251 | shared_ldflag => "-q64 -G", | |
1252 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
1253 | arflags => "-X 64", | |
1254 | }, | |
f09e7ca9 RS |
1255 | |
1256 | # SIEMENS BS2000/OSD: an EBCDIC-based mainframe | |
5e1b2353 | 1257 | "BS2000-OSD" => { |
d2b2221a | 1258 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1259 | cc => "c89", |
1260 | cflags => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC", | |
98fdbce0 | 1261 | ex_libs => add("-lsocket -lnsl"), |
3e9e810f | 1262 | bn_ops => "THIRTY_TWO_BIT RC4_CHAR", |
9c62a279 | 1263 | thread_scheme => "(unknown)", |
5e1b2353 | 1264 | }, |
f09e7ca9 RS |
1265 | |
1266 | # OS/390 Unix an EBCDIC-based Unix system on IBM mainframe | |
1267 | # You need to compile using the c89.sh wrapper in the tools directory, because the | |
1268 | # IBM compiler does not like the -L switch after any object modules. | |
1269 | # | |
5e1b2353 | 1270 | "OS390-Unix" => { |
d2b2221a | 1271 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1272 | cc => "c89.sh", |
1273 | cflags => "-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE", | |
3e9e810f | 1274 | bn_ops => "THIRTY_TWO_BIT RC4_CHAR", |
9c62a279 | 1275 | thread_scheme => "(unknown)", |
5e1b2353 | 1276 | }, |
f09e7ca9 | 1277 | |
7ead0c89 | 1278 | #### Visual C targets |
f09e7ca9 RS |
1279 | # |
1280 | # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64 | |
1281 | # | |
1282 | # Note about -wd4090, disable warning C4090. This warning returns false | |
1283 | # positives in some situations. Disabling it altogether masks both | |
1284 | # legitimate and false cases, but as we compile on multiple platforms, | |
1285 | # we rely on other compilers to catch legitimate cases. | |
2fe73036 RL |
1286 | # |
1287 | # Also note that we force threads no matter what. Configuring "no-threads" | |
1288 | # is ignored. | |
7ead0c89 | 1289 | "VC-common" => { |
d2b2221a | 1290 | inherit_from => [ "BASE_Windows" ], |
7ead0c89 | 1291 | template => 1, |
5e1b2353 | 1292 | cc => "cl", |
7ead0c89 | 1293 | cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE", |
5a5c0b95 RL |
1294 | defines => add(sub { my @defs = (); |
1295 | unless ($disabled{"zlib-dynamic"}) { | |
111b234c RL |
1296 | my $zlib = |
1297 | $withargs{zlib_lib} // "ZLIB1"; | |
5a5c0b95 RL |
1298 | push @defs, |
1299 | quotify("perl", | |
111b234c | 1300 | 'LIBZ="' . $zlib . '"'); |
5a5c0b95 RL |
1301 | } |
1302 | return [ @defs ]; | |
1303 | }), | |
2fe73036 | 1304 | coutflag => "/Fo", |
3ec8a1cf RL |
1305 | lib_cflags => add("/Zi /Fdossl_static"), |
1306 | dso_cflags => "/Zi /Fddso", | |
2fe73036 RL |
1307 | bin_cflags => "/Zi /Fdapp", |
1308 | lflags => add("/debug"), | |
2fe73036 | 1309 | shared_ldflag => "/dll", |
e9abfc3a | 1310 | shared_target => "win-shared", # meaningless except it gives Configure a hint |
2fe73036 | 1311 | thread_scheme => "winthreads", |
5e1b2353 | 1312 | dso_scheme => "win32", |
4e155ec4 | 1313 | apps_aux_src => add("win32_init.c"), |
5e1b2353 | 1314 | }, |
2fe73036 | 1315 | "VC-noCE-common" => { |
acf15259 | 1316 | inherit_from => [ "VC-common" ], |
be1f4812 | 1317 | template => 1, |
2fe73036 RL |
1318 | cflags => add(picker(default => "-DUNICODE -D_UNICODE", |
1319 | debug => | |
1320 | sub { | |
c32cbe97 AP |
1321 | ($disabled{shared} ? "" : "/MDd") |
1322 | ." /Od -DDEBUG -D_DEBUG"; | |
2fe73036 RL |
1323 | }, |
1324 | release => | |
1325 | sub { | |
c32cbe97 | 1326 | ($disabled{shared} ? "" : "/MD") |
592b6fb4 | 1327 | ." /O2"; |
2fe73036 | 1328 | })), |
c32cbe97 AP |
1329 | lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }), |
1330 | # Following might/should appears controversial, i.e. defining | |
1331 | # /MDd without evaluating $disabled{shared}. It works in | |
1332 | # non-shared build because static library is compiled with /Zl | |
1333 | # and bares no reference to specific RTL. And it works in | |
1334 | # shared build because multiple /MDd options are not prohibited. | |
1335 | # But why /MDd in static build? Well, basically this is just a | |
1336 | # reference point, which allows to catch eventual errors that | |
1337 | # would prevent those who want to wrap OpenSSL into own .DLL. | |
1338 | # Why not /MD in release build then? Well, some are likely to | |
1339 | # prefer [non-debug] openssl.exe to be free from Micorosoft RTL | |
1340 | # redistributable. | |
1341 | bin_cflags => add(picker(debug => "/MDd", | |
1342 | release => sub { $disabled{shared} ? "/MT" : () }, | |
1343 | )), | |
2fe73036 | 1344 | bin_lflags => add("/subsystem:console /opt:ref"), |
ef5b8296 | 1345 | ex_libs => add(sub { |
2fe73036 RL |
1346 | my @ex_libs = (); |
1347 | push @ex_libs, 'ws2_32.lib' unless $disabled{sock}; | |
1348 | push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib'; | |
1349 | return join(" ", @ex_libs); | |
ef5b8296 | 1350 | }), |
2fe73036 RL |
1351 | }, |
1352 | "VC-WIN64-common" => { | |
1353 | inherit_from => [ "VC-noCE-common" ], | |
be1f4812 | 1354 | template => 1, |
ef5b8296 | 1355 | ex_libs => add(sub { |
2fe73036 RL |
1356 | my @ex_libs = (); |
1357 | push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./); | |
1358 | return join(" ", @_, @ex_libs); | |
ef5b8296 | 1359 | }), |
2fe73036 RL |
1360 | bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN", |
1361 | build_scheme => add("VC-W64", { separator => undef }), | |
1362 | }, | |
7ead0c89 | 1363 | "VC-WIN64I" => { |
acf15259 AP |
1364 | inherit_from => [ "VC-WIN64-common", asm("ia64_asm"), |
1365 | sub { $disabled{shared} ? () : "ia64_uplink" } ], | |
2fe73036 RL |
1366 | as => "ias", |
1367 | asflags => "-d debug", | |
1368 | asoutflag => "-o", | |
5e1b2353 | 1369 | sys_id => "WIN64I", |
6ddb62a5 AP |
1370 | bn_asm_src => sub { return undef unless @_; |
1371 | my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; }, | |
5e1b2353 | 1372 | perlasm_scheme => "ias", |
6ddb62a5 | 1373 | multilib => "-ia64", |
5e1b2353 RL |
1374 | }, |
1375 | "VC-WIN64A" => { | |
acf15259 AP |
1376 | inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"), |
1377 | sub { $disabled{shared} ? () : "x86_64_uplink" } ], | |
2fe73036 RL |
1378 | as => sub { vc_win64a_info()->{as} }, |
1379 | asflags => sub { vc_win64a_info()->{asflags} }, | |
1380 | asoutflag => sub { vc_win64a_info()->{asoutflag} }, | |
5e1b2353 | 1381 | sys_id => "WIN64A", |
2fe73036 RL |
1382 | bn_asm_src => sub { return undef unless @_; |
1383 | my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; }, | |
5e1b2353 | 1384 | perlasm_scheme => "auto", |
6ddb62a5 | 1385 | multilib => "-x64", |
5e1b2353 | 1386 | }, |
5e1b2353 | 1387 | "VC-WIN32" => { |
7ead0c89 AP |
1388 | # x86 Win32 target defaults to ANSI API, if you want UNICODE, |
1389 | # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE' | |
acf15259 | 1390 | inherit_from => [ "VC-noCE-common", asm("x86_asm"), |
fdf6f73e | 1391 | sub { $disabled{shared} ? () : "uplink_common" } ], |
43800958 RL |
1392 | as => sub { vc_win32_info()->{as} }, |
1393 | asflags => sub { vc_win32_info()->{asflags} }, | |
1394 | asoutflag => sub { vc_win32_info()->{asoutflag} }, | |
ef5b8296 | 1395 | ex_libs => add(sub { |
2fe73036 RL |
1396 | my @ex_libs = (); |
1397 | # WIN32 UNICODE build gets linked with unicows.lib for | |
1398 | # backward compatibility with Win9x. | |
1399 | push @ex_libs, 'unicows.lib' | |
1400 | if (grep { $_ eq "UNICODE" } @user_defines); | |
1401 | return join(" ", @ex_libs, @_); | |
ef5b8296 | 1402 | }), |
5e1b2353 | 1403 | sys_id => "WIN32", |
a01dab94 | 1404 | bn_ops => "BN_LLONG EXPORT_VAR_AS_FN", |
f0d484fc | 1405 | perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} }, |
d2b2221a | 1406 | build_scheme => add("VC-W32", { separator => undef }), |
5e1b2353 | 1407 | }, |
5e1b2353 | 1408 | "VC-CE" => { |
2fe73036 RL |
1409 | inherit_from => [ "VC-common" ], |
1410 | as => "ml", | |
1411 | asflags => "/nologo /Cp /coff /c /Cx /Zi", | |
1412 | asoutflag => "/Fo", | |
5e1b2353 | 1413 | cc => "cl", |
2fe73036 RL |
1414 | cflags => |
1415 | picker(default => | |
1416 | combine('/W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYS_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT', | |
1417 | sub { vc_wince_info()->{cflags}; }, | |
1418 | sub { defined($ENV{'WCECOMPAT'}) | |
1419 | ? '-I$(WCECOMPAT)/include' : (); }, | |
1420 | sub { defined($ENV{'PORTSDK_LIBPATH'}) | |
1421 | ? '-I$(PORTSDK_LIBPATH)/../../include' : (); }, | |
1422 | sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14 | |
1423 | ? ($disabled{shared} ? " /MT" : " /MD") | |
1424 | : " /MC"; }), | |
1425 | debug => "/Od -DDEBUG -D_DEBUG", | |
1426 | release => "/O1i"), | |
1427 | lflags => combine("/nologo /opt:ref", | |
1428 | sub { vc_wince_info()->{lflags}; }, | |
1429 | sub { defined($ENV{PORTSDK_LIBPATH}) | |
1430 | ? "/entry:mainCRTstartup" : (); }), | |
5e1b2353 | 1431 | sys_id => "WINCE", |
a01dab94 | 1432 | bn_ops => "BN_LLONG EXPORT_VAR_AS_FN", |
ef5b8296 | 1433 | ex_libs => add(sub { |
2fe73036 RL |
1434 | my @ex_libs = (); |
1435 | push @ex_libs, 'ws2.lib' unless $disabled{sock}; | |
1436 | push @ex_libs, 'crypt32.lib'; | |
1437 | if (defined($ENV{WCECOMPAT})) { | |
1438 | my $x = '$(WCECOMPAT)/lib'; | |
1439 | if (-f "$x/$ENV{TARGETCPU}/wcecompatex.lib") { | |
1440 | $x .= '/$(TARGETCPU)/wcecompatex.lib'; | |
1441 | } else { | |
1442 | $x .= '/wcecompatex.lib'; | |
1443 | } | |
1444 | push @ex_libs, $x; | |
1445 | } | |
1446 | push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib' | |
1447 | if (defined($ENV{'PORTSDK_LIBPATH'})); | |
1448 | push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib' | |
1449 | if ($ENV{'TARGETCPU'} eq "X86"); | |
1450 | return @ex_libs; | |
ef5b8296 | 1451 | }), |
d2b2221a | 1452 | build_scheme => add("VC-WCE", { separator => undef }), |
5e1b2353 | 1453 | }, |
f09e7ca9 | 1454 | |
7ead0c89 | 1455 | #### MinGW |
5e1b2353 | 1456 | "mingw" => { |
d2b2221a | 1457 | inherit_from => [ "BASE_unix", asm("x86_asm"), |
84af1bae | 1458 | sub { $disabled{shared} ? () : "x86_uplink" } ], |
5e1b2353 | 1459 | cc => "gcc", |
9c62a279 RL |
1460 | cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall", |
1461 | debug => "-g -O0", | |
1462 | release => "-O3 -fomit-frame-pointer"), | |
1463 | threads("-D_MT")), | |
5e1b2353 | 1464 | sys_id => "MINGW32", |
98fdbce0 | 1465 | ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"), |
a01dab94 | 1466 | bn_ops => "BN_LLONG EXPORT_VAR_AS_FN", |
9c62a279 | 1467 | thread_scheme => "winthreads", |
5e1b2353 RL |
1468 | perlasm_scheme => "coff", |
1469 | dso_scheme => "win32", | |
520f434b | 1470 | shared_target => "mingw-shared", |
bdcd83e1 | 1471 | shared_cflag => add("-D_WINDLL"), |
68ab559a | 1472 | shared_ldflag => "-static-libgcc", |
64c443e3 | 1473 | shared_rcflag => "--target=pe-i386", |
fcf80c46 | 1474 | shared_extension => ".dll", |
520f434b | 1475 | multilib => "", |
4e155ec4 | 1476 | apps_aux_src => add("win32_init.c"), |
5e1b2353 | 1477 | }, |
5e1b2353 | 1478 | "mingw64" => { |
7ead0c89 AP |
1479 | # As for OPENSSL_USE_APPLINK. Applink makes it possible to use |
1480 | # .dll compiled with one compiler with application compiled with | |
1481 | # another compiler. It's possible to engage Applink support in | |
1482 | # mingw64 build, but it's not done, because till mingw64 | |
1483 | # supports structured exception handling, one can't seriously | |
1484 | # consider its binaries for using with non-mingw64 run-time | |
1485 | # environment. And as mingw64 is always consistent with itself, | |
1486 | # Applink is never engaged and can as well be omitted. | |
d2b2221a | 1487 | inherit_from => [ "BASE_unix", asm("x86_64_asm") ], |
7ead0c89 | 1488 | cc => "gcc", |
9c62a279 RL |
1489 | cflags => combine(picker(default => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall", |
1490 | debug => "-g -O0", | |
1491 | release => "-O3"), | |
1492 | threads("-D_MT")), | |
5e1b2353 | 1493 | sys_id => "MINGW64", |
98fdbce0 | 1494 | ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"), |
3e9e810f | 1495 | bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN", |
9c62a279 | 1496 | thread_scheme => "winthreads", |
5e1b2353 RL |
1497 | perlasm_scheme => "mingw64", |
1498 | dso_scheme => "win32", | |
520f434b | 1499 | shared_target => "mingw-shared", |
bdcd83e1 | 1500 | shared_cflag => add("-D_WINDLL"), |
68ab559a | 1501 | shared_ldflag => "-static-libgcc", |
64c443e3 | 1502 | shared_rcflag => "--target=pe-x86-64", |
fcf80c46 | 1503 | shared_extension => ".dll", |
520f434b | 1504 | multilib => "64", |
4e155ec4 | 1505 | apps_aux_src => add("win32_init.c"), |
5e1b2353 | 1506 | }, |
f09e7ca9 | 1507 | |
4d60c7e1 DW |
1508 | #### UEFI |
1509 | "UEFI" => { | |
d2b2221a | 1510 | inherit_from => [ "BASE_unix" ], |
4d60c7e1 DW |
1511 | cc => "cc", |
1512 | cflags => "-DL_ENDIAN -O", | |
1513 | sys_id => "UEFI", | |
1514 | }, | |
1515 | ||
7ead0c89 | 1516 | #### UWIN |
5e1b2353 | 1517 | "UWIN" => { |
d2b2221a | 1518 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1519 | cc => "cc", |
1520 | cflags => "-DTERMIOS -DL_ENDIAN -O -Wall", | |
1521 | sys_id => "UWIN", | |
a01dab94 | 1522 | bn_ops => "BN_LLONG", |
5e1b2353 RL |
1523 | dso_scheme => "win32", |
1524 | }, | |
f09e7ca9 | 1525 | |
7ead0c89 | 1526 | #### Cygwin |
3f542969 | 1527 | "Cygwin-x86" => { |
d2b2221a | 1528 | inherit_from => [ "BASE_unix", asm("x86_asm") ], |
5e1b2353 | 1529 | cc => "gcc", |
8864f0de RL |
1530 | cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall", |
1531 | debug => "-g -O0", | |
1532 | release => "-O3 -fomit-frame-pointer"), | |
5e1b2353 | 1533 | sys_id => "CYGWIN", |
a01dab94 | 1534 | bn_ops => "BN_LLONG", |
e58d9102 | 1535 | thread_scheme => "pthread", |
5e1b2353 RL |
1536 | perlasm_scheme => "coff", |
1537 | dso_scheme => "dlfcn", | |
1538 | shared_target => "cygwin-shared", | |
1539 | shared_cflag => "-D_WINDLL", | |
1540 | shared_ldflag => "-shared", | |
fcf80c46 | 1541 | shared_extension => ".dll", |
5e1b2353 RL |
1542 | }, |
1543 | "Cygwin-x86_64" => { | |
d2b2221a | 1544 | inherit_from => [ "BASE_unix", asm("x86_64_asm") ], |
5e1b2353 | 1545 | cc => "gcc", |
8864f0de RL |
1546 | cflags => picker(default => "-DTERMIOS -DL_ENDIAN -Wall", |
1547 | debug => "-g -O0", | |
1548 | release => "-O3"), | |
5e1b2353 | 1549 | sys_id => "CYGWIN", |
3e9e810f | 1550 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
e58d9102 | 1551 | thread_scheme => "pthread", |
5e1b2353 RL |
1552 | perlasm_scheme => "mingw64", |
1553 | dso_scheme => "dlfcn", | |
1554 | shared_target => "cygwin-shared", | |
1555 | shared_cflag => "-D_WINDLL", | |
1556 | shared_ldflag => "-shared", | |
fcf80c46 | 1557 | shared_extension => ".dll", |
5e1b2353 | 1558 | }, |
b9ee2dac RL |
1559 | # Backward compatibility for those using this target |
1560 | "Cygwin" => { | |
1561 | inherit_from => [ "Cygwin-x86" ] | |
1562 | }, | |
1563 | # In case someone constructs the Cygwin target name themself | |
1564 | "Cygwin-i386" => { | |
1565 | inherit_from => [ "Cygwin-x86" ] | |
1566 | }, | |
1567 | "Cygwin-i486" => { | |
1568 | inherit_from => [ "Cygwin-x86" ] | |
1569 | }, | |
1570 | "Cygwin-i586" => { | |
1571 | inherit_from => [ "Cygwin-x86" ] | |
1572 | }, | |
1573 | "Cygwin-i686" => { | |
1574 | inherit_from => [ "Cygwin-x86" ] | |
1575 | }, | |
f09e7ca9 | 1576 | |
f09e7ca9 | 1577 | ##### MacOS X (a.k.a. Darwin) setup |
7ead0c89 | 1578 | "darwin-common" => { |
d2b2221a | 1579 | inherit_from => [ "BASE_unix" ], |
7ead0c89 | 1580 | template => 1, |
5e1b2353 | 1581 | cc => "cc", |
9c62a279 RL |
1582 | cflags => combine(picker(default => "", |
1583 | debug => "-g -O0", | |
1584 | release => "-O3"), | |
1585 | threads("-D_REENTRANT")), | |
5e1b2353 | 1586 | sys_id => "MACOSX", |
c86ddbe6 | 1587 | plib_lflags => "-Wl,-search_paths_first", |
3e9e810f | 1588 | bn_ops => "BN_LLONG RC4_CHAR", |
9c62a279 | 1589 | thread_scheme => "pthreads", |
5e1b2353 RL |
1590 | perlasm_scheme => "osx32", |
1591 | dso_scheme => "dlfcn", | |
0c873419 | 1592 | ranlib => "ranlib -c", |
5e1b2353 | 1593 | shared_target => "darwin-shared", |
0c873419 | 1594 | shared_cflag => "-fPIC", |
7ead0c89 | 1595 | shared_ldflag => "-dynamiclib", |
5e1b2353 RL |
1596 | shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", |
1597 | }, | |
c75065e1 AP |
1598 | # Option "freeze" such as -std=gnu9x can't negatively interfere |
1599 | # with future defaults for below two targets, because MacOS X | |
1600 | # for PPC has no future, it was discontinued by vendor in 2009. | |
7ead0c89 AP |
1601 | "darwin-ppc-cc" => { |
1602 | inherit_from => [ "darwin-common", asm("ppc32_asm") ], | |
c75065e1 | 1603 | cflags => add("-arch ppc -std=gnu9x -DB_ENDIAN -Wa,-force_cpusubtype_ALL"), |
7ead0c89 AP |
1604 | perlasm_scheme => "osx32", |
1605 | shared_ldflag => "-arch ppc -dynamiclib", | |
1606 | }, | |
5e1b2353 | 1607 | "darwin64-ppc-cc" => { |
7ead0c89 | 1608 | inherit_from => [ "darwin-common", asm("ppc64_asm") ], |
c75065e1 | 1609 | cflags => add("-arch ppc64 -std=gnu9x -DB_ENDIAN"), |
3e9e810f | 1610 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
5e1b2353 | 1611 | perlasm_scheme => "osx64", |
5e1b2353 | 1612 | shared_ldflag => "-arch ppc64 -dynamiclib", |
5e1b2353 RL |
1613 | }, |
1614 | "darwin-i386-cc" => { | |
7ead0c89 | 1615 | inherit_from => [ "darwin-common", asm("x86_asm") ], |
8864f0de RL |
1616 | cflags => add(picker(default => "-arch i386 -DL_ENDIAN", |
1617 | release => "-fomit-frame-pointer")), | |
3e9e810f | 1618 | bn_ops => "BN_LLONG RC4_INT", |
5e1b2353 | 1619 | perlasm_scheme => "macosx", |
5e1b2353 | 1620 | shared_ldflag => "-arch i386 -dynamiclib", |
5e1b2353 RL |
1621 | }, |
1622 | "darwin64-x86_64-cc" => { | |
7ead0c89 | 1623 | inherit_from => [ "darwin-common", asm("x86_64_asm") ], |
8864f0de | 1624 | cflags => add("-arch x86_64 -DL_ENDIAN -Wall"), |
3e9e810f | 1625 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
5e1b2353 | 1626 | perlasm_scheme => "macosx", |
5e1b2353 | 1627 | shared_ldflag => "-arch x86_64 -dynamiclib", |
5e1b2353 | 1628 | }, |
7ead0c89 AP |
1629 | |
1630 | #### iPhoneOS/iOS | |
f09e7ca9 RS |
1631 | # |
1632 | # It takes three prior-set environment variables to make it work: | |
1633 | # | |
1634 | # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash] | |
1635 | # CROSS_TOP=/where/SDKs/are | |
1636 | # CROSS_SDK=iPhoneOSx.y.sdk | |
1637 | # | |
1638 | # Exact paths vary with Xcode releases, but for couple of last ones | |
1639 | # they would look like this: | |
1640 | # | |
1641 | # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/ | |
1642 | # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer | |
7ead0c89 | 1643 | # CROSS_SDK=iPhoneOS.sdk |
f09e7ca9 | 1644 | # |
5e1b2353 | 1645 | "iphoneos-cross" => { |
7ead0c89 | 1646 | inherit_from => [ "darwin-common" ], |
8864f0de | 1647 | cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"), |
5e1b2353 | 1648 | sys_id => "iOS", |
5e1b2353 | 1649 | }, |
313e6ec1 AP |
1650 | "ios-cross" => { |
1651 | inherit_from => [ "darwin-common", asm("armv4_asm") ], | |
1652 | # It should be possible to go below iOS 6 and even add -arch armv6, | |
1653 | # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant | |
d11582f1 | 1654 | # at this point. |
8864f0de | 1655 | cflags => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"), |
313e6ec1 AP |
1656 | sys_id => "iOS", |
1657 | perlasm_scheme => "ios32", | |
1658 | }, | |
5e1b2353 | 1659 | "ios64-cross" => { |
7ead0c89 | 1660 | inherit_from => [ "darwin-common", asm("aarch64_asm") ], |
8864f0de | 1661 | cflags => add("-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"), |
5e1b2353 | 1662 | sys_id => "iOS", |
3e9e810f | 1663 | bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", |
5e1b2353 | 1664 | perlasm_scheme => "ios64", |
5e1b2353 | 1665 | }, |
f09e7ca9 RS |
1666 | |
1667 | ##### GNU Hurd | |
5e1b2353 | 1668 | "hurd-x86" => { |
d2b2221a | 1669 | inherit_from => [ "BASE_unix" ], |
7ead0c89 | 1670 | inherit_from => [ asm("x86_elf_asm") ], |
5e1b2353 | 1671 | cc => "gcc", |
9c62a279 RL |
1672 | cflags => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall", |
1673 | threads("-pthread")), | |
98fdbce0 | 1674 | ex_libs => add("-ldl"), |
a01dab94 | 1675 | bn_ops => "BN_LLONG", |
9c62a279 | 1676 | thread_scheme => "pthreads", |
5e1b2353 RL |
1677 | dso_scheme => "dlfcn", |
1678 | shared_target => "linux-shared", | |
1679 | shared_cflag => "-fPIC", | |
5a3a5466 | 1680 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", |
5e1b2353 | 1681 | }, |
f09e7ca9 | 1682 | |
f09e7ca9 | 1683 | ##### VxWorks for various targets |
5e1b2353 | 1684 | "vxworks-ppc60x" => { |
d2b2221a | 1685 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1686 | cc => "ccppc", |
1687 | 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", | |
1688 | sys_id => "VXWORKS", | |
98fdbce0 | 1689 | ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"), |
5e1b2353 RL |
1690 | }, |
1691 | "vxworks-ppcgen" => { | |
d2b2221a | 1692 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1693 | cc => "ccppc", |
1694 | 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", | |
1695 | sys_id => "VXWORKS", | |
98fdbce0 | 1696 | ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"), |
5e1b2353 RL |
1697 | }, |
1698 | "vxworks-ppc405" => { | |
d2b2221a | 1699 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1700 | cc => "ccppc", |
1701 | cflags => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h", | |
1702 | sys_id => "VXWORKS", | |
1703 | lflags => "-r", | |
1704 | }, | |
1705 | "vxworks-ppc750" => { | |
d2b2221a | 1706 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1707 | cc => "ccppc", |
1708 | 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)", | |
1709 | sys_id => "VXWORKS", | |
1710 | lflags => "-r", | |
1711 | }, | |
1712 | "vxworks-ppc750-debug" => { | |
d2b2221a | 1713 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 1714 | cc => "ccppc", |
463a7b8c | 1715 | 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 -DPEDANTIC -DDEBUG -g", |
5e1b2353 RL |
1716 | sys_id => "VXWORKS", |
1717 | lflags => "-r", | |
1718 | }, | |
1719 | "vxworks-ppc860" => { | |
d2b2221a | 1720 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1721 | cc => "ccppc", |
1722 | cflags => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h", | |
1723 | sys_id => "VXWORKS", | |
1724 | lflags => "-r", | |
1725 | }, | |
1726 | "vxworks-simlinux" => { | |
d2b2221a | 1727 | inherit_from => [ "BASE_unix" ], |
5e1b2353 RL |
1728 | cc => "ccpentium", |
1729 | 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", | |
1730 | sys_id => "VXWORKS", | |
1731 | lflags => "-r", | |
1732 | ranlib => "ranlibpentium", | |
1733 | }, | |
1734 | "vxworks-mips" => { | |
d2b2221a | 1735 | inherit_from => [ "BASE_unix", asm("mips32_asm") ], |
5e1b2353 | 1736 | cc => "ccmips", |
9c62a279 RL |
1737 | cflags => combine("-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", |
1738 | threads("-D_REENTRANT")), | |
5e1b2353 | 1739 | sys_id => "VXWORKS", |
98fdbce0 | 1740 | ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"), |
9c62a279 | 1741 | thread_scheme => "pthreads", |
5e1b2353 RL |
1742 | perlasm_scheme => "o32", |
1743 | ranlib => "ranlibmips", | |
1744 | }, | |
f09e7ca9 | 1745 | |
7ead0c89 | 1746 | #### uClinux |
5e1b2353 | 1747 | "uClinux-dist" => { |
d2b2221a | 1748 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 1749 | cc => "$ENV{'CC'}", |
9c62a279 RL |
1750 | cflags => combine("\$(CFLAGS)", |
1751 | threads("-D_REENTRANT")), | |
c86ddbe6 | 1752 | plib_lflags => "\$(LDFLAGS)", |
98fdbce0 | 1753 | ex_libs => add("\$(LDLIBS)"), |
5e1b2353 | 1754 | bn_ops => "BN_LLONG", |
9c62a279 | 1755 | thread_scheme => "pthreads", |
5e1b2353 RL |
1756 | dso_scheme => "$ENV{'LIBSSL_dlfcn'}", |
1757 | shared_target => "linux-shared", | |
1758 | shared_cflag => "-fPIC", | |
1759 | shared_ldflag => "-shared", | |
1760 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
1761 | ranlib => "$ENV{'RANLIB'}", | |
1762 | }, | |
1763 | "uClinux-dist64" => { | |
d2b2221a | 1764 | inherit_from => [ "BASE_unix" ], |
5e1b2353 | 1765 | cc => "$ENV{'CC'}", |
9c62a279 RL |
1766 | cflags => combine("\$(CFLAGS)", |
1767 | threads("-D_REENTRANT")), | |
c86ddbe6 | 1768 | plib_lflags => "\$(LDFLAGS)", |
98fdbce0 | 1769 | ex_libs => add("\$(LDLIBS)"), |
5e1b2353 | 1770 | bn_ops => "SIXTY_FOUR_BIT_LONG", |
9c62a279 | 1771 | thread_scheme => "pthreads", |
5e1b2353 RL |
1772 | dso_scheme => "$ENV{'LIBSSL_dlfcn'}", |
1773 | shared_target => "linux-shared", | |
1774 | shared_cflag => "-fPIC", | |
1775 | shared_ldflag => "-shared", | |
1776 | shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | |
1777 | ranlib => "$ENV{'RANLIB'}", | |
1778 | }, | |
f09e7ca9 | 1779 | |
e84193e4 RL |
1780 | ##### VMS |
1781 | "vms-generic" => { | |
d2b2221a | 1782 | inherit_from => [ "BASE_VMS" ], |
e84193e4 RL |
1783 | template => 1, |
1784 | cc => "CC/DECC", | |
4f3015bb | 1785 | cflags => picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL", |
8864f0de RL |
1786 | debug => "/NOOPTIMIZE/DEBUG", |
1787 | release => "/OPTIMIZE/NODEBUG"), | |
1186a2b3 | 1788 | defines => add("OPENSSL_USE_NODELETE"), |
2de2df7f | 1789 | lflags => picker(default => "/MAP='F\$PARSE(\".MAP\",\"\$\@\")'", |
1ae4c07e | 1790 | debug => "/DEBUG/TRACEBACK", |
8864f0de | 1791 | release => "/NODEBUG/NOTRACEBACK"), |
68a39960 | 1792 | lib_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"), |
19eaee74 RL |
1793 | # no_inst_lib_cflags is used instead of lib_cflags by descrip.mms.tmpl |
1794 | # for object files belonging to selected internal libraries | |
1795 | no_inst_lib_cflags => "", | |
e84193e4 | 1796 | shared_target => "vms-shared", |
ac722c9a | 1797 | dso_scheme => "vms", |
9c62a279 | 1798 | thread_scheme => "pthreads", |
e84193e4 | 1799 | |
d602c2b6 | 1800 | apps_aux_src => "vms_decc_init.c vms_term_sock.c", |
e84193e4 RL |
1801 | }, |
1802 | ||
e84193e4 RL |
1803 | "vms-alpha" => { |
1804 | inherit_from => [ "vms-generic" ], | |
0a2629b3 | 1805 | cflags => add(sub { my @warnings = |
0c9b1534 | 1806 | @{vms_info(0)->{disable_warns}}; |
0a2629b3 RL |
1807 | @warnings |
1808 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), | |
62890f47 RL |
1809 | defines => |
1810 | add(sub { | |
0c9b1534 RL |
1811 | return vms_info(0)->{def_zlib} |
1812 | ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : (); | |
62890f47 | 1813 | }), |
0c9b1534 | 1814 | ex_libs => add(sub { return vms_info(0)->{zlib} || (); }), |
7878e536 | 1815 | pointer_size => sub { return vms_info(0)->{pointer_size} }, |
e84193e4 RL |
1816 | #as => "???", |
1817 | #debug_aflags => "/NOOPTIMIZE/DEBUG", | |
1818 | #release_aflags => "/OPTIMIZE/NODEBUG", | |
2b58c83e | 1819 | bn_opts => "SIXTY_FOUR_BIT RC4_INT", |
e84193e4 | 1820 | }, |
52d86d9b | 1821 | "vms-alpha-p32" => { |
0c9b1534 | 1822 | inherit_from => [ "vms-generic" ], |
5fe5bc30 RL |
1823 | cflags => |
1824 | add("/POINTER_SIZE=32", | |
1825 | sub { my @warnings = | |
0c9b1534 | 1826 | @{vms_info(32)->{disable_warns}}; |
5fe5bc30 RL |
1827 | @warnings |
1828 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); | |
1829 | } ), | |
62890f47 RL |
1830 | defines => |
1831 | add(sub { | |
0c9b1534 RL |
1832 | return vms_info(32)->{def_zlib} |
1833 | ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : (); | |
62890f47 | 1834 | }), |
0c9b1534 | 1835 | ex_libs => add(sub { return vms_info(32)->{zlib} || (); }), |
7878e536 | 1836 | pointer_size => sub { return vms_info(32)->{pointer_size} }, |
e84193e4 | 1837 | }, |
52d86d9b | 1838 | "vms-alpha-p64" => { |
0c9b1534 | 1839 | inherit_from => [ "vms-generic" ], |
5fe5bc30 | 1840 | cflags => |
368058d0 | 1841 | add("/POINTER_SIZE=64=ARGV", |
5fe5bc30 | 1842 | sub { my @warnings = |
0c9b1534 | 1843 | @{vms_info(64)->{disable_warns}}; |
5fe5bc30 RL |
1844 | @warnings |
1845 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); | |
1846 | } ), | |
62890f47 RL |
1847 | defines => |
1848 | add(sub { | |
0c9b1534 RL |
1849 | return vms_info(64)->{def_zlib} |
1850 | ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : (); | |
62890f47 | 1851 | }), |
0c9b1534 | 1852 | ex_libs => add(sub { return vms_info(64)->{zlib} || (); }), |
7878e536 | 1853 | pointer_size => sub { return vms_info(64)->{pointer_size} }, |
e84193e4 RL |
1854 | }, |
1855 | "vms-ia64" => { | |
1856 | inherit_from => [ "vms-generic" ], | |
0a2629b3 | 1857 | cflags => add(sub { my @warnings = |
0c9b1534 | 1858 | @{vms_info(0)->{disable_warns}}; |
0a2629b3 RL |
1859 | @warnings |
1860 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), | |
62890f47 RL |
1861 | defines => |
1862 | add(sub { | |
0c9b1534 RL |
1863 | return vms_info(0)->{def_zlib} |
1864 | ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : (); | |
62890f47 | 1865 | }), |
0c9b1534 | 1866 | ex_libs => add(sub { return vms_info(0)->{zlib} || (); }), |
7878e536 | 1867 | pointer_size => sub { return vms_info(0)->{pointer_size} }, |
e84193e4 RL |
1868 | #as => "I4S", |
1869 | #debug_aflags => "/NOOPTIMIZE/DEBUG", | |
1870 | #release_aflags => "/OPTIMIZE/NODEBUG", | |
2b58c83e | 1871 | bn_opts => "SIXTY_FOUR_BIT RC4_INT", |
e84193e4 | 1872 | }, |
52d86d9b | 1873 | "vms-ia64-p32" => { |
0c9b1534 | 1874 | inherit_from => [ "vms-generic" ], |
5fe5bc30 RL |
1875 | cflags => |
1876 | add("/POINTER_SIZE=32", | |
1877 | sub { my @warnings = | |
0c9b1534 | 1878 | @{vms_info(32)->{disable_warns}}; |
5fe5bc30 RL |
1879 | @warnings |
1880 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); | |
1881 | } ), | |
62890f47 RL |
1882 | defines => |
1883 | add(sub { | |
0c9b1534 RL |
1884 | return vms_info(32)->{def_zlib} |
1885 | ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : (); | |
62890f47 | 1886 | }), |
0c9b1534 | 1887 | ex_libs => add(sub { return vms_info(32)->{zlib} || (); }), |
7878e536 | 1888 | pointer_size => sub { return vms_info(32)->{pointer_size} }, |
e84193e4 | 1889 | }, |
52d86d9b | 1890 | "vms-ia64-p64" => { |
0c9b1534 | 1891 | inherit_from => [ "vms-generic" ], |
5fe5bc30 | 1892 | cflags => |
368058d0 | 1893 | add("/POINTER_SIZE=64=ARGV", |
5fe5bc30 | 1894 | sub { my @warnings = |
0c9b1534 | 1895 | @{vms_info(64)->{disable_warns}}; |
5fe5bc30 RL |
1896 | @warnings |
1897 | ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); | |
1898 | } ), | |
62890f47 RL |
1899 | defines => |
1900 | add(sub { | |
0c9b1534 RL |
1901 | return vms_info(64)->{def_zlib} |
1902 | ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : (); | |
62890f47 | 1903 | }), |
0c9b1534 | 1904 | ex_libs => add(sub { return vms_info(64)->{zlib} || (); }), |
7878e536 | 1905 | pointer_size => sub { return vms_info(64)->{pointer_size} }, |
e84193e4 RL |
1906 | }, |
1907 | ||
f09e7ca9 | 1908 | ); |