f-stack/dpdk/mk/toolchain/clang/rte.toolchain-compat.mk

23 lines
582 B
Makefile
Raw Normal View History

2019-06-25 14:12:58 +03:00
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
2017-04-21 13:43:26 +03:00
#
# 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")
2017-04-21 13:43:26 +03:00
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