[edk2-devel] [PATCH] CryptoPkg: define DSO_NONE in the OpenSSL build

rebecca@bluestop.org posted 1 patch 4 years, 10 months ago
Failed in applying to current master (apply log)
CryptoPkg/Library/OpensslLib/OpensslLib.inf       | 2 +-
CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[edk2-devel] [PATCH] CryptoPkg: define DSO_NONE in the OpenSSL build
Posted by rebecca@bluestop.org 4 years, 10 months ago
This fixes the build on FreeBSD, where DSO_METHOD_openssl is undefined
since dso_openssl.c only compiles the function if DSO_NONE is defined.

Signed-off-by: Rebecca Cran <rebecca@bluestop.org>
---
 CryptoPkg/Library/OpensslLib/OpensslLib.inf       | 2 +-
 CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
index 5f36edeeef..fa8cc660be 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -15,7 +15,7 @@
   VERSION_STRING                 = 1.0
   LIBRARY_CLASS                  = OpensslLib
   DEFINE OPENSSL_PATH            = openssl
-  DEFINE OPENSSL_FLAGS           = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
+  DEFINE OPENSSL_FLAGS           = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DDSO_NONE
 
 #
 #  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
index de05cac931..680df19a4a 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
@@ -15,7 +15,7 @@
   VERSION_STRING                 = 1.0
   LIBRARY_CLASS                  = OpensslLib
   DEFINE OPENSSL_PATH            = openssl
-  DEFINE OPENSSL_FLAGS           = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
+  DEFINE OPENSSL_FLAGS           = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DDSO_NONE
 
 #
 #  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42396): https://edk2.groups.io/g/devel/message/42396
Mute This Topic: https://groups.io/mt/32058409/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] CryptoPkg: define DSO_NONE in the OpenSSL build
Posted by rebecca@bluestop.org 4 years, 10 months ago
On 2019-06-13 17:32, Rebecca Cran wrote:
> This fixes the build on FreeBSD, where DSO_METHOD_openssl is undefined
> since dso_openssl.c only compiles the function if DSO_NONE is defined.

Sorry, I just realized this isn't applicable to the OpenSSL we currently
pull in: I was testing against OpenSSL_1_1_1-stable where they changed
the configuration in
https://github.com/openssl/openssl/commit/5fba3afad01707f4a8856a35500de007a8a256ec#diff-e1ea891baa345b284ad0a5a663bb9b20
:


"Rework DSO API conditions and configuration option

'no-dso' is meaningless, as it doesn't get any macro defined.
Therefore, we remove all checks of OPENSSL_NO_DSO.  However, there may
be some odd platforms with no DSO scheme.  For those, we generate the
internal macro DSO_NONE aand use it."



So please ignore this.


-- 
Rebecca Cran


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42397): https://edk2.groups.io/g/devel/message/42397
Mute This Topic: https://groups.io/mt/32058409/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-