From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 7E42F374C for ; Fri, 7 Apr 2017 10:15:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491552931; x=1523088931; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=pCpxkaIQYcDkxbJfEP2AxBidzwG1wGOx8CNCHBv9Av8=; b=VvVbxjTdHW3oNW1eAeaAW32ot6lzZ3/mCCV8IN9Mg01WeF+eilMJvdZP MDfbNcSUwZ0Iqnxer78GMx/fKp31Cg==; Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2017 01:15:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,164,1488873600"; d="scan'208";a="953273632" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga003.jf.intel.com with ESMTP; 07 Apr 2017 01:15:30 -0700 From: Yuanhan Liu To: Olivier Matz Cc: Yuanhan Liu , Thomas Monjalon , dpdk stable Date: Fri, 7 Apr 2017 16:11:59 +0800 Message-Id: <1491552724-3034-42-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1491552724-3034-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1491552724-3034-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'mk: fix shell errors when building with clang' has been queued to LTS release 16.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Apr 2017 08:15:32 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/11/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 694225f4a3efc50cc8f24de7ebf8a9dbfb66c840 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Thu, 6 Apr 2017 16:12:41 +0200 Subject: [PATCH] mk: fix shell errors when building with clang [ upstream commit e629b8dbd9b38259e5fe32475fdf3e56176d8f39 ] 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") Signed-off-by: Olivier Matz Acked-by: Thomas Monjalon --- mk/toolchain/clang/rte.toolchain-compat.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mk/toolchain/clang/rte.toolchain-compat.mk b/mk/toolchain/clang/rte.toolchain-compat.mk index b734413..9e095d3 100644 --- a/mk/toolchain/clang/rte.toolchain-compat.mk +++ b/mk/toolchain/clang/rte.toolchain-compat.mk @@ -38,7 +38,8 @@ # find out CLANG version -CLANG_VERSION := $(shell $(CC) -v 2>&1 | grep version | sed "s/.*version \([0-9]*\.[0-9]*\).*/\1/") +CLANG_VERSION := $(shell $(CC) -v 2>&1 | \ + sed -n "s/.*version \([0-9]*\.[0-9]*\).*/\1/p") CLANG_MAJOR_VERSION := $(shell echo $(CLANG_VERSION) | cut -f1 -d.) -- 1.9.0