From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web09.29805.1615165570076487800 for ; Sun, 07 Mar 2021 17:06:10 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=RaDuoLEv; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: bob.c.feng@intel.com) IronPort-SDR: HP7NK4774Yo99MbPojuxE9lPAbrb5RRIsvm/lwyjzh/cobp8W5EsN8fvcDOGb4VT33TZNu2R5Q Bus3ebhUD56g== X-IronPort-AV: E=McAfee;i="6000,8403,9916"; a="167853017" X-IronPort-AV: E=Sophos;i="5.81,231,1610438400"; d="scan'208";a="167853017" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2021 17:06:07 -0800 IronPort-SDR: Am0/uIMpRRA8gnSEG1eGja7G5mtJjFGQ0qugAIEutEiZVdC+qcwYr7nId4vIGe+IoTocDHJCDc cWpNaRmW8ceQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,231,1610438400"; d="scan'208";a="508752772" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2021 17:06:07 -0800 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sun, 7 Mar 2021 17:06:06 -0800 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sun, 7 Mar 2021 17:06:06 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Sun, 7 Mar 2021 17:06:06 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Sun, 7 Mar 2021 17:05:59 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iTtJxUxxHPLwKguz5mNgyPR5r1I59F4ScaKVUYLRszp5LtzPQZOYpcQvqzK8FYE57rgELzNvydiRXmNNfiIjKpJ7uFvLIqnfunF1SNwD1qWqEIAgZMKc0CSwNifPoSR7auAGdPLJWIfX4z8Y0BasKd58cGBTNesXXWVt5lwSkU6qyGf4r2b6NDk6Y9iD+1hSCh4Z9uDF3srU9ZkQmZskwQJWDaosS+vAWCWwfGr588OY1yCAvA3lVVJIKX9z9lghlzMdXFp1BmMx6K+P98zp84tknQkj+K6TALzqD/cmCU7saRu0fYnuPpcJQpPlFVJ0ACGd3t837acHxCmOvZN4Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H4K4NjAdhGZ0Pr08QxthHu+ZZu1yXoqydU0kkvlQwyU=; b=acFAojFTise610ipaMWyRK9k05yjZoOvOwg+KxduZzFu8Kmlg+6RUzQjDVzYpOFV44kZz0l2q1hKLwrrAz6wQEiWWh6+HjyH7YueAzA6RYMNljyUab+sntlSKuY5y1EjtqNhdwYgc0TrhPScY4qu7p3w7HjvajY+nBWulIVtDLYm26wYKR6622rzRiSYF9kh4tNi8tp1fVxYP5sxr3pGCG951MEH6/YSGvEj67FxjUQ7X50fjd3ABDSPfnh6GR5/0jVXYDQ3+PgGJwMrbAIdFD0y8QbT5Idy5VcJLRZ7FVMaTCz8nl6Hlu0Ea1d5zx8NM9IVflBLQdpwgeaGcxiAfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H4K4NjAdhGZ0Pr08QxthHu+ZZu1yXoqydU0kkvlQwyU=; b=RaDuoLEvc6Mzeh4lIfrU40m70H+Oru1iwLZ/wsMDaTD628ESVAFnmoZsW8iNBhvHyIuyGSufsMNG6wkrQrOjSIMwSGdYq+2VFAwbmWTWzKn7zhHtDI0qy0QRirHD7HE/fOvc1uUTJzJvUfoRddReNCfB1xKA8K7iFa755Wi1sME= Received: from DM6PR11MB4073.namprd11.prod.outlook.com (2603:10b6:5:19f::22) by DM6PR11MB4721.namprd11.prod.outlook.com (2603:10b6:5:2a3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.18; Mon, 8 Mar 2021 01:05:33 +0000 Received: from DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::845:55b:f6b3:aa0a]) by DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::845:55b:f6b3:aa0a%6]) with mapi id 15.20.3890.038; Mon, 8 Mar 2021 01:05:32 +0000 From: "Bob Feng" To: "devel@edk2.groups.io" , "daniel.schaefer@hpe.com" CC: Liming Gao , "Chen, Christine" , Derek Lin Subject: Re: [edk2-devel] [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) Thread-Topic: [edk2-devel] [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) Thread-Index: AQHXDz05Qcx5bhOISkqu7gJgSW6F7qp5TrVw Date: Mon, 8 Mar 2021 01:05:31 +0000 Message-ID: References: <20210302082150.15478-1-daniel.schaefer@hpe.com> <20210302082150.15478-2-daniel.schaefer@hpe.com> In-Reply-To: <20210302082150.15478-2-daniel.schaefer@hpe.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b906aa5a-beb0-4309-9727-08d8e1ce461c x-ms-traffictypediagnostic: DM6PR11MB4721: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2276; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Rbd4IhXEIOF6kWpwbL8A+a4eDaXzen2ELqrMW/rnOBvwY4JdmlRsu4QTQUXlzxX8aZ6G7fenEWsvcgSZSzJprNVtMn/mGfxkV0a1OdZDEJ+wjfocdUOof0nbKjVNp/chF1gj/KozWISngnKVxY6hiBC1DnLOovbyvkRGSU+Bt2nUyK3kQSL5WNFdaMrP0tfxOeaZEyNCen4gNIj1MRVP2VYNNXhFfHxqcyLVjmH609j496FG1Y9uIpXtNEy7QzMSvZKz3hphiA6xIWnCeoBCj31grBGyGqqFneQzpmogv6JrTR1HuRis0y0ZFsj6OyWTMnaHfGBtTX3tHh/0Lfyp82crDZBfD0vQ8DmJ2ApQrSm2pRVqU6Et58stGjhLPfpoFjoWseDXiVpC24d7ImWo5Ph9wEK9XnVyEop7vSa3pxzEdrrgZ+Jv0KYZ4wUMlB4OLNPIRzSqN4rgjS+6PP7pPHJNsfpbQoWWRg1GindWjiUZOhoJfE5ADnaL72T+hYs34a+09FGUcJqKRyNdAKwNX2WzI3bfPvkuxyB1nfL/DwRuWK0jONbzoYdWwDkTOMJYRDwWwUDAhl78L5CAW2LIoHnKLy4VN5nY0kkCAi4WB9k= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4073.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(346002)(136003)(376002)(396003)(39860400002)(366004)(54906003)(8676002)(45080400002)(186003)(478600001)(966005)(316002)(110136005)(66476007)(26005)(66946007)(9686003)(71200400001)(66446008)(4326008)(76116006)(6506007)(53546011)(66556008)(64756008)(2906002)(86362001)(5660300002)(83380400001)(7696005)(52536014)(8936002)(33656002)(55016002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?SpKTjJ2j7mk6sTXNXDClIoaWagblDnOi9fRmESkYF+e8qazzKwATDX1n2kw3?= =?us-ascii?Q?UhRODCAlzupleCSOJAFV9c6+w59tn+GWz8BRlCbqLaGtzLhfJFmPeaQV9dd0?= =?us-ascii?Q?7czBcRJF1I+ESDenYCrslOt2ZKJKbzd3oa+vWXgo13u+F4WlsW89pJSP7XAd?= =?us-ascii?Q?xd0WHiAJh1k2TQcciKNI5QBjElN6Sx/Om0MBJxxmoQ5yLeLt23Le2rZWkT7V?= =?us-ascii?Q?1u50+ZSijiW8HNW/3wlBLtYefye4P57/AVwCfbh3XpcAhTtP3U6jlybZii67?= =?us-ascii?Q?x05/OSXBk4sAXnHbDfHWbV+GGLYmCoad6wJpMNCavs2cLMzqJFLgmH/9cJ/Z?= =?us-ascii?Q?Znhfx1EDcIBdj/VPUIxikfLRP6YczMDjcpb0rIPXBBQx2jvnR8L8/hXN57Gr?= =?us-ascii?Q?iHV47Qiq4B7DhVROFwaut71Yxlp6kf6PkFFiphSa+Zt+PFbml5LnFaHZw6aC?= =?us-ascii?Q?E0Vkt7FEHgk7+r6ZRMl8BHliFClT694p4U+Xfy3z3JvDnZtQImjmppUGarAd?= =?us-ascii?Q?PSPnclxrtyoDhAZxgrLuBvYhBvWdpSsOIxX3RvkN8u2dWXH4FkMCQEANuQQU?= =?us-ascii?Q?DwXA2L5v4WJ7eVBJJkos84DnJaug2fVS66MX92tiPR+c2Bfy2acelQiSdmC6?= =?us-ascii?Q?+h8zxrUnIbUjK3Fn0/qhlYXLjOmrkXIadA7+/BIeUvBdAxp231OHcbTJlLj1?= =?us-ascii?Q?y23kVBHsFbcwoHMI64OUk8iNMF7qu6B5nNu+ozEmZlj951JZkQtaKc6rgXiw?= =?us-ascii?Q?R6fb1PrO+o99ZM7y4zBHZPkVPMBLi0sBRELBZpfgvstYO2LL729xAP987xRN?= =?us-ascii?Q?LhkPhRHumfKYTPWIoXlaQFNHHHhSraH+L+adEXH9GFBCVDddy4FlD28e6HKg?= =?us-ascii?Q?sD8g83ijt5KFUMiIJRus1fF4xshAplut6+5AfYHH+dqYUdcRheKIb55oLKsJ?= =?us-ascii?Q?vP4JHKgGprt0JdkNbsZjiedO83BiDVzSnccCldd8KJe/GvLvkAWGzLH/Zyi6?= =?us-ascii?Q?k5mB/4QCPPLa4Q+x5cmkce5U8pmqWvaBa5IRGIGSPn5byk4cbintmFRD2i8t?= =?us-ascii?Q?NuxYWzRqvXGHLCm7xAcQ7MbvCMU7zaz4+NkszbXw14jpFKNd4WQJse8DiQ/6?= =?us-ascii?Q?5NyVHrO5iSqQmJpj68exNmy1MDUj4tHz2ii5LaRVR8QJUPt6jobXaKpKk6GS?= =?us-ascii?Q?UOAqkS5pA6YncTXFIDylj9OBlok9rNIby1VcyYwBgHBAbqZ5a+4yhmOemt4H?= =?us-ascii?Q?BsTf8x+Lx/wb5ZB7jRusR09fiiDiFTCnkSo/lSu21FmPSytOLshYu1IkoQ8N?= =?us-ascii?Q?SPT5TrYRa8M4ORRb9b6jGp7g?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4073.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b906aa5a-beb0-4309-9727-08d8e1ce461c X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2021 01:05:32.3509 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jB0P89BnCXuOqLqYWH138TwYjjU52ltdryqJrQThSCEDSvwKQozsyrqOgKziCOFEEyetXiYjJR7Cis+KiR9t3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4721 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Derek, -Werror. Make all warnings into errors. Should here be that only treat undef warning as error? Thanks, Bob -----Original Message----- From: devel@edk2.groups.io On Behalf Of Daniel Scha= efer Sent: Tuesday, March 2, 2021 4:22 PM To: devel@edk2.groups.io Cc: Feng, Bob C ; Liming Gao ; Chen, Christine ; Derek Lin Subject: [edk2-devel] [PATCH v1 1/2] BaseTools: Make undefined VFR macro a= n error (GCC) VFR successfully compiles if we forget to include a header that defines a = macro. In that case the HII option was hidden when it shouldn't be just bec= ause the macro was used but not defined. The behaviour is totally intended by the C/PP standard. When a macro is un= defined it evaluates to 0. GCC, MSVC and Clang have warnings to catch this type of mistake. With this= commit we enable this warning and make it a compiler error. Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Cc: Derek Lin --- BaseTools/Conf/tools_def.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.= template index 933b3160fd2b..728c1d3119e4 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -3,7 +3,7 @@ # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved. # Portions copyright (c) 2011 - 2019, ARM Ltd. All rights reserved.
= # Copyright (c) 2015, Hewlett-Packard Development Company, L.P.
-# = (C) Copyright 2020, Hewlett Packard Enterprise Development LP
+# (C) Copyright 2020-2021, Hewlett Packard Enterprise Development=20 +LP
# Copyright (c) Microsoft Corporation # # SPDX-License-Identifier: BSD-2-Clause-Patent @@ -1938,7 +1938,7 @@ DEF= INE GCC_AARCH64_ASLDLINK_FLAGS =3D DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entr= y,Re DEFINE GCC_IA32_X64_DLINK_FLAGS =3D DEF(GCC_IA32_X64_DLINK_COMMON) --e= ntry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -= Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map DEFINE GCC_ASM_FLAGS =3D -c -x assembler -imacros AutoGen.h DEFINE GCC_PP_FLAGS =3D -E -x assembler-with-cpp -include = AutoGen.h -DEFINE GCC_VFRPP_FLAGS =3D -x c -E -P -DVFRCOMPILE --include = $(MODULE_NAME)StrDefs.h +DEFINE GCC_VFRPP_FLAGS =3D -x c -E -P -DVFRCOMPILE --include = $(MODULE_NAME)StrDefs.h -Wundef -Werror DEFINE GCC_ASLPP_FLAGS =3D -x c -E -include AutoGen.h DEFINE GCC_ASLCC_FLAGS =3D -x c DEFINE GCC_WINDRES_FLAGS =3D -J rc -O coff -- 2.30.0