From patchwork Fri Jul 15 22:16:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 72148 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp21024qga; Fri, 15 Jul 2016 15:17:03 -0700 (PDT) X-Received: by 10.98.89.23 with SMTP id n23mr25352433pfb.34.1468621023606; Fri, 15 Jul 2016 15:17:03 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id eg8si7461525pac.40.2016.07.15.15.17.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jul 2016 15:17:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 277201A1F36; Fri, 15 Jul 2016 15:17:48 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (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 8C41F1A1F32 for ; Fri, 15 Jul 2016 15:17:46 -0700 (PDT) Received: by mail-wm0-x22d.google.com with SMTP id r190so12098363wmr.0 for ; Fri, 15 Jul 2016 15:16:59 -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:in-reply-to:references; bh=eMjmvrRp7sGvFlfy3/oNnoFfCGezUtBjNWMw0WjylXE=; b=IRFdn3uKYNgvwvhCtONy3xxtTrvjf9b+3vOVxhq3K3iGEaCrSMV+Uyt8bdyMDlsRHC 7TjZAmcXFeag2Fo5yMoaBvKRW7LaTjZNcRRMzkgiJUozHEoKC9SuwGDOnqANWma20ahn HKo+9ob16Yigs1yRYirlPISVh45G61DdZTqBw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eMjmvrRp7sGvFlfy3/oNnoFfCGezUtBjNWMw0WjylXE=; b=fqha4dwZ7+RYTMPZ8yoFU5W5Ph3fCTDsyqm2nnKvUnEgyOdK1OGaiYFfWCTXHXyQo1 key66OhUMa42MUWRVaPXJ2XhKKDJNDLJIsILIWaOv01tFasQuasRGTQcrJVDF4ECvWP5 EJ/ixJRYQrQ5/KGrJ4A/d0SXIIXIVxuAg/KNoxGhTTbFCPBdPUih5KidZ9gVf7N4CUIJ 9IQfattLrF2kCdLa1AkZQ90xAYMkS6kNme+E91GH5gBGl/p8CbhRsNl2a1hNSoq50EdM cKOCTjYRhl48j/goCW4P9M0jlzBrqaZE2vzDSSypC8Df+GOx2w1mmhtMMremsu5W8esW v8ag== X-Gm-Message-State: ALyK8tJMfIvxPL7Ga+w5faXMnrSaf2uxClrdZqiNzwKwc9+IWgk2iEN5WIY/r2VMQtWIUvS2 X-Received: by 10.194.103.131 with SMTP id fw3mr2808071wjb.98.1468621017895; Fri, 15 Jul 2016 15:16:57 -0700 (PDT) Received: from localhost.localdomain ([188.203.148.129]) by smtp.gmail.com with ESMTPSA id kr1sm2736108wjc.46.2016.07.15.15.16.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Jul 2016 15:16:57 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com, afish@apple.com, liming.gao@intel.com, steven.shi@intel.com, yonghong.zhu@intel.com, michael.d.kinney@intel.com, jordan.l.justen@intel.com Date: Sat, 16 Jul 2016 00:16:09 +0200 Message-Id: <1468620971-5960-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468620971-5960-1-git-send-email-ard.biesheuvel@linaro.org> References: <1468620971-5960-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 3/5] BaseTools/tools_def: enable Os optimization for GCC X64 builds X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: bruce@cran.org.uk, pbonzini@redhat.com, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Now that we switched to the __builtin_ms_va_list VA_LIST type for GCC/X64, we can trust the compiler to do the right thing even under optimization, and so we can enable -Os optimization all the way back to GCC44, and drop the -D define that prevents the use of the __builtin VA_LIST types. Note that this requires the -maccumulate-outgoing-args switch as well. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- BaseTools/Conf/tools_def.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 2065fa34998f..a7da6741611d 100644 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4353,7 +4353,7 @@ DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address -mcmodel=large -fno-asynchronous-unwind-tables +DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -Os -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=large -fno-asynchronous-unwind-tables DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections -z common-page-size=0x20 DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry ReferenceAcpiTable -u ReferenceAcpiTable DEFINE GCC44_IA32_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map