From nobody Sat May 4 01:55:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1514366834298430.43987610947295; Wed, 27 Dec 2017 01:27:14 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 66CBC22280C33; Wed, 27 Dec 2017 01:22:17 -0800 (PST) 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 EEE6B22280C23 for ; Wed, 27 Dec 2017 01:22:15 -0800 (PST) Received: by mail-wr0-x244.google.com with SMTP id w68so23852691wrc.10 for ; Wed, 27 Dec 2017 01:27:11 -0800 (PST) Received: from localhost.localdomain ([105.137.110.132]) by smtp.gmail.com with ESMTPSA id r68sm44453680wmd.47.2017.12.27.01.27.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Dec 2017 01:27:08 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Lexq07AT0gG0I0Hq7fOTeGn3+3t72KE+G+FMfZiinJY=; b=KTiqBtpSUoHDuyN0LNr5njcgqIG0PNisH9aZkFcsoswIE6k7pEunJkqfodvQWG6/9o hycb8n8631Ejuge69oPKvgJp3n3f5M2skQ7cOW6sNOuHYTb94GQEr963t4A83EqOjRCM w4DsdXah7L4xG49Cjds8VADXm8q1+qDkzUmC0= 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=Lexq07AT0gG0I0Hq7fOTeGn3+3t72KE+G+FMfZiinJY=; b=p5CQaBgW/tLAoEAoyDHafiMsYPvW0jW5vrOczhMIakQwXsEK5bI/uAVJ4xfTcq/nW6 LybQFzQ3uVZd/gwCFv1Olx8cPAxX2boVl8ulBienPlHJCqhSC30eBA5/8NcX/uK3CWMg rv/sU6souardwC7jsBa13l9gjofuApIFp2eo6HbprRpPAqK5tQbVPaRXc+4wS5M2fPc1 mvEStqGwqI2Wp3xIg2SM+EIsT1C386V+e+9Q3Ix5RBEBSyL+2qcX+bC7PkyCPNsIEhty YscB9S6yoFL3Wv5DHINnxN6IiCDU0wEJI0/PM8oBou0sjCqKhmigbhcNDp8rASC7YPko 8ASg== X-Gm-Message-State: AKGB3mJLB4SZUz1oXEUYFd+7Y2rUjtnQfudQTT55kDUw9ZwJZVdiOCww ctVr+kEDzXPfhBhmzPnwr4uECYmd6fc= X-Google-Smtp-Source: ACJfBosKHE8WHOcIzxEENOo1cN7MXVKH8ru5oKxzLgYcdyWJ8YirTsDFHyXa7JsNfGhaRcXEkB6J9A== X-Received: by 10.223.185.61 with SMTP id k58mr28521796wrf.40.1514366829549; Wed, 27 Dec 2017 01:27:09 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, qin.long@intel.com, ting.ye@intel.com Date: Wed, 27 Dec 2017 09:27:01 +0000 Message-Id: <20171227092701.8690-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH] CryptoPkg/OpensslLib AARCH64: disable rather than demote format warning X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We recently added -Wno-error=3Dformat to the OpenSslLib build script to work around an issue in the upstream OpenSSL code. This does not inhibit the warning, but prevents it from breaking the build by not treating it as a fatal error. Unfortunately, this interacts poorly with the -Wno-unused-const-variable option that we added to GCC49 and later. Those versions of GCC ignore -Wno-xxxx options that they don't understand, unless warnings are emitted for another reason, in which case the warning is emitted after all, and in our case, this breaks the build when the non-fatal format warning is emitted. CryptoPkg/Library/OpensslLib/openssl/crypto/asn1/x_int64.c: In function 'ui= nt64_print': CryptoPkg/Library/OpensslLib/openssl/crypto/asn1/x_int64.c:105:32: warning:= format '%ld' expects argument of type 'long int', but argument 3 has type = 'int64_t {aka long long int}' [-Wformat=3D] return BIO_printf(out, "%"BIO_PRI64"d\n", **(int64_t **)pval); ^ CryptoPkg/Library/OpensslLib/openssl/crypto/asn1/x_int64.c:106:28: warning:= format '%lu' expects argument of type 'long unsigned int', but argument 3 = has type 'uint64_t {aka long long unsigned int}' [-Wformat=3D] return BIO_printf(out, "%"BIO_PRI64"u\n", **(uint64_t **)pval); ^ CryptoPkg/Library/OpensslLib/openssl/crypto/asn1/x_int64.c: At top level: cc1: error: unrecognized command line option '-Wno-unused-const-variable' [= -Werror] cc1: all warnings being treated as errors So replace -Wno-error=3Dformat with -Wno-format to suppress the warning entirely. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Long Qin --- CryptoPkg/Library/OpensslLib/OpensslLib.inf | 6 +++--- CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Librar= y/OpensslLib/OpensslLib.inf index 602953eefff7..f3eb19afd34e 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -557,10 +557,10 @@ [BuildOptions] # types appropriate to the format string specified. # GCC:*_*_IA32_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized - GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-error=3Dformat -DNO_MSABI_VA_FUNCS - GCC:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-error=3Dformat + GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-format -DNO_MSABI_VA_FUNCS + GCC:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-format GCC:*_*_ARM_CC_FLAGS =3D $(OPENSSL_FLAGS) - GCC:*_*_AARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dformat + GCC:*_*_AARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-format =20 # suppress the following warnings in openssl so we don't break the build= with warnings-as-errors: # 1295: Deprecated declaration - give arg types diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/= Library/OpensslLib/OpensslLibCrypto.inf index f697243f9787..88134b5b5ff3 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf @@ -518,10 +518,10 @@ [BuildOptions] # types appropriate to the format string specified. # GCC:*_*_IA32_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized - GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-error=3Dformat -DNO_MSABI_VA_FUNCS - GCC:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-error=3Dformat + GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-format -DNO_MSABI_VA_FUNCS + GCC:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-format GCC:*_*_ARM_CC_FLAGS =3D $(OPENSSL_FLAGS) - GCC:*_*_AARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dformat + GCC:*_*_AARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-format =20 # suppress the following warnings in openssl so we don't break the build= with warnings-as-errors: # 1295: Deprecated declaration - give arg types --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel