From 85b468262e78807248c73cf3f356e393e54d0c56 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 3 May 2017 21:02:49 +0100 Subject: [PATCH] Remove unused liblockdep packaging --- debian/.gitignore | 2 - debian/liblockdep-dev.README.Debian | 13 ---- debian/liblockdep-dev.docs | 1 - debian/liblockdep-dev.install | 3 - debian/lockdep.dirs | 1 - ...blockdep-define-the-array_size-macro.patch | 26 ------- .../liblockdep-enable-wall-by-default.patch | 28 -------- ...efined-but-not-used-warning-for-init.patch | 54 -------------- ...ockdep-fix-set-but-not-used-warnings.patch | 44 ------------ ...dep-fix-undefined-symbol-prandom_u32.patch | 34 --------- ...liblockdep-fix-unused-value-warnings.patch | 72 ------------------- ...e-max_lock_depth-to-avoid-overflowin.patch | 44 ------------ .../bugfix/all/lockdep-fix-oot-build.patch | 40 ----------- .../bugfix/all/lockdep-fix-soname.patch | 18 ----- .../all/tools-lib-lockdep-use-ldflags.patch | 18 ----- debian/patches/series | 10 --- debian/rules.d/tools/Makefile | 1 - debian/rules.d/tools/lib/lockdep/Makefile | 20 ------ debian/rules.d/tools/lib/lockdep/lockdep.in | 2 - debian/rules.real | 50 ------------- debian/templates/control.tools.in | 31 -------- 21 files changed, 512 deletions(-) delete mode 100644 debian/liblockdep-dev.README.Debian delete mode 100644 debian/liblockdep-dev.docs delete mode 100644 debian/liblockdep-dev.install delete mode 100644 debian/lockdep.dirs delete mode 100644 debian/patches/bugfix/all/liblockdep-define-the-array_size-macro.patch delete mode 100644 debian/patches/bugfix/all/liblockdep-enable-wall-by-default.patch delete mode 100644 debian/patches/bugfix/all/liblockdep-fix-defined-but-not-used-warning-for-init.patch delete mode 100644 debian/patches/bugfix/all/liblockdep-fix-set-but-not-used-warnings.patch delete mode 100644 debian/patches/bugfix/all/liblockdep-fix-undefined-symbol-prandom_u32.patch delete mode 100644 debian/patches/bugfix/all/liblockdep-fix-unused-value-warnings.patch delete mode 100644 debian/patches/bugfix/all/liblockdep-reduce-max_lock_depth-to-avoid-overflowin.patch delete mode 100644 debian/patches/bugfix/all/lockdep-fix-oot-build.patch delete mode 100644 debian/patches/bugfix/all/lockdep-fix-soname.patch delete mode 100644 debian/patches/bugfix/all/tools-lib-lockdep-use-ldflags.patch delete mode 100644 debian/rules.d/tools/lib/lockdep/Makefile delete mode 100644 debian/rules.d/tools/lib/lockdep/lockdep.in diff --git a/debian/.gitignore b/debian/.gitignore index d040fa3c7..26b537c30 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -14,12 +14,10 @@ /files /hyperv-daemons/ /libcpupower*/ -/liblockdep*/ /libusbip-dev/ /linux-* !/linux-cpupower.install !/linux-cpupower.manpages -/lockdep/ /po/ /rules.gen /stamps/ diff --git a/debian/liblockdep-dev.README.Debian b/debian/liblockdep-dev.README.Debian deleted file mode 100644 index a0673a170..000000000 --- a/debian/liblockdep-dev.README.Debian +++ /dev/null @@ -1,13 +0,0 @@ -liblockdep for Debian ---------------------- - -liblockdep does not have proper documentation, but these articles -provide an introduction: - - https://lwn.net/Articles/536363/ - http://www.vctlabs.com/posts/2014/Jul/09/liblockdep/ - -'lockdep-design.txt' explains some more detail about what lockdep -does, both in the kernel and as liblockdep. - - -- Ben Hutchings , Fri, 14 Aug 2015 14:22:55 +0200 diff --git a/debian/liblockdep-dev.docs b/debian/liblockdep-dev.docs deleted file mode 100644 index 15b2bbe12..000000000 --- a/debian/liblockdep-dev.docs +++ /dev/null @@ -1 +0,0 @@ -Documentation/locking/lockdep-design.txt diff --git a/debian/liblockdep-dev.install b/debian/liblockdep-dev.install deleted file mode 100644 index bd857244b..000000000 --- a/debian/liblockdep-dev.install +++ /dev/null @@ -1,3 +0,0 @@ -usr/include/liblockdep -usr/lib/*/liblockdep.a -usr/lib/*/liblockdep.so diff --git a/debian/lockdep.dirs b/debian/lockdep.dirs deleted file mode 100644 index e77248175..000000000 --- a/debian/lockdep.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/bin diff --git a/debian/patches/bugfix/all/liblockdep-define-the-array_size-macro.patch b/debian/patches/bugfix/all/liblockdep-define-the-array_size-macro.patch deleted file mode 100644 index ed639ec46..000000000 --- a/debian/patches/bugfix/all/liblockdep-define-the-array_size-macro.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Ben Hutchings -Date: Tue, 14 Jun 2016 21:14:14 +0100 -Subject: [PATCH 3/7] liblockdep: Define the ARRAY_SIZE() macro -Forwarded: http://mid.gmane.org/20160614204803.GV7555@decadent.org.uk - -lockdep.c now uses ARRAY_SIZE(). - -Fixes: 75dd602a5198 ("lockdep: Fix lock_chain::base size") -Signed-off-by: Ben Hutchings ---- - tools/lib/lockdep/uinclude/linux/kernel.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tools/lib/lockdep/uinclude/linux/kernel.h b/tools/lib/lockdep/uinclude/linux/kernel.h -index 276c7a8b2ed1..da87bd9ad2c1 100644 ---- a/tools/lib/lockdep/uinclude/linux/kernel.h -+++ b/tools/lib/lockdep/uinclude/linux/kernel.h -@@ -7,6 +7,8 @@ - #include - #include - -+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) -+ - #ifndef container_of - #define container_of(ptr, type, member) ({ \ - const typeof(((type *)0)->member) * __mptr = (ptr); \ diff --git a/debian/patches/bugfix/all/liblockdep-enable-wall-by-default.patch b/debian/patches/bugfix/all/liblockdep-enable-wall-by-default.patch deleted file mode 100644 index 74db9c82f..000000000 --- a/debian/patches/bugfix/all/liblockdep-enable-wall-by-default.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Ben Hutchings -Date: Tue, 14 Jun 2016 21:26:01 +0100 -Subject: [PATCH 4/7] liblockdep: Enable -Wall by default -Forwarded: http://mid.gmane.org/20160614204841.GW7555@decadent.org.uk - -Regressions in liblockdep may be missed because it doesn't enable -warnings. - -Adding -Wall immediately introduces a lot of warnings, but those will -be fixed by the following commits. - -Signed-off-by: Ben Hutchings ---- - tools/lib/lockdep/Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile -index 1d57af56814b..710a0edfe1b1 100644 ---- a/tools/lib/lockdep/Makefile -+++ b/tools/lib/lockdep/Makefile -@@ -79,6 +79,7 @@ INCLUDES = -I. -I./uinclude -I./include -I../../include $(CONFIG_INCLUDES) - # Set compile option CFLAGS if not set elsewhere - CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g - CFLAGS += -fPIC -+CFLAGS += -Wall - - override CFLAGS += $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ) - diff --git a/debian/patches/bugfix/all/liblockdep-fix-defined-but-not-used-warning-for-init.patch b/debian/patches/bugfix/all/liblockdep-fix-defined-but-not-used-warning-for-init.patch deleted file mode 100644 index 3852c9698..000000000 --- a/debian/patches/bugfix/all/liblockdep-fix-defined-but-not-used-warning-for-init.patch +++ /dev/null @@ -1,54 +0,0 @@ -From: Ben Hutchings -Date: Tue, 14 Jun 2016 21:32:11 +0100 -Subject: [PATCH 7/7] liblockdep: Fix 'defined but not used' warning for - init_utsname() -Forwarded: http://mid.gmane.org/20160614204909.GZ7555@decadent.org.uk - -We define init_utsname() as static but not inline, resulting -in a warning for every source file that includes lockdep.h but -doesn't call it. - -Since it is only used by lockdep.c, define it in there. - -Signed-off-by: Ben Hutchings ---- - tools/lib/lockdep/lockdep.c | 10 ++++++++++ - tools/lib/lockdep/uinclude/linux/lockdep.h | 10 ---------- - 2 files changed, 10 insertions(+), 10 deletions(-) - ---- a/tools/lib/lockdep/lockdep.c -+++ b/tools/lib/lockdep/lockdep.c -@@ -12,4 +12,14 @@ u32 prandom_u32(void) - abort(); - } - -+static struct new_utsname *init_utsname(void) -+{ -+ static struct new_utsname n = (struct new_utsname) { -+ .release = "liblockdep", -+ .version = LIBLOCKDEP_VERSION, -+ }; -+ -+ return &n; -+} -+ - #include "../../../kernel/locking/lockdep.c" ---- a/tools/lib/lockdep/uinclude/linux/lockdep.h -+++ b/tools/lib/lockdep/uinclude/linux/lockdep.h -@@ -44,16 +44,6 @@ static inline int debug_locks_off(void) - #define atomic_t unsigned long - #define atomic_inc(x) ((*(x))++) - --static struct new_utsname *init_utsname(void) --{ -- static struct new_utsname n = (struct new_utsname) { -- .release = "liblockdep", -- .version = LIBLOCKDEP_VERSION, -- }; -- -- return &n; --} -- - #define print_tainted() "" - #define static_obj(x) 1 - diff --git a/debian/patches/bugfix/all/liblockdep-fix-set-but-not-used-warnings.patch b/debian/patches/bugfix/all/liblockdep-fix-set-but-not-used-warnings.patch deleted file mode 100644 index 1a84dad8a..000000000 --- a/debian/patches/bugfix/all/liblockdep-fix-set-but-not-used-warnings.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Ben Hutchings -Date: Tue, 14 Jun 2016 20:13:24 +0100 -Subject: [PATCH 6/7] liblockdep: Fix 'set but not used' warnings -Forwarded: http://mid.gmane.org/20160614204900.GY7555@decadent.org.uk - -liblockdep defines trivial macros for working with interrupt flags, as -interrupts are never disabled in userland. This results in warnings -from gcc when -Wunused-but-set-variable is enabled, and it is enabled -by -Wall. Fix this by evaluating the flags parameter and casting it to -void. - -Signed-off-by: Ben Hutchings ---- - tools/lib/lockdep/uinclude/linux/irqflags.h | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tools/lib/lockdep/uinclude/linux/irqflags.h b/tools/lib/lockdep/uinclude/linux/irqflags.h -index 6cc296f0fad0..df77669cfe1c 100644 ---- a/tools/lib/lockdep/uinclude/linux/irqflags.h -+++ b/tools/lib/lockdep/uinclude/linux/irqflags.h -@@ -17,19 +17,19 @@ - #define raw_local_irq_disable() do { } while (0) - #define raw_local_irq_enable() do { } while (0) - #define raw_local_irq_save(flags) ((flags) = 0) --#define raw_local_irq_restore(flags) do { } while (0) -+#define raw_local_irq_restore(flags) ((void)(flags)) - #define raw_local_save_flags(flags) ((flags) = 0) --#define raw_irqs_disabled_flags(flags) do { } while (0) -+#define raw_irqs_disabled_flags(flags) ((void)(flags)) - #define raw_irqs_disabled() 0 - #define raw_safe_halt() - - #define local_irq_enable() do { } while (0) - #define local_irq_disable() do { } while (0) - #define local_irq_save(flags) ((flags) = 0) --#define local_irq_restore(flags) do { } while (0) -+#define local_irq_restore(flags) ((void)(flags)) - #define local_save_flags(flags) ((flags) = 0) - #define irqs_disabled() (1) --#define irqs_disabled_flags(flags) (0) -+#define irqs_disabled_flags(flags) ((void)(flags), 0) - #define safe_halt() do { } while (0) - - #define trace_lock_release(x, y) diff --git a/debian/patches/bugfix/all/liblockdep-fix-undefined-symbol-prandom_u32.patch b/debian/patches/bugfix/all/liblockdep-fix-undefined-symbol-prandom_u32.patch deleted file mode 100644 index 2244bcc5d..000000000 --- a/debian/patches/bugfix/all/liblockdep-fix-undefined-symbol-prandom_u32.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Ben Hutchings -Date: Tue, 14 Jun 2016 21:09:19 +0100 -Subject: [PATCH 1/7] liblockdep: Fix undefined symbol prandom_u32 -Forwarded: http://mid.gmane.org/20160614204713.GT7555@decadent.org.uk - -__lock_pin_lock() now calls prandom_u32() which is not defined in -liblockdep. __lock_pin_lock() and its caller lock_pin_lock() are dead -code in liblockdep, but we still need to provide a definition of -prandom_u32() in case lazy binding is disabled. - -Fixes: e7904a28f533 ("locking/lockdep, sched/core: Implement a better ...") -Signed-off-by: Ben Hutchings ---- - tools/lib/lockdep/common.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/tools/lib/lockdep/lockdep.c -+++ b/tools/lib/lockdep/lockdep.c -@@ -1,8 +1,15 @@ - #include -+#include - - /* Trivial API wrappers, we don't (yet) have RCU in user-space: */ - #define hlist_for_each_entry_rcu hlist_for_each_entry - #define hlist_add_head_rcu hlist_add_head - #define hlist_del_rcu hlist_del - -+u32 prandom_u32(void) -+{ -+ /* Used only by lock_pin_lock() which is dead code */ -+ abort(); -+} -+ - #include "../../../kernel/locking/lockdep.c" diff --git a/debian/patches/bugfix/all/liblockdep-fix-unused-value-warnings.patch b/debian/patches/bugfix/all/liblockdep-fix-unused-value-warnings.patch deleted file mode 100644 index 4612489c0..000000000 --- a/debian/patches/bugfix/all/liblockdep-fix-unused-value-warnings.patch +++ /dev/null @@ -1,72 +0,0 @@ -From: Ben Hutchings -Date: Tue, 14 Jun 2016 20:13:23 +0100 -Subject: [PATCH 5/7] liblockdep: Fix 'unused value' warnings -Forwarded: http://mid.gmane.org/20160614204853.GX7555@decadent.org.uk - -liblockdep defines various macros that may expand to an expression -with no effect, while the in-kernel definition does have an effect. -This results in warnings from gcc when -Wunused-value is enabled, and -is is enabled by -Wall. Fix this by introducing trivial functions, -as function return values are generally allowed to be ignored. - -Signed-off-by: Ben Hutchings ---- - tools/lib/lockdep/uinclude/linux/debug_locks.h | 2 +- - tools/lib/lockdep/uinclude/linux/kernel.h | 12 +++++++++--- - tools/lib/lockdep/uinclude/linux/lockdep.h | 6 +++++- - 3 files changed, 15 insertions(+), 5 deletions(-) - -diff --git a/tools/lib/lockdep/uinclude/linux/debug_locks.h b/tools/lib/lockdep/uinclude/linux/debug_locks.h -index f38eb64df794..1d4fbec5c649 100644 ---- a/tools/lib/lockdep/uinclude/linux/debug_locks.h -+++ b/tools/lib/lockdep/uinclude/linux/debug_locks.h -@@ -4,7 +4,7 @@ - #include - #include - --#define DEBUG_LOCKS_WARN_ON(x) (x) -+#define DEBUG_LOCKS_WARN_ON(x) WARN_ON(x) - - extern bool debug_locks; - extern bool debug_locks_silent; -diff --git a/tools/lib/lockdep/uinclude/linux/kernel.h b/tools/lib/lockdep/uinclude/linux/kernel.h -index da87bd9ad2c1..021cff4f4e3d 100644 ---- a/tools/lib/lockdep/uinclude/linux/kernel.h -+++ b/tools/lib/lockdep/uinclude/linux/kernel.h -@@ -22,10 +22,16 @@ - _max1 > _max2 ? _max1 : _max2; }) - - #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) --#define WARN_ON(x) (x) --#define WARN_ON_ONCE(x) (x) -+ -+static inline int lockdep_warn(int condition) -+{ -+ return condition; -+} -+#define WARN_ON(x) lockdep_warn(x) -+#define WARN_ON_ONCE(x) WARN_ON(x) -+#define WARN(x, y...) WARN_ON(x) -+ - #define likely(x) (x) --#define WARN(x, y...) (x) - #define uninitialized_var(x) x - #define __init - #define noinline -diff --git a/tools/lib/lockdep/uinclude/linux/lockdep.h b/tools/lib/lockdep/uinclude/linux/lockdep.h -index d30214221920..d1079034a14d 100644 ---- a/tools/lib/lockdep/uinclude/linux/lockdep.h -+++ b/tools/lib/lockdep/uinclude/linux/lockdep.h -@@ -29,7 +29,11 @@ extern struct task_struct *__curr(void); - - #define current (__curr()) - --#define debug_locks_off() 1 -+static inline int debug_locks_off(void) -+{ -+ return 1; -+} -+ - #define task_pid_nr(tsk) ((tsk)->pid) - - #define KSYM_NAME_LEN 128 diff --git a/debian/patches/bugfix/all/liblockdep-reduce-max_lock_depth-to-avoid-overflowin.patch b/debian/patches/bugfix/all/liblockdep-reduce-max_lock_depth-to-avoid-overflowin.patch deleted file mode 100644 index f15e6d396..000000000 --- a/debian/patches/bugfix/all/liblockdep-reduce-max_lock_depth-to-avoid-overflowin.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Ben Hutchings -Date: Tue, 14 Jun 2016 20:44:14 +0100 -Subject: [PATCH 2/7] liblockdep: Reduce MAX_LOCK_DEPTH to avoid overflowing - lock_chain::depth -Forwarded: http://mid.gmane.org/20160614204752.GU7555@decadent.org.uk - -liblockdep has been broken since commit 75dd602a5198 ("lockdep: Fix -lock_chain::base size"), as that adds a check that MAX_LOCK_DEPTH is -within the range of lock_chain::depth and in liblockdep it is much -too large. - -That should have resulted in a compiler error, but didn't because: - -- the check uses ARRAY_SIZE(), which isn't yet defined in liblockdep - so is assumed to be an (undeclared) function -- putting a function call inside a BUILD_BUG_ON() expression quietly - turns it into some nonsense involving a variable-length array - -It did produce a compiler warning, but I didn't notice because -liblockdep already produces too many warnings if -Wall is enabled -(which I'll fix shortly). - -Even before that commit, which reduced lock_chain::depth from 8 bits -to 6, MAX_LOCK_DEPTH was too large. - -Cc: # for versions before 4.6, use a value of 255 -Signed-off-by: Ben Hutchings ---- - tools/lib/lockdep/uinclude/linux/lockdep.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/lib/lockdep/uinclude/linux/lockdep.h b/tools/lib/lockdep/uinclude/linux/lockdep.h -index c808c7d02d21..d30214221920 100644 ---- a/tools/lib/lockdep/uinclude/linux/lockdep.h -+++ b/tools/lib/lockdep/uinclude/linux/lockdep.h -@@ -8,7 +8,7 @@ - #include - #include - --#define MAX_LOCK_DEPTH 2000UL -+#define MAX_LOCK_DEPTH 63UL - - #define asmlinkage - #define __visible diff --git a/debian/patches/bugfix/all/lockdep-fix-oot-build.patch b/debian/patches/bugfix/all/lockdep-fix-oot-build.patch deleted file mode 100644 index b22569aff..000000000 --- a/debian/patches/bugfix/all/lockdep-fix-oot-build.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Ben Hutchings -Date: Thu, 13 Aug 2015 20:48:12 +0200 -Subject: liblockdep: Fix object file paths used in an out-of-tree build -Forwarded: no - -Signed-off-by: Ben Hutchings ---- ---- a/tools/lib/lockdep/Makefile -+++ b/tools/lib/lockdep/Makefile -@@ -100,7 +100,7 @@ include $(srctree)/tools/build/Makefile. - - do_compile_shared_library = \ - ($(print_shared_lib_compile) \ -- $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$@"';$(shell ln -sf $@ liblockdep.so)) -+ $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$(@F)"';$(shell ln -sf $(@F) $(@D)/liblockdep.so)) - - do_build_static_lib = \ - ($(print_static_lib_build) \ -@@ -118,10 +118,10 @@ all_cmd: $(CMD_TARGETS) - $(LIB_IN): force - $(Q)$(MAKE) $(build)=liblockdep - --liblockdep.so.$(LIBLOCKDEP_VERSION): $(LIB_IN) -+$(OUTPUT)liblockdep.so.$(LIBLOCKDEP_VERSION): $(LIB_IN) - $(Q)$(do_compile_shared_library) - --liblockdep.a: $(LIB_IN) -+$(OUTPUT)liblockdep.a: $(LIB_IN) - $(Q)$(do_build_static_lib) - - tags: force -@@ -149,7 +149,7 @@ install_lib: all_cmd - install: install_lib - - clean: -- $(RM) *.o *~ $(TARGETS) *.a *liblockdep*.so* $(VERSION_FILES) .*.d .*.cmd -+ $(RM) $(OUTPUT)*.o *~ $(TARGETS) $(OUTPUT)*.a $(OUTPUT)*liblockdep*.so* $(VERSION_FILES) $(OUTPUT).*.d $(OUTPUT).*.cmd - $(RM) tags TAGS - - PHONY += force diff --git a/debian/patches/bugfix/all/lockdep-fix-soname.patch b/debian/patches/bugfix/all/lockdep-fix-soname.patch deleted file mode 100644 index ed6078193..000000000 --- a/debian/patches/bugfix/all/lockdep-fix-soname.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Ben Hutchings -Date: Thu, 13 Aug 2015 20:48:12 +0200 -Subject: liblockdep: Remove double-quotes from soname -Forwarded: no - -Signed-off-by: Ben Hutchings ---- ---- a/tools/lib/lockdep/Makefile -+++ b/tools/lib/lockdep/Makefile -@@ -100,7 +100,7 @@ include $(srctree)/tools/build/Makefile. - - do_compile_shared_library = \ - ($(print_shared_lib_compile) \ -- $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$(@F)"';$(shell ln -sf $(@F) $(@D)/liblockdep.so)) -+ $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='$(@F)';$(shell ln -sf $(@F) $(@D)/liblockdep.so)) - - do_build_static_lib = \ - ($(print_static_lib_build) \ diff --git a/debian/patches/bugfix/all/tools-lib-lockdep-use-ldflags.patch b/debian/patches/bugfix/all/tools-lib-lockdep-use-ldflags.patch deleted file mode 100644 index dc3dd7fac..000000000 --- a/debian/patches/bugfix/all/tools-lib-lockdep-use-ldflags.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Ben Hutchings -Date: Fri, 25 Sep 2015 21:36:29 +0100 -Subject: tools/lib/lockdep: Use LDFLAGS -Forwarded: no - -Signed-off-by: Ben Hutchings ---- ---- a/tools/lib/lockdep/Makefile -+++ b/tools/lib/lockdep/Makefile -@@ -100,7 +100,7 @@ include $(srctree)/tools/build/Makefile. - - do_compile_shared_library = \ - ($(print_shared_lib_compile) \ -- $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='$(@F)';$(shell ln -sf $(@F) $(@D)/liblockdep.so)) -+ $(CC) $(LDFLAGS) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='$(@F)';$(shell ln -sf $(@F) $(@D)/liblockdep.so)) - - do_build_static_lib = \ - ($(print_static_lib_build) \ diff --git a/debian/patches/series b/debian/patches/series index 1860aa89f..b72c048d6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -156,20 +156,10 @@ bugfix/all/module-disable-matching-missing-version-crc.patch bugfix/all/usbip-document-tcp-wrappers.patch bugfix/all/kbuild-fix-recordmcount-dependency.patch bugfix/all/tools-perf-man-date.patch -bugfix/all/lockdep-fix-oot-build.patch -bugfix/all/lockdep-fix-soname.patch bugfix/all/tools-perf-remove-shebangs.patch bugfix/all/tools-lib-traceevent-use-ldflags.patch -bugfix/all/tools-lib-lockdep-use-ldflags.patch bugfix/x86/revert-perf-build-fix-libunwind-feature-detection-on.patch bugfix/alpha/alpha-uapi-add-support-for-__sane_userspace_types__.patch bugfix/all/tools-build-remove-bpf-run-time-check-at-build-time.patch bugfix/all/cpupower-bump-soname-version.patch bugfix/all/cpupower-fix-checks-for-cpu-existence.patch -bugfix/all/liblockdep-fix-undefined-symbol-prandom_u32.patch -bugfix/all/liblockdep-reduce-max_lock_depth-to-avoid-overflowin.patch -bugfix/all/liblockdep-define-the-array_size-macro.patch -bugfix/all/liblockdep-enable-wall-by-default.patch -bugfix/all/liblockdep-fix-unused-value-warnings.patch -bugfix/all/liblockdep-fix-set-but-not-used-warnings.patch -bugfix/all/liblockdep-fix-defined-but-not-used-warning-for-init.patch diff --git a/debian/rules.d/tools/Makefile b/debian/rules.d/tools/Makefile index 787959c33..1680e2f9d 100644 --- a/debian/rules.d/tools/Makefile +++ b/debian/rules.d/tools/Makefile @@ -3,6 +3,5 @@ SUBDIRS = \ perf \ power \ usb/usbip -#SUBDIRS += lib/lockdep include $(top_rulesdir)/Makefile.inc diff --git a/debian/rules.d/tools/lib/lockdep/Makefile b/debian/rules.d/tools/lib/lockdep/Makefile deleted file mode 100644 index cb8c122f8..000000000 --- a/debian/rules.d/tools/lib/lockdep/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -include $(top_rulesdir)/Makefile.inc - -DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) - -MAKE_LOCKDEP := +$(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR) V=1 \ - prefix=/usr libdir_relative=lib/$(DEB_HOST_MULTIARCH) \ - LIBLOCKDEP_VERSION=$(VERSION) \ - CONFIG_FLAGS='$(CFLAGS) $(filter -D%,$(CPPFLAGS))' LDFLAGS='$(LDFLAGS)' - -unexport CFLAGS - -all: - $(MAKE_LOCKDEP) - -install: - $(MAKE_LOCKDEP) install - mkdir -p $(DESTDIR)/usr/include - cp -R $(top_srcdir)/$(OUTDIR)/include/liblockdep $(DESTDIR)/usr/include/ - ln -s liblockdep.so.$(VERSION) \ - $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/liblockdep.so diff --git a/debian/rules.d/tools/lib/lockdep/lockdep.in b/debian/rules.d/tools/lib/lockdep/lockdep.in deleted file mode 100644 index 4a0d03ac5..000000000 --- a/debian/rules.d/tools/lib/lockdep/lockdep.in +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -LD_PRELOAD="liblockdep.so.@VERSION@ $LD_PRELOAD" exec "$@" diff --git a/debian/rules.real b/debian/rules.real index 50d6cb01a..b1e3fac7b 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -76,7 +76,6 @@ binary-indep: install-support ifneq ($(DO_TOOLS),False) build-arch-arch: $(STAMPS_DIR)/build-tools binary-arch-arch: install-kbuild install-usbip install-cpupower -# binary-arch-arch: install-liblockdep ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_HOST_ARCH)),) ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),) binary-arch-arch: install-perf @@ -85,7 +84,6 @@ ifneq ($(DO_TOOLS),False) ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),) binary-arch-arch: install-hyperv-daemons endif -# binary-indep: install-lockdep endif binary-indep-featureset: install-common-headers_$(FEATURESET) @@ -686,52 +684,4 @@ endif dh_md5sums dh_builddeb -install-liblockdep: DH_OPTIONS = -pliblockdep$(VERSION) -pliblockdep-dev -install-liblockdep: DIR = $(CURDIR)/debian/liblockdep-tmp -install-liblockdep: $(STAMPS_DIR)/build-tools - dh_testdir - dh_testroot - dh_prep - $(call make-tools,tools/lib/lockdep) install DESTDIR=$(DIR) - env -u DH_OPTIONS dh_install -pliblockdep$(VERSION) --sourcedir=$(DIR) \ - 'usr/lib/*/liblockdep.so.*' - dh_install --sourcedir=$(DIR) - dh_installchangelogs -ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) - dh_installdocs -endif - dh_strip - dh_compress - dh_fixperms - env -u DH_OPTIONS dh_makeshlibs -pliblockdep$(VERSION) \ - liblockdep$(VERSION) - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -install-lockdep: PACKAGE_NAME = lockdep -install-lockdep: DH_OPTIONS = -p$(PACKAGE_NAME) -install-lockdep: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) -install-lockdep: - dh_testdir - dh_testroot - dh_prep - dh_installdirs -# Upstream lockdep preload script is not suitable for installation - sed 's/@VERSION@/$(VERSION)/' debian/rules.d/tools/lib/lockdep/lockdep.in \ - > $(DIR)/usr/bin/lockdep - chmod 755 $(DIR)/usr/bin/lockdep - dh_installchangelogs -ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) - dh_installdocs -endif - dh_compress - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - # vim: filetype=make diff --git a/debian/templates/control.tools.in b/debian/templates/control.tools.in index 735c88c82..ca245b7b1 100644 --- a/debian/templates/control.tools.in +++ b/debian/templates/control.tools.in @@ -106,34 +106,3 @@ Description: Support daemons for Linux running on Hyper-V . hv_vss_daemon provides the volume shadow copy service (VSS), allowing the host to freeze the guest filesystems while taking a snapshot. - -#Package: lockdep -#Build-Profiles: -#Architecture: all -#Depends: ${shlibs:Depends}, ${misc:Depends}, liblockdep@version@ -#Recommends: liblockdep-dev -#Section: devel -#Multi-Arch: allowed -#Description: Runtime locking correctness validator -# lockdep is a wrapper for programs that use the pthreads API, which detects -# actual and potential deadlocks and other locking bugs. -# -#Package: liblockdep@version@ -#Build-Profiles: -#Architecture: linux-any -#Depends: ${shlibs:Depends}, ${misc:Depends} -#Section: libs -#Multi-Arch: same -#Description: Runtime locking correctness validator (shared library) -# liblockdep is a library for programs that use the pthreads API, which can -# be used to detect actual and potential deadlocks and other locking bugs. -# -#Package: liblockdep-dev -#Build-Profiles: -#Architecture: linux-any -#Depends: ${shlibs:Depends}, ${misc:Depends}, liblockdep@version@ (= ${binary:Version}) -#Section: libdevel -#Multi-Arch: same -#Description: Runtime locking correctness validator (development files) -# liblockdep is a library for programs that use the pthreads API, which can -# be used to detect actual and potential deadlocks and other locking bugs.