-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TCBZ2596: Added FltUsedLib to MdePkg
added FltUsedLib, submitted a feature request to TianoCore
- Loading branch information
1 parent
378ba56
commit ddf32c3
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** @file | ||
Lib to include if using floats | ||
Copyright (C) Microsoft Corporation. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
// You need to include this to let the compiler know we are going to use floating point | ||
int _fltused = 0x9875; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## @file | ||
# Lib to include if using floats | ||
# | ||
# Copyright (C) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
## | ||
|
||
[Defines] | ||
INF_VERSION = 0x00010005 | ||
BASE_NAME = FltUsedLib | ||
FILE_GUID = C004F180-9FE2-4D2B-8318-BADC2A231774 | ||
MODULE_TYPE = BASE | ||
VERSION_STRING = 1.0 | ||
LIBRARY_CLASS = FltUsedLib | ||
|
||
# | ||
# The following information is for reference only and not required by the build tools. | ||
# | ||
# VALID_ARCHITECTURES = IA32 X64 AARCH64 | ||
# | ||
|
||
[Sources] | ||
FltUsedLib.c | ||
|
||
[Packages] | ||
MdePkg/MdePkg.dec | ||
|
||
[BuildOptions] | ||
# Disable GL due to linker error LNK1237 | ||
# https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk1237?view=vs-2017 | ||
MSFT:*_*_*_CC_FLAGS = /GL- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# FltUsedLib | ||
|
||
This library provides a global (fltused) that needs to be defined anywhere floating point operations are used. | ||
The C compiler produces the _fltused symbol by default, this is just to satisfy the linker. | ||
|
||
## Using | ||
|
||
To use FltUsedLib, just include it in the INF of the module that uses floating point. | ||
|
||
```inf | ||
[LibraryClasses] | ||
BaseLib | ||
BaseMemoryLib | ||
FltUsedLib | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters