From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] mk: fix shell errors when building with clang Date: Thu, 06 Apr 2017 16:33:31 +0200 Message-ID: <2919831.1aLGMpDVn7@xps13> References: <20170406141241.14061-1-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, stable@dpdk.org To: Olivier Matz Return-path: Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) by dpdk.org (Postfix) with ESMTP id 114A31E20 for ; Thu, 6 Apr 2017 16:33:32 +0200 (CEST) Received: by mail-wr0-f175.google.com with SMTP id t20so65295717wra.1 for ; Thu, 06 Apr 2017 07:33:32 -0700 (PDT) In-Reply-To: <20170406141241.14061-1-olivier.matz@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-04-06 16:12, Olivier Matz: > On my system, the version of the compiler is not properly retrieved, > resulting in strange logs when building the dpdk: > /bin/sh: line 0: test: too many arguments > > This happens when mk/toolchain/clang/rte.toolchain-compat.mk is included > from a directory that use gcc to build (ex: kernel modules). In that > case, the CLANG_VERSION variable contains spaces that breaks some shell > calls to the test program. > > The error is because the output of "gcc -v" on my system contains 2 lines > that matches the "version" string: > > Configured with: ../src/configure -v \ > --with-pkgversion='Debian 6.3.0-6' [...] > gcc version 6.3.0 20170205 (Debian 6.3.0-6) > > This may be specific to Debian. Fix it by specializing the grep. > > Fixes: 2ef6eea891e5 ("mk: add clang toolchain") > > Cc: stable@dpdk.org > Signed-off-by: Olivier Matz Acked-by: Thomas Monjalon Applied, thanks