New upstream version 18.02
[deb_dpdk.git] / mk / toolchain / clang / rte.toolchain-compat.mk
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
3
4 #
5 # CPUID-related options
6 #
7 # This was added to support compiler versions which might not support all the
8 # flags we need
9 #
10
11 # find out CLANG version
12
13 CLANG_VERSION := $(shell $(CC) -v 2>&1 | \
14         sed -n "s/.*version \([0-9]*\.[0-9]*\).*/\1/p")
15
16 CLANG_MAJOR_VERSION := $(shell echo $(CLANG_VERSION) | cut -f1 -d.)
17
18 CLANG_MINOR_VERSION := $(shell echo $(CLANG_VERSION) | cut -f2 -d.)
19
20 ifeq ($(shell test $(CLANG_MAJOR_VERSION)$(CLANG_MINOR_VERSION) -lt 35 && echo 1), 1)
21         CC_SUPPORTS_Z := false
22 endif