From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]:26295 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727455AbfFCLQx (ORCPT ); Mon, 3 Jun 2019 07:16:53 -0400 From: David Laight Subject: RE: [PATCH] kbuild: use more portable 'command -v' for cc-cross-prefix Date: Mon, 3 Jun 2019 11:16:49 +0000 Message-ID: <3dcacca3f71c46cc98fa64b13a405b59@AcuMS.aculab.com> References: <20190603104902.23799-1-yamada.masahiro@socionext.com> In-Reply-To: <20190603104902.23799-1-yamada.masahiro@socionext.com> Content-Language: en-US MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: 'Masahiro Yamada' , "linux-kbuild@vger.kernel.org" Cc: Vineet Gupta , Alexey Brodkin , "linux-snps-arc@lists.infradead.org" , linux-stable , Michal Marek , "linux-kernel@vger.kernel.org" From: Masahiro Yamada > Sent: 03 June 2019 11:49 > > To print the pathname that will be used by shell in the current > environment, 'command -v' is a standardized way. [1] > > 'which' is also often used in scripting, but it is not portable. All uses of 'which' should be expunged. It is a bourne shell script that is trying to emulate a csh builtin. It is doomed to fail in corner cases. ISTR it has serious problems with shell functions and aliases. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)