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