Hi,
One more problem. Your patch for Base.h brakes XCODE5 compilation. I may
propose the better one
----------
--- Base-orig.h 2014-11-11 09:43:31.000000000 +0300
+++ Base.h 2014-11-11 10:11:52.000000000 +0300
@@ -441,7 +441,7 @@ struct _LIST_ENTRY {
@return The aligned size.
**/
#define _INT_SIZE_OF(n) ((sizeof (n) + sizeof (UINTN) - 1) &~(sizeof (UINTN) -
1))
-
+#define GCC_VERSION (__GNUC__ * 10 + __GNUC_MINOR__)
#if defined(__CC_ARM)
//
// RVCT ARM variable argument list support.
@@ -472,7 +472,8 @@ struct _LIST_ENTRY {
#define VA_COPY(Dest, Start) __va_copy (Dest, Start)
-#elif defined(__GNUC__) && !defined(NO_BUILTIN_VA_FUNCS)
+//#elif defined(__GNUC__) && !defined(NO_BUILTIN_VA_FUNCS)
+#elif defined(__GNUC__) && !defined(__x86_64__) || __APPLE__
//
// Use GCC built-in macros for variable argument lists.
//
@@ -491,6 +492,19 @@ typedef __builtin_va_list VA_LIST;
#define VA_COPY(Dest, Start) __builtin_va_copy (Dest, Start)
+#elif defined(__GNUC__) && defined(__x86_64__) && (GCC_VERSION >= 48)
+
+ typedef __builtin_ms_va_list VA_LIST;
+
+ #define VA_START(Marker, Parameter) __builtin_ms_va_start (Marker,
Parameter)
+
+ #define VA_ARG(Marker, TYPE) ((sizeof (TYPE) < sizeof (UINTN)) ?
(TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker,
TYPE)))
+
+ #define VA_END(Marker) __builtin_ms_va_end (Marker)
+
+ #define VA_COPY(Dest, Start) __builtin_ms_va_copy (Dest, Start)
+
+
#else
///
/// Variable used to traverse the list of arguments. This type can vary by
----------
About UINT16 I also encounter and made a quirky workaround
----
if DatumType == 'VOID*' and Array == '[]':
if TokenCName == 'PcdShellSupplier' or TokenCName ==
'PcdFdtDevicePath':
AutoGenH.Append('extern const %s _gPcd_FixedAtBuild_%s%s;\n'
%('UINT16', TokenCName, Array))
else:
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))
----
I hope it should be resolved on a level of these PCD definitions. But I can
live with these workarounds.
Wishes,
Sergey
On 11.11.2014, at 5:29, Scott Duplichan wrote:
> Hello Sergey,
>
> Thanks. It is pretty close. All the 8-bit ones are fixed, but the 16-bit ones
> still fail:
>
> d:\uefi\buildtest-016\edk2\Build\OvmfX64\DEBUG_GCC49\X64\ShellPkg\Application\Shell\Shell\DEBUG\AutoGen.c:196:44:
> note: previously declared here
> GLOBAL_REMOVE_IF_UNREFERENCED const UINT16
> _gPcd_FixedAtBuild_PcdShellSupplier[7] = {69, 68, 75, 32, 73, 73, 0 };
>
> d:\uefi\buildtest-016\edk2\Build\ArmPlatform\DEBUG_GCC49\AARCH64\EmbeddedPkg\Ebl\Ebl\DEBUG\AutoGen.c:278:15:
> note: previously declared here
> GLOBAL_REMOVE_IF_UNREFERENCED const UINT16
> _gPcd_FixedAtBuild_PcdFdtDevicePath[1] = {0 };
>
> d:\uefi\buildtest-016\edk2\Build\ArmPlatform\RELEASE_GCC49\AARCH64\EmbeddedPkg\Ebl\Ebl\DEBUG\AutoGen.c:264:15:
> note: previously declared here
> --strip-unneeded -R .eh_frame
> d:\uefi\buildtest-016\edk2\Build\ArmPlatform\RELEASE_GCC49\AARCH64\ArmPlatformPkg\Bds\Bds\DEBUG\ArmPlatformBds.dll
> GLOBAL_REMOVE_IF_UNREFERENCED const UINT16
> _gPcd_FixedAtBuild_PcdFdtDevicePath[1] = {0 };
>
> Thanks,
> Scott
>
> From: Sergey Isakov [mailto:[email protected]]
> Sent: Saturday, November 08, 2014 06:14 AM
> To: [email protected]
> Subject: Re: [edk2] Status of gcc link time optimization for EDK2 use
>
> 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
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk_______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel