Fix missing Assembler defines
authorShane Lontis <shane.lontis@oracle.com>
Tue, 15 Oct 2019 02:35:41 +0000 (12:35 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Wed, 16 Oct 2019 06:10:39 +0000 (16:10 +1000)
Implementations are now spread across several libraries, so the assembler
related defines need to be applied to all affected libraries and modules.

AES_ASM define was missing from libimplementations.a which disabled AESNI
aarch64 changes were made by xkqian.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10180)

crypto/aes/build.info
crypto/bn/build.info
crypto/build.info
crypto/ec/build.info
crypto/md5/build.info
crypto/modes/build.info
crypto/poly1305/build.info
crypto/ripemd/build.info
crypto/sha/build.info
crypto/whrlpool/build.info

index 59c009761ebd7d9c812a7284bc191ad0a701efcc..291bf2af9b4fed39a84fd866d5b4d3cd9706eb13 100644 (file)
@@ -61,9 +61,15 @@ ENDIF
 
 $COMMON=aes_misc.c aes_ecb.c $AESASM
 SOURCE[../../libcrypto]=$COMMON aes_cfb.c aes_ofb.c aes_ige.c aes_wrap.c
-DEFINE[../../libcrypto]=$AESDEF
 SOURCE[../../providers/libfips.a]=$COMMON
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
+DEFINE[../../libcrypto]=$AESDEF
 DEFINE[../../providers/libfips.a]=$AESDEF
+DEFINE[../../providers/libimplementations.a]=$AESDEF
+# fipsprov.c needs access to AESNI.
+DEFINE[../../providers/fips]=$AESDEF
 
 GENERATE[aes-ia64.s]=asm/aes-ia64.S
 
index 75b84d0df6aa6ab0fc3710bf24854bd5fdf63f13..5ad8bf14d304819436b657b8b74cbfd43a0525da 100644 (file)
@@ -108,9 +108,12 @@ $COMMON=bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c \
         bn_const.c bn_x931p.c bn_intern.c bn_dh.c \
         bn_rsa_fips186_4.c $BNASM
 SOURCE[../../libcrypto]=$COMMON bn_print.c bn_err.c bn_depr.c bn_srp.c
-DEFINE[../../libcrypto]=$BNDEF
 SOURCE[../../providers/libfips.a]=$COMMON
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
+DEFINE[../../libcrypto]=$BNDEF
 DEFINE[../../providers/libfips.a]=$BNDEF
+DEFINE[../../providers/libimplementations.a]=$BNDEF
 
 INCLUDE[../../libcrypto]=../../crypto/include
 
index f41ecf448f32302548f99b6f278ff89fe850beaa..7d3eb29570998bf4e3baaf0e7f636464dd24ccda 100644 (file)
@@ -77,10 +77,14 @@ SOURCE[../libcrypto]=$UTIL_COMMON \
         cversion.c info.c cpt_err.c ebcdic.c uid.c o_time.c o_dir.c \
         o_fopen.c getenv.c o_init.c o_fips.c init.c trace.c provider.c \
         $UPLINKSRC
-DEFINE[../libcrypto]=$UTIL_DEFINE $UPLINKDEF
 SOURCE[../providers/libfips.a]=$UTIL_COMMON
-DEFINE[../providers/libfips.a]=$UTIL_DEFINE
 
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
+DEFINE[../libcrypto]=$UTIL_DEFINE $UPLINKDEF
+DEFINE[../providers/libfips.a]=$UTIL_DEFINE
+DEFINE[../providers/fips]=$UTIL_DEFINE
+DEFINE[../providers/libimplementations.a]=$UTIL_DEFINE
 
 DEPEND[info.o]=buildinf.h
 DEPEND[cversion.o]=buildinf.h
index 40aef3679857dfcb55deea9ce22ddcbe65fadb6c..90aea66a14e05301fb3a9c0abe0329543ad462ed 100644 (file)
@@ -56,9 +56,13 @@ $COMMON=ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \
         $ECASM
 SOURCE[../../libcrypto]=$COMMON ec_ameth.c ec_pmeth.c ecx_meth.c ec_err.c \
                         ecdh_kdf.c eck_prn.c
-DEFINE[../../libcrypto]=$ECDEF
 SOURCE[../../providers/libfips.a]=$COMMON
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
+DEFINE[../../libcrypto]=$ECDEF
 DEFINE[../../providers/libfips.a]=$ECDEF
+DEFINE[../../providers/libimplementations.a]=$ECDEF
 
 GENERATE[ecp_nistz256-x86.s]=asm/ecp_nistz256-x86.pl
 
