Received: by 10.192.165.156 with SMTP id m28csp712364imm; Mon, 16 Apr 2018 07:33:13 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+zPYxeAA2YYZWS4CiwdtBOn16a23BRVCNYFWRzzBLCgJHZ9m8EbFPb7AxriRS1Vtxn4FWe X-Received: by 10.167.128.71 with SMTP id y7mr21909842pfm.12.1523889193829; Mon, 16 Apr 2018 07:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523889193; cv=none; d=google.com; s=arc-20160816; b=a29opjdjfA8u2BDGiJlDkDrCZlnmK1zwnwCK52JibsECNwxab9v3mqzBgn2eU/BswA fq4tiN4twAjYCrxl1gh5KgdfLRYIDbvr3K4KPhf/2KMRRv+7obBkz+8q10tF0SzUQ5qZ +MuyoHtPdr+uEiQGwVTBt4yGMSYHHMysknBw9H/h3vC6P+7U5xEZTNeLhklcaglgF4nx r4lH6hSODdGb5uPTRZlwlFCXFprMMuMN/zRfTVAEc/QmUyBYOXg8MqIhfF7jkDz10wxX sxY2a42bbsPo0SjubGVNyW4K59lJ/byQZr+IB3lLOGnlFSA+bmrU+zwd3giKJE/rv12v 79oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=1OK4DKXH7X7hIT9vTQmBqgbBL5G2DkeaVm87XoKcBKo=; b=FDLyv7hpbUP98kSBFfVEDOTrpjmNfZG4XXuEJtHYEGwPjXtJIR+R4ffNICXxXOdPWq R9aq5zLds5NGfWZFLv9k+CS4pWBHFeKILd3k3FHxIIAoP2kHk9tLGCmKKKaa7fxMM5yU JCcSFXNPRLkst7d8MP2qWAsrWfmkqOdwiU/hlpK2nRiicV+ZPb2VeIuJNG8WeHStF45R 7JBkmVe0e1suSsH/Bpt6E9In/l4H5yanz0h3KbFGiI8gv3xn9Qake6MUOt0Ljh3/gtUj 0HlsNTXlImmLCsHootb6j9DMYURRmc+0er4adO9frCWEY4QRpB70x+H/uTGixt1l7AzX xmnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=eR162VqR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s3si10863704pfj.50.2018.04.16.07.32.59; Mon, 16 Apr 2018 07:33:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=eR162VqR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753510AbeDPMTU (ORCPT + 99 others); Mon, 16 Apr 2018 08:19:20 -0400 Received: from mail-io0-f177.google.com ([209.85.223.177]:42745 "EHLO mail-io0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753199AbeDPMTO (ORCPT ); Mon, 16 Apr 2018 08:19:14 -0400 Received: by mail-io0-f177.google.com with SMTP id d5so17767428iob.9 for ; Mon, 16 Apr 2018 05:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landley-net.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=1OK4DKXH7X7hIT9vTQmBqgbBL5G2DkeaVm87XoKcBKo=; b=eR162VqRTaEuBoyzyWzJm2mo0W9OsJaJPwyQXyPOHcvOjlOrWxCtlOwfjfsHdQybeJ bhNuGBEIYGVQiiMb5Fz1w7vNBH/Lz4eEqYeuw4Gb/3Oy4OTlVjjRgjVrTRmkhxU7OARk OjnfNIQ/CVmsFw5Wy8AWdZ0WoFCrbncy4XDEabL5gNzlB4mlHi4dcnT3I1z0Plko+hHf 7AKbvCtQvfK0tvHHm+Mq3xqzrhEZcA3cF3VBeBfH4J9cOQ8oz5E3Ri5wYBuZiwQURJXR wB9xgSTpe/28vrLd4ENwJF/JIhf/9YhoZ0sNKQg+92KWkNpKSdL6WtutfvE5uDLUdZrs NpLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1OK4DKXH7X7hIT9vTQmBqgbBL5G2DkeaVm87XoKcBKo=; b=uhAQymvba8VVEvyfTkJEAEMH1iiIqOcG1Ndqi2RpPUAfTCkn+8AazCR2qHsCFKFjpN AoSUEtF1gF8lhaWowioHO8aedu3CgAsOUKhjIW4HBax9nT+bjtK5ZsbCLVq73v4ALFg5 ZAzB2Jz+0SbB57x8BE62gVJQdw17IN41S+gKlHUC/hS3cxcgObGu2in7DkS+AIPG5s/I cJBTU6UNTOcD3YiOJDIAo0BZHC7fCmp0hel4HIgKXGSXZqQQ2XdmlCYZeMCCTzhsd1rk W5aZM0Y1zwaEcl05yWphUcosTFEGyLx3RXSLlRR22LkjQVUUh7U4KfmSDNJMvNysSLvI P7Dg== X-Gm-Message-State: ALQs6tCwkkEPfRSzDZwE3NWYDtt5j1RtsYwHBzOWcmISwmfOblnXNoRA uGAi/Sv13qbVtIkERC6EubnybA== X-Received: by 10.107.70.4 with SMTP id t4mr2894338ioa.203.1523881153521; Mon, 16 Apr 2018 05:19:13 -0700 (PDT) Received: from [192.168.42.190] ([172.58.139.20]) by smtp.googlemail.com with ESMTPSA id l63sm5910334ioe.80.2018.04.16.05.19.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 05:19:13 -0700 (PDT) Subject: Re: [PATCH] Replace unnecessary perl with sed, printf, and the shell $(( )) operator. To: Russell King - ARM Linux Cc: "linux-kernel@vger.kernel.org" , kstewart@linuxfoundation.org, pombredanne@nexb.com, tglx@linutronix.de, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, Tony Lindgren , Keerthy References: <9c72100c-b3e4-07ca-1784-fda2ac9d708c@landley.net> <20180416120930.GS16141@n2100.armlinux.org.uk> From: Rob Landley Message-ID: <70d3e6cb-2ea3-1006-9af8-126cd3ea7fbb@landley.net> Date: Mon, 16 Apr 2018 07:19:11 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180416120930.GS16141@n2100.armlinux.org.uk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/16/2018 07:09 AM, Russell King - ARM Linux wrote: > On Wed, Apr 11, 2018 at 08:38:37PM -0500, Rob Landley wrote: >> You can build a kernel in a cross compiling environment that doesn't have perl >> in the $PATH. Commit 429f7a062e3b broke that for 32 bit arm. Fix it. ... > This looks more complicated than necessary, and therefore less readable. > What's wrong with: > > KBSS_SZ := $(shell echo $$(($$($(CROSS_COMPILE)nm $(obj)/../../../../vmlinux | \ > sed -n -e 's/^\([^ ]*\) B __bss_start$$/-0x\1/p' \ > -e 's/^\([^ ]*\) B __bss_stop$$/+0x\1/p') )) > > The sed command produces output such as: > > -0xc0955e58 > +0xc10b0f9c > > which the shell is then able to evaluate and produce a decimal number. > This seems to work fine with both bash and dash. Yes, that is better. Acked-by: Rob Landley Thanks, Rob