Did you like my workaround? :)
GenC.py:
———
@@ -1077,6 +1071,9 @@ def CreateLibraryPcdCode(Info, AutoGenC,
     if PcdItemType == TAB_PCDS_FIXED_AT_BUILD or PcdItemType == 
TAB_PCDS_FEATURE_FLAG:
         key = ".".join((Pcd.TokenSpaceGuidCName,Pcd.TokenCName))
         
+        if DatumType == 'VOID*' and Array == '[]':
+          AutoGenH.Append('extern const %s _gPcd_FixedAtBuild_%s%s;\n' 
%('UINT8', TokenCName, Array))
+        else:
         AutoGenH.Append('extern const %s _gPcd_FixedAtBuild_%s%s;\n' 
%(DatumType, TokenCName, Array))
         AutoGenH.Append('#define %s  %s_gPcd_FixedAtBuild_%s\n' %(GetModeName, 
Type, TokenCName))
         AutoGenH.Append('//#define %s  ASSERT(FALSE)  // It is not allowed to 
set value for a FIXED_AT_BUILD PCD\n' % SetModeName)
———
Now LTO works fine.


On 08 нояб. 2014 г., at 13:29, Sergey Isakov <[email protected]> wrote:

> Declaration VOID* is wrong initially. It comes from 
> IntelFrameworkModulePkg.dec
> ——
> [PcdsFixedAtBuild, PcdsPatchableInModule]
>   ## FFS filename to find the default BMP Logo file.
>   # @Prompt FFS Name of Boot Logo File
>   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile |{ 0x99, 0x8b, 0xB2, 
> 0x7B, 0xBB, 0x61, 0xD5, 0x11, 0x9A, 0x5D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D 
> }|VOID*|0x40000003
> 
>   ## FFS filename to find the shell application.
>   # @Prompt FFS Name of Shell Application
>   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0xB7, 0xD6, 0x7A, 
> 0xC5, 0x15, 0x05, 0xA8, 0x40, 0x9D, 0x21, 0x55, 0x16, 0x52, 0x85, 0x4E, 0x37 
> }|VOID*|0x40000004
> 
> ———
> Really these are GUIDs and must be initialized other way, not here.
> 
> Sergey
> 
> On 08 нояб. 2014 г., at 10:50, Sergey Isakov <[email protected]> wrote:
> 
>> 
>> On 08 нояб. 2014 г., at 0:08, Scott Duplichan <[email protected]> wrote:
>> 
>>> 
>>> AutoGen.h:50:20: warning:
>>> type of '_gPcd_FixedAtBuild_PcdShellFile' does not match original 
>>> declaration
>>> extern const VOID* _gPcd_FixedAtBuild_PcdShellFile[];
>>> 
>>> AutoGen.c:277:43: note: previously declared here
>>> GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 
>>> _gPcd_FixedAtBuild_PcdShellFile[16] =
>>> { 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 
>>> 0x68, 0xD0, 0xB4, 0xD1 };
>> 
>> I also encounter this.  And PcdLogoFile
>> Is there any workaround for this.?
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> edk2-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to