Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp46744pxb; Tue, 12 Jan 2021 19:36:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVOd00L3eVbiLbRvoJ1OTdAIYQGQYg+9/kraso8SzbajmQMLyPgLxSYXP+GiyJ1pcgFDa5 X-Received: by 2002:a17:907:7255:: with SMTP id ds21mr94266ejc.258.1610508994510; Tue, 12 Jan 2021 19:36:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610508994; cv=none; d=google.com; s=arc-20160816; b=H7oS1DYIkfK+CIhhikV0WHzPs+j1AtCUhBEZAfBbUOeCjVTM1B3H6w2ERya5Kq12Z/ 0B8wWAi3ZIW3VweeIVJYs3mT0W5xFRzyIOUJF/FOCx67Q2ypffIIqYQHwaFXo4b5avsV nHfFlLlkNfmPUiiczSpB9Ga6MP5AnnW4R2vOrNil/E4Cejf63GT+AcyiHTk4enZEk2ni ZIJrr15KLYF3/7Vs3kXm0A6SPPBMEH0jOdzSk0tUBUMn5A4c4WtiPBwZb/aJu7ZRoglt sNibRoJZQeszbePaZQj6fR4dem2cBRU3R1MhAX2h/DxHxET4EYJ0LwCpmrnSgkeAseEl 8q1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=sR9mKM5fZj3Onoi6nrIzD0sEYuGwuHWAJnaDB43NL3k=; b=azsykKYM3rAJJaETqinrAcAP4LaQmclqCrx+SX48hFQplno+bJlMKLqAkPhG3MJNiB 8hp6cvqvJkptKK0f3LcxtvXyqWW82tEGzq8Kk1K18ohzkP/z6b50c+gCTKnYRhWfGynk Uagt4ReegDmCOEawrcPoQPNugSeyk/1M885+TQgZUEjccx2WkL1n2W7SwWTiWQuVhJaI Lq5OcZdOGiORPFRWnIa+DiKOT1J8zMkzcIoQSND6bFAn3swbmyvCSt30lp33ybHv9aQj 6JC0pHoZfq/FowQ+vlCADwOoMggQyxN7VWODnRP75N3Vc7zsSpKvjXKrct/bg1rFT9vf qlYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=wEDdvgZ6; 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 dg4si342657edb.104.2021.01.12.19.36.10; Tue, 12 Jan 2021 19:36:34 -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=wEDdvgZ6; 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 S1726720AbhAMBUF (ORCPT + 99 others); Tue, 12 Jan 2021 20:20:05 -0500 Received: from so254-31.mailgun.net ([198.61.254.31]:42374 "EHLO so254-31.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbhAMBUE (ORCPT ); Tue, 12 Jan 2021 20:20:04 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1610500779; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=sR9mKM5fZj3Onoi6nrIzD0sEYuGwuHWAJnaDB43NL3k=; b=wEDdvgZ6VwXzNgbA9Br15onmO4jizFkwdCUydn8MTUJsZr7Uf2CPf5LkiYQ5bQk+5XRJr7KM CZb9rURZ7ulVH9FiRCK8+jYDABQjYRTGVQjJzlQUIBq4hPkyxL1JRWvLVx4e2d6IqRby4gEx 0ped27S2raB9DJb90AvlNe/9FBQ= 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-n10.prod.us-east-1.postgun.com with SMTP id 5ffe4a8df1be2d22c41f2768 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 13 Jan 2021 01:19:09 GMT Sender: jjohnson=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 24700C433CA; Wed, 13 Jan 2021 01:19:09 +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 26A71C433C6; Wed, 13 Jan 2021 01:19:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 26A71C433C6 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 2/2] kbuild: handle excessively long argument lists Date: Tue, 12 Jan 2021 17:18:51 -0800 Message-Id: <1610500731-30960-2-git-send-email-jjohnson@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610500731-30960-1-git-send-email-jjohnson@codeaurora.org> References: <1610500731-30960-1-git-send-email-jjohnson@codeaurora.org> 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 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 --- scripts/Makefile.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 252b7d2..d5ef345 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -425,7 +425,11 @@ $(obj)/lib.a: $(lib-y) FORCE # module is turned into a multi object module, $^ will contain header file # dependencies recorded in the .*.cmd file. quiet_cmd_link_multi-m = LD [M] $@ - cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^) + cmd_link_multi-m = \ + $(file >$@.in,$(filter %.o,$^)) \ + $(LD) $(ld_flags) -r -o $@ @$@.in; \ + rm -f $@.in +endif $(multi-used-m): FORCE $(call if_changed,link_multi-m) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project