From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ua1-f47.google.com (mail-ua1-f47.google.com [209.85.222.47]) by mx.groups.io with SMTP id smtpd.web08.15001.1638554282056137778 for ; Fri, 03 Dec 2021 09:58:02 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U52VU6C+; spf=pass (domain: gmail.com, ip: 209.85.222.47, mailfrom: pedro.falcato@gmail.com) Received: by mail-ua1-f47.google.com with SMTP id o1so6999288uap.4 for ; Fri, 03 Dec 2021 09:58:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Pcx6pOXZXaCWUMTrddP2GUI4a4taKYmSEIvWwUyLHkI=; b=U52VU6C+1UxsFXvqowOocRq3YviuE/rmCN5YcRUzWd6v0ACAsa3+729inFf+ZFI+k2 Z3B4AH/jebaSOcByL4cHI39NjR39bZ3Pr1hjYK5Rz4T+pR/VRu/A3BuvaEXkMKW5+AZT TA4mqPQm3GV16urlyYBrjWdPhoaDY+AhMmbbsjO54fAqxYWo5rYZuk0L1Wj61BV15hEI sRcz8wO+qvKcMhVPprtccKQr6mAOMmCk+7/5hJKEF+tC+ts1Ahte5QxayoTSW3sQ1Lv5 dLaSig3FaaEciqHKpDhdeo5SGrii14/pe7mLZ+ARbkmfBGqyGoIEK5VQ+nS8hUXoxDln ncxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Pcx6pOXZXaCWUMTrddP2GUI4a4taKYmSEIvWwUyLHkI=; b=fBkRh7gtmiFNSLJ8l4drInuH2maz0ViebAPlpIbXgyocf6hMfLFHaY7DO6AsKfaybX sccOIM79MoFYyQRFhv99BjfSRkE15ap8rBhabjL5ia16d/R2lLnicCS8xGH4Gvmp7WhP oaRhc2uWaVADRJCNNh0OU79oogkxZmb/o4/ja7gqbz7wSGBiaxWBaptW5JaiZZgk5y2e k+FOxnT0KkCTRyK7n+NiqTSLK5+Y1gDltkLjW3C5jnAjIJz/jhA+Wk/SDOp/YSXT4Hhi Fjo5uMQ/AjkOZrU5m1tKiA4cSsPTGy0qdpMRumAWQ6WPhJU1w9y7lBoh+0GC7weMM5+D uorg== X-Gm-Message-State: AOAM531JW75I5hMAMwkk/wnYePKqWeCgao5RNvBkHMOJrBv+RRFP/BZj cf8hXKc7giHiLmQtQvxf7trkrjvzstgdclxTU56BcbQHsfQ= X-Google-Smtp-Source: ABdhPJzQQ9V6jBG+AZZfUXyFznCXPhBN5GD7aw9UJK7OhTH4LB+cqdVjNA4KSbWPf9MVDsoKIjDmAYonuYSESBJQqg8= X-Received: by 2002:a05:6102:55a5:: with SMTP id dc37mr22836314vsb.62.1638554280934; Fri, 03 Dec 2021 09:58:00 -0800 (PST) MIME-Version: 1.0 References: <20211203160748.866150-1-kraxel@redhat.com> <20211203160748.866150-25-kraxel@redhat.com> In-Reply-To: From: "Pedro Falcato" Date: Fri, 3 Dec 2021 17:57:50 +0000 Message-ID: Subject: Re: [edk2-devel] [PATCH 24/24] [hack] turn off -Werror To: edk2-devel-groups-io , "Kinney, Michael D" Cc: "kraxel@redhat.com" , "Yao, Jiewen" , "Wang, Jian J" , "Jiang, Guomin" , Pawel Polawski , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , "Lu, XiaoyuX" Content-Type: multipart/alternative; boundary="000000000000dc423e05d241a571" --000000000000dc423e05d241a571 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mike, If I get the patch right, it's working around a bug in upstream openssl, which is in a git submodule. That may make it impossible to undefine MIN, unless it comes from one of our headers in edk2 proper. We also have similar build warning-as-errors with the brotli submodule(s) which have been breaking the build for recent GCC compilers, for months now. I suggest we find a good way to fix these submodule Werrors for once and for all. Maybe having a project-wide policy of disabling Werror in external (submodule) code isn't such a bad idea? Best regards, Pedro On Fri, Dec 3, 2021 at 4:27 PM Michael D Kinney wrote: > You should be able to undefine MIN at the right place instead of turning > off all warnings as errors. > > Mike > > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Gerd > Hoffmann > > Sent: Friday, December 3, 2021 8:08 AM > > To: devel@edk2.groups.io > > Cc: Yao, Jiewen ; Wang, Jian J < > jian.j.wang@intel.com>; Jiang, Guomin ; > > Pawel Polawski ; Philippe Mathieu-Daud=C3=A9 < > philmd@redhat.com>; Lu, XiaoyuX ; Gerd > > Hoffmann > > Subject: [edk2-devel] [PATCH 24/24] [hack] turn off -Werror > > > > workaround for this: > > > CryptoPkg/Library/OpensslLib/openssl/providers/implementations/kdfs/kbkdf= .c:49: > warning: "MIN" redefined > > > > Signed-off-by: Gerd Hoffmann > > --- > > CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > > index 7424cd16ac21..0ec925d8b53e 100644 > > --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > > @@ -16,7 +16,7 @@ [Defines] > > VERSION_STRING =3D 1.0 > > LIBRARY_CLASS =3D OpensslLib > > DEFINE OPENSSL_PATH =3D openssl > > - DEFINE OPENSSL_FLAGS =3D -DL_ENDIAN -DOPENSSL_SMALL_FOOTPR= INT > -D_CRT_SECURE_NO_DEPRECATE - > > D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_NO_ASM > > + DEFINE OPENSSL_FLAGS =3D -DL_ENDIAN -DOPENSSL_SMALL_FOOTPR= INT > -D_CRT_SECURE_NO_DEPRECATE - > > D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_NO_ASM -Wno-error > > > > # > > # VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 > > -- > > 2.33.1 > > > > > > > > > > > > > >=20 > > > --=20 Pedro Falcato --000000000000dc423e05d241a571 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Mike,

