Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp27764lqe; Fri, 5 Apr 2024 11:26:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXceTK/PUxlA2Yw3c26T+jPXcrltaR3OMc7HJo3nl7aBZB3rGJOW1Tr9qsmeArAj9yWEfLbX1dSTIcD668QtVcW6LEirFGhSHC1tBu1aw== X-Google-Smtp-Source: AGHT+IHMiC/uNCmFI+UFi8+s3Ns6zrBSYD32Uo41OGZzMvfrgw+SHHKXFNbXAqdbkFxT6Bc0kqUP X-Received: by 2002:a05:6a00:b4f:b0:6ea:89e5:99a3 with SMTP id p15-20020a056a000b4f00b006ea89e599a3mr2637249pfo.8.1712341593673; Fri, 05 Apr 2024 11:26:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712341593; cv=pass; d=google.com; s=arc-20160816; b=0UvLddETe2bRpuTJ/fDW/56E+IZvSj1Fwc+FzH0DvVKbzz282zXGfm2dfHoEmddwrf 315PcfzffgC5TyqdD/CWtdNwtbzMn+sD8ZUY2tkRhlCF2BgP0eWdXL9pNAiZQr9RjOdI A+C2aLC59rzUZemyMmRYNApmmyWlroFiD682i9ZTyAJWgn8+vIo/fzX60vgpH0mx8+8o h+oh3FAf2nfXmxVtGLRQxpJocl5a/fcINl7ZY4YGH1qFh+bnKvHWlakw84EWfQGqHApp 0pEWfjqwOlz/rZmzwHQVhjhIEjfcdo7rR4lx40coRa5ByX6nnm1lkcAimsFHC6lnr6qy 5lPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=7n33e9TOqfHdPSOxwwAXF/+bIY86Q75KlStQt98tMCM=; fh=SA1N00ejnQGJFWvUV0JYq1JY0QlarnxM40iBsNLeZKc=; b=SIZgZpT6loheytnyjCsi4PXsY8elJi5derzE0u5TYobrD0e+vYM/RUGBihc44GPbVf HwlExuEToQMZ4kXbZNDRH4DGsoWiHtsq/l7vw15FXi9i6uhtQDiza3Vodn692BQG/eEZ G9MYsPF0VOiLAFzMFxtLY+KNNrmhgz6zsDHWZ9AIy0tfKN8h6pMyAxdSmTLPAyMG6qRh VN91PizyUGuCYpU83EHKylzXUebG+Pv5kFDB7ANxhhm1Cyy+47oXAUZYQtV8UeilGXEw O6ilQ7Z5EY1sJdYiJf3YCGHWguYCVNLmiRLsGbHAtSc5S7NBPFBUgQPU5PASUlOUeTA6 eHHQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=DfVrLC7X; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-133416-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133416-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 13-20020a63010d000000b005dcbb9ab5b7si1688256pgb.277.2024.04.05.11.26.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 11:26:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133416-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=DfVrLC7X; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-133416-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133416-linux.lists.archive=gmail.com@vger.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8437CB24E7C for ; Fri, 5 Apr 2024 17:19:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88DD6171669; Fri, 5 Apr 2024 17:19:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="DfVrLC7X" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 760FE6AB6; Fri, 5 Apr 2024 17:19:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712337556; cv=none; b=ggPl61ihm3rtMCm+Qnud/Ke+Ezq+6sehnJ7Pf4hw/tpEIOklagynHTsmNKij/4RQdAC/SEqSUXlNkVQ0i5Uakf5LF9XNbOtHaXZHVFqjq57vf+c7UAvUc1RGe01g1Swjk2lplfvK83Qh8x2ePDTtbHvkRVkms6KSflwm4jA7+SE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712337556; c=relaxed/simple; bh=QRMeVHlXFsGyPck1GAXCXiTs+tmUSKXsHHrqCVNReVs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nMgXpVyMZdTJ7VJBtVx2RFDet2MttT0oh7epnw4RVxBPyCVNAJZpro3ZUQQ9o/yjsrzYELFmUIeeDZNLLqksXQM/SN8eZo9RQ5dg+Vk4ZHTeRoWgaWTQBT3CShtsMs/IeC3OLZs32cY7dBFv6FZ2GzwE0n3iuUVgZMGEjxi8M04= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=DfVrLC7X; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=7n33e9TOqfHdPSOxwwAXF/+bIY86Q75KlStQt98tMCM=; b=DfVrLC7XkfKVXbfbHth4Q1ve5o YHsGv6kKKy1Cq3igmNMC3xwNRsFOWrbnS2OF7XKrNOpnLgknEGab+XA7+vLtWVInSlftOi1r8+C2W yP41B4MqLaG/HJ4ZfmO6vtLB6KCN9KvqE0SmlYcBEmf2tnjnpDVIxcI/hRAxOdqCttZc/8jy6DCv7 bYRmOuc5eRI21661mlnb/UWYf+AM0yFTR3lkvLr2vcBG2PWvdruoF1Z/BcWPTf3OTRYLZyky9y0Zy B9+Ht8InRco1L4cMbCmtCcrMmITwZKNVpQPZ+pz09RQdrG+Gk4Mjjn37t3teX9HEDVc/s0I4yVJg5 gdivTJ6g==; Received: from [50.53.2.121] (helo=[192.168.254.15]) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsnDZ-00000008CaJ-29Yd; Fri, 05 Apr 2024 17:19:09 +0000 Message-ID: <1536720f-7fba-4c47-8708-bfa80b701e7a@infradead.org> Date: Fri, 5 Apr 2024 10:19:08 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] Add MO(mod objs) variable to process ext modules with subdirs To: Valerii Chernous , Masahiro Yamada , Nathan Chancellor , Nicolas Schier Cc: xe-linux-external@cisco.com, Jonathan Corbet , linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240405165610.1537698-1-vchernou@cisco.com> Content-Language: en-US From: Randy Dunlap In-Reply-To: <20240405165610.1537698-1-vchernou@cisco.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Valerii, On 4/5/24 9:56 AM, Valerii Chernous wrote: > The change allow to build external modules with nested makefiles. > With current unofficial way(using "src" variable) it is possible to build > external(out of tree) kernel module with separate source and build > artifacts dirs but with nested makefiles it doesn't work properly. > Build system trap to recursion inside makefiles, artifacts output dir > path grow with each iteration until exceed max path len and build failed. > Providing "MO" variable and using "override" directive with declaring > "src" variable solves the problem > Usage example: > make -C KERNEL_SOURCE_TREE MO=BUILD_OUT_DIR M=EXT_MOD_SRC_DIR modules > > Cc: xe-linux-external@cisco.com > Cc: Valerii Chernous > Signed-off-by: Valerii Chernous > --- > Documentation/kbuild/kbuild.rst | 14 +++++++++++++- > Documentation/kbuild/modules.rst | 16 +++++++++++++++- > Makefile | 17 +++++++++++++++++ > scripts/Makefile.build | 7 +++++++ > 4 files changed, 52 insertions(+), 2 deletions(-) > I can read it now. There are still a few small things that I would change, but they aren't a big deal. I'll leave it for Masahiro or others to comment on. Thanks. -- #Randy