Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4150909pxu; Wed, 9 Dec 2020 09:33:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2aKXOySdInIYZ/1V4WL9nZlQMT0Zk7GrHfXZUCuY6Cuz6YeW1d7ODq8vhiGBno9bIFkYG X-Received: by 2002:a50:aac8:: with SMTP id r8mr2952586edc.9.1607535183407; Wed, 09 Dec 2020 09:33:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607535183; cv=none; d=google.com; s=arc-20160816; b=ui8FPoLLcfFDZVroPAnm9p5PNqA+Nt24gdTGY0zbaTsBSq1Kve7mjdU/10z2rC3zI9 7xWegeXpok+zq+RBj2Gyl+4owcR2Z6wyXt0W9Etw0+lHPdtxcD7r4ycm4Pq3O3Hq5vKr 9q7lqNx19B6iC7GOmv/iCFTWSWbibY1NuPQr/BpqfQ6yudTnYEk3NV3qLUPO7Rs+8pXR 4kqAVetjQsIxaVQ/E//Zmy4MtSwateBaYiDCX5jSxDekUmFExNcbD55zepbEO48a97lz HOq2ocbzBzERLPIfGdFFik07z2zTEfrbp97cgdvTZFbkzwcFHwV2cYnaf9CmUdSkVNMF EUFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=PJDPns7fW65ppCYdEdMP7fXVZiQfHtA31Im46k8ei4E=; b=YxHuQgw+ndUwAtfr6c+MCpvg0djujh47PSJRazA5auovqudTzsU5Lk5JWtp7000j/R j4cSIjNXIHNADvWszFQhzBqAL6LJmR6hgcldKVNd+mB70kzg4FeJosnaCmBCd+jgCMDD MUAwW3J5dEaOL4ssNNMm9izRSKHrMx3vFcssko6PbDh93n3mcq5qGteZApanKnNHz0DT wwo4ReipjeIfcqNaS7rVZiLPNl5Fo4XmlQ0cwzfoo4uubvE0qZKZGy8r6+TKoa1zvhD7 X83DYd84i5mxxQ4uEl/U76RnY6WHSogtsB6S9njna5YCpWn2TmmIKw4taGzt4+19w2tw pGRg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si1146416ede.523.2020.12.09.09.32.34; Wed, 09 Dec 2020 09:33:03 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732640AbgLIR3x (ORCPT + 99 others); Wed, 9 Dec 2020 12:29:53 -0500 Received: from foss.arm.com ([217.140.110.172]:37972 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728369AbgLIR3x (ORCPT ); Wed, 9 Dec 2020 12:29:53 -0500 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 0DD0B1FB; Wed, 9 Dec 2020 09:29:07 -0800 (PST) Received: from [10.37.8.43] (unknown [10.37.8.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F37163F68F; Wed, 9 Dec 2020 09:29:05 -0800 (PST) Subject: Re: [PATCH 1/2] ld-version: use /usr/bin/env awk for shebank To: Dominique Martinet , Masahiro Yamada , Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org References: <1606828650-29841-1-git-send-email-asmadeus@codewreck.org> From: Vincenzo Frascino Message-ID: <69c82aee-59ec-f8d8-9546-b38f85bf08c0@arm.com> Date: Wed, 9 Dec 2020 17:32:27 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1606828650-29841-1-git-send-email-asmadeus@codewreck.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dominique, On 12/1/20 1:17 PM, Dominique Martinet wrote: > /usr/bin/awk is not garanteed to exist (and doesn't on e.g. nixos), > using /usr/bin/env to have it look in PATH is more robust > This patch breaks the compilation on Ubuntu 16.04 and 18.04 in fact: make[1]: Entering directory '/data1/Projects/LinuxKernel/linux-out' GEN Makefile HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/parser.tab.o HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTCC scripts/kconfig/util.o HOSTLD scripts/kconfig/conf *** Default configuration is based on 'defconfig' /usr/bin/env: invalid option -- 'S' Try '/usr/bin/env --help' for more information. init/Kconfig:39: syntax error init/Kconfig:38: invalid statement /data1/Projects/LinuxKernel/linux-mte/scripts/kconfig/Makefile:80: recipe for target 'defconfig' failed make[2]: *** [defconfig] Error 1 /data1/Projects/LinuxKernel/linux-mte/Makefile:602: recipe for target 'defconfig' failed make[1]: *** [defconfig] Error 2 make[1]: Leaving directory '/data1/Projects/LinuxKernel/linux-out' Makefile:185: recipe for target '__sub-make' failed make: *** [__sub-make] Error 2 The problem seems to be that the minimum version of env that supports '-S' is 8.30. Reverting the patch fixes the issue. Thanks! > Signed-off-by: Dominique Martinet > --- > I've been carrying these two patchs for local kernel development on > nixos for a while, I don't think it'd break anything for anyone so > might as well submit these -- please consider it :) > > scripts/ld-version.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh > index f2be0ff9a738..05476b8f8925 100755 > --- a/scripts/ld-version.sh > +++ b/scripts/ld-version.sh > @@ -1,4 +1,4 @@ > -#!/usr/bin/awk -f > +#!/usr/bin/env -S awk -f > # SPDX-License-Identifier: GPL-2.0 > # extract linker version number from stdin and turn into single number > { > -- Regards, Vincenzo