Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp100475pxb; Thu, 14 Jan 2021 20:37:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQCg5Gzq7Sovg1EwJDOdwUYIZ90Kf0TdmFIAUr/7aSQ7G/QPH6FD8bQMrnWm4bBtlBbH56 X-Received: by 2002:a17:906:a8e:: with SMTP id y14mr7340659ejf.47.1610685437719; Thu, 14 Jan 2021 20:37:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610685437; cv=none; d=google.com; s=arc-20160816; b=GrfIo3zAq5Be6PtWtww57qfvXR6JdHf+xwwcO+S7ziTpqgElk+M2gIe//gl9gzKNal 2XZQ0s1kKNraC/aZJtV1ynazKlCZCiUVrhMu7OEjgJzidp4+pAua3gVorhigZ5WeN2HK 01Fe6HDb0H6O+cwycqlomtNooutYTZjrranE0n4FOioX3auvWj5zW8tNr6iWEYnSfswh Y3KpBCVY9mi/GRF3GW5bVxZNmizocJU9BUsM0gjZ2uJvKgcaEyFm/kcHp1YeCrc7hXsy +GUgT0RXpDVh1OImeZJ378z36wXsp74BTUIC0Yrlv88WHMJ+vrRfXTooLNtvMYvWm2LJ ruZg== 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; bh=l3WeFaKNJEz4OecO9N42Dpu4fB89NTF5qv7y1AdEYTM=; b=QkyBg/S+e6AburCE7xrRj88ILQBy8o3pyaFEygINrVpURRXJ7CQ5QQYHWMw88kAyae YeWas8rop/emrIzQ6Cxj7iqmyx6IWnSePnOrQHRCqpRHfcxcn8TRkQdr0yr3wJrBk7U3 6hFYUpIc5Q4Y28O2H3HQ0LTzZ9yEjTo53S/I/s4tDKbDU61rsdnXH2TBgPqw/byquyeQ zIkYjUx759BkYiXem9NT33vsY8gILS0SLQR7nMdsYmGu/9bZIJXv2PP0K9rGJ00XdB1x T6lvXId6QRzL1AUF6Ll94ejv9FWsgUv2ByWs+mjlOmUsJcQRgCRxK9X+THRjF6tJJWUC eIcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=tSNS1CnM; 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 pw3si3197257ejb.186.2021.01.14.20.36.54; Thu, 14 Jan 2021 20:37:17 -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=tSNS1CnM; 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 S1726159AbhAOBBu (ORCPT + 99 others); Thu, 14 Jan 2021 20:01:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726215AbhAOBBs (ORCPT ); Thu, 14 Jan 2021 20:01:48 -0500 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A333C061757 for ; Thu, 14 Jan 2021 17:01:08 -0800 (PST) Received: by mail-pg1-x530.google.com with SMTP id i7so4941536pgc.8 for ; Thu, 14 Jan 2021 17:01:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l3WeFaKNJEz4OecO9N42Dpu4fB89NTF5qv7y1AdEYTM=; b=tSNS1CnMXMY4MD92ZyP8uZtFqK6+/HTf0XPlBgegGtQ9XePOsTqRlN7z6ukXZLrTF+ vo6nqJpSDJu2YaS/EfmTWPumeIlAl6mQZBpvsEWZHm721/C2DwEs6VneiFjx3bLmb49i xYQ+oyNKFiPzgci073pFC6IeUn8YYJWCkQBdOJu3AMk6Jfok4VCGLgMnP2mFOCQU9o61 02QLwfK8Tov9cBFW/fdWSya9NPrqk0r7EcAtCIl3zZnCMmviFTK1GrhKkfs0u9iGmpOV Oi0sA0UlMK3WcFDUReNKxZxWWgFF2ejJE1DkxrTAyD2Hf4/bxSuAl/eDKxlFCojxjtWQ dD3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l3WeFaKNJEz4OecO9N42Dpu4fB89NTF5qv7y1AdEYTM=; b=UJq/nWb4HWnU0+dDQCZuglr2JPGUoToAEHYx0f4NjetTS/btt7GLEnC9duvineClSF naZ/d+5AbVPSpLaYLYLeva0MRKEmlgDdJMYCL4TUkksH1wUC/9vSxX9A7i9ZsPou/Dvj jvW5Q9exVF3zqLEs4R/xThAL4yjMsjalwEcAfd0dNfHjikVwLZV7n3TpWzhI6AF1sePu f+2cscml4iMCUCBprp19QtxudQQ1d+F4r2PwIBoTvGffH3N8j7QifMKxxkbqwng97zgr UeYuNH66WWCMT/8K4ewN5aieQK0m3Z4/vorwozMTZYrPPnizmKoqm8QhW90SSEYThTqP NYhA== X-Gm-Message-State: AOAM532SMWVUlNsmulM8YXbovGV0VZ4OfQr/T4CYnAPWl1nhL6N/cSnO 0ELNyU0tG/hfLRnrR4XDBzwPc1028/NUy1Bn1EMLUQ== X-Received: by 2002:a63:1f47:: with SMTP id q7mr10190029pgm.10.1610672467320; Thu, 14 Jan 2021 17:01:07 -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> In-Reply-To: <1610660990-18812-1-git-send-email-jjohnson@codeaurora.org> From: Nick Desaulniers Date: Thu, 14 Jan 2021 17:00:56 -0800 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 , Mahesh Kumar Kalikot Veetil , Masahiro Yamada , Michal Marek , LKML , Sami Tolvanen Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 14, 2021 at 1:50 PM 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 > --- > > Changes in v2: > - Remove spurious endif > > scripts/Makefile.build | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/scripts/Makefile.build b/scripts/Makefile.build > index 252b7d2..787dca2 100644 > --- a/scripts/Makefile.build > +++ b/scripts/Makefile.build > @@ -425,7 +425,10 @@ $(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 The GNU Make docs linked above use an `@` before the invocation of `rm`. I don't know what that's about, but that or even this patch doesn't affect my ability to build negatively. LGTM Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers > > $(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 > -- Thanks, ~Nick Desaulniers