From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::244; helo=mail-wr0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) (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 83EC621B02833 for ; Thu, 7 Dec 2017 12:49:21 -0800 (PST) Received: by mail-wr0-x244.google.com with SMTP id v22so8867459wrb.0 for ; Thu, 07 Dec 2017 12:53:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=a7P2x9tdn3tRGcD1xa7MZVZv6nTTJpTCUUQAKmWrtWI=; b=f4qbsqFkr8Ves8AB8GrXl7LrId52mBqZhndVjRmkfHAtOWQBHXqTUHLZua5bq3vOhv B2KpZW1ACKyZX77X044HLxkS6V9xMRSfPeiptWLBevHecCGEbYN6gNoZFW04IWMyq+Ts RonnHZkzt+BNA6ZCOjeQpCasFxAyCiKgZcyJw= 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:in-reply-to :references; bh=a7P2x9tdn3tRGcD1xa7MZVZv6nTTJpTCUUQAKmWrtWI=; b=P9dtQbN7oI/izbs8rPzkLlv6ttK9O6reu3FfTYoltgkEh+1C4yli0tuL3IJXbiXPzw M6kGxYs+MJhFmd8fDyisp1EeYhOkmfeYwnU8ndXwCH4Qe1DfDgTcoI+0YOTChHb43N3V cM/CxfRAkPuf9CeoEFcDcN1m0cPG4XGm7CXPSw1Hx4rkd2ewEKbzwOSt45dJjoJt5msv CDP1RMZ8Nd5tGiNaUews8BLA7Dqyszev4UODGzXRiLpbtL5IF0bLvx8582sOUKo2tGcf x7xVxM7Z/1Umu4NLscvmaN0TND4jqUjMEwcz04sQf43L+oxPG5Ol8wi9EbwDsjg+bv6K cLug== X-Gm-Message-State: AJaThX6macdlI3O/K+ocUpuZTVXwZFkwL5zjw9LdFGZUXyNDRmmYXCIl QVccUzKZDC8m9STBdEZoPU4sVFxwVf4= X-Google-Smtp-Source: AGs4zMZ0MfGWu1ZR+XMIma0CeZyVDlxSsSjuGQdjacdli737pFRTGhK1AdMvG1NaCHgjwQxE5Z7eiQ== X-Received: by 10.223.158.13 with SMTP id u13mr23917489wre.134.1512680033117; Thu, 07 Dec 2017 12:53:53 -0800 (PST) Received: from localhost.localdomain ([160.171.158.223]) by smtp.gmail.com with ESMTPSA id v195sm35123wmf.25.2017.12.07.12.53.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 12:53:52 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, liming.gao@intel.com, yonghong.zhu@intel.com, steven.shi@intel.com, evan.lloyd@arm.com, lersek@redhat.com, Ard Biesheuvel Date: Thu, 7 Dec 2017 20:52:50 +0000 Message-Id: <20171207205250.16312-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171207205250.16312-1-ard.biesheuvel@linaro.org> References: <20171207205250.16312-1-ard.biesheuvel@linaro.org> Subject: [PATCH v3 3/3] BaseTool/tools_def GCC5: enable optimization for ARM/AARCH64 DEBUG 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: Thu, 07 Dec 2017 20:49:21 -0000 Enable optimization for DEBUG builds, to make it more usable in terms of performance, and to give more coverage to the LTO builds. Also, some diagnostics are only enabled when optimization is enabled. NOOPT builds can now also be created, which will retain the behavior DEBUG builds had previously. Note that this aligns ARM and AARCH64 with the x86 architectures, which already use optimization for DEBUG builds. In order to preserve existing behavior for users of older toolchains, keep GCC49 and older as-is. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Acked-by: Laszlo Ersek --- v3: add Laszlo's ack BaseTools/Conf/tools_def.template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 896ec1a9f077..98ab6dd45e81 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -5517,8 +5517,8 @@ RELEASE_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os *_GCC5_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS) *_GCC5_ARM_CC_XIPFLAGS = DEF(GCC5_ARM_CC_XIPFLAGS) - DEBUG_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -O0 - DEBUG_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) + DEBUG_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable + DEBUG_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm RELEASE_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm @@ -5551,8 +5551,8 @@ RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKS *_GCC5_AARCH64_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS) *_GCC5_AARCH64_CC_XIPFLAGS = DEF(GCC5_AARCH64_CC_XIPFLAGS) - DEBUG_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -O0 -mcmodel=small - DEBUG_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 + DEBUG_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=small + DEBUG_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch -mcmodel=small 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 -- 2.11.0