If I get the patch rig= ht, it's working around a bug in upstream openssl, which is in a git su= bmodule. That may make it impossible to undefine MIN, unless it comes from = one of our headers in edk2 proper.

We also have si= milar build warning-as-errors with the brotli submodule(s) which have been = breaking the build for recent GCC compilers, for months now. I suggest we f= ind a good way to fix these submodule Werrors for once and for all. Maybe h= aving a project-wide policy of disabling Werror in external (submodule) cod= e isn't such a bad idea?

Best regards,
Pedro

On Fri, Dec 3, 2021 at 4:27 PM Michael D Kinney <michael.d.kinney@intel.com>= wrote:
You shou= ld be able to undefine MIN at the right place instead of turning off all wa= rnings as errors.

Mike

> -----Original Message-----
> From: devel@= edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd Hoffmann
> Sent: Friday, December 3, 2021 8:08 AM
> To: devel@ed= k2.groups.io
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Jiang= , Guomin <gu= omin.jiang@intel.com>;
> Pawel Polawski <ppolawsk@redhat.com>; Philippe Mathieu-Daud=C3=A9 <philmd@redhat.com>; = Lu, XiaoyuX <x= iaoyux.lu@intel.com>; Gerd
> Hoffmann <kr= axel@redhat.com>
> Subject: [edk2-devel] [PATCH 24/24] [hack] turn off -Werror
>
> workaround for this:
> CryptoPkg/Library/OpensslLib/openssl/providers/implementations/kdfs/kb= kdf.c:49: warning: "MIN" redefined
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>=C2=A0 CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 2 +-
>=C2=A0 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/Crypt= oPkg/Library/OpensslLib/OpensslLibCrypto.inf
> index 7424cd16ac21..0ec925d8b53e 100644
> --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
> +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
> @@ -16,7 +16,7 @@ [Defines]
>=C2=A0 =C2=A0 VERSION_STRING=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0=3D 1.0
>=C2=A0 =C2=A0 LIBRARY_CLASS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =3D OpensslLib
>=C2=A0 =C2=A0 DEFINE OPENSSL_PATH=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =3D openssl
> -=C2=A0 DEFINE OPENSSL_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =3D -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -
> D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_NO_ASM
> +=C2=A0 DEFINE OPENSSL_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =3D -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -
> D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_NO_ASM -Wno-error
>
>=C2=A0 #
>=C2=A0 #=C2=A0 VALID_ARCHITECTURES=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=3D IA32 X64 ARM AARCH64
> --
> 2.33.1
>
>
>
>
>








--
Pedro Falcato
--000000000000dc423e05d241a571--