From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by ml01.01.org (Postfix) with ESMTP id 661D81A1DEC for ; Thu, 11 Aug 2016 20:27:21 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 11 Aug 2016 20:27:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,508,1464678000"; d="scan'208";a="747641061" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 11 Aug 2016 20:27:20 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 11 Aug 2016 20:27:19 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 11 Aug 2016 20:27:19 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.8]) with mapi id 14.03.0248.002; Fri, 12 Aug 2016 11:27:17 +0800 From: "Gao, Liming" To: Ard Biesheuvel , "edk2-devel@lists.01.org" , "leif.lindholm@linaro.org" , "Zhu, Yonghong" Thread-Topic: [edk2] [PATCH 1/2] BaseTools ARM AARCH64: pass CC flags to linker for XIP modules as well Thread-Index: AQHR88GW1q4Auh5DJUaSDoxxsdfWPKBEq1KA Date: Fri, 12 Aug 2016 03:27:16 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155EA890@shsmsx102.ccr.corp.intel.com> References: <1470914055-28034-1-git-send-email-ard.biesheuvel@linaro.org> In-Reply-To: <1470914055-28034-1-git-send-email-ard.biesheuvel@linaro.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 1/2] BaseTools ARM AARCH64: pass CC flags to linker for XIP modules as well X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2016 03:27:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Ard Biesheuvel > Sent: Thursday, August 11, 2016 7:14 PM > To: edk2-devel@lists.01.org; leif.lindholm@linaro.org; Gao, Liming > ; Zhu, Yonghong > Cc: Ard Biesheuvel > Subject: [edk2] [PATCH 1/2] BaseTools ARM AARCH64: pass CC flags to linke= r > for XIP modules as well >=20 > Commit 478f50990a ("BaseTools GCC: add the compiler flags to the linker > command line") added the compiler flags to the linker command line, > which is required for LTO to function correctly, since it involves code > generation at link time. >=20 > This patch failed to update the build rules for XIP modules on AARCH64, > which not only requires the ordinary CC flags but also the XIP CC flags > to prevent the LTO backend to, e.g., emit code that does not adhere to > the strict alignment rules we impose for code that may execute with the > MMU off. >=20 > So update the XIP link rules as well. Since AARCH64 and ARM are not > supported by any toolchains in the GCCLD build rule family, drop the > reference to GCCLD while we're at it. >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > BaseTools/Conf/build_rule.template | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/BaseTools/Conf/build_rule.template > b/BaseTools/Conf/build_rule.template > index 6191957e0e70..7e2c6a96583d 100755 > --- a/BaseTools/Conf/build_rule.template > +++ b/BaseTools/Conf/build_rule.template > @@ -310,7 +310,7 @@ > "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist > $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS) >=20 >=20 > -[Static-Library-File.SEC.AARCH64, Static-Library-File.PEI_CORE.AARCH64, > Static-Library-File.PEIM.AARCH64] > +[Static-Library-File.SEC.AARCH64, Static-Library-File.PEI_CORE.AARCH64, > Static-Library-File.PEIM.AARCH64,Static-Library-File.SEC.ARM, Static-Libr= ary- > File.PEI_CORE.ARM, Static-Library-File.PEIM.ARM] > > *.lib >=20 > @@ -320,8 +320,8 @@ > > $(DEBUG_DIR)(+)$(MODULE_NAME).dll >=20 > - > - "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) -Wl,--star= t- > group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(DLINK2_FLAGS) > + > + "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) -Wl,--star= t- > group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) > $(CC_XIPFLAGS) $(DLINK2_FLAGS) > "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst} >=20 >=20 > -- > 2.7.4 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel