]> git.ipfire.org Git - thirdparty/openssl.git/blob - Configurations/00-base-templates.conf
Move bn_asm_src file information to build.info files
[thirdparty/openssl.git] / Configurations / 00-base-templates.conf
1 # -*- Mode: perl -*-
2 my %targets=(
3 DEFAULTS => {
4 template => 1,
5
6 cflags => "",
7 cppflags => "",
8 lflags => "",
9 defines => [],
10 includes => [],
11 lib_cflags => "",
12 lib_cppflags => "",
13 lib_defines => [],
14 thread_scheme => "(unknown)", # Assume we don't know
15 thread_defines => [],
16
17 cpuid_asm_src => "mem_clr.c",
18 ec_asm_src => "",
19 des_asm_src => "des_enc.c fcrypt_b.c",
20 aes_asm_src => "aes_core.c aes_cbc.c",
21 bf_asm_src => "bf_enc.c",
22 md5_asm_src => "",
23 cast_asm_src => "c_enc.c",
24 rc4_asm_src => "rc4_enc.c rc4_skey.c",
25 rmd160_asm_src => "",
26 rc5_asm_src => "rc5_enc.c",
27 wp_asm_src => "wp_block.c",
28 cmll_asm_src => "camellia.c cmll_misc.c cmll_cbc.c",
29 modes_asm_src => "",
30 padlock_asm_src => "",
31 chacha_asm_src => "chacha_enc.c",
32 poly1305_asm_src => "",
33 keccak1600_asm_src => "keccak1600.c",
34
35 unistd => "<unistd.h>",
36 shared_target => "",
37 shared_cflag => "",
38 shared_defines => [],
39 shared_ldflag => "",
40 shared_rcflag => "",
41
42 #### Defaults for the benefit of the config targets who don't inherit
43 #### a BASE and assume Unix defaults
44 #### THESE WILL DISAPPEAR IN OpenSSL 1.2
45 build_scheme => [ "unified", "unix" ],
46 build_file => "Makefile",
47
48 AR => "ar",
49 ARFLAGS => "r",
50 CC => "cc",
51 HASHBANGPERL => "/usr/bin/env perl",
52 RANLIB => sub { which("$config{cross_compile_prefix}ranlib")
53 ? "ranlib" : "" },
54 RC => "windres",
55
56 #### THESE WILL BE ENABLED IN OpenSSL 1.2
57 #HASHBANGPERL => "PERL", # Only Unix actually cares
58 },
59
60 BASE_common => {
61 template => 1,
62
63 enable => [],
64 disable => [],
65
66 defines =>
67 sub {
68 my @defs = ();
69 push @defs, "ZLIB" unless $disabled{zlib};
70 push @defs, "ZLIB_SHARED" unless $disabled{"zlib-dynamic"};
71 return [ @defs ];
72 },
73 includes =>
74 sub {
75 my @incs = ();
76 push @incs, $withargs{zlib_include}
77 if !$disabled{zlib} && $withargs{zlib_include};
78 return [ @incs ];
79 },
80 },
81
82 BASE_unix => {
83 inherit_from => [ "BASE_common" ],
84 template => 1,
85
86 AR => "ar",
87 ARFLAGS => "r",
88 CC => "cc",
89 lflags =>
90 sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () },
91 ex_libs =>
92 sub { !defined($disabled{zlib})
93 && defined($disabled{"zlib-dynamic"})
94 ? "-lz" : () },
95 HASHBANGPERL => "/usr/bin/env perl", # Only Unix actually cares
96 RANLIB => sub { which("$config{cross_compile_prefix}ranlib")
97 ? "ranlib" : "" },
98 RC => "windres",
99
100 build_scheme => [ "unified", "unix" ],
101 build_file => "Makefile",
102
103 perl_platform => 'Unix',
104 },
105
106 BASE_Windows => {
107 inherit_from => [ "BASE_common" ],
108 template => 1,
109
110 lib_defines =>
111 sub {
112 my @defs = ();
113 unless ($disabled{"zlib-dynamic"}) {
114 my $zlib = $withargs{zlib_lib} // "ZLIB1";
115 push @defs, 'LIBZ=' . (quotify("perl", $zlib))[0];
116 }
117 return [ @defs ];
118 },
119 ex_libs =>
120 sub {
121 unless ($disabled{zlib}) {
122 if (defined($disabled{"zlib-dynamic"})) {
123 return $withargs{zlib_lib} // "ZLIB1";
124 }
125 }
126 return ();
127 },
128
129 LD => "link",
130 LDFLAGS => "/nologo",
131 ldoutflag => "/out:",
132 AR => "lib",
133 ARFLAGS => "/nologo",
134 aroutflag => "/out:",
135 RC => "rc",
136 rcoutflag => "/fo",
137 MT => "mt",
138 MTFLAGS => "-nologo",
139 mtinflag => "-manifest ",
140 mtoutflag => "-outputresource:",
141
142 build_file => "makefile",
143 build_scheme => [ "unified", "windows" ],
144
145 perl_platform => 'Windows',
146 },
147
148 BASE_VMS => {
149 inherit_from => [ "BASE_common" ],
150 template => 1,
151
152 includes =>
153 add(sub {
154 my @incs = ();
155 # GNV$ZLIB_INCLUDE is the standard logical name for later
156 # zlib incarnations.
157 push @incs, 'GNV$ZLIB_INCLUDE:'
158 if !$disabled{zlib} && !$withargs{zlib_include};
159 return [ @incs ];
160 }),
161
162 build_file => "descrip.mms",
163 build_scheme => [ "unified", "VMS" ],
164
165 perl_platform => 'VMS',
166 },
167
168 x86_asm => {
169 template => 1,
170 cpuid_asm_src => "x86cpuid.s",
171 ec_asm_src => "ecp_nistz256.c ecp_nistz256-x86.s",
172 des_asm_src => "des-586.s crypt586.s",
173 aes_asm_src => "aes-586.s vpaes-x86.s aesni-x86.s",
174 bf_asm_src => "bf-586.s",
175 md5_asm_src => "md5-586.s",
176 cast_asm_src => "cast-586.s",
177 sha1_asm_src => "sha1-586.s sha256-586.s sha512-586.s",
178 rc4_asm_src => "rc4-586.s",
179 rmd160_asm_src => "rmd-586.s",
180 rc5_asm_src => "rc5-586.s",
181 wp_asm_src => "wp_block.c wp-mmx.s",
182 cmll_asm_src => "cmll-x86.s",
183 modes_asm_src => "ghash-x86.s",
184 padlock_asm_src => "e_padlock-x86.s",
185 chacha_asm_src => "chacha-x86.s",
186 poly1305_asm_src=> "poly1305-x86.s",
187 },
188 x86_elf_asm => {
189 template => 1,
190 inherit_from => [ "x86_asm" ],
191 },
192 x86_64_asm => {
193 template => 1,
194 cpuid_asm_src => "x86_64cpuid.s",
195 ec_asm_src => "ecp_nistz256.c ecp_nistz256-x86_64.s x25519-x86_64.s",
196 aes_asm_src => "aes-x86_64.s vpaes-x86_64.s bsaes-x86_64.s aesni-x86_64.s aesni-sha1-x86_64.s aesni-sha256-x86_64.s aesni-mb-x86_64.s",
197 md5_asm_src => "md5-x86_64.s",
198 sha1_asm_src => "sha1-x86_64.s sha256-x86_64.s sha512-x86_64.s sha1-mb-x86_64.s sha256-mb-x86_64.s",
199 rc4_asm_src => "rc4-x86_64.s rc4-md5-x86_64.s",
200 wp_asm_src => "wp-x86_64.s",
201 cmll_asm_src => "cmll-x86_64.s cmll_misc.c",
202 modes_asm_src => "ghash-x86_64.s aesni-gcm-x86_64.s",
203 padlock_asm_src => "e_padlock-x86_64.s",
204 chacha_asm_src => "chacha-x86_64.s",
205 poly1305_asm_src=> "poly1305-x86_64.s",
206 keccak1600_asm_src => "keccak1600-x86_64.s",
207 },
208 ia64_asm => {
209 template => 1,
210 cpuid_asm_src => "ia64cpuid.s",
211 aes_asm_src => "aes_core.c aes_cbc.c aes-ia64.s",
212 sha1_asm_src => "sha1-ia64.s sha256-ia64.s sha512-ia64.s",
213 modes_asm_src => "ghash-ia64.s",
214 chacha_asm_src => "chacha-ia64.S",
215 poly1305_asm_src=> "asm/poly1305-ia64.S",
216 },
217 sparcv9_asm => {
218 template => 1,
219 cpuid_asm_src => "sparcv9cap.c sparccpuid.S",
220 ec_asm_src => "ecp_nistz256.c ecp_nistz256-sparcv9.S",
221 des_asm_src => "des_enc-sparc.S fcrypt_b.c dest4-sparcv9.S",
222 aes_asm_src => "aes_core.c aes_cbc.c aes-sparcv9.S aest4-sparcv9.S aesfx-sparcv9.S",
223 md5_asm_src => "md5-sparcv9.S",
224 sha1_asm_src => "sha1-sparcv9.S sha256-sparcv9.S sha512-sparcv9.S",
225 cmll_asm_src => "camellia.c cmll_misc.c cmll_cbc.c cmllt4-sparcv9.S",
226 modes_asm_src => "ghash-sparcv9.S",
227 poly1305_asm_src=> "poly1305-sparcv9.S",
228 },
229 sparcv8_asm => {
230 template => 1,
231 cpuid_asm_src => "",
232 des_asm_src => "des_enc-sparc.S fcrypt_b.c",
233 },
234 alpha_asm => {
235 template => 1,
236 cpuid_asm_src => "alphacpuid.s",
237 sha1_asm_src => "sha1-alpha.S",
238 modes_asm_src => "ghash-alpha.S",
239 },
240 mips32_asm => {
241 template => 1,
242 aes_asm_src => "aes_cbc.c aes-mips.S",
243 sha1_asm_src => "sha1-mips.S sha256-mips.S",
244 },
245 mips64_asm => {
246 inherit_from => [ "mips32_asm" ],
247 template => 1,
248 sha1_asm_src => add("sha512-mips.S"),
249 poly1305_asm_src=> "poly1305-mips.S",
250 },
251 s390x_asm => {
252 template => 1,
253 cpuid_asm_src => "s390xcap.c s390xcpuid.S",
254 aes_asm_src => "aes-s390x.S aes-ctr.fake aes-xts.fake",
255 sha1_asm_src => "sha1-s390x.S sha256-s390x.S sha512-s390x.S",
256 rc4_asm_src => "rc4-s390x.s",
257 modes_asm_src => "ghash-s390x.S",
258 chacha_asm_src => "chacha-s390x.S",
259 poly1305_asm_src=> "poly1305-s390x.S",
260 keccak1600_asm_src => "keccak1600-s390x.S",
261 },
262 armv4_asm => {
263 template => 1,
264 cpuid_asm_src => "armcap.c armv4cpuid.S",
265 ec_asm_src => "ecp_nistz256.c ecp_nistz256-armv4.S",
266 aes_asm_src => "aes_cbc.c aes-armv4.S bsaes-armv7.S aesv8-armx.S",
267 sha1_asm_src => "sha1-armv4-large.S sha256-armv4.S sha512-armv4.S",
268 modes_asm_src => "ghash-armv4.S ghashv8-armx.S",
269 chacha_asm_src => "chacha-armv4.S",
270 poly1305_asm_src=> "poly1305-armv4.S",
271 keccak1600_asm_src => "keccak1600-armv4.S",
272 },
273 aarch64_asm => {
274 template => 1,
275 cpuid_asm_src => "armcap.c arm64cpuid.S",
276 ec_asm_src => "ecp_nistz256.c ecp_nistz256-armv8.S",
277 aes_asm_src => "aes_core.c aes_cbc.c aesv8-armx.S vpaes-armv8.S",
278 sha1_asm_src => "sha1-armv8.S sha256-armv8.S sha512-armv8.S",
279 modes_asm_src => "ghashv8-armx.S",
280 chacha_asm_src => "chacha-armv8.S",
281 poly1305_asm_src=> "poly1305-armv8.S",
282 keccak1600_asm_src => "keccak1600-armv8.S",
283 },
284 parisc11_asm => {
285 template => 1,
286 cpuid_asm_src => "pariscid.s",
287 aes_asm_src => "aes_core.c aes_cbc.c aes-parisc.s",
288 sha1_asm_src => "sha1-parisc.s sha256-parisc.s sha512-parisc.s",
289 rc4_asm_src => "rc4-parisc.s",
290 modes_asm_src => "ghash-parisc.s",
291 },
292 parisc20_64_asm => {
293 template => 1,
294 inherit_from => [ "parisc11_asm" ],
295 },
296 ppc32_asm => {
297 template => 1,
298 cpuid_asm_src => "ppccpuid.s ppccap.c",
299 aes_asm_src => "aes_core.c aes_cbc.c aes-ppc.s vpaes-ppc.s aesp8-ppc.s",
300 sha1_asm_src => "sha1-ppc.s sha256-ppc.s sha512-ppc.s sha256p8-ppc.s sha512p8-ppc.s",
301 modes_asm_src => "ghashp8-ppc.s",
302 chacha_asm_src => "chacha-ppc.s",
303 poly1305_asm_src=> "poly1305-ppc.s poly1305-ppcfp.s",
304 },
305 ppc64_asm => {
306 inherit_from => [ "ppc32_asm" ],
307 template => 1,
308 ec_asm_src => "ecp_nistz256.c ecp_nistz256-ppc64.s x25519-ppc64.s",
309 keccak1600_asm_src => "keccak1600-ppc64.s",
310 },
311 );