From patchwork Fri May 3 04:18:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 794521 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2058.outbound.protection.outlook.com [40.107.244.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A10E02E827; Fri, 3 May 2024 04:18:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714709935; cv=fail; b=DAo54sr4K/E2BhYgGBcrxtpJeKsj6+2hvUAIMFS8nBg58rObj0HKN48LBAsz73nobWc82XDK0tOpxakjhMUWaVx5WXzKAwybWAL/rkE9/UVBVNNA6A2SzQTTSGJymN97YNEJwn4kM2ZLXO0uj0XQF7RdP/8NRzQWoroD5i2PD4E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714709935; c=relaxed/simple; bh=CmbSrZ28SsnUkmIsNzHPPipai7Ixu0t+gZuIWV28b+c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=IooK1eawViSY+9KfbTqbyU4l01zUBynADPzbWYVXnP87ca7hDJIkNNId4xNS2UznAV0R44CVdKknzgpeeRQ2Lm6xO+viNAjnrtkjKYMuFweg6hew1vL+ZKqmEIfn+RPBTPiRj2TXCJars4VkPUV6I1Xl4eQD988ZVPupnVfNUl4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=BODXZAs9; arc=fail smtp.client-ip=40.107.244.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="BODXZAs9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g/dIstoZBBKhbLaz5p+OhArKc+zNDS6zfgwkdfvtJjcHqgzMs6yc1ZWqk7ANltmRwDDBGG1COoC/9FIKELg6Qm7vKS6fIIyAZg31Ua94AEyqBkvbGz4GGIHElefKIzN2vIxvg2omXjLQDBG5nSufY1oxuC7xlW2rk8PbwMysnWfC+JjJAMdpoaIbU0waMwjcChZRLiqpC15DtOFuwV2LDI2jYFGOnbYsprnOLwka05srVzYQijCfU/hZYdp5zG42APLbDBCSQYvRKBVcfI6OvkGeCBYH36gLPQhl6HJurqzn/RyBwVatERVHhAVmPJun7RQnBtrfoKfGSU+/EaJ+eQ== 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=EaOTjLI1jNgKfQtVwtbmXuBMpmygEJj+O6pPRmqs1hE=; b=jEHx1eVXFWzlVfzqb0Vjq38uKrSQRL2z9OLW2jHj5Eek261JR/AFtMA3Pva6ca/5rioxYHdMTd92UFH7CzKNFwOThzJrStvr9dXJ80vvQm9V9YAgV3qmb/bomzCWq4zXhNR8yPhmxwn66GzodK1443dEgTsLFAp786C5qrqCFq7dcak2ZZP7h28G+OLL0DUPU9Pg3n/sd64U5yNN+UH5CB9Aj8rg9ePI9IsTODPnlWCcnUxtI/QvFQHvzjMlloSBF2JydlwQ/juHXBSBl/xrKcsuNfC5xe1cZ/tEMvN4uuAInlUZaWIlqI/vK7WkNdYbHrexoOmCtoaySAbZOfax7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EaOTjLI1jNgKfQtVwtbmXuBMpmygEJj+O6pPRmqs1hE=; b=BODXZAs9LOW52+TFAroFwkiWdsvoKEG19LmoWZl53qWPPMB3yxrWKa0N0IlJO+kW57YCVA9ewE+PfR6N8qtgnm2iPgek8YA/XDa5XnNlRLtVjOF4Sug2gEQTVC8nPprRuSmGgliBXIa4mSLLQ79VWge28gCZcTqIaQlCBqLPCkeuqQFhd7AuhS6lPM2MxZe269Id6eos1Xki7P9ZmKyrMoMwv6tPsuY3FYQQuYZVUTLw41Hp61cds5GijzRWMEqVuo5UsM6AK8amXmim+G3BBctV4XE2rY/3OETNp8CH15uExgSQXdBdHDNuDwongFkI8Q8Uo3IwbAuN0L9CQro33Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by PH8PR12MB7445.namprd12.prod.outlook.com (2603:10b6:510:217::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.29; Fri, 3 May 2024 04:18:48 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7519.035; Fri, 3 May 2024 04:18:48 +0000 From: John Hubbard To: Shuah Khan Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?utf-8?q?Andr=C3=A9_Almeida?= , "Nysal Jan K . A" , Mark Brown , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, John Hubbard Subject: [PATCH 3/3] selftests/futex: pass _GNU_SOURCE without a value to the compiler Date: Thu, 2 May 2024 21:18:43 -0700 Message-ID: <20240503041843.99136-4-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240503041843.99136-1-jhubbard@nvidia.com> References: <20240503041843.99136-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: BYAPR07CA0078.namprd07.prod.outlook.com (2603:10b6:a03:12b::19) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|PH8PR12MB7445:EE_ X-MS-Office365-Filtering-Correlation-Id: 5facd09e-63a8-463f-2ac2-08dc6b282165 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|366007|7416005; X-Microsoft-Antispam-Message-Info: FQSwzkqnS4e9EzYfiCiu7coi+4wmfkkqt3zTmPvB7+wTtuTEhS+Nliv0xQscEJq0E2rtYty2BvmUIDLL7BOWvgOume6w609nFOR6In8gsv7wIC7D25qhJ3fGS5OrwgnXoiQnE8bkXYC7qw/IzVDeaSqLhKwiqPBmQppX29e18Vr6xinS07c5N5/jOyXjMeci4+0DN2LL0MpgD3+t5j6j5Shmh+sZzASDCumMhNxzM/KQEDL4/NbOmQHn2bAcd0jgn00QTxJAgB40BWVb33vy930SEzRP9kKWOByQUvRQIK7KJj0cHPGiqc4GsKrcGOnhaaYdxLHTvnD7XX1ZwZCBqpvr834MaB7usy0DkgGftImMqd0orD4+wYBnBQWAxC5wrlb/9lEmGpuXRHlnXrJ43arU6vZDi3k4MR8KTmlUznQ/+pnwerq2KFzeh9zs8kcqVpUw9VrOaCFEl95EAKcWZ/9Gq6qzKUP0cbuMKxhXckvHnU8DoZ+vZF69EWfEDG3vwyRrgj7FTF7HYGQRxHj1wvCJ2b8K6SHb9IrnQNpdsz0idiEyA6CynkcCtf9Cu5OKJR2ou9Xeht11rv70KDJpaoS7JNtTaayJ/gGK/KlgpSQGB19Vd1JhdZH45V8D8ix2npnOsv3ILX4kuVQWN6Koa45nDkOSwQKQD7kEp85EgBh5LCYMU2wQwHE+0+bH625vWsf/Wu+QnSgTAJ4WvGDHysvkuBAKJc5KyuixU4uDK/3VVnm89axXbD5/tWB4fdb8NLu3Le8jpZn2ALGCMVC5fXk5wKJgrn7ow0o/eoVikKSr7WBmnCQYHBhHafAQRDZzOsXDAOVYADzV5kPj0N1zIqn2iav2N0sOvHmSonbCp4L232+ebPhaOGE0/mY9vuz6EgC+5nQAMDVIYmx0Sx2n2kCLj6YpPGSsl1//q9NEcxoZLqJCHw6ORTSl/+n/2I223CA83mCOMwNasneS7IKC0Tm6s6pFfT82fVWO829Chzger7kU5B9hNKBrEp8VzIsBr09rNw77xtjiurIddbZFvfW4Vfs+tM7or6RJND/yiEEER0pftOy5sFWl+IKJxb3kJIfesn7bkBeL6/tq6t3vsj6PaPz5eCUJnK4P0ov2wpYSdAKQmwzdb1I+uZfAMM2bVVc5r4puTIfTElTVWReuvJHTX/gtrlFg3rAIe2oHojHsrKeoHloNtCj8cPhnfP1vQ/FDwKsXEXuUVrY+mZpfSw33P+CyQ1qSvOEe9jq2+casVe58x1NOvl48vwGjl057nPVxw8xLuKx3GDChT9slKA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(366007)(7416005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam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/I1d3Lzb1Sqjxnfws5G4pIpVp6ZgnSVxT9jm9zRZI0u3WbUiPNfMqzu8ZxETzcY4Owg8b2zRqrKbspxLPC/+dLKgbCQKOyZqcx5Fyw9R3FnnWLZGxU3QAiBwA3jEFvG/T7nTdfsQLOpzUuadjB7nvz0+i8Qk1Es7QiqBBt+9eSluei/qMCZvXakbaRjDUvc74POorsIN2Ayj9rbm/N8AZvXXM9r5oJaod9pdJW5wnQ1OiyxSC/VJLfRj7oBQ40pRLBRbmtJ9R2P62pGYWQYItlzvYzhRdChNk8BnUkDSi1Cjrci2as/ZSz7b6YiHNx7jg54nabLFI/r9uzoumpgLSWVu1owmBEQ1MKAJn0SRwBjsnD+5nV5E0bIoguug0Dlcq6nWMvU8YneuxAsEO1U249Q1cOo7QyOqdaSBstLuktY4fWi9L/zxU5ocWmtxMgrOxI20DNNMIXRMM5oQmyAKJ8GiFQ3cUfm2gt6oFOP7wkbQO91eqKkDkEHqTihlwtZ6pkNLS0ILLA5BIcp/zXKXdVucaFUkl/iwyEgfkZ X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5facd09e-63a8-463f-2ac2-08dc6b282165 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2024 04:18:48.3900 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6BHXq2/P9k1GM5A0HDeuprddrAFQcn+5GcE8r8otcSjzKpZ17Vo91oJkLf48VtHhd9Lx7h8drelzsWkbPGoihw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7445 It's slightly better to set _GNU_SOURCE in the source code, but if one must do it via the compiler invocation, then the best way to do so is this: $(CC) -D_GNU_SOURCE= ...because otherwise, if this form is used: $(CC) -D_GNU_SOURCE ...then that leads the compiler to set a value, as if you had passed in: $(CC) -D_GNU_SOURCE=1 That, in turn, leads to warnings under both gcc and clang, like this: futex_requeue_pi.c:20: warning: "_GNU_SOURCE" redefined Fix this by using the "-D_GNU_SOURCE=" form. Signed-off-by: John Hubbard Reviewed-by: Edward Liaw --- tools/testing/selftests/futex/functional/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile index a392d0917b4e..994fa3468f17 100644 --- a/tools/testing/selftests/futex/functional/Makefile +++ b/tools/testing/selftests/futex/functional/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 INCLUDES := -I../include -I../../ $(KHDR_INCLUDES) -CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) $(KHDR_INCLUDES) +CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE= -pthread $(INCLUDES) $(KHDR_INCLUDES) LDLIBS := -lpthread -lrt LOCAL_HDRS := \