[package] fix oprofile compilation failure, remove 2.4 support (#5281)
authorFlorian Fainelli <florian@openwrt.org>
Sun, 26 Jul 2009 13:28:37 +0000 (13:28 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 26 Jul 2009 13:28:37 +0000 (13:28 +0000)
SVN-Revision: 17015

devel/oprofile/Makefile
devel/oprofile/patches/10-use-insmod-instead-of-modprobe.patch [deleted file]
devel/oprofile/patches/100-use_insmod_instead_of_modprobe.patch [new file with mode: 0644]
devel/oprofile/patches/101-remove_24_support.patch [new file with mode: 0644]

index af2558c5f03107f1539e3988150d09a52096fa5b..3105f7fe3efbde0c6c2c78cfbec3ba7354482364 100644 (file)
@@ -23,7 +23,7 @@ include $(INCLUDE_DIR)/kernel.mk
 define KernelPackage/oprofile
   SUBMENU:=Other modules
   TITLE:=OProfile profiling support
 define KernelPackage/oprofile
   SUBMENU:=Other modules
   TITLE:=OProfile profiling support
-  KCONFIG:=CONFIG_OPROFILE
+  KCONFIG:=CONFIG_OPROFILE @LINUX_2_6
   FILES:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/oprofile/oprofile.$(LINUX_KMOD_SUFFIX)
   DEPENDS:=@KERNEL_PROFILING
 endef
   FILES:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/oprofile/oprofile.$(LINUX_KMOD_SUFFIX)
   DEPENDS:=@KERNEL_PROFILING
 endef
diff --git a/devel/oprofile/patches/10-use-insmod-instead-of-modprobe.patch b/devel/oprofile/patches/10-use-insmod-instead-of-modprobe.patch
deleted file mode 100644 (file)
index c55dbce..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/utils/opcontrol b/utils/opcontrol
-index ce53010..60a7e64 100644
---- a/utils/opcontrol
-+++ b/utils/opcontrol
-@@ -170,7 +170,7 @@ load_module_26()
- {
-       grep oprofilefs /proc/filesystems >/dev/null
-       if test "$?" -ne 0; then
--              modprobe oprofile
-+              insmod oprofile
-               if test "$?" != "0"; then
-                       # couldn't load the module
-                       return
-@@ -200,7 +200,7 @@ load_module_24()
- {
-       grep oprof /proc/devices >/dev/null
-       if test "$?" -ne 0; then
--              modprobe oprofile
-+              insmod oprofile
-               if test "$?" != "0"; then
-                       # couldn't load a module
-                       return
diff --git a/devel/oprofile/patches/100-use_insmod_instead_of_modprobe.patch b/devel/oprofile/patches/100-use_insmod_instead_of_modprobe.patch
new file mode 100644 (file)
index 0000000..c55dbce
--- /dev/null
@@ -0,0 +1,22 @@
+diff --git a/utils/opcontrol b/utils/opcontrol
+index ce53010..60a7e64 100644
+--- a/utils/opcontrol
++++ b/utils/opcontrol
+@@ -170,7 +170,7 @@ load_module_26()
+ {
+       grep oprofilefs /proc/filesystems >/dev/null
+       if test "$?" -ne 0; then
+-              modprobe oprofile
++              insmod oprofile
+               if test "$?" != "0"; then
+                       # couldn't load the module
+                       return
+@@ -200,7 +200,7 @@ load_module_24()
+ {
+       grep oprof /proc/devices >/dev/null
+       if test "$?" -ne 0; then
+-              modprobe oprofile
++              insmod oprofile
+               if test "$?" != "0"; then
+                       # couldn't load a module
+                       return
diff --git a/devel/oprofile/patches/101-remove_24_support.patch b/devel/oprofile/patches/101-remove_24_support.patch
new file mode 100644 (file)
index 0000000..5867520
--- /dev/null
@@ -0,0 +1,67 @@
+diff -urN oprofile-0.9.4/daemon/Makefile.am oprofile-0.9.4.new/daemon/Makefile.am
+--- oprofile-0.9.4/daemon/Makefile.am  2008-04-28 23:23:24.000000000 +0200
++++ oprofile-0.9.4.new/daemon/Makefile.am      2009-07-26 15:23:23.000000000 +0200
+@@ -1,4 +1,4 @@
+-SUBDIRS = liblegacy .
++SUBDIRS = .
+ oprofiled_SOURCES = \
+       init.c \
+@@ -42,7 +42,6 @@
+ bin_PROGRAMS = oprofiled
+ oprofiled_LDADD = \
+-      liblegacy/liblegacy.a \
+       ../libabi/libabi.a \
+       ../libdb/libodb.a \
+       ../libop/libop.a \
+diff -urN oprofile-0.9.4/daemon/Makefile.in oprofile-0.9.4.new/daemon/Makefile.in
+--- oprofile-0.9.4/daemon/Makefile.in  2008-07-18 01:14:44.000000000 +0200
++++ oprofile-0.9.4.new/daemon/Makefile.in      2009-07-26 15:23:14.000000000 +0200
+@@ -68,7 +68,7 @@
+       opd_events.$(OBJEXT) opd_mangling.$(OBJEXT) \
+       opd_perfmon.$(OBJEXT) opd_anon.$(OBJEXT) opd_spu.$(OBJEXT)
+ oprofiled_OBJECTS = $(am_oprofiled_OBJECTS)
+-oprofiled_DEPENDENCIES = liblegacy/liblegacy.a ../libabi/libabi.a \
++oprofiled_DEPENDENCIES = ../libabi/libabi.a \
+       ../libdb/libodb.a ../libop/libop.a ../libutil/libutil.a
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+@@ -240,7 +240,7 @@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ topdir = @topdir@
+-SUBDIRS = liblegacy .
++SUBDIRS = .
+ oprofiled_SOURCES = \
+       init.c \
+       oprofiled.c \
+@@ -279,7 +279,6 @@
+ # -fno-omit-frame-pointer needed for daemon build: see ChangeLog-2004 02-23
+ AM_CFLAGS = @OP_CFLAGS@ -fno-omit-frame-pointer
+ oprofiled_LDADD = \
+-      liblegacy/liblegacy.a \
+       ../libabi/libabi.a \
+       ../libdb/libodb.a \
+       ../libop/libop.a \
+diff -urN oprofile-0.9.4/daemon/oprofiled.c oprofile-0.9.4.new/daemon/oprofiled.c
+--- oprofile-0.9.4/daemon/oprofiled.c  2008-04-28 23:23:23.000000000 +0200
++++ oprofile-0.9.4.new/daemon/oprofiled.c      2009-07-26 15:25:25.000000000 +0200
+@@ -73,7 +73,6 @@
+ static char * events;
+ static int showvers;
+ static struct oprofiled_ops * opd_ops;
+-extern struct oprofiled_ops opd_24_ops;
+ extern struct oprofiled_ops opd_26_ops;
+ #define OPD_IMAGE_FILTER_HASH_SIZE 32
+@@ -465,9 +464,6 @@
+ static struct oprofiled_ops * get_ops(void)
+ {
+       switch (op_get_interface()) {
+-              case OP_INTERFACE_24:
+-                      printf("Using 2.4 OProfile kernel interface.\n");
+-                      return &opd_24_ops;
+               case OP_INTERFACE_26:
+                       printf("Using 2.6+ OProfile kernel interface.\n");
+                       return &opd_26_ops;