From patchwork Sun Jul 17 10:34:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 72170 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp175541qga; Sun, 17 Jul 2016 03:35:06 -0700 (PDT) X-Received: by 10.98.34.66 with SMTP id i63mr35547334pfi.130.1468751704628; Sun, 17 Jul 2016 03:35:04 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id l189si4988541pfl.125.2016.07.17.03.35.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jul 2016 03:35:04 -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; 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 dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B7B861A1E3A; Sun, 17 Jul 2016 03:35: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 343751A1E24 for ; Sun, 17 Jul 2016 03:35:47 -0700 (PDT) Received: by mail-wm0-x22d.google.com with SMTP id o80so81853209wme.1 for ; Sun, 17 Jul 2016 03:34:58 -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=XoJd7YGcTk/QTzPLUe9F2ssfwRlCv0clY6oq05EE8z/+g+gfaWY6MJ8LFPcNNDwRan p2EJgcSrnLkvhzkYrS5r8v5nidoakZlPcU3MpdhgWBhyI2WDkrMuZ9FXV3Xvv6bsez9d hMbdPbjf22sj6qXHq7S51n493Y00R04zD/fq4= 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=MOfX5bTIUcF6bLoAKt5ktJAakgqJp5RQF82orvbG++8EGmT5Fy1mMOcho/wJRcdxz5 8yDXBZxOgPg21tB5PteilxdqsSbLh62v8HS3bYmRE6LNDHb8YjgjAN0ooBQL5L1vjnK6 LP1ti4XHPTEsH9Tg0axI68nfP+IOa403WaJjdMVBrECErMVxdv1MEq0W3QOs1c0HUr8T dQ7Q0vGyapAx7r3N39+uuUcM7pd5Cud9pXXLffu1uFIjQQPKXFU8Pm/wnY4rI4q+Riir R1jJgDN6dNs/JLLaF1mFAiDJTLAgou/yR6/zVWSbICmNsPFDcsFTCqWQ7PgiJvJ/2o6E 0vAA== X-Gm-Message-State: ALyK8tIamKsl21Vo+ZZ/WXmkQ82JsFxIfoLH07/Ipq6UzL7+VyWNFQM9KUQ28G9YMYdSYlA0 X-Received: by 10.28.94.18 with SMTP id s18mr10837242wmb.44.1468751697482; Sun, 17 Jul 2016 03:34:57 -0700 (PDT) Received: from localhost.localdomain (ip16-2-212-87.adsl2.static.versatel.nl. [87.212.2.16]) by smtp.gmail.com with ESMTPSA id d64sm7075922wmc.22.2016.07.17.03.34.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 Jul 2016 03:34:56 -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: Sun, 17 Jul 2016 12:34:42 +0200 Message-Id: <1468751686-28047-6-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468751686-28047-1-git-send-email-ard.biesheuvel@linaro.org> References: <1468751686-28047-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v3 5/9] 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 , ting.ye@intel.com, qin.long@intel.com 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