Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp46722pxb; Tue, 12 Jan 2021 19:36:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvqy3hjxg2CKUPQEk7tS0PGQ6sQO3aoPW9qlTNN7uJ3wb6CRXaofO5MXANlQnZBShmtKZl X-Received: by 2002:a17:906:934c:: with SMTP id p12mr68618ejw.361.1610508990165; Tue, 12 Jan 2021 19:36:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610508990; cv=none; d=google.com; s=arc-20160816; b=S2Dd0WCE+F/cZmqmYMzdvLZHR9Td+NBxffwwhBVKj1NKoQ0pkhjo61OfrTjhTKFFPm pI0FxYr6N0YK6LdbhVHgEAwkbUxjxTHW/naVzE5Pw2hV/HVZ5OZCqYgFrITL8pJeHY+r JScD88lvh8ia4X3lP6Z0bRRUFWj3gBMvQEr+YMdI+zHVtoH4RkSQEpcrPpCVC5xkoyCl otJrGQlqxtnNhO/i3kM25YLAQA0u8GaxN68IpuBE3adJiPFILKPbYf3MrUvhT3zMIoAz PSnXgU2kyN4Lc0aYaDKgAUuIr0rJ1eEeaM2s3CGXoYPss4Vdgg+CanFu/hvsMUqUk4QH tODA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:dmarc-filter :sender:dkim-signature; bh=YSG/qQ1q1fMOG/Hav8fx9/REuPQIkzfFlEODaYgoTI8=; b=PRXwBeN1b4GATldqR6w5b35zIYxsJv+a2BYuJBXW1il6cKx4Ssjpl+LQ/QhPL7bWPg v0ZCRbOHhOUvTjZa8KLgbIL/nWNqtkUnRGbzra/OYweBIPXhdnJYi276uW42RfylvM+4 p3uTA/ESs1T3w/pHAr9wznlvVJjpdEsCmdpqbx1Sbm10th9Zil2Iim0Q8Ndrr66hTRiq AKvgyexKGKigs4QaYtHCe5pHOQPdFcnlriX+jx+zKoUjtOoBeMk5v2nSB4ZFyWCE88CZ T8yFfe8DOsjeMrRF+n8dNJN8uuGQqbFaPhCFlqulZmmXVPukp5Nmkm6H6QT2PcwQIDvW a0JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=cKivp+E6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m17si319410ejc.705.2021.01.12.19.36.07; Tue, 12 Jan 2021 19:36:30 -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=@mg.codeaurora.org header.s=smtp header.b=cKivp+E6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726429AbhAMBT6 (ORCPT + 99 others); Tue, 12 Jan 2021 20:19:58 -0500 Received: from so254-31.mailgun.net ([198.61.254.31]:21822 "EHLO so254-31.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbhAMBT5 (ORCPT ); Tue, 12 Jan 2021 20:19:57 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1610500774; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=YSG/qQ1q1fMOG/Hav8fx9/REuPQIkzfFlEODaYgoTI8=; b=cKivp+E6eGYR/eqtFUaqJX2yvb4A5Fmr2gjvIDifga5TDoc2n6m1/ERzGkbmzG4rAmNgabLc Ih5KqmJezhWqyRWl+g1fHyeryCBYWy8BDJ+4WDzxyW2RuW2aZko5ujueeZ56DV1fzhBXmfQG cale23LQJqN0xK4D4CwPIDrfFUc= X-Mailgun-Sending-Ip: 198.61.254.31 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 5ffe4a8a415a6293c5eb7b6a (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 13 Jan 2021 01:19:06 GMT Sender: jjohnson=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id B92C3C43461; Wed, 13 Jan 2021 01:19:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jjohnson) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7BDB5C433CA; Wed, 13 Jan 2021 01:19:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7BDB5C433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=jjohnson@codeaurora.org From: Jeff Johnson To: linux-kbuild@vger.kernel.org Cc: psodagud@quicinc.com, eberman@quicinc.com, Mahesh Kumar Kalikot Veetil , Jeff Johnson , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] kbuild: simplify cmd_mod Date: Tue, 12 Jan 2021 17:18:50 -0800 Message-Id: <1610500731-30960-1-git-send-email-jjohnson@codeaurora.org> X-Mailer: git-send-email 2.7.4 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 >> $@ $(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