From: Gerd Hoffmann <kra...@redhat.com> Seems with openssl 3.0 this is used by multiple source files, so we get duplicate symbol errors when linking. Fix that by moving compiler_flags from header file to a source file.
Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Cc: Jiewen Yao <jiewen....@intel.com> Cc: Xiaoyu Lu <xiaoyu1...@intel.com> Cc: Guomin Jiang <guomin.ji...@intel.com> --- CryptoPkg/Library/OpensslLib/OpensslLib.inf | 1 + CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf | 1 + CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 1 + CryptoPkg/Library/OpensslLib/OpensslLibFull.inf | 1 + CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf | 1 + CryptoPkg/Library/OpensslLib/buildinf.c | 4 ++++ CryptoPkg/Library/OpensslLib/buildinf.h | 2 +- 7 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 CryptoPkg/Library/OpensslLib/buildinf.c diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf index 9c922d0f49..d43806708a 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -34,6 +34,7 @@ # Autogenerated files list starts here # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c # SslNull.c diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf b/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf index e6f2b8e07b..54cf01279c 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf @@ -36,6 +36,7 @@ # Autogenerated files list starts here # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c # SslNull.c diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf index c7e63ca16c..3037eba9d3 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf @@ -35,6 +35,7 @@ # Autogenerated files list starts here # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c SslNull.c diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf b/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf index 8dffe936fc..f9c00605f2 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf @@ -39,6 +39,7 @@ # Autogenerated files list starts here # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c # SslNull.c diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf b/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf index e8ebf6afb7..7ba262cb01 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf @@ -41,6 +41,7 @@ # Autogenerated files list starts here # Autogenerated files list ends here buildinf.h + buildinf.c ossl_store.c rand_pool.c # SslNull.c diff --git a/CryptoPkg/Library/OpensslLib/buildinf.c b/CryptoPkg/Library/OpensslLib/buildinf.c new file mode 100644 index 0000000000..cd7fe9322e --- /dev/null +++ b/CryptoPkg/Library/OpensslLib/buildinf.c @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: BSD-2-Clause-Patent */ +#include "buildinf.h" + +const char *compiler_flags = "compiler: information not available from edk2"; diff --git a/CryptoPkg/Library/OpensslLib/buildinf.h b/CryptoPkg/Library/OpensslLib/buildinf.h index 9042c7526f..7cf0eae008 100644 --- a/CryptoPkg/Library/OpensslLib/buildinf.h +++ b/CryptoPkg/Library/OpensslLib/buildinf.h @@ -1,4 +1,4 @@ #define PLATFORM "UEFI" #define DATE "Fri Dec 22 01:23:45 PDT 2017" -const char *compiler_flags = "compiler: information not available from edk2"; +extern const char *compiler_flags; -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107495): https://edk2.groups.io/g/devel/message/107495 Mute This Topic: https://groups.io/mt/100520597/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-