00-base-templates.conf 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  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. unistd => "<unistd.h>",
  36. shared_target => "",
  37. shared_cflag => "",
  38. shared_defines => [],
  39. shared_ldflag => "",
  40. shared_rcflag => "",
  41. shared_extension => "",
  42. #### Defaults for the benefit of the config targets who don't inherit
  43. #### a BASE and assume Unixly 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. },
  95. BASE_Windows => {
  96. inherit_from => [ "BASE_common" ],
  97. template => 1,
  98. lib_defines =>
  99. sub {
  100. my @defs = ();
  101. unless ($disabled{"zlib-dynamic"}) {
  102. my $zlib = $withargs{zlib_lib} // "ZLIB1";
  103. push @defs, 'LIBZ=' . (quotify("perl", $zlib))[0];
  104. }
  105. return [ @defs ];
  106. },
  107. ex_libs =>
  108. sub {
  109. unless ($disabled{zlib}) {
  110. if (defined($disabled{"zlib-dynamic"})) {
  111. return $withargs{zlib_lib} // "ZLIB1";
  112. }
  113. }
  114. return ();
  115. },
  116. LD => "link",
  117. LDFLAGS => "/nologo",
  118. ldoutflag => "/out:",
  119. AR => "lib",
  120. ARFLAGS => "/nologo",
  121. aroutflag => "/out:",
  122. RC => "rc",
  123. rcoutflag => "/fo",
  124. MT => "mt",
  125. MTFLAGS => "-nologo",
  126. mtinflag => "-manifest ",
  127. mtoutflag => "-outputresource:",
  128. build_file => "makefile",
  129. build_scheme => [ "unified", "windows" ],
  130. },
  131. BASE_VMS => {
  132. inherit_from => [ "BASE_common" ],
  133. template => 1,
  134. includes =>
  135. add(sub {
  136. my @incs = ();
  137. # GNV$ZLIB_INCLUDE is the standard logical name for later
  138. # zlib incarnations.
  139. push @incs, 'GNV$ZLIB_INCLUDE:'
  140. if !$disabled{zlib} && !$withargs{zlib_include};
  141. return [ @incs ];
  142. }),
  143. build_file => "descrip.mms",
  144. build_scheme => [ "unified", "VMS" ],
  145. },
  146. uplink_common => {
  147. template => 1,
  148. apps_init_src => add("../ms/applink.c"),
  149. uplink_aux_src => add("../ms/uplink.c"),
  150. defines => add("OPENSSL_USE_APPLINK"),
  151. },
  152. x86_uplink => {
  153. inherit_from => [ "uplink_common" ],
  154. template => 1,
  155. uplink_aux_src => add("uplink-x86.s"),
  156. },
  157. x86_64_uplink => {
  158. inherit_from => [ "uplink_common" ],
  159. template => 1,
  160. uplink_aux_src => add("uplink-x86_64.s"),
  161. },
  162. ia64_uplink => {
  163. inherit_from => [ "uplink_common" ],
  164. template => 1,
  165. uplink_aux_src => add("uplink-ia64.s"),
  166. },
  167. x86_asm => {
  168. template => 1,
  169. cpuid_asm_src => "x86cpuid.s",
  170. bn_asm_src => "bn-586.s co-586.s x86-mont.s x86-gf2m.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. perlasm_scheme => "elf"
  192. },
  193. x86_64_asm => {
  194. template => 1,
  195. cpuid_asm_src => "x86_64cpuid.s",
  196. 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",
  197. ec_asm_src => "ecp_nistz256.c ecp_nistz256-x86_64.s x25519-x86_64.s",
  198. 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",
  199. md5_asm_src => "md5-x86_64.s",
  200. 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",
  201. rc4_asm_src => "rc4-x86_64.s rc4-md5-x86_64.s",
  202. wp_asm_src => "wp-x86_64.s",
  203. cmll_asm_src => "cmll-x86_64.s cmll_misc.c",
  204. modes_asm_src => "ghash-x86_64.s aesni-gcm-x86_64.s",
  205. padlock_asm_src => "e_padlock-x86_64.s",
  206. chacha_asm_src => "chacha-x86_64.s",
  207. poly1305_asm_src=> "poly1305-x86_64.s",
  208. },
  209. ia64_asm => {
  210. template => 1,
  211. cpuid_asm_src => "ia64cpuid.s",
  212. bn_asm_src => "bn-ia64.s ia64-mont.s",
  213. aes_asm_src => "aes_core.c aes_cbc.c aes-ia64.s",
  214. sha1_asm_src => "sha1-ia64.s sha256-ia64.s sha512-ia64.s",
  215. modes_asm_src => "ghash-ia64.s",
  216. perlasm_scheme => "void"
  217. },
  218. sparcv9_asm => {
  219. template => 1,
  220. cpuid_asm_src => "sparcv9cap.c sparccpuid.S",
  221. bn_asm_src => "asm/sparcv8plus.S sparcv9-mont.S sparcv9a-mont.S vis3-mont.S sparct4-mont.S sparcv9-gf2m.S",
  222. ec_asm_src => "ecp_nistz256.c ecp_nistz256-sparcv9.S",
  223. des_asm_src => "des_enc-sparc.S fcrypt_b.c dest4-sparcv9.S",
  224. aes_asm_src => "aes_core.c aes_cbc.c aes-sparcv9.S aest4-sparcv9.S aesfx-sparcv9.S",
  225. md5_asm_src => "md5-sparcv9.S",
  226. sha1_asm_src => "sha1-sparcv9.S sha256-sparcv9.S sha512-sparcv9.S",
  227. cmll_asm_src => "camellia.c cmll_misc.c cmll_cbc.c cmllt4-sparcv9.S",
  228. modes_asm_src => "ghash-sparcv9.S",
  229. poly1305_asm_src=> "poly1305-sparcv9.S",
  230. perlasm_scheme => "void"
  231. },
  232. sparcv8_asm => {
  233. template => 1,
  234. cpuid_asm_src => "",
  235. bn_asm_src => "asm/sparcv8.S",
  236. des_asm_src => "des_enc-sparc.S fcrypt_b.c",
  237. perlasm_scheme => "void"
  238. },
  239. alpha_asm => {
  240. template => 1,
  241. cpuid_asm_src => "alphacpuid.s",
  242. bn_asm_src => "bn_asm.c alpha-mont.S",
  243. sha1_asm_src => "sha1-alpha.S",
  244. modes_asm_src => "ghash-alpha.S",
  245. perlasm_scheme => "void"
  246. },
  247. mips32_asm => {
  248. template => 1,
  249. bn_asm_src => "bn-mips.S mips-mont.S",
  250. aes_asm_src => "aes_cbc.c aes-mips.S",
  251. sha1_asm_src => "sha1-mips.S sha256-mips.S",
  252. },
  253. mips64_asm => {
  254. inherit_from => [ "mips32_asm" ],
  255. template => 1,
  256. sha1_asm_src => add("sha512-mips.S"),
  257. poly1305_asm_src=> "poly1305-mips.S",
  258. },
  259. s390x_asm => {
  260. template => 1,
  261. cpuid_asm_src => "s390xcap.c s390xcpuid.S",
  262. bn_asm_src => "asm/s390x.S s390x-mont.S s390x-gf2m.s",
  263. aes_asm_src => "aes-s390x.S aes-ctr.fake aes-xts.fake",
  264. sha1_asm_src => "sha1-s390x.S sha256-s390x.S sha512-s390x.S",
  265. rc4_asm_src => "rc4-s390x.s",
  266. modes_asm_src => "ghash-s390x.S",
  267. chacha_asm_src => "chacha-s390x.S",
  268. poly1305_asm_src=> "poly1305-s390x.S",
  269. },
  270. armv4_asm => {
  271. template => 1,
  272. cpuid_asm_src => "armcap.c armv4cpuid.S",
  273. bn_asm_src => "bn_asm.c armv4-mont.S armv4-gf2m.S",
  274. ec_asm_src => "ecp_nistz256.c ecp_nistz256-armv4.S",
  275. aes_asm_src => "aes_cbc.c aes-armv4.S bsaes-armv7.S aesv8-armx.S",
  276. sha1_asm_src => "sha1-armv4-large.S sha256-armv4.S sha512-armv4.S",
  277. modes_asm_src => "ghash-armv4.S ghashv8-armx.S",
  278. chacha_asm_src => "chacha-armv4.S",
  279. poly1305_asm_src=> "poly1305-armv4.S",
  280. perlasm_scheme => "void"
  281. },
  282. aarch64_asm => {
  283. template => 1,
  284. cpuid_asm_src => "armcap.c arm64cpuid.S",
  285. ec_asm_src => "ecp_nistz256.c ecp_nistz256-armv8.S",
  286. bn_asm_src => "bn_asm.c armv8-mont.S",
  287. aes_asm_src => "aes_core.c aes_cbc.c aesv8-armx.S vpaes-armv8.S",
  288. sha1_asm_src => "sha1-armv8.S sha256-armv8.S sha512-armv8.S",
  289. modes_asm_src => "ghashv8-armx.S",
  290. chacha_asm_src => "chacha-armv8.S",
  291. poly1305_asm_src=> "poly1305-armv8.S",
  292. },
  293. parisc11_asm => {
  294. template => 1,
  295. cpuid_asm_src => "pariscid.s",
  296. bn_asm_src => "bn_asm.c parisc-mont.s",
  297. aes_asm_src => "aes_core.c aes_cbc.c aes-parisc.s",
  298. sha1_asm_src => "sha1-parisc.s sha256-parisc.s sha512-parisc.s",
  299. rc4_asm_src => "rc4-parisc.s",
  300. modes_asm_src => "ghash-parisc.s",
  301. perlasm_scheme => "32"
  302. },
  303. parisc20_64_asm => {
  304. template => 1,
  305. inherit_from => [ "parisc11_asm" ],
  306. perlasm_scheme => "64",
  307. },
  308. ppc32_asm => {
  309. template => 1,
  310. cpuid_asm_src => "ppccpuid.s ppccap.c",
  311. bn_asm_src => "bn-ppc.s ppc-mont.s",
  312. aes_asm_src => "aes_core.c aes_cbc.c aes-ppc.s vpaes-ppc.s aesp8-ppc.s",
  313. sha1_asm_src => "sha1-ppc.s sha256-ppc.s sha512-ppc.s sha256p8-ppc.s sha512p8-ppc.s",
  314. modes_asm_src => "ghashp8-ppc.s",
  315. chacha_asm_src => "chacha-ppc.s",
  316. poly1305_asm_src=> "poly1305-ppc.s poly1305-ppcfp.s",
  317. },
  318. ppc64_asm => {
  319. inherit_from => [ "ppc32_asm" ],
  320. template => 1,
  321. ec_asm_src => "ecp_nistz256.c ecp_nistz256-ppc64.s",
  322. },
  323. );