index 081e0b08bd18b1fc22225937e04d82e8030df37d..d4494b274d6c3cd51c72705942b99f2176213b87 100644 (file)
@@ -15,7 +15,11 @@ IF[{- !$disabled{asm} -}]
 ENDIF
 
 SOURCE[../../libcrypto]=md5_dgst.c md5_one.c md5_sha1.c $MD5ASM
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
 DEFINE[../../libcrypto]=$MD5DEF
+DEFINE[../../providers/libimplementations.a]=$MD5DEF
 
 GENERATE[md5-586.s]=asm/md5-586.pl
 
index 4ae0d8b01127e0f2fa6a2df2605f48553c1cf359..b741be821b40ddfffab4280ad6af6d986e98ba55 100644 (file)
@@ -52,10 +52,14 @@ $COMMON=cbc128.c ctr128.c cfb128.c ofb128.c gcm128.c ccm128.c xts128.c \
         wrap128.c $MODESASM
 SOURCE[../../libcrypto]=$COMMON \
         cts128.c ocb128.c siv128.c
+SOURCE[../../providers/libfips.a]=$COMMON
 
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
 DEFINE[../../libcrypto]=$MODESDEF
-SOURCE[../../providers/libfips.a]=$COMMON
 DEFINE[../../providers/libfips.a]=$MODESDEF
+DEFINE[../../providers/libimplementations.a]=$MODESDEF
+
 
 INCLUDE[gcm128.o]=..
 
index 29cdf4c86174bb541f25422448be88494fdfbbf2..6425a015834d4d76e8c3ebfe5d9afa3c21eff185 100644 (file)
@@ -30,7 +30,11 @@ IF[{- !$disabled{asm} -}]
 ENDIF
 
 SOURCE[../../libcrypto]=poly1305_ameth.c poly1305.c $POLY1305ASM
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
 DEFINE[../../libcrypto]=$POLY1305DEF
+DEFINE[../providers/libimplementations.a]=$POLY1305DEF
 
 GENERATE[poly1305-sparcv9.S]=asm/poly1305-sparcv9.pl
 INCLUDE[poly1305-sparcv9.o]=..
index c4baf631413c49e0e4fc0432ffdf33495eaa3207..a0a45b0e84d7b0f322d25c8be1ad345f05573c3f 100644 (file)
@@ -13,7 +13,11 @@ IF[{- !$disabled{asm} -}]
 ENDIF
 
 SOURCE[../../libcrypto]=rmd_dgst.c rmd_one.c $RMD160ASM
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules
 DEFINE[../../libcrypto]=$RMD160DEF
+DEFINE[../providers/libimplementations.a]=$RMD160DEF
 
 GENERATE[rmd-586.s]=asm/rmd-586.pl
 DEPEND[rmd-586.s]=../perlasm/x86asm.pl
index 25c64a0e2c5e58b6960a9692172c323abb0cdb23..dd10c5cd667125e450e5ad574f15aa8acb9a9318 100644 (file)
@@ -75,9 +75,13 @@ ENDIF
 
 $COMMON=sha1dgst.c sha256.c sha512.c sha3.c $SHA1ASM $KECCAK1600ASM
 SOURCE[../../libcrypto]=$COMMON sha1_one.c
-DEFINE[../../libcrypto]=$SHA1DEF $KECCAK1600DEF
 SOURCE[../../providers/libfips.a]= $COMMON
-DEFINE[../../providers/libfips.a]= $SHA1DEF $KECCAK1600DEF
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
+DEFINE[../../libcrypto]=$SHA1DEF $KECCAK1600DEF
+DEFINE[../../providers/libfips.a]=$SHA1DEF $KECCAK1600DEF
+DEFINE[../../providers/libimplementations.a]=$SHA1DEF $KECCAK1600DEF
 
 GENERATE[sha1-586.s]=asm/sha1-586.pl
 DEPEND[sha1-586.s]=../perlasm/x86asm.pl
index 3276bd12377632ff060500494b1c4391634e3c3e..6630a779f424523822e43731dd085766c5f9e154 100644 (file)
@@ -18,7 +18,11 @@ IF[{- !$disabled{asm} -}]
 ENDIF
 
 SOURCE[../../libcrypto]=wp_dgst.c $WPASM
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
 DEFINE[../../libcrypto]=$WPDEF
+DEFINE[../../providers/libimplementations.a]=$WPDEF
 
 GENERATE[wp-mmx.s]=asm/wp-mmx.pl
 DEPEND[wp-mmx.s]=../perlasm/x86asm.pl