From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: leif.lindholm@linaro.org, liming.gao@intel.com, yonghong.zhu@intel.com, Ard Biesheuvel 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: [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: Fri, 15 Sep 2017 23:11:32 -0000 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(-) 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