On Thu, 17 Dec 2015 12:04:10 +0900 (JST)
YASUOKA Masahiko <[email protected]> wrote:
> Compiling sha256-x86_64.S fails if the "src" is located a directory
> which includes "512".
Actually I hit this problem like below since it's 2015-12:
sha512-x86_64.so: In function `sha512_block_data_order':
/source/yasuoka/201512/src/lib/libcrypto/crypto/obj/sha512-x86_64.S:7:
multiple definition of `sha512_block_data_order'
sha256-x86_64.so:/source/yasuoka/201512/src/lib/libcrypto/crypto/obj/sha256-x86_64.S:7:
first defined here
collect2: ld returned 1 exit status
*** Error 1 in crypto (<bsd.lib.mk>:212 'libcrypto.so.37.0')
*** Error 2 in /source/yasuoka/201512/src/lib/libcrypto (<bsd.subdir.mk>:48
'all')
Also I checked sha512-x86_64.pl again. It seems the perl script
doesn't assume the argument includes a directory.
Let me update the diff.
ok?
Index: lib/libcrypto/crypto/arch/amd64/Makefile.inc
===================================================================
RCS file: /cvs/src/lib/libcrypto/crypto/arch/amd64/Makefile.inc,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile.inc
--- lib/libcrypto/crypto/arch/amd64/Makefile.inc 11 Sep 2015 14:48:06
-0000 1.5
+++ lib/libcrypto/crypto/arch/amd64/Makefile.inc 28 Dec 2015 02:11:11
-0000
@@ -46,14 +46,12 @@ CFLAGS+= -DSHA256_ASM
SRCS+= sha256-x86_64.S
GENERATED+= sha256-x86_64.S
sha256-x86_64.S: ${LCRYPTO_SRC}/sha/asm/sha512-x86_64.pl
- cd ${LCRYPTO_SRC}/sha/asm ; \
- /usr/bin/perl ./sha512-x86_64.pl ${.OBJDIR}/${.TARGET}
+ /usr/bin/perl ${LCRYPTO_SRC}/sha/asm/sha512-x86_64.pl ${.TARGET}
CFLAGS+= -DSHA512_ASM
SRCS+= sha512-x86_64.S
GENERATED+= sha512-x86_64.S
sha512-x86_64.S: ${LCRYPTO_SRC}/sha/asm/sha512-x86_64.pl
- cd ${LCRYPTO_SRC}/sha/asm ; \
- /usr/bin/perl ./sha512-x86_64.pl ${.OBJDIR}/${.TARGET}
+ /usr/bin/perl ${LCRYPTO_SRC}/sha/asm/sha512-x86_64.pl ${.TARGET}
# whrlpool
CFLAGS+= -DWHIRLPOOL_ASM
SSLASM+= whrlpool wp-x86_64