From nobody Mon May 20 19:20:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112255+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112255+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1702167962; cv=none; d=zohomail.com; s=zohoarc; b=HG3+t6/Cr3NmlY9yDyKIkqKAqi6FwrOhBEuO/qnTCaMApJeZNTq3Uvrz3+8MJ1xD5KeaYFwE/AXnrsI9eEsGSsTN4hqcnwu26/NTWzcnVdim8BQVRjMT9PIE4ZzVq8oF8IlnZNE8VK4iM2TNaQafdyKzhR11/YojRIOWdBguzSs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1702167962; h=Content-Type:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Sender:Subject:Subject:To:To:Message-Id; bh=BDbJ0uJtJhPE0oMiqhbhLgfnibf0AYjWIkJL8i2bTN8=; b=U623ISO9xHAev9FZf1+FLgWzwAaFwCaMlFs+8/Y0PpDcjqVRD/A8nJKpBl/5Onp/x1VXnhbYlQ9NvG4NafahYjTFB+rYCBX7N+K3BFOqHdKF8KuAvT0NsuM1xonv8yyoKO+zDoVxh04I/OvoIEmzBxqrr8G9Qd+Sca47JIhvamw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112255+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1702167962278519.0396642186021; Sat, 9 Dec 2023 16:26:02 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=LiIjSQGPJaZwF2+jSeE5yDf4u1GSJiI6A4NUGkMpxGs=; c=relaxed/simple; d=groups.io; h=MIME-Version:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1702167961; v=1; b=w2b4g928jWBIwhrVHm3r3C6YME0wqcmfcrG9l3330w49OiqTsI4knfIj4yKFq9qmE4sC8gM5 9TBB3s9N1fLd1FUycFqpYchIV2+DgYWfDugkro7v2XSekr5Q2ZPiUCpT7AXCEPw09sdiKQMODgg plVDsET8gQ4dCdfXRruk0Ft0= X-Received: by 127.0.0.2 with SMTP id wpLjYY1788612xokSFjaOzEg; Sat, 09 Dec 2023 16:26:01 -0800 X-Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.groups.io with SMTP id smtpd.web11.33082.1702167960782844897 for ; Sat, 09 Dec 2023 16:26:01 -0800 X-Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-3333a3a599fso2276173f8f.0 for ; Sat, 09 Dec 2023 16:26:00 -0800 (PST) X-Gm-Message-State: bgbbLIL3Phs9MLQJvuAlVJ9kx1787277AA= X-Google-Smtp-Source: AGHT+IFFEOMipu7pYSSrUweyqrRijUJaPwRtyty4+Md+yXU6CDPM5sDsbsGewjSAK6Wn4n7hYYCvd9Id2jwiTPv89KA= X-Received: by 2002:adf:fc07:0:b0:333:2fd7:960c with SMTP id i7-20020adffc07000000b003332fd7960cmr1078126wrr.71.1702167958646; Sat, 09 Dec 2023 16:25:58 -0800 (PST) MIME-Version: 1.0 From: "Mike Beaton" Date: Sun, 10 Dec 2023 00:25:47 +0000 Message-ID: Subject: [edk2-devel] RELEASE CLANGPDB OVMF currently does not compile To: devel@edk2.groups.io Cc: Ard Biesheuvel Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mjsbeaton@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1702167964278100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Dear Ard, Thanks for your attention on my other issue, about NOOPT CLANGDWARF OVMF. This one is about RELEASE CLANGPDB OVMF, which currently does not compile, giving: ``` /home/mjsbeaton/OpenSource/edk2/OvmfPkg/VirtioSerialDxe/VirtioSerial.c:28:2= 2: error: variable 'EventNames' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] STATIC CONST CHAR8 *EventNames[] =3D { ^ 1 error generated. ``` I logged this at https://bugzilla.tianocore.org/show_bug.cgi?id=3D4620 This _can_ be fixed by: ``` Acked-by: Ard Biesheuvel --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -1754,7 +1754,7 @@ DEFINE CLANGPDB_X64_PREFIX =3D ENV(CLANG_BI= N) DEFINE CLANGPDB_IA32_TARGET =3D -target i686-unknown-windows-gnu DEFINE CLANGPDB_X64_TARGET =3D -target x86_64-unknown-windows-gnu -DEFINE CLANGPDB_WARNING_OVERRIDES =3D -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-access -Wno-microsoft-enum-forward-reference +DEFINE CLANGPDB_WARNING_OVERRIDES =3D -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-access -Wno-unneeded-internal-declaration -Wno-microsoft-enum-forward-reference DEFINE CLANGPDB_ALL_CC_FLAGS =3D DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -funsigned-char -ftrap-function=3Dundefined_behavior_has_been_optimized_away_by_clang -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-implicit-float -mms-bitfields -mno-stack-arg-probe -nostdlib -nostdlibinc -fseh-exceptions ########################### ``` which duplicates https://github.com/tianocore/edk2/commit/d3225577123, which already applied the same change to CLANGDWARF. That change was discussed and approved here: https://edk2.groups.io/g/devel/topic/98807494 - however, I'd like to belatedly object, if I may! There is currently exactly one line of code which needs this warning to be disabled (at least, in OVMF), the line mentioned above. So if we were going to bring the warning back, now rather than later would be the time to do it. The issue at that line can, of course, be worked around by removing the STATIC (and presumably adding a comment, so that someone doesn't mistakenly add it back again). I would guess that there must be several other places where people _have_ already tiptoed round this issue before, in EDK-2 code, though a quick search for the warning name itself only throws up one such instance in OpenSslLib. The advantage of tiptoeing round the issue (in the reasonably rare cases where needed) instead of disabling the error check, is that the check may well show up genuine issues in code (perhaps most obviously, variables left unused after code changes). For that reason, I'd propose re-enabling the warning in CLANGDWARF, and removing the STATIC (and adding a comment) in the relevant line in VirtioSerialDxe. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112255): https://edk2.groups.io/g/devel/message/112255 Mute This Topic: https://groups.io/mt/103083030/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-