From patchwork Wed May 29 02:08:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13677656 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2052.outbound.protection.outlook.com [40.107.236.52]) (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 D424515AD9A; Wed, 29 May 2024 02:08:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716948532; cv=fail; b=FY5cmLzHQ0dN6NefMB72eYLDU9gt9eZsC9njGFvyXkiTSQFLMh2XoDZZMFOjAbGycyrgYJ8dESJN8yiAlSBHDAAxc89uVLplgZpJwR4XOyk17duycD1sEy/wvPj+Su04MnMDxoyz9HHhLZt5DfJkXhT2Nbr1Gbiqe1DxNPmlzbU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716948532; c=relaxed/simple; bh=moeVUqSHo2UKVYGHJhvkLChv9In2GZ4ucc2wxNeMM2E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=MVK9/NdAuQ9ebGm6t64p6osOJFOgCSh876g3NTnDpcwA+lMVTRYl19vjNyhEQx9XDVDpSqQ0cgJY2RiHtMDxVpiP7/4Xubuq0Gzc/Pteho7EK6fButXA9YeSj3QgtSsr7G1esdCElNI9m51MHalVXCcnEWZCgT4C/4UfnhMIOK0= 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=RFSRBEfh; arc=fail smtp.client-ip=40.107.236.52 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="RFSRBEfh" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OXOGdjTAM1gDWuiBkXK/EMfcqXAli81HxxF+pt+mUSvebZNz43T1HN7fTk1g2+f25U47DmAA8vibyssghGrrD6W46H4ZS/Am+xFUuva+ZSuEwflpqlNGqk2/vCGF30WVYjPEhllQiUPbvKL5dQP6vy5OC4gGc5QTfthMLwidOabda+auHYwwzppdMIjAKNH+qb3nSHDqrkvKleTmSBicCU64QEQcu21Bq1iiwj2zKN7JvAYq3QfxvT2UluuVQygvVz2HEfnTxJnTgUI4/MdDdcUiruZN0R4lIpaGxNoOs0imNByfd7+xprZlW4aZ9HyE+sJbVfMK+a1idMJV/ktNVw== 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=Q8mLsY97dn+gG43ev4hFjruZ1Izz2zefk/N5jtvvWAQ=; b=DdOZyrqsA9yB/+yTtanQ5gl7f0q6S7eNGVU+jJkiiyF95JnGJm5bxMQPQ1ETDO4DWNN33ul0InAAVg61yhXomO8l0ew1tDgLQSHCqEltdNSGxWV1HGJmqWfpqn8xi3asTZpAla564eOULwPUe3piUoVzM1zR0f6U1vq1MqQbsO8T7Co8nHtaD1LeQjqk0GSfFt+fL0WqfS0br+5P+mvOKbN5E5T8p3B8KIBS84vp0HixxBEh0GL2uJjxAtIPFOASHq15VTQzgv3e5RTBQeL2PXnZh7PdFa/kRXUMwMrBKfrk2sT96Dw+Z4WpPc7vC2E8oZv4HzGByZOv8Toignr75w== 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=Q8mLsY97dn+gG43ev4hFjruZ1Izz2zefk/N5jtvvWAQ=; b=RFSRBEfhshOfVyrpSd8YkrdNOu8GKUbo0WJRPoODb8MDCinpHGpiAHX+VTTsWukB+Cqa0yI407w52V0mTs86wnOqgDTQtnmY7Ir18vH1qyCudkuqqje00mlFuxraBqJOiuq6J6T6+Yj+g2JbjwDmHSVfmrTUgJL7U6lK3dhsqxTLmyAUlHlOpeJ1cXtvQYKFw6/sIi3u6sSoBTwD2QZVYNPzqdfRsZ6QypaDYzyaJ+UNgdViMi3/E190h/JEUoORuwn3n9dKtMTpFgZdLsNAbEz50lm2dyRLofBce9no7hObWZu5MX3ZPb2/78HdcpWNRXtKCpZXuN69P4cvFpj67g== 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 MW4PR12MB5642.namprd12.prod.outlook.com (2603:10b6:303:187::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30; Wed, 29 May 2024 02:08:45 +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.7611.030; Wed, 29 May 2024 02:08:45 +0000 From: John Hubbard To: Shuah Khan Cc: Beau Belgrave , Steven Rostedt , Mark Brown , Naresh Kamboju , Nick Desaulniers , Justin Stitt , Bill Wendling , sunliming , Masami Hiramatsu , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, John Hubbard , Nathan Chancellor , Ryan Roberts Subject: [PATCH 1/2] selftests/lib.mk: handle both LLVM=1 and CC=clang builds Date: Tue, 28 May 2024 19:08:41 -0700 Message-ID: <20240529020842.127275-2-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240529020842.127275-1-jhubbard@nvidia.com> References: <20240529020842.127275-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: BY5PR17CA0071.namprd17.prod.outlook.com (2603:10b6:a03:167::48) 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_|MW4PR12MB5642:EE_ X-MS-Office365-Filtering-Correlation-Id: af3891b6-0c8e-48eb-e09d-08dc7f84451a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: 9KF2d8mlvRTSdnq18h+I3e/NMS9JvTxMHYyroAxG++QAOLefXvjC9jI2kINnO4ILLlJVieymhbE97+EONVB4Gu9wZJF4+5iJHmL7Wzha0q6I4zgAzHD+NPZMRpIz8BP0/xkxHk7akGYrAJAZulaXcWSSnSE5vxB9pozNEWasM4GFnP9QafE7yk/NAvn+7KuZldZld4ClFoETm05tT8dmXkQjrdJE/Y68YADkKgNLZ52+OSQBntWGUtexYhZkjhYhZtqudkAdWILkvYo1yDVsSIXJxYrWQeblA+rfH1jLi4QxBboPSxbzKIZssY3hHUI25SD+UMkTUne7+c6QOTLd48nOhy7FBvILmsM5xfja351XbAzhZNp091e3qhyQcXudYjPVvIneqRcryhgJhLrlt792FQCd9gK8J8Sy0QL+mLs28KZea8JXO8jFwV3zFK6LhVBLyZmVBFOYdIDyPQgiWBKwhtm4qr+CcxBNRiZ765ENnRhhcmrcuw9Rbq8KEF791trlb3a5OIRRwpeiJXOwNxGwGbZHl5uhtdbfymX6nKYm7lMzzENtHiHdDBonuVJ8o+hLCXV8ZAnQTGRJFjxiQLIFTGf7357Eixp/riapDhj+sLcWdbPL3q94pP5g4KrA6VlsLQTtabiuxsBwA/gle1TeLUP6BkOSv6frj0NFGOpWCEXWfYVpooLwssUByx68giA30P//p6U6WyxxUfzb/1uziSaBMV0YsazBDhRuEQLni3FIoqCVKhw1C6FEDjsipaULEt445GYVTgo/O1Aq5yWP5dljUU1YWAr1F9R0nT2XLtcQ59qU3+2Web2twvkt9mliMdYK00TvlG2PY5wauqiOJ99sh+noxktwWcLv0GtxtSLEEEDI4y2S6cEThhIhA55GOVxn8rgxRrdMOBtCAHV6xfPAmzb9xH8srmlHv8H1mZkaYAfSFjZ4KQ910JGhsRhK6vEJ2lj09UKGMSk1WpDBC8XlDDAaVLLBw75fIayr3CoPL3MUxXLcb8a20+Zzi4ewi0iBNoQwepq7g5o8Kyg2JftMDu/1Ge8IstKgUsrPuLvH6kw48EfmFXHPoBgsEIm6cayog/xPYdP+X/0Bh6Jg8dXflVNWHh6oRnYgUbGQlYJmqWgknXqaxfDAw1xX70XJu9WdN+uZyeWs/K26+W+FvuK93IQoSYuiwPkEdJgXHH6/ZRr7qw85E2ASBmF6DMx4UwL/ocFKw1LpE67hdCdtGkxU/AI5N9643Nzw+Bcn5zWea6DHcs4sE4N/UxUNBc+QPAxX1eX337DjuM5o0A== 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)(7416005)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSp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K8mUx4Cx5xkj6BKdSIEOyQb7bJvUHNnHP9pa9pvaAsC/MKJ55bzg3GKvitmbH6+TKqqI4CuQZn29Jq9KtazrpZTPX82N0JGMIAWJ5PmJdciZXZZJUYFc2IquMcwDCDgAOJCZtuARje6eAknK38oKkWLB8NOpAScY/imOiG6g5uTt0Sp9qLE9B9bJtQpsIHfYr06MlRnHnmLZIOgpxMd00/ERHkHdKaNZgHQSMBqFPnzwfJdzFg6VWBwS2p56lLKv6JpEq/DJtraWGPVOgUiJ3W1NDBNZYy4DCvPPMs2PX2cBMum13KNIUCdsOcPO8D3tqrJw7FybiXNP7dSzjN0fjdczCO2VGlOhrf9qa9iyE7/sDa9fv+Jg6IUm6tftojdOaAc35xrXVKPbBy9/3h0fMeZVsoWwsncboRlPz6gMchd33pOeDSaHRVfpRkg8rGKRXht6OvzAzNFh1cKO9O3GadqLITRGXxsjP6H89FAipv/K65lIDVkkGTw5FbJ2B8ZmkrxZJF8vFlsLHu4sDrTrciQIFnrAMg9gsS528N2DfEPT0b24szEzr36uiKyH X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: af3891b6-0c8e-48eb-e09d-08dc7f84451a X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2024 02:08:45.2266 (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: MnS853BtOLi3CMvQRrLUiWMouitXvxL7yh1qbRb/NbPVs03M5I6j7LIBg4vinVE+1xMkrtrepoLkTq0CYSLPZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB5642 The kselftests may be built in a couple different ways: make LLVM=1 make CC=clang In order to handle both cases, set LLVM=1 if CC=clang. That way,the rest of lib.mk, and any Makefiles that include lib.mk, can base decisions solely on whether or not LLVM is set. Cc: Nathan Chancellor Cc: Ryan Roberts Signed-off-by: John Hubbard Reviewed-by: Muhammad Usama Anjum --- tools/testing/selftests/lib.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index 429535816dbd..2902787b89b2 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -1,5 +1,17 @@ # This mimics the top-level Makefile. We do it explicitly here so that this # Makefile can operate with or without the kbuild infrastructure. + +# The kselftests may be built in a couple different ways: +# make LLVM=1 +# make CC=clang +# +# In order to handle both cases, set LLVM=1 if CC=clang. That way,the rest of +# lib.mk, and any Makefiles that include lib.mk, can base decisions solely on +# whether or not LLVM is set. +ifeq ($(CC),clang) + LLVM := 1 +endif + ifneq ($(LLVM),) ifneq ($(filter %/,$(LLVM)),) LLVM_PREFIX := $(LLVM) From patchwork Wed May 29 02:08:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13677657 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2052.outbound.protection.outlook.com [40.107.236.52]) (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 943A815ADBC; Wed, 29 May 2024 02:08:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716948534; cv=fail; b=V+xUpWhQv9/N1OrrQm3DvdXKF943DpQU4RKw997YfTGLFHgYPSmYFcfcrGZ/O5nvZPN4ogIr96jRiMAW0tBk8lCiuaVCln03G98KTL6wkeSEngJJCUUo2lfGUi27ZSyQO9oEA/qNNXX1Pk1mVuuADA25K8cIBFVtbq5YdUDP02k= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716948534; c=relaxed/simple; bh=m6StqIIvMC1ualYVakFbzI6brq7UYVnA836S6mnhQJ4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=oxcVhInHrX+J+ku7UVBYVSfZFdpzABbFi9H56SzdWIR/uDaRSYh7on25IVrHuv4tYuDdWuAUPTahrb3jL7u8tPYwp2MnNdodCledMg8LR8svu1LLmlkg5oq3xGd/IgO0PZondGl6eIfb7jXikUsaxpqwohThBPruwFvgVjC9ygo= 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=ZN1BOu6P; arc=fail smtp.client-ip=40.107.236.52 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="ZN1BOu6P" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NfvNgX953zwZ1F5eCN/J9brFXDN/ksAwO6GRGfmGXU2T0fBUYVXeS8lF8sHWm0uZJeYD49GrS1BvssFt4DxVYsW5euewAY5lSWjxTjwF5T4SGNrIxUVpwUg/+TA0GZ/nmSShdBu/QrTkL0Pic/IzeORbc8UEYKjMmn45qUUtx4Q5IzwbgYcDykAU5yXSqMD3GfJrW7hzKDzC99jZdm1BDA/ddYS9GhEb9w/RFa4Nwd6tzcz3nZmH/bShmpckD4JQ209Qdxw+Ewckbbu0m4zEIbjMmMUXdlTekxiIT9CGU9fct2QVUorKTM+U+CdGFYi8XurVe8WR81Kcml39iahKww== 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=wBpC1o3AcVkPrvvVeufrvPsYaK2RDTfkmvEJThKwzSY=; b=hjRyE4W5ozKeARdolHNP8DYIEj5m0Tj2Y7Z9ACQm+Ksn36sma6RJyD9rY+SQYtNZ6/pQ9Ia4J0d8+HlIgiSw1rV3wafY0/hyoDnWPrNGC/E7YsKgctYpu6VmrxN0UjO+iMguG41kP6ItuWGaEvqnIh2AANJVPS9ko7j51qRsXAvjGYDJ5l7KG1uXu4t/30WdUUd+ySQPy6eCM7eDdSdDKtwhuMzmaci95vDA83g37HKC4VS3EAeJrzk0xjQ5KDjhnowuuLUMbxU5zfYfNIwi6re5NKLHQgbUSag7zAD6dKnBieQuJ80eBQrmEc22BlHqEoQu/b6HdG5ODDw23WWKKA== 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=wBpC1o3AcVkPrvvVeufrvPsYaK2RDTfkmvEJThKwzSY=; b=ZN1BOu6PIAE4XlCht/2GeNFvsYd18pXjgKbAR6pZaqdVaDzsNGzQyKkJHynLjVzJUIQgPNs/ytazolFToPX5fkjQZ5TTws5br+GtTI2QOTRRfZAUoPbi8HGPV/O9bELIj2mal3+QOCMbXZTsfGCqimu24Jw4gJ8BnLdD5z1A/Z6NcvsBTkDLc7weVQJp5VUhSAeJ5c7ZjiCqP8tkj6pV6otaWAO7cCfZTY45A+MSFUlDHBPoDfIIIqNAPwQJp4CMjNV1AmC8AqmLz59iq+nfDqpeoX8iUp+kS1nT2mxBNfGu87RiyCVdOIs0zE2HkvoClIr/ZRXvKvaTDNwBov+30w== 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 MW4PR12MB5642.namprd12.prod.outlook.com (2603:10b6:303:187::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30; Wed, 29 May 2024 02:08:46 +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.7611.030; Wed, 29 May 2024 02:08:46 +0000 From: John Hubbard To: Shuah Khan Cc: Beau Belgrave , Steven Rostedt , Mark Brown , Naresh Kamboju , Nick Desaulniers , Justin Stitt , Bill Wendling , sunliming , Masami Hiramatsu , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, John Hubbard , Nathan Chancellor Subject: [PATCH 2/2] selftests/lib.mk: silence some clang warnings that gcc already ignores Date: Tue, 28 May 2024 19:08:42 -0700 Message-ID: <20240529020842.127275-3-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240529020842.127275-1-jhubbard@nvidia.com> References: <20240529020842.127275-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: BY5PR17CA0038.namprd17.prod.outlook.com (2603:10b6:a03:167::15) 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_|MW4PR12MB5642:EE_ X-MS-Office365-Filtering-Correlation-Id: e0455712-9a38-49e0-260d-08dc7f844597 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: 3xrFqfo+EHqWBE8xBcKYChhEMKyRMbgdQ3o+GRm8AsYTKelHL8/xnfDC6nA0AnetVmPKAy+6I9zPH3sKSjnORaAL0zbqWIDw5ZPKVIlR5SeuNGV2EBa63zV4aOevSNXffOuuvk9oJYXh0JivDz0jhfHJnfh6G4W6RJ731EhYyPoI9kqmEgq3Qh49z2+gKyvTrTJLfYNA4QJ1X/j95ClpNqRQQbpzNXrZWV3vOw2+/+kUpDmi+F01rnU8SmYHkMJSDzWZeQQ1MepGOBISYE2hqjNPxi/waRVlRcLPypZy/9YzFweef/Io/EwXUb4AMR99ScAc+Hmbu+/KkNpGnzJ8sQabV42mICyanarqv22nB1POu6DLgXv0N1S1MU838YbOMFTG/765Zj5jTonuxvufgtRXxZEFw/yBzBUIA1jWnUAoY04SooPmwXOFzmqwZWHQq8evjG9UUPuskxsDyD3/93g1gnvbreHDZNh6l5TYR8y3YXH6EbYjxAb/iwKlAH6thSDatZqlnWXlQ1JafO7L1peywYmpfQQA0FOoF4/oeOItl+7xhtC8MQAQmtrG8+aZp3ckQ5wfugFaYrXZO7OD3cOwxlxgxeKJCR/Ngw90E9EU872w3bBNcVrCOMKVznws+Ci18NztdaDK1r05NUuLhqjm8s0K/2Be6liCjmLWuzSOZnUDRQCOHSNX5UgwednFXbG7rlUqrLO8y8hVwPkQeD5eRW+86jjTPc0QsirhStzRhWwUSvd2sXmfPRF32JMPQY55J0CrMU9dS7k1rLc55ZjiyWVqIXXs1oWVfBuXr85zBaUowv5b81W9Qv8pWjFgg9/vp/kcqIMqlDVvVDk3sJtyEh5sjTTO3WUAnmzGwboV3VcYTsf7+MTjzkC3d6GDgDz2BtPE6Av2FBV/IFgfy2rcUX239TKviW5Nxpp5LY9n5Rbck4EXD3y0vD+BbAKp9KdASVc1xhDSavh6mUXSfJUOCvKptvANPA1N+PzdCLQC4J5JoWQiboq+IYLok1lEJAMXSpf51L5rzJV433RkVVlUhyWdaXOZgZINYUbqkzIAcq5Z8gysejeml7BpDuTd4NFNzMlgtJhYC7MvXTIZEjTP05aNSJyHwPBCDGoyy86uQqphbWdvcwg+r4nCISlrm9ik9w64ijXcHd+85jIGyapo7lr6lSNKUdGJOvwOxLe8iXz4d+bov4ZPHEAW+TyyNoCKAj/9AVAys7WytwsXJwWdYqa9tNQefK2i6jBK3npG6WUzMc1YUvdI5C6YJemBqqi8VQr5y4cawL/JV+IKPw== 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)(7416005)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 43QCE+8VVdJRiJwZXIF4yCohIpTwpweaO38FkdcJ9r0fgAnZY4tR/G7BkxAxq5RmJz3jChq9+dkwz0to38MqQHEg5BxnvS2HaaDC4mtEovKG5wewYaHoh9R0HEINQqoXBHJ5V8ObD14LzAgxERWGrcJT593wPeGHtE7MQHuvAiuCJA4xXC/tpROMHv8CXcb8HHbPBvBQZ+LsDntDXy1cb518o0xRWkUW2CmXBExAY5Zpae5TJIhektR5lqwxqNBAacORP56bEPCY/rL41wMHe2VZ/yXWb6QJW16CcOpMGJn8gh5gN+gJxFAXSnRt6q75XdTd+J+SYoN6hsXLkoaaY4WfDViaGKKh33nKlThDgzhiKRF8chU9LKWMoQZ0vuKk+1WnLeTZPF6KmNMKhvqdewyhjP5aZ0a5JktrMs2iI4ukHnaT7FkUUECWjbpQdD703jxRKNfRctMN4aJfbSSpsPxQIfA3adj6WYgzvL3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woHso6NXVx+myg0r7VzZ5XXegI3r X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: e0455712-9a38-49e0-260d-08dc7f844597 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2024 02:08:46.0252 (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: Qy7XOTi/1El/f3YjggYpAtygwPLlqa5LVc8rLkmpbtoD5V9Ww61sWjUpXMfxIWtWWhkDMCtRxDIWsYekZfE3TQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB5642 gcc defaults to silence (off) for the following warnings, but clang defaults to the opposite. These warnings are not useful for kselftests, so silence them for the clang builds as well: -Wno-address-of-packed-member -Wno-gnu-variable-sized-type-not-at-end This eliminates warnings for the net/ and user_events/ kselftest subsystems, in these files: ./net/af_unix/scm_rights.c ./net/timestamping.c ./net/ipsec.c ./user_events/perf_test.c Cc: Nathan Chancellor Signed-off-by: John Hubbard --- tools/testing/selftests/lib.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index 2902787b89b2..41e879f3f8a2 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -50,6 +50,12 @@ else CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) endif # CROSS_COMPILE +# gcc defaults to silence (off) for the following warnings, but clang defaults +# to the opposite. These warnings are not useful for kselftests, so silence them +# for the clang builds as well. +CFLAGS += -Wno-address-of-packed-member +CFLAGS += -Wno-gnu-variable-sized-type-not-at-end + CC := $(CLANG) $(CLANG_FLAGS) -fintegrated-as else CC := $(CROSS_COMPILE)gcc