Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp314604pxb; Fri, 15 Jan 2021 13:56:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAQoZUgagAiCE0qtigL4+QFnc2/fTxqUJKp/IOwwG+2SysA3VBtoK7aSZtTyuShdyXEPux X-Received: by 2002:a17:906:28d6:: with SMTP id p22mr5662642ejd.365.1610747814483; Fri, 15 Jan 2021 13:56:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610747814; cv=none; d=google.com; s=arc-20160816; b=IblGcTd6O6hrdHpeYlBYyb/ADzhpelDu8beR067t5LYJK+6UD6f/JYokVxFJaYmcUb T+r04rqip6jbo7bS83G5gx00M2sQyl1Nt/lxuLFqhu3/MilDmexysOUilG68ZMjUO0uO 3eZellSdZ2aSyuROGD0tEbfqs6wDgItBu1BDFktYE/pbs03tD/Y8aNKGXvluDbbZBiXt jyXciYFLAfyYOR59irEq2BjWC7F8AAD7zTC/nHt+kLCvvO/bJG1LIbWrFwZyXtlPlyDi RbbqpMpubTosJpdrOt/b8oWFjSSgnxXp/v5efBdmPwMhrqrUBfsF36NF6YWEY49ihxSg ow5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=XU3Chwqkk39bmnq4nkdSFRKSv8Btv1XMVUJlsyr4mfE=; b=JKa6nesy6p6/p/PjmOPzqpwgT/m39angpWjkVh+UTb2/n5P6gyIH1HZFWy0sY1mTWE lbwCnJ1Ikmffz50EkIQAbemfJo4YjxzUUxbUSysB4xZqW704Xs1hzZs4JMeDNnfaUW+D cdXmmJIMdb0L9+IdfY04HpZbi+UteZ1t+nckPn+ldMCF1+A7Fv2lvjrL7M9c5w2FhdKH XP0z54xBXdNTYw95F3HuMQNJ3xprUyV8rHyBfZY0qU9KlLY+JGCobpXjzNlJD4RPsxQo qCGl1Hj/bA+YdSgm8zxVxwcSDZSbocHVxnx5bo61dfdfe7iuzwt64iKTQzDqkFfKXoEq H/eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="Yu5U9l0/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s16si4453177ejf.641.2021.01.15.13.56.31; Fri, 15 Jan 2021 13:56:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="Yu5U9l0/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726893AbhAOVzM (ORCPT + 99 others); Fri, 15 Jan 2021 16:55:12 -0500 Received: from conssluserg-06.nifty.com ([210.131.2.91]:42154 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726773AbhAOVzL (ORCPT ); Fri, 15 Jan 2021 16:55:11 -0500 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 10FLs8hP003555; Sat, 16 Jan 2021 06:54:09 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 10FLs8hP003555 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1610747649; bh=XU3Chwqkk39bmnq4nkdSFRKSv8Btv1XMVUJlsyr4mfE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Yu5U9l0/LQCLuAjgQVcW45hAxysl7duDodnBn+AmO9ZsdKv2jL83fGG0I01Z1ZhZ+ MBNRfWnUiiZVZIwl2v9abEIVmOTcd0QOErqSGkTJ/XqcHVCDt9r4T0EqakMD/mKO29 Wjj+vyHS4L+99gWKhpWKY/a3k486v2/fVoyxaK3Qmhul3yq0DXaMrP3Kqw70/6O3an vOGj1QJGHJJpJvI01XJvDGPOt+uhWUiYN7T/56ZYHxa1Nguw3z9cPbodhYtwOms3kc /6xL5B6qSldsEY+fCkhyZ3qLWn1TinxXezcxaU7kUECQNuvj8yhpfsnB8iIbLoS4x0 +qmVGQBqF+pfg== X-Nifty-SrcIP: [209.85.210.172] Received: by mail-pf1-f172.google.com with SMTP id w2so6309923pfc.13; Fri, 15 Jan 2021 13:54:09 -0800 (PST) X-Gm-Message-State: AOAM533cuBicJt/ZVShxGssQQtBdoP/zTbb9bIzAcqKIR7/zf2TA07jF HiV81Bl+/yn4k+7hfYcrJxyE4W2FH/iXd8UoSdA= X-Received: by 2002:a63:ff09:: with SMTP id k9mr14775205pgi.175.1610747648138; Fri, 15 Jan 2021 13:54:08 -0800 (PST) MIME-Version: 1.0 References: <1610500731-30960-2-git-send-email-jjohnson@codeaurora.org> <1610660990-18812-1-git-send-email-jjohnson@codeaurora.org> <4c02050c4e95e4cb8cc04282695f8404@codeaurora.org> In-Reply-To: <4c02050c4e95e4cb8cc04282695f8404@codeaurora.org> From: Masahiro Yamada Date: Sat, 16 Jan 2021 06:53:29 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/2] kbuild: handle excessively long argument lists To: Jeff Johnson Cc: Linux Kbuild mailing list , Prasad Sodagudi , Elliot Berman , Nick Desaulniers , Mahesh Kumar Kalikot Veetil , Michal Marek , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 16, 2021 at 5:15 AM wrote: > > On 2021-01-14 17:12, Masahiro Yamada wrote: > > On Fri, Jan 15, 2021 at 6:50 AM Jeff Johnson > > wrote: > >> > >> From: Mahesh Kumar Kalikot Veetil > >> > >> Modules with a large number of compilation units may be > >> exceeding AR and LD command argument list. Handle this gracefully by > >> writing the long argument list in a file. The command line options > >> read from file are inserted in place of the original @file option. > >> > >> The usage is well documented at > >> https://www.gnu.org/software/make/manual/html_node/File-Function.html > >> > >> Signed-off-by: Mahesh Kumar Kalikot Veetil > >> Signed-off-by: Jeff Johnson > >> --- > > > > > > > > > > First, is this a real problem? > > If so, which module is exceeding the command line limit? > > On 2021-01-14 17:12, Masahiro Yamada wrote: > > First, is this a real problem? > > If so, which module is exceeding the command line limit? > > Mahesh & I appreciate all of the feedback. > > The issue is seen in an Android environment with an out-of-tree > driver. The combination of long path names and a large number > of source files is leading to the issue. > > Since Mahesh & I are not Kbuild gurus, is there an alternative > solution to this issue? > > Jeff I see. The support for out-of-tree modules is not nice in this regard, but fixing it would need many changes. The long-term solution might be to upstream your driver, but it might not be possible. One cheesy workaround might be to point the module path via a symbolic link. Let's say your module is located in a very deep directory, /home/foo/long/long/.../path/to/your/module make M=/home/foo/long/long/.../path/to/your/module modules would fail due to the too long command line. First, create a symbolic link as follows: ln -s /home/foo/long/long/.../path/to/your/module mod_dir Then, pass the symbolic link to M= option. make M=mod_dir modules -- Best Regards Masahiro Yamada