summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFerruh Yigit <ferruh.yigit@intel.com>2016-07-25 13:55:48 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-07-25 17:48:30 +0200
commit50e315fca2c0af4a0382ad5cb71c61aff968c543 (patch)
tree6f8d85dc919124f4df1d0ba72687ec452b061c92
parent6baf0eca5cfa068621ee15605159523918109661 (diff)
downloaddpdk-50e315fca2c0af4a0382ad5cb71c61aff968c543.zip
dpdk-50e315fca2c0af4a0382ad5cb71c61aff968c543.tar.gz
dpdk-50e315fca2c0af4a0382ad5cb71c61aff968c543.tar.xz
mk: fix clang version query
-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 <ferruh.yigit@intel.com> Tested-by: Bruce Richardson <bruce.richardson@intel.com>
-rw-r--r--mk/toolchain/clang/rte.toolchain-compat.mk6
1 files 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.)