callstack context: use delimiter when stack is incomplete
[lttng-modules.git] / Kbuild.common
CommitLineData
72e6c528
MD
1# Work-around for distro-specific public modules ABI breakages.
2# Some distributions break the public module instrumentation ABI
3# compared to upstream stable kernels without providing other mean than
4# the kernel EXTRAVERSION to figure it out. Translate this information
5# into a define visible from the C preprocessor.
6
b933d85e 7DEB_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-debian-version.sh $(CURDIR))
72e6c528
MD
8
9ifneq ($(DEB_API_VERSION), 0)
a8907e9a 10 ccflags-y += -DDEBIAN_API_VERSION=$(DEB_API_VERSION)
72e6c528 11endif
b4c8e4d3 12
c94ac1ac
MJ
13RHEL_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-rhel-version.sh $(CURDIR))
14
15ifneq ($(RHEL_API_VERSION), 0)
16 ccflags-y += -DRHEL_API_VERSION=$(RHEL_API_VERSION)
17endif
18
ce66b486
MJ
19SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-sle-version.sh $(CURDIR))
20
21ifneq ($(SLE_API_VERSION), 0)
22 ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION)
23endif
24
e4838da1
LG
25FEDORA_REVISION_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-fedora-version.sh $(CURDIR))
26
27ifneq ($(FEDORA_REVISION_VERSION), 0)
28 ccflags-y += -DFEDORA_REVISION_VERSION=$(FEDORA_REVISION_VERSION)
29endif
30
b933d85e 31RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/rt-patch-version.sh $(CURDIR))
b4c8e4d3
MJ
32
33ifneq ($(RT_PATCH_VERSION), 0)
34 ccflags-y += -DRT_PATCH_VERSION=$(RT_PATCH_VERSION)
35endif
f61d99f9
MJ
36
37# Starting with kernel 4.12, the ftrace header was moved to private headers
38# and as such is not available when building against distro headers instead
39# of the full kernel sources. In the situation, define LTTNG_FTRACE_MISSING_HEADER
40# so we can enable the compat code even if CONFIG_DYNAMIC_FTRACE is enabled.
41ifneq ($(CONFIG_DYNAMIC_FTRACE),)
42 ftrace_dep = $(srctree)/kernel/trace/trace.h
43 ftrace_dep_check = $(wildcard $(ftrace_dep))
44 have_ftrace_header = $(shell \
45 if [ $(VERSION) -ge 5 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 12 \) ] ; then \
46 if [ -z "$(ftrace_dep_check)" ] ; then \
47 echo "no" ; \
48 exit ; \
49 fi; \
50 fi; \
51 echo "yes" ; \
52 )
53 ifeq ($(have_ftrace_header), no)
54 ccflags-y += -DLTTNG_FTRACE_MISSING_HEADER
55 endif
56endif
e6213a91
MJ
57
58# vim:syntax=make
This page took 0.027405 seconds and 4 git commands to generate.