aboutsummaryrefslogtreecommitdiffstats
path: root/mk/toolchain/clang/rte.toolchain-compat.mk
blob: e6189b498d1d73b0bff4a3b6bff1b7cad37b4d7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation

#
# CPUID-related options
#
# This was added to support compiler versions which might not support all the
# flags we need
#

# find out CLANG version

CLANG_VERSION := $(shell $(CC) -v 2>&1 | \
	sed -n "s/.*version \([0-9]*\.[0-9]*\).*/\1/p")

CLANG_MAJOR_VERSION := $(shell echo $(CLANG_VERSION) | cut -f1 -d.)

CLANG_MINOR_VERSION := $(shell echo $(CLANG_VERSION) | cut -f2 -d.)

ifeq ($(shell test $(CLANG_MAJOR_VERSION)$(CLANG_MINOR_VERSION) -lt 35 && echo 1), 1)
	CC_SUPPORTS_Z := false
endif