Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Sep 2023 15:55:30 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1a18383a52bc - main - libcrypto: link engines and the legacy provider to libcrypto
Message-ID:  <202309161555.38GFtUXj064786@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=1a18383a52bc373e316d224cef1298debf6f7e25

commit 1a18383a52bc373e316d224cef1298debf6f7e25
Author:     Pierre Pronchery <pierre@freebsdfoundation.org>
AuthorDate: 2023-09-15 15:14:16 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-09-16 15:55:12 +0000

    libcrypto: link engines and the legacy provider to libcrypto
    
    OpenSSL's legacy provider module and engines need to link to
    libcrypto.so, as it provides some of the actual implementations of
    legacy routines.
    
    This is a little tricky due to build order issues.  Introduce a small
    hack (LIBCRYPTO_WITHOUT_SUBDIRS) that builds libcrypto.so in its usual
    early phase without any OpenSSL provider modules or engines.  This is
    intended to restore the test suite; a future change should remove the
    hack and replace it with a better approach.
    
    PR:             254853, 273528
    Discussed with: Folks at EuroBSDCon in Coimbra
    Sponsored by:   The FreeBSD Foundation
---
 Makefile.inc1                                | 2 +-
 secure/lib/libcrypto/Makefile                | 2 ++
 secure/lib/libcrypto/engines/Makefile.inc    | 2 ++
 secure/lib/libcrypto/modules/legacy/Makefile | 1 +
 4 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile.inc1 b/Makefile.inc1
index 7c6981f0f890..7776b40a9801 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2980,7 +2980,7 @@ libraries: .MAKE .PHONY
 	${_+_}cd ${.CURDIR}; \
 	    ${MAKE} -f Makefile.inc1 _prereq_libs; \
 	    ${MAKE} -f Makefile.inc1 _startup_libs; \
-	    ${MAKE} -f Makefile.inc1 _prebuild_libs; \
+	    ${MAKE} -f Makefile.inc1 _prebuild_libs -DLIBCRYPTO_WITHOUT_SUBDIRS; \
 	    ${MAKE} -f Makefile.inc1 _generic_libs
 
 #
diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile
index 585e89861815..d8ae91bb3272 100644
--- a/secure/lib/libcrypto/Makefile
+++ b/secure/lib/libcrypto/Makefile
@@ -1,6 +1,8 @@
 
 SHLIBDIR?=	/lib
+.if !defined(LIBCRYPTO_WITHOUT_SUBDIRS)
 SUBDIR=		engines modules
+.endif
 
 .include <bsd.own.mk>
 .include <src.opts.mk>
diff --git a/secure/lib/libcrypto/engines/Makefile.inc b/secure/lib/libcrypto/engines/Makefile.inc
index 39b728ff722f..13d5f4849cbc 100644
--- a/secure/lib/libcrypto/engines/Makefile.inc
+++ b/secure/lib/libcrypto/engines/Makefile.inc
@@ -16,6 +16,8 @@ CFLAGS+=	-DB_ENDIAN
 .endif
 CFLAGS+=	-DNDEBUG
 
+LIBADD=		crypto
+
 .PATH: ${LCRYPTO_SRC}/engines
 
 WARNS?=		0
diff --git a/secure/lib/libcrypto/modules/legacy/Makefile b/secure/lib/libcrypto/modules/legacy/Makefile
index 913c0c41f5eb..a285d0b1148b 100644
--- a/secure/lib/libcrypto/modules/legacy/Makefile
+++ b/secure/lib/libcrypto/modules/legacy/Makefile
@@ -1,5 +1,6 @@
 
 SHLIB_NAME?=	legacy.so
+LIBADD=		crypto
 
 SRCS+=	legacyprov.c prov_running.c
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202309161555.38GFtUXj064786>