build.info 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. LIBS=../../libcrypto
  2. $BNASM=bn_asm.c
  3. IF[{- !$disabled{asm} -}]
  4. # Define source files and macros per asm architecture
  5. # Known macros are:
  6. #
  7. # OPENSSL_BN_ASM_PART_WORDS For any collection with /-586/ file names
  8. # OPENSSL_BN_ASM_MONT For any collection with /-mont/ file names
  9. # OPENSSL_BN_ASM_MONT5 For any collection with /-mont5/ file names
  10. # OPENSSL_BN_ASM_GF2m For any collection with /-gf2m/ file names
  11. # OPENSSL_IA32_SSE2 For any collection with /86/ file names
  12. # when sse2 is enabled
  13. # BN_DIV3W For any collection with /-div3w/ file names
  14. #
  15. # All variables are named in such a way that they can be "indexed" with
  16. # $target{asm_arch}
  17. $BNASM_x86=bn-586.S co-586.S x86-mont.S x86-gf2m.S
  18. # bn-586 is the only one implementing bn_*_part_words
  19. # => OPENSSL_BN_ASM_PART_WORDS
  20. $BNDEF_x86=OPENSSL_BN_ASM_PART_WORDS OPENSSL_BN_ASM_MONT OPENSSL_BN_ASM_GF2m
  21. $BNDEF_x86_sse2=OPENSSL_IA32_SSE2
  22. $BNASM_x86_64=\
  23. x86_64-mont.s x86_64-mont5.s x86_64-gf2m.s rsaz_exp.c rsaz-x86_64.s \
  24. rsaz-avx2.s rsaz_exp_x2.c rsaz-2k-avx512.s rsaz-3k-avx512.s rsaz-4k-avx512.s
  25. IF[{- $config{target} !~ /^VC/ -}]
  26. $BNASM_x86_64=asm/x86_64-gcc.c $BNASM_x86_64
  27. ELSE
  28. $BNASM_x86_64=bn_asm.c $BNASM_x86_64
  29. ENDIF
  30. $BNDEF_x86_64=OPENSSL_BN_ASM_MONT OPENSSL_BN_ASM_MONT5 OPENSSL_BN_ASM_GF2m
  31. $BNDEF_x86_64_sse2=OPENSSL_IA32_SSE2
  32. IF[{- $config{target} !~ /^VC/ -}]
  33. $BNASM_ia64=bn-ia64.s ia64-mont.s
  34. ELSE
  35. $BNASM_ia64=bn_asm.c ia64-mont.s
  36. ENDIF
  37. $BNASM_sparcv9=asm/sparcv8plus.S sparcv9-mont.S sparcv9a-mont.S vis3-mont.S \
  38. sparct4-mont.S bn_sparc.c
  39. $BNDEF_sparcv9=OPENSSL_BN_ASM_MONT
  40. $BNASM_sparcv9_ec2m=sparcv9-gf2m.S
  41. $BNDEF_sparcv9_ec2m=OPENSSL_BN_ASM_GF2m
  42. $BNASM_sparcv8=asm/sparcv8.S
  43. $BNASM_alpha=bn_asm.c alpha-mont.S
  44. $BNDEF_alpha=OPENSSL_BN_ASM_MONT
  45. $BNASM_mips32=bn-mips.S mips-mont.S
  46. $BNDEF_mips32=OPENSSL_BN_ASM_MONT
  47. $BNASM_mips64=$BNASM_mips32
  48. $BNDEF_mips64=$BNDEF_mips32
  49. IF[{- ($target{perlasm_scheme} // '') eq '31' -}]
  50. $BNASM_s390x=bn_asm.c s390x-mont.S
  51. ELSE
  52. $BNASM_s390x=asm/s390x.S s390x-mont.S
  53. ENDIF
  54. $BNDEF_s390x=OPENSSL_BN_ASM_MONT
  55. $BNASM_s390x_ec2m=s390x-gf2m.s
  56. $BNDEF_s390x_ec2m=OPENSSL_BN_ASM_GF2m
  57. $BNASM_armv4=bn_asm.c armv4-mont.S
  58. $BNDEF_armv4=OPENSSL_BN_ASM_MONT
  59. $BNASM_armv4_ec2m=armv4-gf2m.S
  60. $BNDEF_armv4_ec2m=OPENSSL_BN_ASM_GF2m
  61. $BNASM_aarch64=bn_asm.c armv8-mont.S
  62. $BNDEF_aarch64=OPENSSL_BN_ASM_MONT
  63. $BNASM_parisc11=bn_asm.c parisc-mont.s
  64. $BNDEF_parisc11=OPENSSL_BN_ASM_MONT
  65. $BNASM_parisc20_64=$BNASM_parisc11
  66. $BNDEF_parisc20_64=$BNDEF_parisc11
  67. $BNASM_ppc32=bn_ppc.c bn-ppc.s ppc-mont.s
  68. $BNDEF_ppc32=OPENSSL_BN_ASM_MONT
  69. $BNASM_ppc64=$BNASM_ppc32 ppc64-mont-fixed.s
  70. $BNDEF_ppc64=$BNDEF_ppc32
  71. $BNASM_c64xplus=asm/bn-c64xplus.asm
  72. $BNASM_c64xplus_ec2m=c64xplus-gf2m.s
  73. $BNDEF_c64xplus_ec2m=OPENSSL_BN_ASM_GF2m
  74. # Now that we have defined all the arch specific variables, use the
  75. # appropriate ones, and define the appropriate macros
  76. IF[$BNASM_{- $target{asm_arch} -}]
  77. $BNASM=$BNASM_{- $target{asm_arch} -}
  78. $BNDEF=$BNDEF_{- $target{asm_arch} -}
  79. IF[{- !$disabled{ec2m} -}]
  80. $BNASM=$BNASM $BNASM_{- $target{asm_arch} -}_ec2m
  81. $BNDEF=$BNDEF $BNDEF_{- $target{asm_arch} -}_ec2m
  82. ENDIF
  83. IF[{- !$disabled{sse2} -}]
  84. $BNDEF=$BNDEF $BNDEF_{- $target{asm_arch} -}_sse2
  85. ENDIF
  86. ENDIF
  87. ENDIF
  88. $COMMON=bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c \
  89. bn_mod.c bn_conv.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
  90. bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_sqr.c \
  91. bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \
  92. bn_intern.c bn_dh.c bn_rsa_fips186_4.c bn_const.c
  93. SOURCE[../../libcrypto]=$COMMON $BNASM bn_print.c bn_err.c bn_srp.c
  94. DEFINE[../../libcrypto]=$BNDEF
  95. IF[{- !$disabled{'deprecated-0.9.8'} -}]
  96. SOURCE[../../libcrypto]=bn_depr.c
  97. ENDIF
  98. IF[{- !$disabled{'deprecated-3.0'} -}]
  99. SOURCE[../../libcrypto]=bn_x931p.c
  100. ENDIF
  101. SOURCE[../../providers/libfips.a]=$COMMON $BNASM
  102. DEFINE[../../providers/libfips.a]=$BNDEF
  103. # Because some CPUID implementations use some BN assembler (!!!), we
  104. # must include assembler code into the legacy provider under the same
  105. # conditions as CPUID code is included. See ../build.info
  106. SOURCE[../../providers/liblegacy.a]=$BNASM
  107. DEFINE[../../providers/liblegacy.a]=$BNDEF
  108. # Implementations are now spread across several libraries, so the defines
  109. # need to be applied to all affected libraries and modules.
  110. DEFINE[../../providers/libcommon.a]=$BNDEF
  111. INCLUDE[bn_exp.o]=..
  112. GENERATE[bn-586.S]=asm/bn-586.pl
  113. DEPEND[bn-586.S]=../perlasm/x86asm.pl
  114. GENERATE[co-586.S]=asm/co-586.pl
  115. DEPEND[co-586.S]=../perlasm/x86asm.pl
  116. GENERATE[x86-mont.S]=asm/x86-mont.pl
  117. DEPEND[x86-mont.S]=../perlasm/x86asm.pl
  118. GENERATE[x86-gf2m.S]=asm/x86-gf2m.pl
  119. DEPEND[x86-gf2m.S]=../perlasm/x86asm.pl
  120. GENERATE[sparcv9a-mont.S]=asm/sparcv9a-mont.pl
  121. INCLUDE[sparcv9a-mont.o]=..
  122. GENERATE[sparcv9-mont.S]=asm/sparcv9-mont.pl
  123. INCLUDE[sparcv9-mont.o]=..
  124. GENERATE[vis3-mont.S]=asm/vis3-mont.pl
  125. INCLUDE[vis3-mont.o]=..
  126. GENERATE[sparct4-mont.S]=asm/sparct4-mont.pl
  127. INCLUDE[sparct4-mont.o]=..
  128. GENERATE[sparcv9-gf2m.S]=asm/sparcv9-gf2m.pl
  129. INCLUDE[sparcv9-gf2m.o]=..
  130. GENERATE[bn-mips.S]=asm/mips.pl
  131. INCLUDE[bn-mips.o]=..
  132. GENERATE[mips-mont.S]=asm/mips-mont.pl
  133. INCLUDE[mips-mont.o]=..
  134. GENERATE[s390x-mont.S]=asm/s390x-mont.pl
  135. GENERATE[s390x-gf2m.s]=asm/s390x-gf2m.pl
  136. GENERATE[x86_64-mont.s]=asm/x86_64-mont.pl
  137. GENERATE[x86_64-mont5.s]=asm/x86_64-mont5.pl
  138. GENERATE[x86_64-gf2m.s]=asm/x86_64-gf2m.pl
  139. GENERATE[rsaz-x86_64.s]=asm/rsaz-x86_64.pl
  140. GENERATE[rsaz-avx2.s]=asm/rsaz-avx2.pl
  141. GENERATE[rsaz-2k-avx512.s]=asm/rsaz-2k-avx512.pl
  142. GENERATE[rsaz-3k-avx512.s]=asm/rsaz-3k-avx512.pl
  143. GENERATE[rsaz-4k-avx512.s]=asm/rsaz-4k-avx512.pl
  144. GENERATE[bn-ia64.s]=asm/ia64.S
  145. GENERATE[ia64-mont.s]=asm/ia64-mont.pl
  146. GENERATE[parisc-mont.s]=asm/parisc-mont.pl
  147. # ppc - AIX, Linux, MacOS X...
  148. GENERATE[bn-ppc.s]=asm/ppc.pl
  149. GENERATE[ppc-mont.s]=asm/ppc-mont.pl
  150. GENERATE[ppc64-mont.s]=asm/ppc64-mont.pl
  151. GENERATE[ppc64-mont-fixed.s]=asm/ppc64-mont-fixed.pl
  152. GENERATE[alpha-mont.S]=asm/alpha-mont.pl
  153. GENERATE[armv4-mont.S]=asm/armv4-mont.pl
  154. INCLUDE[armv4-mont.o]=..
  155. GENERATE[armv4-gf2m.S]=asm/armv4-gf2m.pl
  156. INCLUDE[armv4-gf2m.o]=..
  157. GENERATE[armv8-mont.S]=asm/armv8-mont.pl
  158. INCLUDE[armv8-mont.o]=..