Is there an existing issue for this?
Bug Type
What packages are impacted?
Platform/ARM/VExpressPkg
Which targets are impacted by this bug?
RELEASE
Current Behavior
When compiling commit 0dfaa1f or later, the following compile errors/warnings are encountered:
The error experienced is:
| edk2-platforms/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c:1559:3: error: implicit declaration of function 'InitialiseProcStrings' [-Wimplicit-function-declaration]
| 1559 | InitialiseProcStrings ();
| | ^~~~~~~~~~~~~~~~~~~~~
| edk2-platforms/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c: At top level:
| edk2-platforms/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c:1161:1: error: 'CopyString' defined but not used [-Werror=unused-function]
| 1161 | CopyString (
| | ^~~~~~~~~~
| edk2-platforms/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c:1132:3: error: 'StringMapping' defined but not used [-Werror=unused-variable]
| 1132 | } StringMapping[] = {
| | ^~~~~~~~~~~~~
All of this is because the uses of InitialiseProcStrings, CopyString, and StringMapping are either inside of #ifdef ENABLE_TPM or are referenced outside of their definition inside of said ifdef.
I was able to get around this issue by moving the '#ifdef ENABLE_TPM' from above PopulatePlatformTpmInfoSpmMm(), roughly line 1180, to be above StringMapping[], roughly line 1128. Also, in InitializePlatformRepository(), move InitialiseProcStrings down to be inside '#ifdef ENABLE_TPM'.
I'm not 100% sure this is the correct behavior, but seems to work for my use cases.
Expected Behavior
Compile cleanly, without warnings or errors
Steps To Reproduce
Update to the latest SHA of edk2-platforms, make sure ENABLE_TPM is disabled, then attempt to compile with GCC 15
Build Environment
- OS(s): Yocto Project
- Tool Chain(s): GCC 15.2
Version Information
commit 0dfaa1f45ffc2d6ff80c287fb7029dc9b774480a
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
Is there an existing issue for this?
Bug Type
What packages are impacted?
Platform/ARM/VExpressPkg
Which targets are impacted by this bug?
RELEASE
Current Behavior
When compiling commit 0dfaa1f or later, the following compile errors/warnings are encountered:
The error experienced is:
| edk2-platforms/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c:1559:3: error: implicit declaration of function 'InitialiseProcStrings' [-Wimplicit-function-declaration]
| 1559 | InitialiseProcStrings ();
| | ^~~~~~~~~~~~~~~~~~~~~
| edk2-platforms/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c: At top level:
| edk2-platforms/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c:1161:1: error: 'CopyString' defined but not used [-Werror=unused-function]
| 1161 | CopyString (
| | ^~~~~~~~~~
| edk2-platforms/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c:1132:3: error: 'StringMapping' defined but not used [-Werror=unused-variable]
| 1132 | } StringMapping[] = {
| | ^~~~~~~~~~~~~
All of this is because the uses of InitialiseProcStrings, CopyString, and StringMapping are either inside of #ifdef ENABLE_TPM or are referenced outside of their definition inside of said ifdef.
I was able to get around this issue by moving the '#ifdef ENABLE_TPM' from above PopulatePlatformTpmInfoSpmMm(), roughly line 1180, to be above StringMapping[], roughly line 1128. Also, in InitializePlatformRepository(), move InitialiseProcStrings down to be inside '#ifdef ENABLE_TPM'.
I'm not 100% sure this is the correct behavior, but seems to work for my use cases.
Expected Behavior
Compile cleanly, without warnings or errors
Steps To Reproduce
Update to the latest SHA of edk2-platforms, make sure ENABLE_TPM is disabled, then attempt to compile with GCC 15
Build Environment
Version Information
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