summaryrefslogtreecommitdiffstats
path: root/src/seastar/dpdk/mk/toolchain/clang/rte.toolchain-compat.mk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /src/seastar/dpdk/mk/toolchain/clang/rte.toolchain-compat.mk
parentInitial commit. (diff)
downloadceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz
ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/seastar/dpdk/mk/toolchain/clang/rte.toolchain-compat.mk')
-rw-r--r--src/seastar/dpdk/mk/toolchain/clang/rte.toolchain-compat.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/seastar/dpdk/mk/toolchain/clang/rte.toolchain-compat.mk b/src/seastar/dpdk/mk/toolchain/clang/rte.toolchain-compat.mk
new file mode 100644
index 000000000..e6189b498
--- /dev/null
+++ b/src/seastar/dpdk/mk/toolchain/clang/rte.toolchain-compat.mk
@@ -0,0 +1,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