From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com []) by mx.groups.io with SMTP id smtpd.web10.2731.1588057338787952898 for ; Tue, 28 Apr 2020 00:02:19 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: guomin.jiang@intel.com) IronPort-SDR: xGfx3u+Q44FDcd5E8jLrR+KZk9J57X3MagZzbKvOzE9iLIO57JIAq1KFyCdq12v2mQa2IGkIgv uy9zSSpMnWXA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2020 00:01:18 -0700 IronPort-SDR: 0iKxpI8J+8/mIPd62+O8An1qIpR9p47rR6+T2NJzQeTRPLZCmgXGaVzsf8X8ZHGZ5n9apyin9M cLyKTJHxGbMA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,327,1583222400"; d="scan'208";a="292764373" Received: from guominji-mobl.ccr.corp.intel.com ([10.238.5.173]) by fmsmga002.fm.intel.com with ESMTP; 28 Apr 2020 00:01:17 -0700 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao Subject: [PATCH v3 1/2] MdePkg/BaseLib: Add _fltused to feed MSVC compiler Date: Tue, 28 Apr 2020 15:01:14 +0800 Message-Id: <20200428070115.830-2-guomin.jiang@intel.com> X-Mailer: git-send-email 2.25.1.windows.1 In-Reply-To: <20200428070115.830-1-guomin.jiang@intel.com> References: <20200428070115.830-1-guomin.jiang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2596 Out of edk2 may need _fltused symbol such as mu_plus OnScreenKeyboard and UiToolKit. those driver will define the symbol to feed MSVC, but it will conflict with CryptoPkg. so move the symbol to BaseLib. Signed-off-by: Guomin Jiang Cc: Michael D Kinney Cc: Liming Gao --- MdePkg/Library/BaseLib/BaseLib.inf | 3 ++- MdePkg/Library/BaseLib/FltUsed.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 MdePkg/Library/BaseLib/FltUsed.c diff --git a/MdePkg/Library/BaseLib/BaseLib.inf b/MdePkg/Library/BaseLib/BaseLib.inf index 3586beb0ab..bab31c07c7 100644 --- a/MdePkg/Library/BaseLib/BaseLib.inf +++ b/MdePkg/Library/BaseLib/BaseLib.inf @@ -1,7 +1,7 @@ ## @file # Base Library implementation. # -# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
# Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.
# @@ -60,6 +60,7 @@ String.c FilePaths.c BaseLibInternals.h + FltUsed.c | MSFT [Sources.Ia32] Ia32/WriteTr.nasm diff --git a/MdePkg/Library/BaseLib/FltUsed.c b/MdePkg/Library/BaseLib/FltUsed.c new file mode 100644 index 0000000000..c065594266 --- /dev/null +++ b/MdePkg/Library/BaseLib/FltUsed.c @@ -0,0 +1,14 @@ +/** @file + Declare _fltused symbol for MSVC + + MSVC need this symbol for float, andd it here to feed MSVC. it may remove + if MSVC not need it any more. + + Copyright (c) 2020 - 2020, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +// +// Just for MSVC float +// +int _fltused = 0x1; -- 2.25.1.windows.1