00-base-templates.conf 11 KB

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