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