From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1721A20945BEE for ; Sun, 17 Sep 2017 22:03:21 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 17 Sep 2017 22:06:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,411,1500966000"; d="scan'208";a="1015473911" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 17 Sep 2017 22:06:23 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 17 Sep 2017 22:06:23 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 17 Sep 2017 22:06:23 -0700 Received: from shsmsx152.ccr.corp.intel.com ([169.254.6.93]) by shsmsx102.ccr.corp.intel.com ([169.254.2.175]) with mapi id 14.03.0319.002; Mon, 18 Sep 2017 13:06:20 +0800 From: "Gao, Liming" To: Leif Lindholm , Ard Biesheuvel CC: "edk2-devel@lists.01.org" , "Zhu, Yonghong" Thread-Topic: [PATCH] BaseTools/tools_def AARCH64: enable frame pointers for RELEASE builds Thread-Index: AQHTLnhlXw6zlKQb2ESuxtQ0qa12x6K2mTGAgAOBlbA= Date: Mon, 18 Sep 2017 05:06:20 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E153203@SHSMSX152.ccr.corp.intel.com> References: <20170915231356.23936-1-ard.biesheuvel@linaro.org> <20170916073343.xamfucw5i52wyczc@bivouac.eciton.net> In-Reply-To: <20170916073343.xamfucw5i52wyczc@bivouac.eciton.net> 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] BaseTools/tools_def AARCH64: enable frame pointers for RELEASE builds X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 05:03: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: Leif Lindholm [mailto:leif.lindholm@linaro.org] >Sent: Saturday, September 16, 2017 3:34 PM >To: Ard Biesheuvel >Cc: edk2-devel@lists.01.org; Gao, Liming ; Zhu, >Yonghong >Subject: Re: [PATCH] BaseTools/tools_def AARCH64: enable frame pointers >for RELEASE builds > >On Fri, Sep 15, 2017 at 04:13:56PM -0700, Ard Biesheuvel wrote: >> Commit 8f0b62a5dac0 ("BaseTools/tools_def AARCH64: enable frame >pointers >> for DEBUG builds") removed the -fomit-frame-pointer switch from the >> shared CFLAGS between AARCH64 DEBUG and RELEASE build, and move it >to >> the RELEASE specific ones, so that DEBUG builds can produce a backtrace >> when a crash occurs. >> >> This is actually a useful thing to have for RELEASE builds as well. >> AArch64 has 30 general purpose registers, and so the performance hit of >> having a frame pointer is unlikely to be noticeable, nor are the >> additional 8 bytes of stack space likely to present a problem. >> >> So remove -fomit-frame-pointer altogether this time. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel > >Looks sensible. >Reviewed-by: Leif Lindholm > >/ > Leif > >> --- >> BaseTools/Conf/tools_def.template | 10 +++++----- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/BaseTools/Conf/tools_def.template >b/BaseTools/Conf/tools_def.template >> index cbb5024c1bd3..e93c2a0bf1ef 100755 >> --- a/BaseTools/Conf/tools_def.template >> +++ b/BaseTools/Conf/tools_def.template >> @@ -4990,7 +4990,7 @@ RELEASE_GCC47_ARM_CC_FLAGS =3D >DEF(GCC47_ARM_CC_FLAGS) -Wno-unused-but-set-v >> *_GCC47_AARCH64_CC_XIPFLAGS =3D >DEF(GCC47_AARCH64_CC_XIPFLAGS) >> >> DEBUG_GCC47_AARCH64_CC_FLAGS =3D DEF(GCC47_AARCH64_CC_FLAGS) >-O0 >> -RELEASE_GCC47_AARCH64_CC_FLAGS =3D DEF(GCC47_AARCH64_CC_FLAGS) >-Wno-unused-but-set-variable -fomit-frame-pointer >> +RELEASE_GCC47_AARCH64_CC_FLAGS =3D >DEF(GCC47_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable >> NOOPT_GCC47_AARCH64_CC_FLAGS =3D DEF(GCC47_AARCH64_CC_FLAGS) >-O0 >> >> >########################################################### >######################### >> @@ -5130,7 +5130,7 @@ RELEASE_GCC48_ARM_CC_FLAGS =3D >DEF(GCC48_ARM_CC_FLAGS) -Wno-unused-but-set-v >> *_GCC48_AARCH64_CC_XIPFLAGS =3D >DEF(GCC48_AARCH64_CC_XIPFLAGS) >> >> DEBUG_GCC48_AARCH64_CC_FLAGS =3D DEF(GCC48_AARCH64_CC_FLAGS) >-O0 >> -RELEASE_GCC48_AARCH64_CC_FLAGS =3D DEF(GCC48_AARCH64_CC_FLAGS) >-Wno-unused-but-set-variable -fomit-frame-pointer >> +RELEASE_GCC48_AARCH64_CC_FLAGS =3D >DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable >> NOOPT_GCC48_AARCH64_CC_FLAGS =3D DEF(GCC48_AARCH64_CC_FLAGS) >-O0 >> >> >########################################################### >######################### >> @@ -5272,7 +5272,7 @@ RELEASE_GCC49_ARM_CC_FLAGS =3D >DEF(GCC49_ARM_CC_FLAGS) -Wno-unused-but-set-v >> DEBUG_GCC49_AARCH64_DLINK_FLAGS =3D >DEF(GCC49_AARCH64_DLINK_FLAGS) -z common-page-size=3D0x1000 >> DEBUG_GCC49_AARCH64_DLINK_XIPFLAGS =3D -z common-page-size=3D0x20 >> >> -RELEASE_GCC49_AARCH64_CC_FLAGS =3D >DEF(GCC49_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno- >unused-const-variable -mcmodel=3Dtiny -fomit-frame-pointer >> +RELEASE_GCC49_AARCH64_CC_FLAGS =3D >DEF(GCC49_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno- >unused-const-variable -mcmodel=3Dtiny >> RELEASE_GCC49_AARCH64_DLINK_FLAGS =3D >DEF(GCC49_AARCH64_DLINK_FLAGS) >> >> NOOPT_GCC49_AARCH64_CC_FLAGS =3D >DEF(GCC49_AARCH64_CC_FLAGS) -O0 -mcmodel=3Dsmall >> @@ -5428,7 +5428,7 @@ RELEASE_GCC5_ARM_DLINK_FLAGS =3D >DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKS >> DEBUG_GCC5_AARCH64_DLINK_FLAGS =3D >DEF(GCC5_AARCH64_DLINK_FLAGS) -z common-page-size=3D0x1000 >> DEBUG_GCC5_AARCH64_DLINK_XIPFLAGS =3D -z common-page-size=3D0x20 >> >> -RELEASE_GCC5_AARCH64_CC_FLAGS =3D DEF(GCC5_AARCH64_CC_FLAGS) >-flto -Wno-unused-but-set-variable -Wno-unused-const-variable - >mcmodel=3Dtiny -fomit-frame-pointer >> +RELEASE_GCC5_AARCH64_CC_FLAGS =3D DEF(GCC5_AARCH64_CC_FLAGS) >-flto -Wno-unused-but-set-variable -Wno-unused-const-variable - >mcmodel=3Dtiny >> RELEASE_GCC5_AARCH64_DLINK_FLAGS =3D >DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os - >L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=3D-pass- >through=3D-llto-aarch64 -Wno-lto-type-mismatch >> >> NOOPT_GCC5_AARCH64_CC_FLAGS =3D DEF(GCC5_AARCH64_CC_FLAGS) - >O0 -mcmodel=3Dsmall >> @@ -5513,7 +5513,7 @@ RELEASE_CLANG35_ARM_CC_FLAGS =3D >DEF(CLANG35_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(P >> *_CLANG35_AARCH64_CC_XIPFLAGS =3D DEF(GCC_AARCH64_CC_XIPFLAGS) >> >> DEBUG_CLANG35_AARCH64_CC_FLAGS =3D >DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) >-O0 >> -RELEASE_CLANG35_AARCH64_CC_FLAGS =3D >DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) >-Oz -fomit-frame-pointer >> +RELEASE_CLANG35_AARCH64_CC_FLAGS =3D >DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) >-Oz >> >> >########################################################### >######################### >> # >> -- >> 2.11.0 >>