00-base-templates.conf 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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 Unixly 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. build_scheme => [ "unified", "unix" ],
  94. build_file => "Makefile",
  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. },
  132. BASE_VMS => {
  133. inherit_from => [ "BASE_common" ],
  134. template => 1,
  135. includes =>
  136. add(sub {
  137. my @incs = ();
  138. # GNV$ZLIB_INCLUDE is the standard logical name for later
  139. # zlib incarnations.
  140. push @incs, 'GNV$ZLIB_INCLUDE:'
  141. if !$disabled{zlib} && !$withargs{zlib_include};
  142. return [ @incs ];
  143. }),
  144. build_file => "descrip.mms",
  145. build_scheme => [ "unified", "VMS" ],
  146. },
  147. uplink_common => {
  148. template => 1,
  149. apps_init_src => add("../ms/applink.c"),
  150. uplink_aux_src => add("../ms/uplink.c"),
  151. defines => add("OPENSSL_USE_APPLINK"),
  152. },
  153. x86_uplink => {
  154. inherit_from => [ "uplink_common" ],
  155. template => 1,
  156. uplink_aux_src => add("uplink-x86.s"),
  157. },
  158. x86_64_uplink => {
  159. inherit_from => [ "uplink_common" ],
  160. template => 1,
  161. uplink_aux_src => add("uplink-x86_64.s"),
  162. },
  163. ia64_uplink => {
  164. inherit_from => [ "uplink_common" ],
  165. template => 1,
  166. uplink_aux_src => add("uplink-ia64.s"),
  167. },
  168. x86_asm => {
  169. template => 1,
  170. cpuid_asm_src => "x86cpuid.s",
  171. bn_asm_src => "bn-586.s co-586.s x86-mont.s x86-gf2m.s",
  172. ec_asm_src => "ecp_nistz256.c ecp_nistz256-x86.s",
  173. des_asm_src => "des-586.s crypt586.s",
  174. aes_asm_src => "aes-586.s vpaes-x86.s aesni-x86.s",
  175. bf_asm_src => "bf-586.s",
  176. md5_asm_src => "md5-586.s",
  177. cast_asm_src => "cast-586.s",
  178. sha1_asm_src => "sha1-586.s sha256-586.s sha512-586.s",
  179. rc4_asm_src => "rc4-586.s",
  180. rmd160_asm_src => "rmd-586.s",
  181. rc5_asm_src => "rc5-586.s",
  182. wp_asm_src => "wp_block.c wp-mmx.s",
  183. cmll_asm_src => "cmll-x86.s",
  184. modes_asm_src => "ghash-x86.s",
  185. padlock_asm_src => "e_padlock-x86.s",
  186. chacha_asm_src => "chacha-x86.s",
  187. poly1305_asm_src=> "poly1305-x86.s",
  188. },
  189. x86_elf_asm => {
  190. template => 1,
  191. inherit_from => [ "x86_asm" ],
  192. perlasm_scheme => "elf"
  193. },
  194. x86_64_asm => {
  195. template => 1,
  196. cpuid_asm_src => "x86_64cpuid.s",
  197. 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",
  198. ec_asm_src => "ecp_nistz256.c ecp_nistz256-x86_64.s x25519-x86_64.s",
  199. 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",
  200. md5_asm_src => "md5-x86_64.s",
  201. 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",
  202. rc4_asm_src => "rc4-x86_64.s rc4-md5-x86_64.s",
  203. wp_asm_src => "wp-x86_64.s",
  204. cmll_asm_src => "cmll-x86_64.s cmll_misc.c",
  205. modes_asm_src => "ghash-x86_64.s aesni-gcm-x86_64.s",
  206. padlock_asm_src => "e_padlock-x86_64.s",
  207. chacha_asm_src => "chacha-x86_64.s",
  208. poly1305_asm_src=> "poly1305-x86_64.s",
  209. keccak1600_asm_src => "keccak1600-x86_64.s",
  210. },
  211. ia64_asm => {
  212. template => 1,
  213. cpuid_asm_src => "ia64cpuid.s",
  214. bn_asm_src => "bn-ia64.s ia64-mont.s",
  215. aes_asm_src => "aes_core.c aes_cbc.c aes-ia64.s",
  216. sha1_asm_src => "sha1-ia64.s sha256-ia64.s sha512-ia64.s",
  217. modes_asm_src => "ghash-ia64.s",
  218. perlasm_scheme => "void"
  219. },
  220. sparcv9_asm => {
  221. template => 1,
  222. cpuid_asm_src => "sparcv9cap.c sparccpuid.S",
  223. bn_asm_src => "asm/sparcv8plus.S sparcv9-mont.S sparcv9a-mont.S vis3-mont.S sparct4-mont.S sparcv9-gf2m.S",
  224. ec_asm_src => "ecp_nistz256.c ecp_nistz256-sparcv9.S",
  225. des_asm_src => "des_enc-sparc.S fcrypt_b.c dest4-sparcv9.S",
  226. aes_asm_src => "aes_core.c aes_cbc.c aes-sparcv9.S aest4-sparcv9.S aesfx-sparcv9.S",
  227. md5_asm_src => "md5-sparcv9.S",
  228. sha1_asm_src => "sha1-sparcv9.S sha256-sparcv9.S sha512-sparcv9.S",
  229. cmll_asm_src => "camellia.c cmll_misc.c cmll_cbc.c cmllt4-sparcv9.S",
  230. modes_asm_src => "ghash-sparcv9.S",
  231. poly1305_asm_src=> "poly1305-sparcv9.S",
  232. perlasm_scheme => "void"
  233. },
  234. sparcv8_asm => {
  235. template => 1,
  236. cpuid_asm_src => "",
  237. bn_asm_src => "asm/sparcv8.S",
  238. des_asm_src => "des_enc-sparc.S fcrypt_b.c",
  239. perlasm_scheme => "void"
  240. },
  241. alpha_asm => {
  242. template => 1,
  243. cpuid_asm_src => "alphacpuid.s",
  244. bn_asm_src => "bn_asm.c alpha-mont.S",
  245. sha1_asm_src => "sha1-alpha.S",
  246. modes_asm_src => "ghash-alpha.S",
  247. perlasm_scheme => "void"
  248. },
  249. mips32_asm => {
  250. template => 1,
  251. bn_asm_src => "bn-mips.S mips-mont.S",
  252. aes_asm_src => "aes_cbc.c aes-mips.S",
  253. sha1_asm_src => "sha1-mips.S sha256-mips.S",
  254. },
  255. mips64_asm => {
  256. inherit_from => [ "mips32_asm" ],
  257. template => 1,
  258. sha1_asm_src => add("sha512-mips.S"),
  259. poly1305_asm_src=> "poly1305-mips.S",
  260. },
  261. s390x_asm => {
  262. template => 1,
  263. cpuid_asm_src => "s390xcap.c s390xcpuid.S",
  264. bn_asm_src => "asm/s390x.S s390x-mont.S s390x-gf2m.s",
  265. aes_asm_src => "aes-s390x.S aes-ctr.fake aes-xts.fake",
  266. sha1_asm_src => "sha1-s390x.S sha256-s390x.S sha512-s390x.S",
  267. rc4_asm_src => "rc4-s390x.s",
  268. modes_asm_src => "ghash-s390x.S",
  269. chacha_asm_src => "chacha-s390x.S",
  270. poly1305_asm_src=> "poly1305-s390x.S",
  271. keccak1600_asm_src => "keccak1600-s390x.S",
  272. },
  273. armv4_asm => {
  274. template => 1,
  275. cpuid_asm_src => "armcap.c armv4cpuid.S",
  276. bn_asm_src => "bn_asm.c armv4-mont.S armv4-gf2m.S",
  277. ec_asm_src => "ecp_nistz256.c ecp_nistz256-armv4.S",
  278. aes_asm_src => "aes_cbc.c aes-armv4.S bsaes-armv7.S aesv8-armx.S",
  279. sha1_asm_src => "sha1-armv4-large.S sha256-armv4.S sha512-armv4.S",
  280. modes_asm_src => "ghash-armv4.S ghashv8-armx.S",
  281. chacha_asm_src => "chacha-armv4.S",
  282. poly1305_asm_src=> "poly1305-armv4.S",
  283. keccak1600_asm_src => "keccak1600-armv4.S",
  284. perlasm_scheme => "void"
  285. },
  286. aarch64_asm => {
  287. template => 1,
  288. cpuid_asm_src => "armcap.c arm64cpuid.S",
  289. ec_asm_src => "ecp_nistz256.c ecp_nistz256-armv8.S",
  290. bn_asm_src => "bn_asm.c armv8-mont.S",
  291. aes_asm_src => "aes_core.c aes_cbc.c aesv8-armx.S vpaes-armv8.S",
  292. sha1_asm_src => "sha1-armv8.S sha256-armv8.S sha512-armv8.S",
  293. modes_asm_src => "ghashv8-armx.S",
  294. chacha_asm_src => "chacha-armv8.S",
  295. poly1305_asm_src=> "poly1305-armv8.S",
  296. keccak1600_asm_src => "keccak1600-armv8.S",
  297. },
  298. parisc11_asm => {
  299. template => 1,
  300. cpuid_asm_src => "pariscid.s",
  301. bn_asm_src => "bn_asm.c parisc-mont.s",
  302. aes_asm_src => "aes_core.c aes_cbc.c aes-parisc.s",
  303. sha1_asm_src => "sha1-parisc.s sha256-parisc.s sha512-parisc.s",
  304. rc4_asm_src => "rc4-parisc.s",
  305. modes_asm_src => "ghash-parisc.s",
  306. perlasm_scheme => "32"
  307. },
  308. parisc20_64_asm => {
  309. template => 1,
  310. inherit_from => [ "parisc11_asm" ],
  311. perlasm_scheme => "64",
  312. },
  313. ppc32_asm => {
  314. template => 1,
  315. cpuid_asm_src => "ppccpuid.s ppccap.c",
  316. bn_asm_src => "bn-ppc.s ppc-mont.s",
  317. aes_asm_src => "aes_core.c aes_cbc.c aes-ppc.s vpaes-ppc.s aesp8-ppc.s",
  318. sha1_asm_src => "sha1-ppc.s sha256-ppc.s sha512-ppc.s sha256p8-ppc.s sha512p8-ppc.s",
  319. modes_asm_src => "ghashp8-ppc.s",
  320. chacha_asm_src => "chacha-ppc.s",
  321. poly1305_asm_src=> "poly1305-ppc.s poly1305-ppcfp.s",
  322. },
  323. ppc64_asm => {
  324. inherit_from => [ "ppc32_asm" ],
  325. template => 1,
  326. ec_asm_src => "ecp_nistz256.c ecp_nistz256-ppc64.s",
  327. keccak1600_asm_src => "keccak1600-ppc64.s",
  328. },
  329. );