diff mbox

[edk2] Need for FixedFeaturePcdGet() ?

Message ID 0877601216922E4B83A7129715B5DA2B9A6C574B09@GEORGE.Emea.Arm.com
State New
Headers show

Commit Message

Olivier Martin Jan. 24, 2014, 12:57 a.m. UTC
It actually came back to my mind that GCC has a similar feature ... which has the same name LTO for 'Link Time Optimization': http://gcc.gnu.org/wiki/LinkTimeOptimization

I have just tried it using a quite recent toolchain (arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.8.3 20131129 (release)).

And it saved me 8 bytes!

Without -lto:
FVMAIN_SEC [9%Full] 524288 total, 47648 used, 476640 free
FVMAIN_COMPACT [28%Full] 2621440 total, 748992 used, 1872448 free
FVMAIN [99%Full] 1941376 total, 1941344 used, 32 free

With -lto:
FVMAIN_SEC [9%Full] 524288 total, 47648 used, 476640 free
FVMAIN_COMPACT [28%Full] 2621440 total, 748984 used, 1872456 free
FVMAIN [99%Full] 1941376 total, 1941344 used, 32 free

I am now wondering if the 8 bytes comes from the change of date from Thursday to Friday...
diff mbox

Patch

--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -1077,6 +1077,8 @@  def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd):

         if PcdItemType == TAB_PCDS_FIXED_AT_BUILD and key in Info.ConstPcd:
             AutoGenH.Append('#define _PCD_VALUE_%s %s\n' %(TokenCName, Pcd.DefaultValue))
+        else:
+            AutoGenH.Append('#define _PCD_VALUE_%s %s\n' %(TokenCName, Pcd.DefaultValue)
--------------

After rebuilding my platform (ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A9x4.dsc) in RELEASE build, here is the result:
--------------
     bl   ArmDisableFiq