Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5ACE2C43334 for ; Wed, 22 Jun 2022 12:35:37 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.353839.580833 (Exim 4.92) (envelope-from ) id 1o3zZu-0001r3-SD; Wed, 22 Jun 2022 12:35:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 353839.580833; Wed, 22 Jun 2022 12:35:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o3zZu-0001qw-PF; Wed, 22 Jun 2022 12:35:26 +0000 Received: by outflank-mailman (input) for mailman id 353839; Wed, 22 Jun 2022 12:35:25 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o3zZt-0001qo-6V for xen-devel@lists.xenproject.org; Wed, 22 Jun 2022 12:35:25 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id c9076705-f227-11ec-b725-ed86ccbb4733; Wed, 22 Jun 2022 14:35:23 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2C27413D5; Wed, 22 Jun 2022 05:35:23 -0700 (PDT) Received: from [10.57.38.102] (unknown [10.57.38.102]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7065A3F534; Wed, 22 Jun 2022 05:35:21 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c9076705-f227-11ec-b725-ed86ccbb4733 Message-ID: Date: Wed, 22 Jun 2022 14:35:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [XEN PATCH v2.1 1/4] build,include: rework shell script for headers++.chk Content-Language: en-US To: Anthony PERARD , xen-devel@lists.xenproject.org Cc: Bertrand Marquis , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu References: <20220614162248.40278-1-anthony.perard@citrix.com> <20220621101128.50543-1-anthony.perard@citrix.com> From: Michal Orzel In-Reply-To: <20220621101128.50543-1-anthony.perard@citrix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Anthony, On 21.06.2022 12:11, Anthony PERARD wrote: > The command line generated for headers++.chk by make is quite long, > and in some environment it is too long. This issue have been seen in > Yocto build environment. > > Error messages: > make[9]: execvp: /bin/sh: Argument list too long > make[9]: *** [include/Makefile:181: include/headers++.chk] Error 127 > > Rework so that we do the foreach loop in shell rather that make to > reduce the command line size by a lot. We also need a way to get > headers prerequisite for some public headers so we use a switch "case" > in shell to be able to do some simple pattern matching. Variables > alone in POSIX shell don't allow to work with associative array or > variables with "/". > > Also rework headers99.chk as it has a similar implementation, even if > with only two headers to check the command line isn't too long at the > moment. > > Reported-by: Bertrand Marquis > Fixes: 28e13c7f43 ("build: xen/include: use if_changed") > Signed-off-by: Anthony PERARD > Reviewed-by: Bertrand Marquis Reviewed-by: Michal Orzel Tested-by: Michal Orzel Cheers, Michal