diff mbox

[edk2,1/3] Update CryptoPkg build with RVCT

Message ID 1408618099-10203-2-git-send-email-olivier.martin@arm.com
State New
Headers show

Commit Message

Olivier Martin Aug. 21, 2014, 10:48 a.m. UTC
From: Ronald Cron <ronald.cron@arm.com>

Update RVCT compile options for the CryptoPkg to compile.
Add support for stack protector with BaseStackCheckLib to link.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
---
 CryptoPkg/CryptoPkg.dsc                     | 21 +++++++++++++++++++++
 CryptoPkg/Library/OpensslLib/OpensslLib.inf |  3 ++-
 2 files changed, 23 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc
index 046a6ce..80e3706 100644
--- a/CryptoPkg/CryptoPkg.dsc
+++ b/CryptoPkg/CryptoPkg.dsc
@@ -59,6 +59,9 @@ 
   #
   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
 
+  # Add support for stack protector
+  NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+
 [LibraryClasses.common.PEIM]
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
 
@@ -80,6 +83,24 @@ 
 [LibraryClasses.common.UEFI_APPLICATION]
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
 
+###############################################################################
+#
+# BuildOptions Section - Define the module specific tool chain flags that
+#                        should be used as the default flags for a module.
+#                        These flags are appended to any standard flags that
+#                        are defined by the build process.
+#
+# -JCryptoPkg/Include : To disable the use of the system includes provided by
+#                       the RVCT toolchain.
+# --diag_remark=1     : To make the warning "#1-D: last line of file ends
+#                       without a newline" just a remark such that the
+#                       build doesn't stop as warnings are considered as
+#                       errors.
+#
+################################################################################
+[BuildOptions]
+RVCT:*_*_ARM_CC_FLAGS = -JCryptoPkg/Include --diag_remark=1
+
 ################################################################################
 #
 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
index 5b3c421..c891eea 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -667,6 +667,7 @@ 
    #  144: a value of type <type> cannot be used to initialize an entity of type <type>
    #  513: a value of type <type> cannot be assigned to an entity of type <type>
    #  188: enumerated type mixed with another type (i.e. passing an integer as an enum without a cast)
-   RVCT:*_*_ARM_CC_FLAGS                  = $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) --library_interface=aeabi_clib99 --fpu=vfpv3 -DTHIRTY_TWO_BIT --diag_suppress=1295,550,1293,111,68,177,223,144,513,188
+   # 1296: Extended constant initialiser used
+   RVCT:*_*_ARM_CC_FLAGS                  = $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) --library_interface=aeabi_clib99 --fpu=vfpv3 -DTHIRTY_TWO_BIT --diag_suppress=1296,1295,550,1293,111,68,177,223,144,513,188
    XCODE:*_*_IA32_CC_FLAGS                = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w -DTHIRTY_TWO_BIT
    XCODE:*_*_X64_CC_FLAGS                 = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w -DSIXTY_FOUR_BIT