Rename Makefile.ABI.workarounds to Kbuild.common
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 Rename Makefile.ABI.workarounds to Kbuild.common
This file is now used for code which is common to all Kbuild files.
--- Kbuild.common | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 2 +- Makefile.ABI.workarounds | 50 ------------------------------------------------ lib/Kbuild | 2 +- probes/Kbuild | 2 +- tests/Kbuild | 2 +- 6 files changed, 54 insertions(+), 54 deletions(-) create mode 100644 Kbuild.common delete mode 100644 Makefile.ABI.workarounds
Kbuild.common new file +50 -0
@@ -0,0 +1,50 @@ +# 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 +# the kernel EXTRAVERSION to figure it out. Translate this information +# into a define visible from the C preprocessor. + +DEB_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-debian-version.sh $(CURDIR)) + +ifneq ($(DEB_API_VERSION), 0) + ccflags-y += -DDEBIAN_API_VERSION=$(DEB_API_VERSION) +endif + +RHEL_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-rhel-version.sh $(CURDIR)) + +ifneq ($(RHEL_API_VERSION), 0) + ccflags-y += -DRHEL_API_VERSION=$(RHEL_API_VERSION) +endif + +SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-sle-version.sh $(CURDIR)) + +ifneq ($(SLE_API_VERSION), 0) + ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION) +endif + +RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/rt-patch-version.sh $(CURDIR)) + +ifneq ($(RT_PATCH_VERSION), 0) + ccflags-y += -DRT_PATCH_VERSION=$(RT_PATCH_VERSION) +endif + +# Starting with kernel 4.12, the ftrace header was moved to private headers +# and as such is not available when building against distro headers instead +# of the full kernel sources. In the situation, define LTTNG_FTRACE_MISSING_HEADER +# so we can enable the compat code even if CONFIG_DYNAMIC_FTRACE is enabled. +ifneq ($(CONFIG_DYNAMIC_FTRACE),) + ftrace_dep = $(srctree)/kernel/trace/trace.h + ftrace_dep_check = $(wildcard $(ftrace_dep)) + have_ftrace_header = $(shell \ + if [ $(VERSION) -ge 5 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 12 \) ] ; then \ + if [ -z "$(ftrace_dep_check)" ] ; then \ + echo "no" ; \ + exit ; \ + fi; \ + fi; \ + echo "yes" ; \ + ) + ifeq ($(have_ftrace_header), no) + ccflags-y += -DLTTNG_FTRACE_MISSING_HEADER + endif +endif
Makefile +1 -1
@@ -29,7 +29,7 @@ ifneq ($(KERNELRELEASE),) endif endif - include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds + include $(TOP_LTTNG_MODULES_DIR)/Kbuild.common ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
Makefile.ABI.workarounds deleted +0 -50
50 lines not on this page · raw message
lib/Kbuild +1 -1
@@ -1,6 +1,6 @@ TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/.. -include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds +include $(TOP_LTTNG_MODULES_DIR)/Kbuild.common ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
probes/Kbuild +1 -1
@@ -1,6 +1,6 @@ TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/.. -include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds +include $(TOP_LTTNG_MODULES_DIR)/Kbuild.common ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
tests/Kbuild +1 -1
@@ -1,6 +1,6 @@ TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/.. -include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds +include $(TOP_LTTNG_MODULES_DIR)/Kbuild.common ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
Signature · 6 lines
2.7.4 _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Mathieu Desnoyers
AppliedRe: [PATCH lttng-modules 1/2] Fix: handle missing ftrace header on v4.12
In reply to a message not in the archiveMerged into master, 2.10, 2.9, 2.8, thanks!
Mathieu
Quoted 92 lines · ----- On Jun 23, 2017, at 2:29 PM, Michael Jeanson [email protected] wrote:
Properly handle the case where we build against the distro headers of a kernel >= 4.12 and ftrace is enabled but the private header is unavailable.
Signed-off-by Michael Jeanson <[email protected]>---
Makefile.ABI.workarounds | 21 +++++++++++++++++++++ lttng-events.h | 2 +- probes/Kbuild | 19 ++++--------------- 3 files changed, 26 insertions(+), 16 deletions(-)Makefile.ABI.workarounds +0
-0@@ -27,3 +27,24 @@ RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/rt-patch-version.sh $(CURDIR) ifneq ($(RT_PATCH_VERSION), 0) ccflags-y += -DRT_PATCH_VERSION=$(RT_PATCH_VERSION)endif
Makefile.ABI.workarounds +4
-0+ +# Starting with kernel 4.12, the ftrace header was moved to private headers +# and as such is not available when building against distro headers instead +# of the full kernel sources. In the situation, define
LTTNG_FTRACE_MISSING_HEADERMakefile.ABI.workarounds +6
-0+# so we can enable the compat code even if CONFIG_DYNAMIC_FTRACE is enabled. +ifneq ($(CONFIG_DYNAMIC_FTRACE),) + ftrace_dep = $(srctree)/kernel/trace/trace.h + ftrace_dep_check = $(wildcard $(ftrace_dep)) + have_ftrace_header = $(shell \ + if [ $(VERSION) -ge 5 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 12 \) ] ;then \
Makefile.ABI.workarounds +11
-0+ if [ -z "$(ftrace_dep_check)" ] ; then \ + echo "no" ; \ + exit ; \ + fi; \ + fi; \ + echo "yes" ; \ + ) + ifeq ($(have_ftrace_header), no) + ccflags-y += -DLTTNG_FTRACE_MISSING_HEADER + endif +endiflttng-events.h +1
-1@@ -810,7 +810,7 @@ int lttng_kretprobes_event_enable_state(struct lttng_event *event, }#endif -#ifdef CONFIG_DYNAMIC_FTRACE +#if defined(CONFIG_DYNAMIC_FTRACE ) && !defined(LTTNG_FTRACE_MISSING_HEADER ) int lttng_ftrace_register(const char *name, const char *symbol_name,struct lttng_event *event);probes/Kbuild +0
-0@@ -259,22 +259,11 @@ ifneq ($(CONFIG_KRETPROBES),)endif #
CONFIG_KRETPROBESifneq ($(CONFIG_DYNAMIC_FTRACE),)
probes/Kbuild +0
-4- ftrace_dep = $(srctree)/kernel/trace/trace.h - ftrace_dep_check = $(wildcard $(ftrace_dep)) - ftrace = $(shell \ - if [ $(VERSION) -ge 5 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 12 \) ] ;then \
probes/Kbuild +4
-11- if [ -z "$(ftrace_dep_check)" ] ; then \ - echo "warn" ; \ - exit ; \ - fi; \ - fi; \ - echo "lttng-ftrace.o" ; \ - ) - ifeq ($(ftrace),warn) + ifeq ($(have_ftrace_header),yes) + obj-$(CONFIG_LTTNG) += lttng-ftrace.o + else $(warning Files $(ftrace_dep) not found. Probe "ftrace" is disabled. Use full kernel source tree to enable it.) - ftrace = - endif # $(ftrace),warn - obj-$(CONFIG_LTTNG) += $(ftrace) + endifendif #
CONFIG_DYNAMIC_FTRACE# vim:syntax=make
--
2.7.4
Signature · 7 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mathieu Desnoyers
AppliedMerged into master, thanks!
Mathieu
Quoted 187 lines · ----- On Jun 23, 2017, at 2:29 PM, Michael Jeanson [email protected] wrote:
This file is now used for code which is common to all
Kbuildfiles.Signed-off-by Michael Jeanson <[email protected]>---
Kbuild.common | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 2 +- Makefile.ABI.workarounds | 50 ------------------------------------------------ lib/Kbuild | 2 +- probes/Kbuild | 2 +- tests/Kbuild | 2 +- 6 files changed, 54 insertions(+), 54 deletions(-)create mode 100644 Kbuild.common
delete mode 100644 Makefile.ABI.workaroundsKbuild.common new file +7
-0@@ -0,0 +1,50 @@ +# 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 +# the kernel EXTRAVERSION to figure it out. Translate this information +# into a define visible from the C preprocessor. + +DEB_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-debian-version.sh$(CURDIR))
Kbuild.common new file +6
-0+ +ifneq ($(DEB_API_VERSION), 0) + ccflags-y += -DDEBIAN_API_VERSION=$(DEB_API_VERSION) +endif + +RHEL_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-rhel-version.sh$(CURDIR))
Kbuild.common new file +12
-0+ +ifneq ($(RHEL_API_VERSION), 0) + ccflags-y += -DRHEL_API_VERSION=$(RHEL_API_VERSION) +endif + +SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-sle-version.sh $(CURDIR)) + +ifneq ($(SLE_API_VERSION), 0) + ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION) +endif + +RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/rt-patch-version.sh$(CURDIR))
Kbuild.common new file +8
-0+ +ifneq ($(RT_PATCH_VERSION), 0) + ccflags-y += -DRT_PATCH_VERSION=$(RT_PATCH_VERSION) +endif + +# Starting with kernel 4.12, the ftrace header was moved to private headers +# and as such is not available when building against distro headers instead +# of the full kernel sources. In the situation, define
LTTNG_FTRACE_MISSING_HEADERKbuild.common new file +6
-0+# so we can enable the compat code even if CONFIG_DYNAMIC_FTRACE is enabled. +ifneq ($(CONFIG_DYNAMIC_FTRACE),) + ftrace_dep = $(srctree)/kernel/trace/trace.h + ftrace_dep_check = $(wildcard $(ftrace_dep)) + have_ftrace_header = $(shell \ + if [ $(VERSION) -ge 5 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 12 \) ] ;then \
Kbuild.common new file +11
-0+ if [ -z "$(ftrace_dep_check)" ] ; then \ + echo "no" ; \ + exit ; \ + fi; \ + fi; \ + echo "yes" ; \ + ) + ifeq ($(have_ftrace_header), no) + ccflags-y += -DLTTNG_FTRACE_MISSING_HEADER + endif +endifMakefile +1
-1@@ -29,7 +29,7 @@ ifneq ($(KERNELRELEASE),) endif endif - include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds + include $(TOP_LTTNG_MODULES_DIR)/Kbuild.common ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)Makefile.ABI.workarounds deleted +0
-7@@ -1,50 +0,0 @@ -# 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 -# the kernel EXTRAVERSION to figure it out. Translate this information -# into a define visible from the C preprocessor. - -DEB_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-debian-version.sh$(CURDIR))
Makefile.ABI.workarounds deleted +0
-6- -ifneq ($(DEB_API_VERSION), 0) - ccflags-y += -DDEBIAN_API_VERSION=$(DEB_API_VERSION) -endif - -RHEL_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-rhel-version.sh$(CURDIR))
Makefile.ABI.workarounds deleted +0
-12- -ifneq ($(RHEL_API_VERSION), 0) - ccflags-y += -DRHEL_API_VERSION=$(RHEL_API_VERSION) -endif - -SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-sle-version.sh $(CURDIR)) - -ifneq ($(SLE_API_VERSION), 0) - ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION) -endif - -RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/rt-patch-version.sh$(CURDIR))
Makefile.ABI.workarounds deleted +0
-8- -ifneq ($(RT_PATCH_VERSION), 0) - ccflags-y += -DRT_PATCH_VERSION=$(RT_PATCH_VERSION) -endif - -# Starting with kernel 4.12, the ftrace header was moved to private headers -# and as such is not available when building against distro headers instead -# of the full kernel sources. In the situation, define
LTTNG_FTRACE_MISSING_HEADERMakefile.ABI.workarounds deleted +0
-6-# so we can enable the compat code even if CONFIG_DYNAMIC_FTRACE is enabled. -ifneq ($(CONFIG_DYNAMIC_FTRACE),) - ftrace_dep = $(srctree)/kernel/trace/trace.h - ftrace_dep_check = $(wildcard $(ftrace_dep)) - have_ftrace_header = $(shell \ - if [ $(VERSION) -ge 5 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 12 \) ] ;then \
Makefile.ABI.workarounds deleted +0
-11- if [ -z "$(ftrace_dep_check)" ] ; then \ - echo "no" ; \ - exit ; \ - fi; \ - fi; \ - echo "yes" ; \ - ) - ifeq ($(have_ftrace_header), no) - ccflags-y += -DLTTNG_FTRACE_MISSING_HEADER - endif -endiflib/Kbuild +0
-0@@ -1,6 +1,6 @@
TOP_LTTNG_MODULES_DIR:= $(shell dirname $(lastword $(MAKEFILE_LIST)))/..lib/Kbuild +1
-1-include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds +include $(TOP_LTTNG_MODULES_DIR)/Kbuild.commonccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
probes/Kbuild +0
-0@@ -1,6 +1,6 @@
TOP_LTTNG_MODULES_DIR:= $(shell dirname $(lastword $(MAKEFILE_LIST)))/..probes/Kbuild +1
-1-include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds +include $(TOP_LTTNG_MODULES_DIR)/Kbuild.commonccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
tests/Kbuild +0
-0@@ -1,6 +1,6 @@
TOP_LTTNG_MODULES_DIR:= $(shell dirname $(lastword $(MAKEFILE_LIST)))/..tests/Kbuild +1
-1-include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds +include $(TOP_LTTNG_MODULES_DIR)/Kbuild.commonccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
--
2.7.4
Signature · 7 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev