From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6BC2420945B77 for ; Sat, 16 Sep 2017 00:30:48 -0700 (PDT) Received: by mail-wm0-x233.google.com with SMTP id g206so12627086wme.0 for ; Sat, 16 Sep 2017 00:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fExzi1WBW8yfjPvZv6LMCTt5iVOhMSvug5GIKnKto+w=; b=TEh+pT1LxH+FfxQOYJ9hua1q2bfYiR98L4ng/T5rJnEHs7ESYQbaN6jgA2pmYCGgFd 96DqPP788K/61VJhEGIhJhXIz669XU/gYG2Zq4v/dQ7yMwOYcKmwov8yBG93QU6W8QBy LoCCgXINratrcYYAhIGgQt+QviNczEkh7eSx8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fExzi1WBW8yfjPvZv6LMCTt5iVOhMSvug5GIKnKto+w=; b=knMYXppKxdpZVKHK3w8oOuJFtUVlZJLsczukv1T3KXI2Olf1Pbpxq7l9jUsyY4O5J3 9OMnYDBB5gA11xeC4JP98FoH3bZ7VbtIUvVcQzwweC/Yw6YQuViHRpjyrQa8t8BAiGML uA2MEDI5ClS6L60w+m3dBrXG3Y6ABGeu1XjTsKuou1VmgpA2tyw9VdVeCS3OpZzzURbw CWZrpne6V8kxCXZTLNJGd8gxpctMDzZQaU33TTTUF7ma+EjkcRqm8SfMsHtz/SXDXTKu bjPLJoAb23HS+amLpjYWB0rOoWoVvqRKll1PSfAGiQmgRWEFCE/ra0HxMeEZaSB19fHz f9JA== X-Gm-Message-State: AHPjjUijqtylPUdid1+4+4oJxoQ3jKqZdi506Li6/dH462HxQBOG8Pqb HTwah432mFCip9iZ70J3uksN4A== X-Google-Smtp-Source: AOwi7QDBEBeJC6MyY2INIOaAPd+ZXagFNlqsr82PkFtH+md3kHKnGWsLRUCWhx3OmUEEGYVm5TiJ8Q== X-Received: by 10.28.175.75 with SMTP id y72mr3883594wme.20.1505547227594; Sat, 16 Sep 2017 00:33:47 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id k18sm1969197wmd.22.2017.09.16.00.33.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Sep 2017 00:33:45 -0700 (PDT) Date: Sat, 16 Sep 2017 08:33:43 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, liming.gao@intel.com, yonghong.zhu@intel.com Message-ID: <20170916073343.xamfucw5i52wyczc@bivouac.eciton.net> References: <20170915231356.23936-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20170915231356.23936-1-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) 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: Sat, 16 Sep 2017 07:30:48 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 = DEF(GCC47_ARM_CC_FLAGS) -Wno-unused-but-set-v > *_GCC47_AARCH64_CC_XIPFLAGS = DEF(GCC47_AARCH64_CC_XIPFLAGS) > > DEBUG_GCC47_AARCH64_CC_FLAGS = DEF(GCC47_AARCH64_CC_FLAGS) -O0 > -RELEASE_GCC47_AARCH64_CC_FLAGS = DEF(GCC47_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable -fomit-frame-pointer > +RELEASE_GCC47_AARCH64_CC_FLAGS = DEF(GCC47_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable > NOOPT_GCC47_AARCH64_CC_FLAGS = DEF(GCC47_AARCH64_CC_FLAGS) -O0 > > #################################################################################### > @@ -5130,7 +5130,7 @@ RELEASE_GCC48_ARM_CC_FLAGS = DEF(GCC48_ARM_CC_FLAGS) -Wno-unused-but-set-v > *_GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC48_AARCH64_CC_XIPFLAGS) > > DEBUG_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -O0 > -RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable -fomit-frame-pointer > +RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable > NOOPT_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -O0 > > #################################################################################### > @@ -5272,7 +5272,7 @@ RELEASE_GCC49_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -Wno-unused-but-set-v > DEBUG_GCC49_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 > DEBUG_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 > > -RELEASE_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=tiny -fomit-frame-pointer > +RELEASE_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=tiny > RELEASE_GCC49_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) > > NOOPT_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -O0 -mcmodel=small > @@ -5428,7 +5428,7 @@ RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKS > DEBUG_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 > DEBUG_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 > > -RELEASE_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=tiny -fomit-frame-pointer > +RELEASE_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=tiny > RELEASE_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch > > NOOPT_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -O0 -mcmodel=small > @@ -5513,7 +5513,7 @@ RELEASE_CLANG35_ARM_CC_FLAGS = DEF(CLANG35_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(P > *_CLANG35_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS) > > DEBUG_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -O0 > -RELEASE_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -Oz -fomit-frame-pointer > +RELEASE_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -Oz > > #################################################################################### > # > -- > 2.11.0 >