From: Ferruh Yigit Date: Mon, 25 Jul 2016 12:55:48 +0000 (+0100) Subject: mk: fix clang version query X-Git-Tag: spdx-start~6078 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=50e315fca2c0af4a0382ad5cb71c61aff968c543;p=dpdk.git 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 Tested-by: Bruce Richardson --- diff --git a/mk/toolchain/clang/rte.toolchain-compat.mk b/mk/toolchain/clang/rte.toolchain-compat.mk index f995b0b06a..03e5a97de6 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.)