From patchwork Fri May 3 02:17:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13652272 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2058.outbound.protection.outlook.com [40.107.212.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 DAF6F12E78; Fri, 3 May 2024 02:17:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714702643; cv=fail; b=U6iL2zuYjwDaedBNXRQ4j7ODcPkEQ4dfrIABGpa75JxwS16Nbe+NeDIqz9tUh4zH77LJ3XqyJH5GFSZZhAYroTxEe7PqiwEzlKaK4OmUyesi9EBLCJY/Bi+vtPZqxHIDF5IWptYyuWHqdIRKcwvI7oqqzrOWAPq9BVf9QhZFPco= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714702643; c=relaxed/simple; bh=GKQSQpSsQIbrFPMvq4wKgUVSariZ5F4nbSPtjfdxdu4=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=ubu7/RfpZCTJ8Xn2fbhl7G0AFoGkVD9Qnp6l/ZaqJFUp/LW8Sw9U4wOdZ2eWfvsNwUqFw2FMCbYf/Mj8u7Gkwx6hr4vwxyftfY6a/nCpSKSbL7Otks0v6/GueFyhYazx1XGeUwC3goSwOTxHubTo/rHh8OhKzsRPO1TewRH6VL4= 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=KspJLjRw; arc=fail smtp.client-ip=40.107.212.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="KspJLjRw" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fb3G2RyDY4gfoi8mE+sNxM6M5uG7B1VRLggRmSjUUw0GFBUQtAiof9jvzNNe4aWLDzQPQkW9hc5++zNbOwCpYlYcozTHr1iISwnzJ9JDWbL+NTnoRJyuKMy0GFcBTfX5FWuesz3amiuQ4SP08BE71He495Vf7ORsAd0f+ilrIEm8MGWQT9KNtn2zCaZ+8Sx9+nDIIDP/nh9V3adJS/eweJBY+v+Q8y4r3MyWzd6J87Ca3YR2/L/WEGMfb7KaEimPtlZzTRnl14FO2SZ8SESJXEDwv6vRmcjAylnE1SNvDes48jV825T4ufctDPtFX6gicv2jy7gADw8L6FNXiQnkDQ== 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=vz3JLq8t9dYTnRm7SrWcGnUsXa5CNjXpayypHgo3a58=; b=RMY8Lv3JI9OwdghXyXQsva5/zCz7ogT2OoBGzP32V3shTbz6cN1Xmrim3PkkU5k03kyeSWqPx+vxZLEJU6eAMXxZpqPc1hyUxPWWHvFYhd0O1u135yE3pYq5Otx+AcmrxIvrJsoyFwLQshxBNiFnZbJhq2QOiELrIbfG21EbV1DW2ozKLs+7H2ae8m+eYg+R+l9VceaopnJuMoxz6oR1Saw6KIgmQQfEO3zvZk3Ivn6C7+T9LZQU/1awNnENtXriPLo58O/ZeHN6WkRcbavUkq2Z0YRetp46vJHY9mCpJZsA1vQ+08aKNYBs3AGc8wk3UPciDCCCZfRN0V8VkmDlCw== 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=vz3JLq8t9dYTnRm7SrWcGnUsXa5CNjXpayypHgo3a58=; b=KspJLjRwPPXHiw3t4ciQPGtmzqwhYyCLTORIOXiMmdvQ/g9p3n0SheVMS1PVhuqdrdZ0uACID85DaLsOqQlW1sVWuJh5HetZx+cyP2s8J0yvhxFXwP6c8X0GEV5wsBANs7S18aoEdgbMpF8eu0fQ7QmDLZjWcj8M605An5ldS1rtKcCNWeVCuip/+NFDS8Wj11ANyAK/UTMHO3PDuwt/oA++eOTH7zfOg4KaMK1RrZIMJExGmDIAVAn8xORUkv+4ovEzh8DTa/KGx+TPVTc9NSNPIsnsBZGgG6DjYHNQiPoL6GBHrs+HIzzRwybSAqk9HyfGMUaqslMsA7aMJee6xg== 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 PH8PR12MB6746.namprd12.prod.outlook.com (2603:10b6:510:1c1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.35; Fri, 3 May 2024 02:17:15 +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 02:17:14 +0000 From: John Hubbard To: Shuah Khan Cc: Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Fenghua Yu , Reinette Chatre , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, John Hubbard , =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH] selftests/resctrl: fix clang build failure: use LOCAL_HDRS Date: Thu, 2 May 2024 19:17:12 -0700 Message-ID: <20240503021712.78601-1-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 X-NVConfidentiality: public X-ClientProxiedBy: BYAPR04CA0028.namprd04.prod.outlook.com (2603:10b6:a03:40::41) 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_|PH8PR12MB6746:EE_ X-MS-Office365-Filtering-Correlation-Id: bf6155da-4ae5-4fb1-6361-08dc6b17261b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|1800799015|376005|7416005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?uSmmAmriiyR2KuYcdgeNiH/D28Afahv?= =?utf-8?q?R7N9SDFS8jhPKzZ0hrb2C7+4eJbDU8/FmUNOv8r0Qa58Y1MzVz07Jq5GhfCkjxGvM?= =?utf-8?q?YMDKUZRLnIBb/xZwHnXkf0l/d2NqVi5zpFLzWjPonQ0DLHLWIYbxkhF4EOUtMAgSf?= =?utf-8?q?anceqTTAuqGqrwWLL1ixmScgYI78aQGGV7jBnwZt2dJ1kTBxb7tXu+AVe5XC+EiUR?= =?utf-8?q?S5LoTCb4ENVSwLJHEkPHyy57z1EXIbdh3Qfv/URqABK1ki39kUNV/cfJlmJwM1zVb?= =?utf-8?q?np3ehDjjXnvDOCvxPdazVn8UU45f/V/ric2iZL8RKJ0qvsspDPLODNXjbjitGUJLR?= =?utf-8?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-8?q?ScqHkebaqahfVNHwOwVtUmZKDLUboJs6n6lQ=3D=3D?= 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)(366007)(1800799015)(376005)(7416005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?VwOVdnHn7b3bD13SlvbFy2nGI9rR?= =?utf-8?q?B350mApupfX78RnfvRAJa5iqgR9cj8ez3SprqKOFftzrTkSgInYIl4DihfLuvc9HR?= =?utf-8?q?4cv15p4vziqMud6M30QXHXdcbyQHmXTGQi+62sHakKwUnAy3FdtJcYRIpOmCJozMA?= =?utf-8?q?1bECLvS1Olswoaz3uKUHp7TdnGZXSzxT8Ll5E8s9/s5U70c34RVm/DPsC3SE+lqC0?= =?utf-8?q?deSjvyQwZW4Ke9myfpRJKvz+iEC3zI/w9o8X2waz6Z7WwOz6uxsS3D6XA9J39ezF0?= =?utf-8?q?BDWzu1VMo1FG78p1V4kka2aYxfn/fJ9k82ebHNDQUgx+wRLgyqWF1zSuTP1PDRaNk?= =?utf-8?q?nLnnhUsevqHVPoFuEEgKPrY5TAX3UYsqRLE27e7pudS/1jmxElu8iLcVSksguuMKs?= =?utf-8?q?oio7eclXXkRK4WzDjxRwfrvjuTnhld3k2bAUPl33zQtuyrL43u+C94auR0X3QJQaT?= =?utf-8?q?PhmCacPmgdme9wKWq1tHFXgUV/hlLJ+Vs+vmKIt2561jH8Kq7k7TBoQpeso4lKyQV?= =?utf-8?q?VxMBK8LBoTA1G/o0kuHNVymfD3LmiNMc3FPIV/eqweBW0vBF0kAau1v4QLFs1tfDu?= =?utf-8?q?HTUP3OlpzUzC1qpLGsX0BTApU1pzCr3p/z5JW0PFW/H1kiHhOGpcP+1A9expiV0YA?= =?utf-8?q?0VhDOP9i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riginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf6155da-4ae5-4fb1-6361-08dc6b17261b X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2024 02:17:14.8352 (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: MZJ6ZyNF4XnfV1Ppgg6F25nPm1jAizC4PIThigT3QwSvULbHcwk13Sm7wKngG+DemHFfGAv471fiQ18EaFm07w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6746 First of all, in order to build with clang at all, one must first apply Valentin Obst's build fix for LLVM [1]. Once that is done, then when building with clang, via: make LLVM=1 -C tools/testing/selftests ...the following error occurs: clang: error: cannot specify -o when generating multiple output files This is because clang, unlike gcc, won't accept invocations of this form: clang file1.c header2.h Fix this by using selftests/lib.mk facilities for tracking local header file dependencies: add them to LOCAL_HDRS, leaving only the .c files to be passed to the compiler. [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/ Fixes: 8e289f454289 ("selftests/resctrl: Add resctrl.h into build deps") Cc: Ilpo Järvinen Signed-off-by: John Hubbard Acked-by: Reinette Chatre --- tools/testing/selftests/resctrl/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) base-commit: f03359bca01bf4372cf2c118cd9a987a5951b1c8 prerequisite-patch-id: b901ece2a5b78503e2fb5480f20e304d36a0ea27 diff --git a/tools/testing/selftests/resctrl/Makefile b/tools/testing/selftests/resctrl/Makefile index 2deac2031de9..021863f86053 100644 --- a/tools/testing/selftests/resctrl/Makefile +++ b/tools/testing/selftests/resctrl/Makefile @@ -5,6 +5,8 @@ CFLAGS += $(KHDR_INCLUDES) TEST_GEN_PROGS := resctrl_tests +LOCAL_HDRS += $(wildcard *.h) + include ../lib.mk -$(OUTPUT)/resctrl_tests: $(wildcard *.[ch]) +$(OUTPUT)/resctrl_tests: $(wildcard *.c)