From patchwork Mon Jul 25 12:55:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 15009 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 8620C5593; Mon, 25 Jul 2016 14:55:55 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 977553978 for ; Mon, 25 Jul 2016 14:55:53 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 25 Jul 2016 05:55:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.28,419,1464678000"; d="scan'208"; a="1028639274" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 25 Jul 2016 05:55:52 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u6PCtplA026465; Mon, 25 Jul 2016 13:55:51 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u6PCtoDh027688; Mon, 25 Jul 2016 13:55:50 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u6PCtoMf027684; Mon, 25 Jul 2016 13:55:50 +0100 X-Authentication-Warning: sivswdev02.ir.intel.com: fyigit set sender to ferruh.yigit@intel.com using -f From: Ferruh Yigit To: dev@dpdk.org Cc: Thomas Monjalon Date: Mon, 25 Jul 2016 13:55:48 +0100 Message-Id: <1469451349-27653-1-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH 1/2] mk: get correct clang version X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -dumpversion is for gcc compatibility and doesn't return actual clang version. -dumpversion only returns 4.2.1 for a long time. Fixes: 2ef6eea891e5 ("mk: add clang toolchain") Signed-off-by: Ferruh Yigit Tested-by: Bruce Richardson --- mk/toolchain/clang/rte.toolchain-compat.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mk/toolchain/clang/rte.toolchain-compat.mk b/mk/toolchain/clang/rte.toolchain-compat.mk index f995b0b..03e5a97 100644 --- a/mk/toolchain/clang/rte.toolchain-compat.mk +++ b/mk/toolchain/clang/rte.toolchain-compat.mk @@ -38,6 +38,8 @@ # find out CLANG version -CLANG_MAJOR_VERSION = $(shell $(CC) -dumpversion | cut -f1 -d.) +CLANG_VERSION := $(shell $(CC) -v 2>&1 | grep version | sed "s/.*version \([0-9]*\.[0-9]*\).*/\1/") -CLANG_MINOR_VERSION = $(shell $(CC) -dumpversion | cut -f2 -d.) +CLANG_MAJOR_VERSION := $(shell echo $(CLANG_VERSION) | cut -f1 -d.) + +CLANG_MINOR_VERSION := $(shell echo $(CLANG_VERSION) | cut -f2 -d.)