Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1651391lqm; Fri, 3 May 2024 02:10:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWzaxWrJEyrHCM+i+g5v8MU7IbxdzEWWKCw7wttP4t3HSvZFvoMmlum//1E/sidHWP3Ls8HbrRqxZmdBUZzcK045Lom6WcCRtVb0YYutQ== X-Google-Smtp-Source: AGHT+IEVargi+asojqrAovPG351SJ7JSYrUPTo8Jk3rE78EbUo3LfBBk7Mvz9J9tV2gh4T04ZUj4 X-Received: by 2002:a50:cd93:0:b0:572:8aab:441c with SMTP id p19-20020a50cd93000000b005728aab441cmr1147200edi.26.1714727453971; Fri, 03 May 2024 02:10:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714727453; cv=pass; d=google.com; s=arc-20160816; b=HvugAz7vJYoXJg5aCRYkEnKT/5/KPLzVsH0P9Q2tBZgk6d+s/gHp7Vv4+ijq+gN8WI HxKbi1/4JY295MXafhFatySomcFC7ryRLNa2YGbcTLHu+TIur6SUl7lv9mr/l/5Ln9RA QMP5Wlku+x6XhNkI+faSUthsCD8OIj9PwphOR9+FPVJdz4IU+egYlEoe3aetN9B6Pq5H D57BxAe4u31vjZRtujck5spjS3otTPVlXpsvlvMQepw+LZSgU77dg0OyLOqxKIOq1dA+ bv2F3lGY1ab0FA7Cf/6pckgffe3QnWDDHibjFvgag3YqN6z2nYYUGa1pao/e9Z59QJ7a ndVg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PtF+rE62HF1w8xY/nvGcTjPSsbg9/pUM+QKRt0MhWY8=; fh=Rt3pC2UT0vtkqzIjGiz1N9A7G2eph0rSWvwOyh4CaDA=; b=lghJlBuDFBvsJseVVVQNX0T7lzbc6XXfrZDm0N4DmLLKAyCKbv34LJTkIdcgt9B1hJ JiMs8d9C2gM8tZMDj28uZr56bahXPrgyOFQFk1gbKw6SorhrzVICBVXoIgW8FBrM/eJb uwzXts1QaO4cE2nBAWbEVLX/SQQrb6SZnCzQoHDUavSbHL7aECsax0zuPghkYfru2Djt P+Pc2YLGNxLuj7168AfW/0RNPhrk28OXDs12HrkMi1Jd2z9a21aptFTmeLkLgO32bQ/P v+EUR5XRTT0uXUl2G1wojRJfFsR+uFvMLeBshFCe3nduAxVPdcquCn8pAKGAoxWt6hAk /j+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F1q2O5mv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-167429-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dy5-20020a05640231e500b00571fe8194a1si1339099edb.346.2024.05.03.02.10.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 02:10:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167429-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F1q2O5mv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-167429-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AACC41F22E36 for ; Fri, 3 May 2024 09:10:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E70A614F111; Fri, 3 May 2024 09:10:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F1q2O5mv" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0E7661367; Fri, 3 May 2024 09:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714727445; cv=none; b=d4LYlBkGcR1skukfsVQgiMVzA7ReV/ptgs57qKP03MVvN1WOB/mjHlblHF6vLWWvS8ubp4P1se5/I79Zargg0Q0RTSKZzqQaKb2ARMQkzaPkC8AqkCff3/kzTPaE333jZ2CAaf4uGGCWpPzhLzgFLil4/bbjkluZyvUv/7Jhs1w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714727445; c=relaxed/simple; bh=WTDd8xTTFTmxmAFyzg5Soj8vzJna+d8YvjaUIxy/+T4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Q1M9IqZ3o00shLSAh2egRzhpghwWVPrOwAx4O4Mw1MBsW/BWtntTKI3QlBOGrXQ7bu5mvWFD+x1HHrFZb6Tr0XKanNPTuVgV5tbEEJE0JhfqjMT5hhMNQ5Xw/2//9Hpeb9cMaVmYvOwVO+JYO8tDvJ6d2KFw2opJR2DtpQ3xRiY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F1q2O5mv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F544C116B1; Fri, 3 May 2024 09:10:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714727444; bh=WTDd8xTTFTmxmAFyzg5Soj8vzJna+d8YvjaUIxy/+T4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F1q2O5mvo3cPCwkLySXkfpwl8YnN9PNkYtfmSoaliKWHUta39eI7uDK7j+8kEZTJO tvj03MIXG071ielV4jEC94C60aKxnuxD62MM2e/PfK87qi40aCIqLNUI3nxTlkOnSX Fl9ZbesgzSnk+xqe84bAcTfJjNLEGNkdFeDP1OWv2tX+CgWvXtnoDopQ9X9lO1JRp1 l15rWENKBnB4gDNq+iF7iHrFRkbri1Psr6cWE1GaLyTE4JGuV8POPogUVZrmzfS4g/ A6ELN1TCWKMZUZ/ADK65D2HqZqV02SLjhsEJo5GwpviP0EiVUoOBXRL09OeKlaZdml OTBD7oRCBzvnQ== Date: Fri, 3 May 2024 11:10:38 +0200 From: Christian Brauner To: John Hubbard Cc: Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Greg Kroah-Hartman , Kees Cook , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev Subject: Re: [PATCH] selftests/binderfs: use the Makefile's rules, not Make's implicit rules Message-ID: <20240503-glossar-notfall-bd7c234c2da7@brauner> References: <20240503015820.76394-1-jhubbard@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240503015820.76394-1-jhubbard@nvidia.com> On Thu, May 02, 2024 at 06:58:20PM -0700, John Hubbard wrote: > 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 > > While trying to fix this, I noticed that: > > a) selftests/lib.mk already avoids the problem, and > > b) The binderfs Makefile indavertently bypasses the selftests/lib.mk > build system, and quitely uses Make's implicit build rules for .c files > instead. > > The Makefile attempts to set up both a dependency and a source file, > neither of which was needed, because lib.mk is able to automatically > handle both. This line: > > binderfs_test: binderfs_test.c > > ...causes Make's implicit rules to run, which builds binderfs_test > without ever looking at lib.mk. > > Fix this by simply deleting the "binderfs_test:" Makefile target and > letting lib.mk handle it instead. > > [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/ > > Fixes: 6e29225af902 ("binderfs: port tests to test harness infrastructure") > Cc: Christian Brauner > Signed-off-by: John Hubbard > --- Reviewed-by: Christian Brauner