Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp580665pxb; Thu, 14 Jan 2021 13:10:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyTNGw/WtCJxepSeCfeCLHsXgRehuJrOszVo9cIX5deusgPTKXX5tJOfVCsrb0m+fgsBfV9 X-Received: by 2002:a17:906:b243:: with SMTP id ce3mr3169506ejb.489.1610658658557; Thu, 14 Jan 2021 13:10:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610658658; cv=none; d=google.com; s=arc-20160816; b=lxm9CRwTATae7IRpmr+er1AwxKZ2t2rjq2IPJtTq4ONiIQ6cVyjpJ/6c/ZTdpOeuiZ lGLwJdSHy/E27y+Iy8blzKwtJS8hDsmDBEC3hZrR3pX1nwQZzp3zaMXie24lqhhXiFAi aRA9ckPfsgqJrxabo7DaUZ6tqD7IYO/j9Z3uMFdfoDwY76ycM9r9pS2e4iYI4D+VGNtV QwsGIqpBUvoLyr68fSGgwTtWlvMqaR8kIY2hG17m+ffg0FwNdf9gHdNfaZoc020NQF/t mCIAdvZHdLnLV97e/X0XZmsrMndk9/ra0xRyjkUyscheypu7/Er6SvKsVxTyKkAFDsnf RcYg== 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=Od5mYrBputSjJFGBKg3W1pEBcGlpib1bLvjQs/hloB4=; b=t5lBpgLhyQ8p9sUCnpSDdqOHji4TEozh/C5Ineqhyn4BMJCndKLuw8s24euX9/NXoG 0TUd8Wm3DgAEbK7piVIFH0ZXp1noFYEOWI3BED4bhAhv2fFfgeT/kt8RSY4bhALrQCkP RHFeFxfJrXFLdd/I2KzVcLwoFAwZ5zEJ2c7UEwi2YlnrY7/PHxzk8uFF6FX0NQ7IZ79T VWtRGmSSUXySoWKfnYpcBDRiCAtQYTQ9a2ZdWd1ic43CIvLqxQTht4bg3AFyjis1V7LI oSBEXa9PQjSsuTW6uFn1AsIXL52SivGBMnVQL7NC1UGYRC9Z4iVZhcc7oY161drt6GUD wGWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="wJfVvK4/"; 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 ds8si2569509ejc.713.2021.01.14.13.10.34; Thu, 14 Jan 2021 13:10:58 -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="wJfVvK4/"; 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 S1728123AbhANVIR (ORCPT + 99 others); Thu, 14 Jan 2021 16:08:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbhANVIQ (ORCPT ); Thu, 14 Jan 2021 16:08:16 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43E9EC061757 for ; Thu, 14 Jan 2021 13:07:36 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id 203so3183681ybz.2 for ; Thu, 14 Jan 2021 13:07:36 -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=Od5mYrBputSjJFGBKg3W1pEBcGlpib1bLvjQs/hloB4=; b=wJfVvK4/Zt5codxwwwZCvvEyV6W+xcr93R8yi2xqrTD/AEYm0/UEQRVfHQBgXXVfm+ IA5j/i0WnmGcUt0XLEyH+zyi1EdQVCzXO0DdogxsmWAfa271IIDAl51KTXbMG+QE70Py iDvYaNyRoDFdkJqSA7Wo7uA4jarprhNN/qfaWxzU5FzGd/Um2/JIl3UAmvHyPEJRXp4I vLbb/B1oWS7mS/Ce/83vC+EfoUDyFOJ1NFqFdOfJ+c8YdT2mSInUgWowzKpsjcON3dS0 4qEXHrdP1JAPg8RMzsuBqFMrh+wEPvovJlyfi6yB/Xk+2NMQDi6/hsg9NZ+X885nQrnk Oq7A== 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=Od5mYrBputSjJFGBKg3W1pEBcGlpib1bLvjQs/hloB4=; b=BX+KptBFg6vblpwep2IUcnAeHNwHDl9Ci/jKN+hUOxQMguVkQ7EScmPgxS6MsWWtSB IrNorBdDwB3Xsdqcmu8LG1zqBdszVQx3bEBLIQ5ph120vTHu4wn+SQfsdln1JwllyZ4K WMId41ilhCFbK6DmAGrdZ7WmLm35sEtW3rnkcBN3v34VYkLZQn53zX7pfnaMeWxGWH36 AKO2haJ+hx/20+5fMZ/+izTIjleCo7nJFTFBBKiK+1LxHHeMjJN3WYmZhAk1/bpowUOX acq1627A7IPdYn+OGSUsuWP0u5kCuAHCPKPafZbKv0bkza5zA9WwA2zY9eAx0Hm9sA71 wXwA== X-Gm-Message-State: AOAM531LQ9kiO4fXntU4PidXCfK0+CsgixYdZLU5iVDvJSUKUcWsvXYs w/NzUqvsGdfuXHn0Sj1o6P3EaJFPvVKBJNFUix0= 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:29c1:: with SMTP id p184mr52665ybp.34.1610658455420; Thu, 14 Jan 2021 13:07:35 -0800 (PST) Date: Thu, 14 Jan 2021 13:07:33 -0800 In-Reply-To: <1610500731-30960-2-git-send-email-jjohnson@codeaurora.org> Message-Id: <20210114210733.3490303-1-ndesaulniers@google.com> Mime-Version: 1.0 References: <1610500731-30960-2-git-send-email-jjohnson@codeaurora.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog Subject: Re: [PATCH 2/2] kbuild: handle excessively long argument lists 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 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 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 Was this build tested? $ make LLVM=1 LLVM_IAS=1 -j72 defconfig scripts/Makefile.build:432: *** extraneous 'endif'. Stop. make: *** [Makefile:535: scripts_basic] Error 2 (Please cc me on v2) > > $(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