Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp100685pxb; Thu, 14 Jan 2021 20:37:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzvTTMtVHBlqcj7zUnZWB1FgAqNYK3aU9b1ldEFIPibETOWNNJ7qcA4LN2Y+xEqqoHaeNAd X-Received: by 2002:a17:906:cd06:: with SMTP id oz6mr7607121ejb.25.1610685474116; Thu, 14 Jan 2021 20:37:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610685474; cv=none; d=google.com; s=arc-20160816; b=Cu2vPiXYgfjlc6v1F9B+swRMXGJylCqrjf7t3VdJdBEbdvcz3HKGbhWoO41pth0ukq v6U7MCiz9Fm6wuj89oUVub1quq7O5QJFhr8Ft0cV1Kwzye/KAn2ah8/fgLFbxPZV53iB OESIgRJKKQoiOjEAodf6UPzqdzjBLSdwWxR+ttqldVacxhNjmgwXs67T9cuOEiFC5w7V PReahVQLC2hTYVr2HU3Lz4pJUD2wvlThAhxnOQcDYJYRsE3YoNn9j/ARGKJOOj8BywL2 2QgtFtPxwPgWkDrh/1mTEShiwqh5HYOMGHalMtOwCxJTAsAqfEg2fzHlGeaA+V+Q7w5i Lihw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=vegfqptpw1wNPtbTqAfiW5JhWvOgA4LdeJqD1gHWX4E=; b=Sx21zH2lugiHlCemhGl9okZQ2fHBWEAEWHuC8R4keWf/YrPyiyuL32XYm9svEFDwwG roVqdSDHhlrTEyExFMgPVCfDQyYpSADU4hSUA2UiULLZtZL6+NH4IwLB0Ev6FpEUo+uO W3c3lziCoaeC4PANiaGMlVubrQeXagwBOi1sHf8tzRDca/JhKgn7LcHpehUpgBAetYYt 0ETziPOo19BQZW+wm/6aW8eSwtzaW5tPY3/cedJ+42L3XppTXQW0nsn5L/Ju90m2YM7e /JU/vj1kjSXMthXY6o0bqI2sBDOTxjrogSlfZc7bHX9P9cvmh5ErKRObipsE1v0KzjaO Y7yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lOQmMFYv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr10si1717607ejb.484.2021.01.14.20.37.31; Thu, 14 Jan 2021 20:37: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=@google.com header.s=20161025 header.b=lOQmMFYv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726442AbhAOBIb (ORCPT + 99 others); Thu, 14 Jan 2021 20:08:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726125AbhAOBIa (ORCPT ); Thu, 14 Jan 2021 20:08:30 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78134C061757 for ; Thu, 14 Jan 2021 17:07:50 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id p80so1390558ybg.10 for ; Thu, 14 Jan 2021 17:07:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=vegfqptpw1wNPtbTqAfiW5JhWvOgA4LdeJqD1gHWX4E=; b=lOQmMFYv/aAziyh/CpnrmFrAuR95FZjxoihmzPKf5C20G5ryMDRKpfuRq8YbB7RmZ9 i7WQA/T7Gp4Annewc4jjMNWHnCq0u450OfGzqLyN6MR5kF+W5EBcECvrknNTLOTfoauK LhvokVXMoCM0VyqXGrMpmFt8GQ097SpFiwuvKNiadmE61sYGAVaE7dYeTpXKGaJo4/Dd rWFaK1EsooRQ8n5p3R2u4yuz9NVs2S5gCS8gk6LxELL46mzZs2R1YZ2yDT5/fzWOoo48 CMLCtq3nQ03KL0+WnQbb8EzeXKwa1dqxUSPfVD5/ALrfQrV9l/gnbtl25B+TqJiXIYHg PfgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=vegfqptpw1wNPtbTqAfiW5JhWvOgA4LdeJqD1gHWX4E=; b=KLuEDuqhJQMRuOVLWIPHuIv+5G9/sLeq4HXbETh5hx1uXivEBUf8pqk57hM7S+zyOD 6vMsvEdzv7VNwuKIrTkEFb57F7cBfIXJdvlTJA2xJLja8u75a22hhQLo/pP2LVIC6BwW ktKfJuw6sFCPBhdIxau6a4OWrVviOFeAlT8m1VfbNlbBhqo8bNBspqguV+bEspi+xbFe P7QKzwoHBqM3GfFM/UWkqOl6drwkcuc5sQTiCb0r6na2m/fkN7bVWtpx4k45U2F16dHP 53KwrSySBoiekC4zIDqYie4M20v+EU7BYMJXIGd3+XZOObk9G7HM14gpXp0N82su/NVS Z86A== X-Gm-Message-State: AOAM530E7o2CEPfbewUDpZfV7Hr9wWsIIfR+/iAsGuTfja0CWA6pYnWL F4LO4ZCX+bAgsnAHGSl6DilMwdFBtHEYVOcqd10= Sender: "ndesaulniers via sendgmr" X-Received: from ndesaulniers1.mtv.corp.google.com ([2620:15c:211:202:f693:9fff:fef4:4d25]) (user=ndesaulniers job=sendgmr) by 2002:a25:d24a:: with SMTP id j71mr14341774ybg.13.1610672869563; Thu, 14 Jan 2021 17:07:49 -0800 (PST) Date: Thu, 14 Jan 2021 17:07:46 -0800 In-Reply-To: <1610500731-30960-1-git-send-email-jjohnson@codeaurora.org> Message-Id: <20210115010746.3839839-1-ndesaulniers@google.com> Mime-Version: 1.0 References: <1610500731-30960-1-git-send-email-jjohnson@codeaurora.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog Subject: Re: [PATCH 1/2] kbuild: simplify cmd_mod From: Nick Desaulniers To: jjohnson@codeaurora.org Cc: eberman@quicinc.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, masahiroy@kernel.org, michal.lkml@markovi.net, mkalikot@codeaurora.org, psodagud@quicinc.com, Sami Tolvanen , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Mahesh Kumar Kalikot Veetil > > Modules with a large number of compilation units can exceed execv > argument list resulting in E2BIG (Argument list too long) error. > > Fix this by replacing shell 'echo > file' into a more native > $(file op filename[,text]) option. > > Signed-off-by: Mahesh Kumar Kalikot Veetil > Signed-off-by: Jeff Johnson > --- > scripts/Makefile.build | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/scripts/Makefile.build b/scripts/Makefile.build > index 4c058f1..252b7d2 100644 > --- a/scripts/Makefile.build > +++ b/scripts/Makefile.build > @@ -279,10 +279,11 @@ $(obj)/%.o: $(src)/%.c $(recordmcount_source) $(objtool_dep) FORCE > $(call if_changed_rule,cc_o_c) > $(call cmd,force_checksrc) > > -cmd_mod = { \ > - echo $(if $($*-objs)$($*-y)$($*-m), $(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)), $(@:.mod=.o)); \ > - $(undefined_syms) echo; \ > - } > $@ > +cmd_mod = $(file >$@,\ > + $(if $($*-objs)$($*-y)$($*-m), \ > + $(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)), \ > + $(@:.mod=.o))) \ > + $(undefined_syms) echo >> $@ I find the indendation to be a readability improvement. Thanks for the patch. Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers > > $(obj)/%.mod: $(obj)/%.o FORCE > $(call if_changed,mod) > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project > >