From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (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 7D21A1A1E04 for ; Tue, 2 Aug 2016 07:39:43 -0700 (PDT) Received: by mail-wm0-x234.google.com with SMTP id f65so412069028wmi.0 for ; Tue, 02 Aug 2016 07:39:43 -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=yDkmgGUWyjmVmtbwANLISNK2q4lWckRAYnXTcNaVNAw=; b=QSmD11NdmSNEACudwy7B6KtpnWty0gy15Nq8zBOzijuLNNqoOaGhhKRX9zWkYNrOW7 SNQXBIm4uZRF8i+SKKgT0Mmc/qY0NK/6kN3zi0qDL/7Pi4PL6SLsAsRHzteXsg0bZFPW a2Ow1iXy7tlFt1STnYGNd4zwGZMpvVb/Gk6iY= 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=yDkmgGUWyjmVmtbwANLISNK2q4lWckRAYnXTcNaVNAw=; b=B+GUrr2HWAyAU4ZK3pJ4ztCrhzoQEFChPMQFIJRn5TiXUTyAyCtVj7B5l+Bz+EebNQ nRj80JbuGxA+UOwCKMtKDTU3CMgZSEY6dU5ZD0qyL7+kokQobEVMeMdhNCN59IY3eDLi Y4ib5SMxweKNPPBEBMVLOzPH0moKjx2mamr8XF16bbsn7D0ezSOJGJEW3AWBrcuNHyMp uYhZ2xaZiQxrYwJ2UeEJ15wbb1tgu4mkxAJA3ifbAVlcGb6gc59ThTVrHTc6k9F7Ui0C YshDZBSvSJwXnVnU6eGxfsEjY+3wBDSnoRKRwkYaCvMxTGQPN9dCED6IHQDCI6hD/UwC vEZQ== X-Gm-Message-State: AEkoouvyitP0LjgmMlIQKcQjqPv/NZVXV5+eaz2kDd1p6alGzykI4KZN+TISbt/OnS/z1R/5 X-Received: by 10.194.133.104 with SMTP id pb8mr56376913wjb.139.1470148782006; Tue, 02 Aug 2016 07:39:42 -0700 (PDT) Received: from localhost.localdomain (3.red-81-34-118.dynamicip.rima-tde.net. [81.34.118.3]) by smtp.gmail.com with ESMTPSA id v203sm3375254wmv.2.2016.08.02.07.39.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Aug 2016 07:39:41 -0700 (PDT) From: Ard Biesheuvel To: yonghong.zhu@intel.com, liming.gao@intel.com, jordan.l.justen@intel.com, edk2-devel@lists.01.org, leif.lindholm@linaro.org Cc: sigmaepsilon92@gmail.com, Ard Biesheuvel Date: Tue, 2 Aug 2016 16:39:31 +0200 Message-Id: <1470148772-15712-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470148772-15712-1-git-send-email-ard.biesheuvel@linaro.org> References: <1470148772-15712-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH 2/3] BaseTools GCC5: disable warnings-as-errors for now X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2016 14:39:43 -0000 GCC5 runs in LTO mode, which means it may generate code from an intermediate representation during the link stage, at which time additional diagnostics are run that may emit warnings. Some of these warnings seem to be spurious, e.g., the following warning which is emitted when building OVMF for IA32 or ArmVirtQemu for ARM (but not for X64 resp. AARCH64) .../MdeModulePkg/Library/UefiHiiLib/HiiLib.c: In function 'HiiCreateGuidOpCode.constprop': .../MdeModulePkg/Library/UefiHiiLib/HiiLib.c:3228:10: error: function may return address of local variable [-Werror=return-local-addr] return (UINT8 *)OpCodePointer; ^ .../MdeModulePkg/Library/UefiHiiLib/HiiLib.c:3208:17: note: declared here EFI_IFR_GUID OpCode; ^ lto1: all warnings being treated as errors lto-wrapper: fatal error: gcc returned 1 exit status So before adding the contents of CC_FLAGS to the linker command line, defuse the default '-Werror' by adding '-Wno-error' to DLINK2_FLAGS for GCC5. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- 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 289e75cc3be6..1f55740929d7 100644 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4466,9 +4466,9 @@ DEFINE GCC5_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -flto -fno-builti DEFINE GCC5_IA32_X64_DLINK_COMMON = DEF(GCC49_IA32_X64_DLINK_COMMON) DEFINE GCC5_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) DEFINE GCC5_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) -flto -DEFINE GCC5_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS) +DEFINE GCC5_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS) -Wno-error DEFINE GCC5_X64_DLINK_FLAGS = DEF(GCC49_X64_DLINK_FLAGS) -flto -DEFINE GCC5_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS) +DEFINE GCC5_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS) -Wno-error DEFINE GCC5_ASM_FLAGS = DEF(GCC49_ASM_FLAGS) DEFINE GCC5_ARM_ASM_FLAGS = DEF(GCC49_ARM_ASM_FLAGS) DEFINE GCC5_AARCH64_ASM_FLAGS = DEF(GCC49_AARCH64_ASM_FLAGS) @@ -4476,9 +4476,9 @@ DEFINE GCC5_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) DEFINE GCC5_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) DEFINE GCC5_AARCH64_CC_XIPFLAGS = DEF(GCC49_AARCH64_CC_XIPFLAGS) DEFINE GCC5_ARM_DLINK_FLAGS = DEF(GCC49_ARM_DLINK_FLAGS) -DEFINE GCC5_ARM_DLINK2_FLAGS = DEF(GCC49_ARM_DLINK2_FLAGS) +DEFINE GCC5_ARM_DLINK2_FLAGS = DEF(GCC49_ARM_DLINK2_FLAGS) -Wno-error DEFINE GCC5_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) -DEFINE GCC5_AARCH64_DLINK2_FLAGS = DEF(GCC49_AARCH64_DLINK2_FLAGS) +DEFINE GCC5_AARCH64_DLINK2_FLAGS = DEF(GCC49_AARCH64_DLINK2_FLAGS) -Wno-error DEFINE GCC5_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS) DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS) -- 2.7.4