-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Is there an existing issue for this?
- I have searched existing issues
Bug Type
- Firmware
- Tool
- Unit Test
What packages are impacted?
MdePkg, CryptoPkg
Which targets are impacted by this bug?
DEBUG, RELEASE
Current Behavior
My DXE driver will hit LNK1237 error when using IntrinsicLib.
BaseIntrinsicLib.lib(MemoryIntrinsics.obj) : fatal error LNK1237: during code generation, compiler introduced reference to symbol 'CompareMem' defined in module 'BaseMemoryLibRepStr.lib(CompareMemWrapper.obj)' compiled with /GL
Finished generating code
NMAKE : fatal error U1077: 'C:\BEA\BuildTools\VS2019_5d18eea\VC\bin\Hostx86\x64\link.exe' : return code '0x4d5'
Stop.
The problem is raised because IntrinsicLib.inf overwrites CC_FLAGS to remove /GL while it references to BaseMemoryLib which is built with /GL flag.
I've checking why /GL f lag is removed in the log. However it gets me further confused: f754e61
It said the modification is to:
- enable /GL optimization building on OpensslLib.
- add DDK3790 compiler option for IA32.
However the code is inconsistent with the change in IntrinsicLib.inf
Expected Behavior
Build process should be completed without stop.
Steps To Reproduce
In your DXE driver, C code, add the following lines:
static UINT8 array[20] = { 0 }
This will introduce memset() call by C compiler.
In the INF file, add IntrinsicLib into [LibraryClasses]
build your module....then LNK1237 error hit.
Build Environment
- OS(s): Windows 11
- Tool Chain(s): VS2019
Version Information
Commit: EDK2 later than f754e61
Urgency
Medium
Are you going to fix this?
Someone else needs to fix it
Do you need maintainer feedback?
Maintainer feedback requested
Anything else?
No response