mirror of https://github.com/acidanthera/audk.git
RedfishPkg/RedfishCrtLib: fix unresolved external symbol issue
-Fix below compiler error reported in edk2 CI. ERROR - Linker #2001 from JsonLib.lib(load.obj) : unresolved external symbol __ftol2 -The file MathFtol.c is copied from IntrinsicLib in CryptoPkg. -Add MathFtol.c to EccCheck IgnoreFiles. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com>
This commit is contained in:
parent
d4c76fa17d
commit
d9a6e7b0b8
|
@ -0,0 +1,37 @@
|
||||||
|
/** @file This file is copied from CryptoPkg/Library/IntrinsicLib/Ia32/MathFtol.c
|
||||||
|
64-bit Math Worker Function.
|
||||||
|
The 32-bit versions of C compiler generate calls to library routines
|
||||||
|
to handle 64-bit math. These functions use non-standard calling conventions.
|
||||||
|
|
||||||
|
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
||||||
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Floating point to integer conversion.
|
||||||
|
*/
|
||||||
|
__declspec(naked) void
|
||||||
|
_ftol2 (
|
||||||
|
void
|
||||||
|
)
|
||||||
|
{
|
||||||
|
_asm {
|
||||||
|
fistp qword ptr [esp-8]
|
||||||
|
mov edx, [esp-4]
|
||||||
|
mov eax, [esp-8]
|
||||||
|
ret
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
__declspec(naked) void
|
||||||
|
_ftol2_sse (
|
||||||
|
void
|
||||||
|
)
|
||||||
|
{
|
||||||
|
_asm {
|
||||||
|
fistp dword ptr [esp-4]
|
||||||
|
mov eax,[esp-4]
|
||||||
|
ret
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
||||||
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||||
|
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
#
|
#
|
||||||
|
@ -23,6 +24,9 @@
|
||||||
[Sources]
|
[Sources]
|
||||||
RedfishCrtLib.c
|
RedfishCrtLib.c
|
||||||
|
|
||||||
|
[Sources.IA32]
|
||||||
|
Ia32/MathFtol.c | MSFT
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
BaseLib
|
BaseLib
|
||||||
SortLib
|
SortLib
|
||||||
|
@ -35,4 +39,5 @@
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
RedfishPkg/RedfishPkg.dec
|
RedfishPkg/RedfishPkg.dec
|
||||||
|
|
||||||
|
[BuildOptions]
|
||||||
|
MSFT:*_*_IA32_CC_FLAGS = /GL-
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
# CI configuration for NetworkPkg
|
# CI configuration for NetworkPkg
|
||||||
#
|
#
|
||||||
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
|
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
|
||||||
|
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
##
|
##
|
||||||
{
|
{
|
||||||
|
@ -38,6 +39,7 @@
|
||||||
"PrivateInclude/Crt/string.h",
|
"PrivateInclude/Crt/string.h",
|
||||||
"PrivateInclude/Crt/time.h",
|
"PrivateInclude/Crt/time.h",
|
||||||
"PrivateLibrary/RedfishCrtLib/RedfishCrtLib.c",
|
"PrivateLibrary/RedfishCrtLib/RedfishCrtLib.c",
|
||||||
|
"PrivateLibrary/RedfishCrtLib/Ia32/MathFtol.c",
|
||||||
"Include/Library/RedfishCrtLib.h",
|
"Include/Library/RedfishCrtLib.h",
|
||||||
##
|
##
|
||||||
## For jansson library open source
|
## For jansson library open source
|
||||||
|
|
Loading…
Reference in New Issue