From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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: , X-List-Received-Date: Mon, 25 Jul 2016 12:55:54 -0000 -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 --- 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.) -- 2.7.4