From patchwork Fri Sep 15 23:13:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 112763 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1153141qgf; Fri, 15 Sep 2017 16:14:34 -0700 (PDT) X-Received: by 10.84.238.16 with SMTP id u16mr13189556plk.217.1505517273939; Fri, 15 Sep 2017 16:14:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505517273; cv=none; d=google.com; s=arc-20160816; b=DQcROL93Ug4CW/OFkhGUVgAjaULbI4o2ETDw/8ZRZGCEUmOQH8NpSzD3VhW3lma/Xg kMWQ8iZZHOw1YIxzyWpF0otR8hrEKFghePpmTAtQDZG2wpFa+WGnN2MfoI8bh9NLjkkR rHHiRFjjxDNnUhSMiSYBAruxH6oQlzNYPU1CYLnEgq3TisyvNavObpoI748Sfm4ze3Zp uYx7cbIvjaPuC6rvVDSx5VUBVOoj8Yg0w6Z6Ou59f31jC6KxVgKrQCQK/xdaj59xvcBd xTzBYEuZcPXJwLIW9fav6cp/kszO89bxSrCffrWgwn167SHMrpgP+FBTFvl4pDGkOj3s 845A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=sfYA6C8Kg3MA2ES5RuMXTlWekvPzlKOtHO0cGE0Nvm0=; b=nhosF5aY3Pqfw4IDSSgNBswCvCyJnN0ugQL1j9O7Rw6rFqf4D2ggbFC6C8s2KeNJd0 QOm00c+FIg584DLokd0jbzCq3gMxe5+548fYbZ3piVIHiguLfat6IYKQfymCStq18bSt /cRT0TDJBhWLKulD7M0K7GxjutIRjSXfDSLuPWB3PHDrNOL14qzx5n1kdgfGoi2lGJJR d7XHxQTtIcNHhGr1y6RoDuU4DaeYWgYwcxHKzbwCy1cXjDUS8vXuEpovtEq5oWjG9wT/ nXk9kfRD3/qRfZWVfd3QjnP9QONylj8YzIez9OAAemfkEg7AOnjlLxZLMTM2clrBNYLB /IAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gCEPyLyA; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id w1si1256887pgm.675.2017.09.15.16.14.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Sep 2017 16:14:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gCEPyLyA; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7D0B220945B8D; Fri, 15 Sep 2017 16:11:32 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-pg0-x232.google.com (mail-pg0-x232.google.com [IPv6:2607:f8b0:400e:c05::232]) (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 16E5D20945B64 for ; Fri, 15 Sep 2017 16:11:32 -0700 (PDT) Received: by mail-pg0-x232.google.com with SMTP id u18so2308314pgo.0 for ; Fri, 15 Sep 2017 16:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=c4EKH4Y42Uv+UaiMmE1QV9uEAcRWbJpPA292lT9KrQE=; b=gCEPyLyAinoS77kJDwkjiKNpOYA77hLsNroD8YjECiFD10c5w1Km96qzaUIWmG5mk3 QD3RDur5qerWs35S24RwyjcPPd7Q1UixhI4Zz3nQpfQEzngvbJyPdUHTH4hpxhu6hQe6 3Gf1+Q2q9FzEvOGqUXGByMP9lVvSPhYrfhvpQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=c4EKH4Y42Uv+UaiMmE1QV9uEAcRWbJpPA292lT9KrQE=; b=r8k1hzgJCk9PrxbaAuPepBFug+fi05cPXqmzDaD9fqmhlyW4kueHe38rlpEm9EiSSB m+xIP4c8ibFNgwSTRcJfOkflEaKEi7aaGL1ndDykgBZ1RLihlE7aLL85hyUYMjjj2bv5 TDtpYC9qa1YOJbh9fVi+I/N6DsqtpCdsT1IGpTcK0ptsPcAvMgfrcHNNUeeGjbbBCa7W p0nK4kNYaLQc6ApwH3zzkIiwgWapQsCn0Lch/oKtKLICHF2+9o9pCRMteaC9Kjq3tykK rZBK1WllxYIOCIDjLfcGmjZvBgXP5aHF3aieHVWJj6vuot4ZwSC221/jqoPEVtHfYei7 Vp9Q== X-Gm-Message-State: AHPjjUhpiURy98AAvDuLJWEEYAZZUlHFvXAjUtQyJRtip72OBMap+5nu g1t7Ss0KuvvvvOnj/AlOFw== X-Google-Smtp-Source: ADKCNb4I3xYblZH3YKAeuWgvafpfuBe0eQxa1Hmyba6rREXSJpyyoiSLIUSfkpmrnKSpAFPYh+S+QA== X-Received: by 10.84.232.133 with SMTP id i5mr29185515plk.396.1505517272262; Fri, 15 Sep 2017 16:14:32 -0700 (PDT) Received: from localhost.localdomain ([12.145.98.253]) by smtp.gmail.com with ESMTPSA id 28sm4095073pfl.14.2017.09.15.16.14.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Sep 2017 16:14:31 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 15 Sep 2017 16:13:56 -0700 Message-Id: <20170915231356.23936-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [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: , Cc: Ard Biesheuvel , liming.gao@intel.com, leif.lindholm@linaro.org MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 --- BaseTools/Conf/tools_def.template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm Reviewed-by: Liming Gao 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 #################################################################################### #