From patchwork Thu Aug 21 10:48:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Martin X-Patchwork-Id: 35738 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2BFC52055D for ; Thu, 21 Aug 2014 10:48:53 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kx10sf73736270pab.0 for ; Thu, 21 Aug 2014 03:48:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=41X8LexkonW7rQ4ifw2q4W0PSrdpTkBskXAtljiWQw0=; b=BoqYjN2xzRhCu2hbxI6uAD8Q5pPnBICLxbBeri/wKNh6VtQbxo6BLm0eS2WEXrQ3/r hDTomKwsyXqq1E2MAtRry17jihthcVQzcZ6sRuLY/7GmOTn8mxgXuxGSLlCVM+oLxZ8/ CAr0TLyWeK+dFfr9IQbEEqsjLTrSGcS7QQmtED9w7KngymlaCcUC8f/aExnk5YlX6Hxz Zp7xLdsfnXlPdY1vYb3FAKdfEFt5xF+La47q5OFURHNGLaGJns7RN31Ris2ATANjBoad bQCBLhkT6ihMrDUJSFXoDkENTBYtRue70pJqPlQHCBROOFB+0369LWlEd04eWOSDVKgR zhuA== X-Gm-Message-State: ALoCoQnMPzFPom7s1zfQIRWrPC2s8eeRnwRm8rHukmEHr+IL6j2sTDSi6DWKRPpKiVe4G1g7TEKT X-Received: by 10.66.119.174 with SMTP id kv14mr24889539pab.23.1408618132368; Thu, 21 Aug 2014 03:48:52 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.97.134 with SMTP id m6ls719258qge.8.gmail; Thu, 21 Aug 2014 03:48:52 -0700 (PDT) X-Received: by 10.52.87.144 with SMTP id ay16mr62845vdb.43.1408618132252; Thu, 21 Aug 2014 03:48:52 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id wt5si10456945vcb.61.2014.08.21.03.48.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Aug 2014 03:48:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id hy10so10530195vcb.32 for ; Thu, 21 Aug 2014 03:48:52 -0700 (PDT) X-Received: by 10.220.190.197 with SMTP id dj5mr41236122vcb.19.1408618132166; Thu, 21 Aug 2014 03:48:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp124871vcb; Thu, 21 Aug 2014 03:48:51 -0700 (PDT) X-Received: by 10.50.43.193 with SMTP id y1mr3294435igl.32.1408618131594; Thu, 21 Aug 2014 03:48:51 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id z4si4863290igf.20.2014.08.21.03.48.50 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 21 Aug 2014 03:48:51 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XKPvA-0007Af-5z; Thu, 21 Aug 2014 10:48:44 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XKPv7-0007AR-Ng for edk2-devel@lists.sourceforge.net; Thu, 21 Aug 2014 10:48:41 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of arm.com designates 217.140.96.21 as permitted sender) client-ip=217.140.96.21; envelope-from=olivier.martin@arm.com; helo=cam-smtp0.cambridge.arm.com; Received: from fw-tnat.cambridge.arm.com ([217.140.96.21] helo=cam-smtp0.cambridge.arm.com) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1XKPv6-0001Jj-Na for edk2-devel@lists.sourceforge.net; Thu, 21 Aug 2014 10:48:41 +0000 Received: from e102605-lin.cambridge.arm.com (e102605-lin.cambridge.arm.com [10.1.193.159]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id s7LAmRXN011369; Thu, 21 Aug 2014 11:48:27 +0100 From: Olivier Martin To: ting.ye@intel.com Date: Thu, 21 Aug 2014 11:48:17 +0100 Message-Id: <1408618099-10203-2-git-send-email-olivier.martin@arm.com> X-Mailer: git-send-email 1.8.5 In-Reply-To: <1408618099-10203-1-git-send-email-olivier.martin@arm.com> References: <1408618099-10203-1-git-send-email-olivier.martin@arm.com> X-Spam-Score: -2.2 (--) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1XKPv6-0001Jj-Na Cc: ronald.cron@arm.com, edk2-devel@lists.sourceforge.net Subject: [edk2] [PATCH 1/3] Update CryptoPkg build with RVCT X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: olivier.martin@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Ronald Cron 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 Reviewed-By: Olivier Martin --- CryptoPkg/CryptoPkg.dsc | 21 +++++++++++++++++++++ CryptoPkg/Library/OpensslLib/OpensslLib.inf | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) 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 cannot be used to initialize an entity of type # 513: a value of type cannot be assigned to an entity of 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