2
0

00-base-templates.conf 11 KB

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