1 Configurations of OpenSSL target platforms
2 ------------------------------------------
4 Target configurations are a collection of facts that we know about
5 different platforms and their capabilities. We organise them in a
6 hash table, where each entry represent a specific target.
8 In each table entry, the following keys are significant:
10 inherit_from => Other targets to inherit values from.
11 Explained further below. [1]
12 template => Set to 1 if this isn't really a platform
13 target. Instead, this target is a template
14 upon which other targets can be built.
15 Explained further below. [1]
17 sys_id => System identity for systems where that
18 is difficult to determine automatically.
20 cc => The compiler command, usually one of "cc",
21 "gcc" or "clang". This command is normally
22 also used to link object files and
23 libraries into the final program.
24 cflags => Flags that are used at all times when
26 debug_cflags => Extra compilation flags used when making a
27 debug build (when Configure receives the
28 --debug option). Typically something like
30 release_cflags => Extra compilation flags used when making a
31 release build (when Configure receives the
32 --release option, or doesn't receive the
33 --debug option). Typically something like
35 thread_cflags => Extra compilation flags used when
36 compiling with threading enabled.
37 Explained further below. [2]
38 shared_cflag => Extra compilation flags used when
39 compiling for shared libraries, typically
40 something like "-fPIC".
42 ld => the linker command, usually not defined
43 (meaning the compiler command is used
45 (NOTE: this is here for future use, it's
47 lflags => the flags that are used at all times when
48 linking. These can have a % sign in them
49 showing where the OpenSSL libraries should
50 appear, otherwise these flags will come
51 last. So in a typical links situation,
52 this is a quick table of results:
54 "-foo%-bar" > -foo -lssl -lcrypto -bar
55 "-foo%" > -foo -lssl -lcrypto
56 "-foo" > -lssl -lcrypto -foo
58 debug_lflags => Like debug_cflags, but used when linking.
59 release_lflags => Like release_cflags, but used when linking.
60 shared_lflags => Like shared_cflags, but used when linking.
62 ar => The library archive command, the default is
64 (NOTE: this is here for future use, it's
66 arflags => Flags to be used with the library archive
69 ranlib => The library archive indexing command, the
70 default is 'ranlib' it it exists.
72 unistd => An alternative header to the typical
73 '<unistd.h>'. This is very rarely needed.
75 shared_extension => File name extension used for shared
77 obj_extension => File name extension used for object files.
78 On unix, this defaults to ".o" (NOTE: this
79 is here for future use, it's not
81 exe_extension => File name extension used for executable
82 files. On unix, this defaults to "" (NOTE:
83 this is here for future use, it's not
86 dso_scheme => The type of dynamic shared objects to build
87 for. This mostly comes into play with
88 engines, but can be used for other purposes
89 as well. Valid values are "DLFCN"
90 (dlopen() et al), "DLFCN_NO_H" (for systems
91 that use dlopen() et al but do not have
92 fcntl.h), "DL" (shl_load() et al), "WIN32"
94 perlasm_scheme => The perlasm method used to created the
95 assembler files used when compiling with
96 assembler implementations.
97 shared_target => The shared library building method used.
98 This is a target found in Makefile.shared.
99 build_scheme => The scheme used to build up a Makefile.
100 In its simplest form, the value is a string
101 with the name of the build scheme.
102 The value may also take the form of a list
103 of strings, if the build_scheme is to have
104 some options. In this case, the first
105 string in the list is the name of the build
107 Currently recognised build schemes are
108 "mk1mf" and "unixmake". Others may appear
111 multilib => On systems that support having multiple
112 implementations of a library (typically a
113 32-bit and a 64-bit variant), this is used
114 to have the different variants in different
117 bn_ops => Building options (was just bignum options
118 in the earlier history of this option,
119 hence the name). This a string of words
120 that describe properties on the designated
121 target platform, such as the type of
122 integers used to build up the bitnum,
123 different ways to implement certain ciphers
124 and so on. To fully comprehend the
125 meaning, the best is to read the affected
129 BN_LLONG use 'unsigned long long' in
130 some bignum calculations.
131 This has no value when
133 SIXTY_FOUR_BIT_LONG is given.
134 RC4_CHAR makes the basic RC4 unit of
135 calculation an unsigned char.
136 SIXTY_FOUR_BIT processor registers
138 32 bits, long long is
140 SIXTY_FOUR_BIT_LONG processor registers
143 THIRTY_TWO_BIT processor registers
145 EXPORT_VAR_AS_FN for shared libraries,
149 cpuid_obj => assembler implementation of cpuid code as
150 well as OPENSSL_cleanse().
152 bn_obj => assembler implementation of core bignum
155 ec_obj => assembler implementation of core EC
157 des_obj => assembler implementation of core DES
158 encryption functions.
159 Defaults to 'des_enc.o fcrypt_b.o'
160 aes_obj => assembler implementation of core AES
162 Defaults to 'aes_core.o aes_cbc.o'
163 bf_obj => assembler implementation of core BF
165 Defaults to 'bf_enc.o'
166 md5_obj => assembler implementation of core MD5
168 sha1_obj => assembler implementation of core SHA1,
169 functions, and also possibly SHA256 and
171 cast_obj => assembler implementation of core BF
173 Defaults to 'c_enc.o'
174 rc4_obj => assembler implementation of core BF
176 Defaults to 'rc4_enc.o rc4_skey.o'
177 rmd160_obj => assembler implementation of core RMD160
179 rc5_obj => assembler implementation of core RC4
181 Defaults to 'rc5_enc.o'
182 wp_obj => assembler implementation of core WHIRLPOOL
184 cmll_obj => assembler implementation of core CAMELLIA
186 Defaults to 'camellia.o cmll_misc.o cmll_cbc.o'
187 modes_obj => assembler implementation of the
188 functions gcm_gmult_4bit and gcm_ghash_4bit.
189 padlock_obj => assembler implementation of core parts of
190 the padlock engine. This is mandatory on
191 any platform where the padlock engine might
195 [1] as part of the target configuration, one can have a key called
196 'inherit_from' that indicate what other configurations to inherit
197 data from. These are resolved recursively.
199 Inheritance works as a set of default values that can be overriden
200 by corresponding key values in the inheriting configuration.
202 Note 1: any configuration table can be used as a template.
203 Note 2: pure templates have the attribute 'template => 1' and
204 cannot be used as build targets.
206 If several configurations are given in the 'inherit_from' array,
207 the values of same attribute are concatenated with space
208 separation. With this, it's possible to have several smaller
209 templates for different configuration aspects that can be combined
210 into a complete configuration.
212 instead of a scalar value or an array, a value can be a code block
213 of the form 'sub { /* your code here */ }'. This code block will
214 be called with the list of inherited values for that key as
215 arguments. In fact, the concatenation of strings is really done
216 by using 'sub { join(" ",@_) }' on the list of inherited values.
224 ignored => "This should not appear in the end result",
233 inherit_from => [ "foo", "bar" ],
234 hehe => sub { join(" ",(@_,"!!!")) },
238 The entry for "laughter" will become as follows after processing:
247 [2] OpenSSL is built with threading capabilities unless the user
248 specifies 'no-threads'. The value of the key 'thread_cflags' may
249 be "(unknown)", in which case the user MUST give some compilation
253 Historically, the target configurations came in form of a string with
254 values separated by colons. This use is deprecated. The string form
257 "target" => "{cc}:{cflags}:{unistd}:{thread_cflag}:{sys_id}:{lflags}:{bn_ops}:{cpuid_obj}:{bn_obj}:{ec_obj}:{des_obj}:{aes_obj}:{bf_obj}:{md5_obj}:{sha1_obj}:{cast_obj}:{rc4_obj}:{rmd160_obj}:{rc5_obj}:{wp_obj}:{cmll_obj}:{modes_obj}:{padlock_obj}:{perlasm_scheme}:{dso_scheme}:{shared_target}:{shared_cflag}:{shared_ldflag}:{shared_extension}:{ranlib}:{arflags}:{multilib}"