From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 5F18D7803D8 for ; Fri, 28 Jul 2023 06:41:44 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=nnk+2WzXV3NgHz6YspHgfFuZ/QO0H2deNH3Igq+5jl8=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-IronPort-AV:X-IronPort-AV:X-Received:X-ExtLoop1:X-IronPort-AV:X-IronPort-AV:X-Received:From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:X-Gm-Message-State:Content-Transfer-Encoding; s=20140610; t=1690526503; v=1; b=fMQ3krIImpwrXf0YO97Y/oEMrZAk1G01xTozLYjtZx5gx9yiHBw2NHscPEdRjGIj3odwWxl1 kQl0+Fq4lKIpOc0+sUjb1eb8QMDyGFFYIMmCcH6sYnS6pO1mlxYiJkoUM+bcb6hq5EsD6NcFenC leINFjLZBzwzHP9hG0utArQk= X-Received: by 127.0.0.2 with SMTP id iVlvYY7687511xENfMMxN0nO; Thu, 27 Jul 2023 23:41:43 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.27093.1690526502582894223 for ; Thu, 27 Jul 2023 23:41:42 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10784"; a="434804285" X-IronPort-AV: E=Sophos;i="6.01,236,1684825200"; d="scan'208";a="434804285" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2023 23:41:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10784"; a="762496051" X-IronPort-AV: E=Sophos;i="6.01,236,1684825200"; d="scan'208";a="762496051" X-Received: from liyi4-desktop.ccr.corp.intel.com ([10.239.153.10]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2023 23:41:04 -0700 From: "Li, Yi" To: devel@edk2.groups.io Cc: Gerd Hoffmann , Jiewen Yao , Xiaoyu Lu , Guomin Jiang Subject: [edk2-devel] [PATCH 11/29] CryptoPkg/openssl: move compiler_flags to buildinf.c Date: Fri, 28 Jul 2023 14:39:57 +0800 Message-Id: <3d4a9e455c2d23675c53014faf488862dfdf6207.1690444292.git.yi1.li@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,yi1.li@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: uZMD81h34UaqexgPVipX1llHx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=fMQ3krII; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io From: Gerd Hoffmann 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 Cc: Jiewen Yao Cc: Xiaoyu Lu Cc: Guomin Jiang --- 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 (#107350): https://edk2.groups.io/g/devel/message/107350 Mute This Topic: https://groups.io/mt/100406054/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-