X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=Kbuild.common;h=fa2f20ce135e209c26d54ac5ca586280b3306552;hb=refs%2Fheads%2Fstable-2.12;hp=09296e7032af804303e8eb8b3cc5dedff72ac3b7;hpb=2bf9218e860dc384419eda9ebdf561d86f38a85e;p=lttng-modules.git diff --git a/Kbuild.common b/Kbuild.common index 09296e70..fa2f20ce 100644 --- a/Kbuild.common +++ b/Kbuild.common @@ -1,5 +1,9 @@ # SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) +ccflags-y += -DLTTNG_LINUX_MAJOR=$(VERSION) +ccflags-y += -DLTTNG_LINUX_MINOR=$(PATCHLEVEL) +ccflags-y += -DLTTNG_LINUX_PATCH=$(SUBLEVEL) + # Work-around for distro-specific public modules ABI breakages. # Some distributions break the public module instrumentation ABI # compared to upstream stable kernels without providing other mean than @@ -21,7 +25,9 @@ endif SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-sle-version.sh $(CURDIR)) ifneq ($(SLE_API_VERSION), 0) - ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION) + ccflags-y += -DSLE_API_VERSION_MAJOR=$(word 1, $(SLE_API_VERSION)) + ccflags-y += -DSLE_API_VERSION_MINOR=$(word 2, $(SLE_API_VERSION)) + ccflags-y += -DSLE_API_VERSION_PATCH=$(word 3, $(SLE_API_VERSION)) endif FEDORA_REVISION_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-fedora-version.sh $(CURDIR))