]> git.proxmox.com Git - mirror_edk2.git/blob - StdLib/StdLib.inc
StdLib: Patches and updates for ARM.
[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
9 ##########
10 # Socket Support Libraries
11 ##########
12
13 [LibraryClasses.common]
14 BsdSocketLib|StdLib/BsdSocketLib/BsdSocketLib.inf
15 EfiSocketLib|StdLib/EfiSocketLib/EfiSocketLib.inf
16 UseSocketDxe|StdLib/UseSocketDxe/UseSocketDxe.inf
17
18 [LibraryClasses.Common.UEFI_APPLICATION]
19 #
20 # C Standard Libraries
21 #
22 LibC|StdLib/LibC/LibC.inf
23 LibCType|StdLib/LibC/Ctype/Ctype.inf
24 LibLocale|StdLib/LibC/Locale/Locale.inf
25 LibMath|StdLib/LibC/Math/Math.inf
26 LibSignal|StdLib/LibC/Signal/Signal.inf
27 LibStdio|StdLib/LibC/Stdio/Stdio.inf
28 LibStdLib|StdLib/LibC/StdLib/StdLib.inf
29 LibString|StdLib/LibC/String/String.inf
30 LibTime|StdLib/LibC/Time/Time.inf
31 LibUefi|StdLib/LibC/Uefi/Uefi.inf
32 LibWchar|StdLib/LibC/Wchar/Wchar.inf
33
34 # Common Utilities for Networking Libraries
35 LibNetUtil|StdLib/LibC/NetUtil/NetUtil.inf
36
37 # Additional libraries for POSIX functionality.
38 LibErr|StdLib/PosixLib/Err/LibErr.inf
39 LibGen|StdLib/PosixLib/Gen/LibGen.inf
40 LibGlob|StdLib/PosixLib/Glob/LibGlob.inf
41 LibStringlist|StdLib/PosixLib/Stringlist/LibStringlist.inf
42
43 # Libraries for device abstractions within the Standard C Library
44 # Applications should not directly access any functions defined in these libraries.
45 LibGdtoa|StdLib/LibC/gdtoa/gdtoa.inf
46 DevConsole|StdLib/LibC/Uefi/Devices/daConsole.inf
47 DevShell|StdLib/LibC/Uefi/Devices/daShell.inf
48 DevUtility|StdLib/LibC/Uefi/Devices/daUtility.inf
49
50 ###
51 # Select the correct TimerLib instance depending upon whether running under
52 # an emulation environment, or not.
53 !ifndef $(EMULATE)
54 # Not running in an Emulation Environment
55 [LibraryClasses.IA32.UEFI_APPLICATION]
56 TimerLib|PerformancePkg/Library/DxeTscTimerLib/DxeTscTimerLib.inf
57
58 [LibraryClasses.X64.UEFI_APPLICATION]
59 TimerLib|PerformancePkg/Library/DxeTscTimerLib/DxeTscTimerLib.inf
60
61 [LibraryClasses.IPF.UEFI_APPLICATION]
62 PalLib|MdePkg/Library/UefiPalLib/UefiPalLib.inf
63 TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf
64
65 [LibraryClasses.ARM.UEFI_APPLICATION]
66 NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
67 TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
68
69
70 !else
71 # Use this instance if Running in an Emulation Environment.
72 [LibraryClasses.Common.UEFI_APPLICATION]
73 TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
74
75 [LibraryClasses.ARM.UEFI_APPLICATION]
76 NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
77
78 !endif
79
80 [Components]
81 # BaseLib and BaseMemoryLib need to be built with the /GL- switch when using the Microsoft
82 # tool chain. This is required so that the library functions can be resolved during
83 # the second pass of the linker during Link-time-code-generation.
84 ###
85 MdePkg/Library/BaseLib/BaseLib.inf {
86 <BuildOptions>
87 MSFT:*_*_*_CC_FLAGS = /X /Zc:wchar_t /GL-
88 }
89
90 MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf {
91 <BuildOptions>
92 MSFT:*_*_*_CC_FLAGS = /X /Zc:wchar_t /GL-
93 }
94
95 ##########
96 # Socket Layer
97 ##########
98 StdLib/SocketDxe/SocketDxe.inf
99
100
101 ##############################################################################
102 #
103 # See the additional comments below if you plan to run applications under an
104 # emulation environment.
105 #
106
107 [BuildOptions]
108 !ifndef $(EMULATE)
109 # These Build Options are used when building the Standard Libraries to be run
110 # on real hardware.
111 INTEL:*_*_*_CC_FLAGS = /Qfreestanding
112 MSFT:*_*_*_CC_FLAGS = /X /Zc:wchar_t
113 GCC:*_*_*_CC_FLAGS = -nostdinc -nostdlib
114 RVCT:*_*_*_CC_FLAGS = --library_interface=none -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm -DNT32dvm
115 ARMGCC:*_*_*_CC_FLAGS = -nostdinc -nostdlib -Wno-unknown-pragmas -Wno-unused -Wno-format-zero-length -DNT32dvm
116
117 !else
118 # The Build Options, below, are only used when building the Standard Libraries
119 # to be run under an emulation environment. They disable the clock() system call
120 # which is currently incompatible with the most emulation environments.
121 # Select the correct TimerLib instance, above.
122 INTEL:*_*_IA32_CC_FLAGS = /Od /D NT32dvm
123 MSFT:*_*_IA32_CC_FLAGS = /Od /D NT32dvm
124 GCC:*_*_IA32_CC_FLAGS = -O0 -DNT32dvm
125 !endif
126
127