From patchwork Fri May 31 19:38:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13682048 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2063.outbound.protection.outlook.com [40.107.244.63]) (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 188C817FAB7; Fri, 31 May 2024 19:38:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.63 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717184336; cv=fail; b=ZSpXdiZTo4Xf/vW5pB8zCETP/hoIM9X9V4yhEuy+kQX1dy3/0arH+TV9kVmkl2E5ZcaWVXUkuYxcd6kCcQOyukEJJE33GZbSOyY97pqcSySULxZI8O1OjTd9bP+/sN1Ajvyzm9gKz6H7Ofr04/UvEBDM/FrfcJsWv0sW+3WT9MI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717184336; c=relaxed/simple; bh=YCkpda0WNd/UD5RJUAuMeiLh0vddzkZNaNoxBNXrz5U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=k59NkQ5rpMnFyCW+4iXw7JzAMjCxe2Lpd25d7SclE1MQ3Ed5aaYpwHZYocMx72B+QwLx6+ydNx4nbEOcuT4mzsOCsr4BjOpxEsjgkF5cUBj7UUXFccyDQBiVEGM952y7GEk1X8XYY3Alg0eYjkIFeM0lE+2kvjpjdu1UvGekhz0= 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=S4AEGwnz; arc=fail smtp.client-ip=40.107.244.63 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="S4AEGwnz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cla7VV0fwKHJiL4C6dJ0MjXtioM1qCXHiFW4pMFsOLJmi+Jfdlhi3XHP9tPwC+hIcOH3zDLmvkqlleAuz9ECd5Hte+r1ZJhlx8CyPo4HQYUnhAvJwIcBJaZs7cyTzC66iiQUKY+IFDpRphrSfAG//kEBpjCYGSdQp8KW6VaM14JLwwkED6/VGMNPNAhF2K9NLYpWXmxRcZ34umw38QJZCg8ljmcpkUI/fTsgfU2q6NEyndvMzJ6sqB4q7YeM/wDUtvFwK9F6Nhni97IUS4Nirt6LLD7RH+kLQACT81l74TA/ai2ie314oZWS2DMrgIwck4grdyckjsY8FC/1bhNaZA== 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=9eKIWT+CwljhaTJQqtFCfM9Y+IA41PKiy1KCN6DW9zE=; b=loOcZ2mDi82y+RI/uZ0oXh3uFfsp+pAqYKAst1BCZlWcSWLwmS0u+9UtSsan6WtaOOJ2A+NzTQ+OOYm6xQrO2cy6gHR4ggrfgR1M9T6TePCfP5hyIItvitHLL6SEdTuIUw8Y2j6ceyPKYYSdHMs3+NlGeA0XwqAyBEAqMu8WilOH+4i4qcPaAw95t88JXLid1S4A41E3pE33zUrqjZEqgHaCtkh7xtjZ1+UJ7E2Jaj4ttXJnTdOJY1MwiRhUoaXwzZwTRgqcqQbsPazO5LWHb6HmyoLU7Qr83tZ0tN6gesxugc8Gs5aMpu7rJYi8kPLFjg/Qjl1Qq1oM1ro+WYB+zg== 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=9eKIWT+CwljhaTJQqtFCfM9Y+IA41PKiy1KCN6DW9zE=; b=S4AEGwnzvAoqzVfRGqCjoQilRsuyVPt7CvymW4ZVPf1vkb/Llqm3pdgcM2cRIvFQIqa+8R7IUUQHgjCy/rnho2StvGWTKAandlhSLXPf+5JpJ/GClSCUJyo8tA9Inl+MCWDe7O284XzrZwx4V/0vc0wXsgB9UhsG4v/z5yE2BgczA+h6INt+NroHz80K1pBCsFDVJwEx1KRy951uQzKtDKJvO5BoefzqreSk61o+FyHK8s0/O1KSpsohPsxVmYK3Q6A/i1SmGAYP1pYUOmRbaieGi38WOAem6MrckqhUuyaGI+I/dQxD3XE0M4fZtcrXlrqOtq/+jXe15kSzW+r7FQ== 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 IA1PR12MB7712.namprd12.prod.outlook.com (2603:10b6:208:420::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.29; Fri, 31 May 2024 19:38:43 +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.7633.021; Fri, 31 May 2024 19:38:43 +0000 From: John Hubbard To: Shuah Khan Cc: angquan yu , "Kirill A . Shutemov" , Ingo Molnar , Binbin Wu , Alexey Dobriyan , Rick Edgecombe , Sohil Mehta , Yu-cheng Yu , Dave Hansen , Muhammad Usama Anjum , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, x86@kernel.org, John Hubbard Subject: [PATCH v3 5/7] selftests/x86: avoid -no-pie warnings from clang during compilation Date: Fri, 31 May 2024 12:38:36 -0700 Message-ID: <20240531193838.108454-6-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240531193838.108454-1-jhubbard@nvidia.com> References: <20240531193838.108454-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR05CA0063.namprd05.prod.outlook.com (2603:10b6:a03:332::8) 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_|IA1PR12MB7712:EE_ X-MS-Office365-Filtering-Correlation-Id: eec6e666-5417-41a4-b468-08dc81a947c1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|7416005|366007; X-Microsoft-Antispam-Message-Info: FLsD/oQkrgzcFB7JQxiGO4e6HZlyVQQIya4AgbkygiRb2uUVjDaoANxhro8fCRMG5ySeZaDdic3rbt9vlVqhakyAfLKZ4ZBfqLzWgel3wGP+/NSwptKnm43094dHGt3Bsv334ofBPUVkpt1p29WJ4qB0o3CawedSSYL8cJC9RmcfklK99mfOT2M52rrkcrRJpvsYussY7NJIdrNNpiJxyo7Kq0TVQ60PwnqUvWTClMpnVogyZbPT6B5LoEHktqeSlmLFooFy1/bpySGLjDlUqN6Jt53jouThKIS3IAcvevAxoztutruTpqJ7tD8XTBktwwTi88WZzZN4QbO7Xboc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je3goyawFNuanBgKvT3U2OPOJXM6kg26iMlHTXkNexAdOgFeNEHNk7iFXnhsnJjNsyb+ne6nC1Ygnnzkf7utrfpQdOLz+aiipw55uhOtTY1F2yCe+nXMhpI5vIqn16giySy5rou7De51GXfVwMHLzGXsWASOuglIK4Ld3EApK7/B1Ii2dmR3KSEFx/12xmN0O6yRkn9Z5G/pnSL3vqQDbblBBAzGTB9OToDLccxBdlcRSAemfp+6epdkXHGXLIFrKxpgGYFqWG+1/9n6elYX1GxocfBJQ4/dd5et04CRww0VrE1dDnt2BTJZNmt3BGOAsWKtK2QAhgIsyNSpsZU73gkOSTS7Gxndmhrtrv4V6ZtzKBJIG4h0BJjLPaRKGA8XH2yhl99NxPAwor7jmlVg0BdRQUbG4VgIskRqMEeJ2jU7WhN0MlcsZDhyPrmAAannhvnc1yxuzX4vbhFs8ZBo4m4vAgLSEiN8MNra/llo+4JRtr6jUDo/UV1J17P3/++9TuA4G/Uph52KlniTd1991LAXgX/eurLn6d0/N3FCRALm6gawN5iMkwFB50X61jf71SpqooNAJy7S+q/SKaxezWfnNaRIbfQ10dfmI0oX7AUnJ+oqMsRrBgRUF X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: eec6e666-5417-41a4-b468-08dc81a947c1 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2024 19:38:43.4227 (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: 5AteHk1wSi+uLUfoPFhsBH4TcKZG5teGnd6ho7hB/I0lgHNU2UNptjz/jd9ZH+A5izPaKhg6y97zueIMRHOQAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7712 When building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang warns that -no-pie is "unused during compilation". This occurs because clang only wants to see -no-pie during linking. Here, we don't have a separate linking stage, so a compiler warning is unavoidable without (wastefully) restructuring the Makefile. Avoid the warning by simply disabling that warning, for clang builds. Signed-off-by: John Hubbard --- tools/testing/selftests/x86/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile index d0bb32bd5538..5c8757a25998 100644 --- a/tools/testing/selftests/x86/Makefile +++ b/tools/testing/selftests/x86/Makefile @@ -40,6 +40,13 @@ CFLAGS := -O2 -g -std=gnu99 -pthread -Wall $(KHDR_INCLUDES) # call32_from_64 in thunks.S uses absolute addresses. ifeq ($(CAN_BUILD_WITH_NOPIE),1) CFLAGS += -no-pie + +ifneq ($(LLVM),) +# clang only wants to see -no-pie during linking. Here, we don't have a separate +# linking stage, so a compiler warning is unavoidable without (wastefully) +# restructuring the Makefile. Avoid this by simply disabling that warning. +CFLAGS += -Wno-unused-command-line-argument +endif endif define gen-target-rule-32