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 46AE9740048 for ; Thu, 26 Oct 2023 15:30:12 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=PcH7tlCpW0UKkkxkNcpzp3sSsJc2s3fouDKWcJmEEF0=; c=relaxed/simple; d=groups.io; h=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:Content-Transfer-Encoding; s=20140610; t=1698334211; v=1; b=Wwm7lAPzWBnrSp5VkQsMn8uInkJ15bN+AHEN8BRKiuRajI2902xm3Cl51zeo5DnrTr0rrtr4 YETVI6mdjlmpb/m0qbIDBMcshtrJGOeNINFGh6ikQPKaVsoWKx0I13R42XGSqmysZRP5o//tumg CS8wjDnZXOcwTPvXi4skjkLw= X-Received: by 127.0.0.2 with SMTP id tb63YY7687511xIMXwouro8f; Thu, 26 Oct 2023 08:30:11 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mx.groups.io with SMTP id smtpd.web10.203466.1698334210120130173 for ; Thu, 26 Oct 2023 08:30:10 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10875"; a="6197982" X-IronPort-AV: E=Sophos;i="6.03,253,1694761200"; d="scan'208";a="6197982" X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2023 08:30:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10875"; a="875991311" X-IronPort-AV: E=Sophos;i="6.03,253,1694761200"; d="scan'208";a="875991311" X-Received: from njayapra-mobl.gar.corp.intel.com ([10.213.103.39]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2023 08:30:07 -0700 From: "Jayaprakash, N" To: devel@edk2.groups.io Cc: Jayaprakash N , Rebecca Cran , Michael D Kinney , Kloper Dimitry Subject: [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: fix missing nanf definition in StdLib Date: Thu, 26 Oct 2023 20:59:59 +0530 Message-Id: <20231026152959.877-2-n.jayaprakash@intel.com> In-Reply-To: <20231026152959.877-1-n.jayaprakash@intel.com> References: <20231026152959.877-1-n.jayaprakash@intel.com> 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,n.jayaprakash@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: QU3iESB0i7neJAMRlxAjZ88tx7686176AA= 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=Wwm7lAPz; 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 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4576 File StdLib/Include/math.h:406 defines NAN constant as __nanf.__val. The problem is that __nanf is never defined. Fix is simple: define __nanf in similar way as __infinityf This fix has been provided through the below PR on edk2-libc repo https://github.com/tianocore/edk2-libc/pull/9. Cc: Rebecca Cran Cc: Michael D Kinney Cc: Jayaprakash N Signed-off-by: Kloper Dimitry --- StdLib/LibC/LibC.inf | 1 + StdLib/LibC/Main/nanf_ieee754.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 StdLib/LibC/Main/nanf_ieee754.c diff --git a/StdLib/LibC/LibC.inf b/StdLib/LibC/LibC.inf index ad6a117..93e32e8 100644 --- a/StdLib/LibC/LibC.inf +++ b/StdLib/LibC/LibC.inf @@ -34,6 +34,7 @@ Main/isnand_ieee754.c Main/isnanf_ieee754.c Main/infinityf_ieee754.c + Main/nanf_ieee754.c Main/Main.c Main/HtoNtoH.c Main/ByteSwap.c diff --git a/StdLib/LibC/Main/nanf_ieee754.c b/StdLib/LibC/Main/nanf_ieee754.c new file mode 100644 index 0000000..8e56d32 --- /dev/null +++ b/StdLib/LibC/Main/nanf_ieee754.c @@ -0,0 +1,15 @@ +/* + * IEEE-compatible nanf.c -- public domain. + */ +#include +#include + +#include +#include + +const union __float_u __nanf = +#if BYTE_ORDER == BIG_ENDIAN + { { 0x7f, 0xc0, 0, 0 } }; +#else + { { 0, 0, 0xc0, 0x7f } }; +#endif -- 2.40.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110117): https://edk2.groups.io/g/devel/message/110117 Mute This Topic: https://groups.io/mt/102202277/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-