From nobody Thu Apr 18 13:04:23 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VKyfX06Y0z5GqPp for ; Thu, 18 Apr 2024 13:04:36 +0000 (UTC) (envelope-from weh@microsoft.com) Received: from HK3PR03CU002.outbound.protection.outlook.com (mail-eastasiaazon11021006.outbound.protection.outlook.com [52.101.128.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VKyfT1YhLz4FkB for ; Thu, 18 Apr 2024 13:04:33 +0000 (UTC) (envelope-from weh@microsoft.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=microsoft.com header.s=selector2 header.b="ddjDR/Gb"; dmarc=pass (policy=reject) header.from=microsoft.com; spf=pass (mx1.freebsd.org: domain of weh@microsoft.com designates 52.101.128.6 as permitted sender) smtp.mailfrom=weh@microsoft.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CfvXLINaZE8CX0TngYgQbQR6k1I6dv0mbjSTmlkQY/KNNaFWAXRenRsk5hiQxOEi2j5xKuB6ilgxGdWH9LUbyuIvZq90qYl4SK/OkVrVm3v4BYb7HeiZOIPoKfxM+Hu7Y6YY2eVd0SvR7GBpIUZHuz7ETLA9wI9iBktnn2+5Yirt+RAaGMh2H7C64jO/6Wk0zqeaNTpIHIP6hjTrwlhrhQAHgm4F3X6dpPsXZlIDgyF/CtHH/MhBg+flxnmqEzGk8/A4PGFLZ2gOldkwoI41erNUK2E+/7Xro7+kGcpZyVgWe6eYx1GOuGjCCiR9EewgCMdzPqdrXpei4T6qcLPi2w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=99/SMcXwFQIHuIIRpZe5PInVi/XCncLn+EYa6AZ3pJs=; b=W+h8wfa1glNd+aLC5n9FWHRB76IK8FRRtYG88NUDaDgfkFw8BkbaZ0zI/n9VTj6NBoszLWieulpUG5OK7+qQkDrDGM8VrV9Hmr/jTXnfDvJSVoCxZDWoA8TztpD7vM7X4QRDoiVvfiRz0sgw6uP2De6+HWwqkNO94aRlP6izWGgwW1kAnfXLHjts4ldjbX7t11ixjLUAm0AH3OFIsadlbWU7YF99od2idd6WFq4opPb+JQShvSJZ+9SXzm/J1PWhZckzN76dlrv24WqQb4ULc7n4WxPzqoKI5bOmI8hw0zybHyCadp2bzOxej8c8NZ+fylZ1CNpyR1EVlG+WgHxs9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=99/SMcXwFQIHuIIRpZe5PInVi/XCncLn+EYa6AZ3pJs=; b=ddjDR/Gb0B81Vl4dZ9ipIxnkXhDd8j8V8xMixltsDvIXzWWGIHA6SXyYmuY0OedjmwyGc+loF0vCVXwhV4S1gO9IAH6jjLM06UhVPRg3zkPaTZi91qqlaeuilw4sHig978H9XCt59ClXc2R/VhTt+xed7/gUTFwLFsOfKNzhvlc= Received: from TYZP153MB0399.APCP153.PROD.OUTLOOK.COM (2603:1096:400:21::12) by TYZP153MB0705.APCP153.PROD.OUTLOOK.COM (2603:1096:400:259::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.10; Thu, 18 Apr 2024 13:04:23 +0000 Received: from TYZP153MB0399.APCP153.PROD.OUTLOOK.COM ([fe80::788:1883:1f09:480e]) by TYZP153MB0399.APCP153.PROD.OUTLOOK.COM ([fe80::788:1883:1f09:480e%7]) with mapi id 15.20.7519.010; Thu, 18 Apr 2024 13:04:23 +0000 From: Wei Hu To: "freebsd-hackers@FreeBSD.org" CC: Wei Hu Subject: How to add a -W flag in local Makefile Thread-Topic: How to add a -W flag in local Makefile Thread-Index: AdqRkOe7luhT44chS0qlVqfwwelwwg== Date: Thu, 18 Apr 2024 13:04:23 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=3e65ffce-ae26-44af-8246-f712289059b1;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2024-04-18T12:56:18Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: TYZP153MB0399:EE_|TYZP153MB0705:EE_ x-ms-office365-filtering-correlation-id: b07dd117-a817-4b5d-4882-08dc5fa811a9 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: =?us-ascii?Q?zD6Gdivkwg103ATWe5sf9DzpdIspXG3qNsRXhHqbLQTHequgpd8LJ+TYpJkA?= =?us-ascii?Q?4wYEdK6qOcyK5V2bCf3TeuAp8a9wiCEY7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nQ/v+P60HkqxgR+4dX101LsxpxDhvCxPwJmM0euCkr4+2w5T9pk9x2Xi9?= =?us-ascii?Q?QYE5F1+39Bp3sxP6+78osXv7ltiJHoHqLqpPn4yei6j35q0qHg219ZXJkeal?= =?us-ascii?Q?a/beHKqFzjLNe7ehx4taeY+2+8gGyVCDqaG0vGG8G+MHqt6ZxOlceJDebHK9?= =?us-ascii?Q?Mq4nCjXXtEz90tOz3/YnTQD5NHw0PnKHjsYIpa0tQSrpmOvfnEN9GB5b95A9?= =?us-ascii?Q?4mMEoXQ8XqmiVp0CdMp9sbD31cFjM4E3E/CSRu6PqBIKE5Jbyc0sXx+/J9XB?= =?us-ascii?Q?UiVM+BRHD1I8ajV48P/9rVnPd3ltAINbGT7LsKkQf9bEpx0+WrM3UQ1G9/K5?= =?us-ascii?Q?TmxCoBuO75CcwiTWL7lzgAPojPrfaQcUwZ+O6bH0Rm5+Dg=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZP153MB0399.APCP153.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0z3KX2WDccVzmNaQr1aiaeMY5/GGUmq45KLzobxTNiLgmOUvOF0ho7482iCw?= =?us-ascii?Q?J71B0jVsO2Uf6ft4xG1bSfhj8SETRrGN5CZlVPV7NEk890i1xk5UduV98x55?= =?us-ascii?Q?3Y4HP+Coq0GTWpcXJ7pmzFrRebsVFNy3ZVfR1DsL1qgKWpXwjqThAYDBPSFe?= =?us-ascii?Q?8F2yhuXhPnKEtS3zd4BI2Xp3ZxUCPNlY1McQQjZZG8rCPssVOaMizrUez7Vc?= =?us-ascii?Q?2c5g57KwaaYZ6xuwxA2OaLKTWnMhXiM1qbvKfOnVDGPHmJwlPOzcsX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lHHCDdaNGbdZ3yjqqfTMs?= =?us-ascii?Q?5LlBj0pGM9zIo9lBtzZb9Up3pf8duESup0vbhwbWo3MEO4W9Dhxn4sukHZHK?= =?us-ascii?Q?3QOH26ROiQ67LZthz3ETRj2+xQQCwFaKxJI1CLT9b1mGvMOlQQClWSlqFPPd?= =?us-ascii?Q?ZnNMhFIDctmsw6WXfnQvjAjmcigiJhCfuRPJFnpm6tBtrmPyK/21zgkyH40U?= =?us-ascii?Q?rCWVQwhpnI8jJoeKLHvfsMDde5BfRQSxUtZ/H5OtHx2aw+P10beo07ynQqUM?= =?us-ascii?Q?XRp1ddqLi/5EWRJD+RIUrto1L6xAVFJqN4D8rsbDY0vpwpKwx1RPbeDR3+ab?= =?us-ascii?Q?Wmqw/co1vHJG+usffgKzA6jQu28eyP3ARno6JAt6j+SWotobcqInSezzlfeu?= =?us-ascii?Q?hVHGnEDhk5EjjmB2ViKiG30rMha0QDOePaEIFjMp4s6y9CQztD95ETqeIYtF?= =?us-ascii?Q?xA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TYZP153MB0399.APCP153.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: b07dd117-a817-4b5d-4882-08dc5fa811a9 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2024 13:04:23.4922 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +tV5Qz6ygghNBwxB728srNDsGH4vRg+RFcBgCqZZ0CNmCaCEFI3pVEBxle38Rm8dYzmEG5/o6rRkqFzfdjNovw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZP153MB0705 X-Spamd-Bar: -------- X-Spamd-Result: default: False [-9.00 / 15.00]; WHITELIST_SPF_DKIM(-3.00)[microsoft.com:d:+,microsoft.com:s:+]; DWL_DNSWL_LOW(-1.00)[microsoft.com:dkim]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[microsoft.com,reject]; R_DKIM_ALLOW(-0.20)[microsoft.com:s=selector2]; R_SPF_ALLOW(-0.20)[+ip4:52.100.0.0/14]; MIME_GOOD(-0.10)[text/plain]; TO_DN_EQ_ADDR_SOME(0.00)[]; ASN(0.00)[asn:8075, ipnet:52.96.0.0/12, country:US]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[52.101.128.6:from]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[52.101.128.6:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; DKIM_TRACE(0.00)[microsoft.com:+] X-Rspamd-Queue-Id: 4VKyfT1YhLz4FkB Hi, I am trying to add a -W flag to local Makefile so it would only be effectiv= e for the local source files. But it seems not working when I build the ent= ire kernel. For example, I added a structure in sys/dev/hyperv/vmbus/vmbus_var.h. The s= tructure requires adding a -W flag ( -Wno-gnu-variable-sized-type-not-at-en= d ) to build successfully for all .c files included this header file.=20 What I did was I add this line in sys/modules/hyperv/vmbus/Makefile: CWARNFLAGS +=3D -Wno-gnu-variable-sized-type-not-at-end This seems working fine if I build the module by typing 'make' under sys/mo= dules/hyperv/vmbus subdir. But it seems having no effect when building the = kernel by using 'make buildkernel' under global directory. Those .c files s= till fail to build due to lacking this flag.=20 If I add this flag in the global sys/conf/kern.mk, it seems to be working. = However, I don't like to add it globally as only a few source files under h= yperv/vmbus need it. What did I do wrong? Do you know what the proper way t= o add this flag? Thanks, Wei