]> git.proxmox.com Git - mirror_edk2.git/blame - StdLib/StdLib.inc
StdLib: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / StdLib / StdLib.inc
CommitLineData
d7ce7006 1################################################################\r
2# Boilerplate text to be included by any DSC file using the\r
3# Standard Libraries.\r
4#\r
5# The including DSC file must DEFINE the EMULATE macro if\r
6# the application is to be run in an emulation environment.\r
41b152c5 7#\r
cfb25230 8# Copyright (c) 2016, Daryl McDaniel. All rights reserved.<BR>\r
caf89d64 9# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
0a2530ea 10# SPDX-License-Identifier: BSD-2-Clause-Patent\r
d7ce7006 11################################################################\r
12\r
13##########\r
14# Socket Support Libraries\r
15##########\r
16\r
17[LibraryClasses.common]\r
18 BsdSocketLib|StdLib/BsdSocketLib/BsdSocketLib.inf\r
19 EfiSocketLib|StdLib/EfiSocketLib/EfiSocketLib.inf\r
20 UseSocketDxe|StdLib/UseSocketDxe/UseSocketDxe.inf\r
21\r
22[LibraryClasses.Common.UEFI_APPLICATION]\r
a7a8363d 23 ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf\r
6a013e50
DM
24 FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf\r
25 SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf\r
a7a8363d 26 ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf\r
27\r
d7ce7006 28 #\r
29 # C Standard Libraries\r
30 #\r
31 LibC|StdLib/LibC/LibC.inf\r
32 LibCType|StdLib/LibC/Ctype/Ctype.inf\r
33 LibLocale|StdLib/LibC/Locale/Locale.inf\r
34 LibMath|StdLib/LibC/Math/Math.inf\r
35 LibSignal|StdLib/LibC/Signal/Signal.inf\r
36 LibStdio|StdLib/LibC/Stdio/Stdio.inf\r
37 LibStdLib|StdLib/LibC/StdLib/StdLib.inf\r
38 LibString|StdLib/LibC/String/String.inf\r
39 LibTime|StdLib/LibC/Time/Time.inf\r
40 LibUefi|StdLib/LibC/Uefi/Uefi.inf\r
41 LibWchar|StdLib/LibC/Wchar/Wchar.inf\r
42\r
43# Common Utilities for Networking Libraries\r
44 LibNetUtil|StdLib/LibC/NetUtil/NetUtil.inf\r
45\r
46# Additional libraries for POSIX functionality.\r
caf89d64
DM
47 LibPosix|StdLib/PosixLib/PosixLib.inf # Combines LibErr, LibGen, LibGlob, LibStringlist, GetPass into one library\r
48\r
d7ce7006 49 LibErr|StdLib/PosixLib/Err/LibErr.inf\r
50 LibGen|StdLib/PosixLib/Gen/LibGen.inf\r
51 LibGlob|StdLib/PosixLib/Glob/LibGlob.inf\r
52 LibStringlist|StdLib/PosixLib/Stringlist/LibStringlist.inf\r
6c6c850a 53 LibIIO|StdLib/LibC/Uefi/InteractiveIO/IIO.inf\r
54\r
55# Additional, non-standard, libraries\r
56 LibContainer|StdLib/LibC/Containers/ContainerLib.inf\r
d7ce7006 57\r
58# Libraries for device abstractions within the Standard C Library\r
59# Applications should not directly access any functions defined in these libraries.\r
60 LibGdtoa|StdLib/LibC/gdtoa/gdtoa.inf\r
61 DevConsole|StdLib/LibC/Uefi/Devices/daConsole.inf\r
efb419ea
DM
62 DevShell|StdLib/LibC/Uefi/Devices/daShell.inf # DEPRECATED! Please use DevMedia for new code.\r
63 DevMedia|StdLib/LibC/Uefi/Devices/daShell.inf\r
d7ce7006 64 DevUtility|StdLib/LibC/Uefi/Devices/daUtility.inf\r
65\r
16a5fed6 66 LuaLib|AppPkg/Applications/Lua/LuaLib.inf # Lua language library\r
67\r
86a7f720 68[LibraryClasses.ARM]\r
c614ca50 69 NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf\r
3352b62b 70 NULL|StdLib/LibC/Softfloat/Softfloat.inf\r
6ba46a92 71\r
b3933335
OM
72 # Add support for GCC stack protector\r
73 NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf\r
74\r
6ba46a92
HL
75[LibraryClasses.AArch64]\r
76 NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf\r
c614ca50 77\r
1bbb83b5
HL
78 # Use the softfloat library to cover missing hardfloat operations.\r
79 NULL|StdLib/LibC/Softfloat/Softfloat.inf\r
80\r
b3933335
OM
81 # Add support for GCC stack protector\r
82 NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf\r
83\r
d7ce7006 84[Components]\r
85# BaseLib and BaseMemoryLib need to be built with the /GL- switch when using the Microsoft\r
86# tool chain. This is required so that the library functions can be resolved during\r
87# the second pass of the linker during Link-time-code-generation.\r
88###\r
89 MdePkg/Library/BaseLib/BaseLib.inf {\r
90 <BuildOptions>\r
91 MSFT:*_*_*_CC_FLAGS = /X /Zc:wchar_t /GL-\r
92 }\r
93\r
94 MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf {\r
95 <BuildOptions>\r
96 MSFT:*_*_*_CC_FLAGS = /X /Zc:wchar_t /GL-\r
97 }\r
98\r
99##########\r
100# Socket Layer\r
101##########\r
102 StdLib/SocketDxe/SocketDxe.inf\r
103\r
104\r
105##############################################################################\r
106#\r
107# See the additional comments below if you plan to run applications under an\r
108# emulation environment.\r
109#\r
110\r
111[BuildOptions]\r
16a5fed6 112!ifdef $(EMULATE)\r
d7ce7006 113 # The Build Options, below, are only used when building the Standard Libraries\r
16a5fed6 114 # to be run under an emulation environment; such as NT32Pkg.\r
8aa163da 115 # They disable optimization which facillitates debugging under the Emulation environment.\r
c21e7a78
AF
116 INTEL:*_*_IA32_CC_FLAGS = /Od /D UEFI_C_SOURCE\r
117 MSFT:*_*_IA32_CC_FLAGS = /Od /D UEFI_C_SOURCE\r
118 GCC:*_*_IA32_CC_FLAGS = -O0 -DUEFI_C_SOURCE\r
119 RVCT:*_*_*_CC_FLAGS = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm\r
c21e7a78 120 XCODE:*_*_*_CC_FLAGS = -O0 -DUEFI_C_SOURCE -Wno-unused-const-variable -Wno-string-compare -Wno-sometimes-uninitialized\r
16a5fed6 121\r
122!else\r
123 # These Build Options are used when building the Standard Libraries to be run\r
124 # on real hardware.\r
125 INTEL:*_*_*_CC_FLAGS = /Qfreestanding /D UEFI_C_SOURCE\r
126 MSFT:*_*_*_CC_FLAGS = /X /Zc:wchar_t /D UEFI_C_SOURCE\r
127 GCC:*_*_*_CC_FLAGS = -nostdinc -nostdlib -DUEFI_C_SOURCE\r
128 RVCT:*_*_*_CC_FLAGS = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm\r
16a5fed6 129 XCODE:*_*_*_CC_FLAGS = -nostdinc -nostdlib -DUEFI_C_SOURCE -Wno-unused-const-variable -Wno-string-compare -Wno-sometimes-uninitialized\r
d7ce7006 130!endif\r
cfb25230
DM
131\r
132 # Temporarily restrict compiler warnings to those produced by VS2012.\r
133 # Code that fails when these flags are removed will have to be rewritten\r
134 # in order to pass. This may be as simple as renaming an object, but may\r
135 # require more significant changes.\r
136 MSFT:*_VS2015_*_CC_FLAGS = /Wv:11\r
137 MSFT:*_VS2015x86_*_CC_FLAGS = /Wv:11\r
138 MSFT:*_VS2015xASL_*_CC_FLAGS = /Wv:11\r
139 MSFT:*_VS2015x86xASL_*_CC_FLAGS = /Wv:11\r