From: florian Date: Sun, 26 Jul 2009 13:28:37 +0000 (+0000) Subject: [package] fix oprofile compilation failure, remove 2.4 support (#5281) X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=bc44f633e1cb98fb52b5165731fadf71ad1a058f;p=packages.git [package] fix oprofile compilation failure, remove 2.4 support (#5281) git-svn-id: svn://svn.openwrt.org/openwrt/packages@17015 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/devel/oprofile/Makefile b/devel/oprofile/Makefile index af2558c5f..3105f7fe3 100644 --- a/devel/oprofile/Makefile +++ b/devel/oprofile/Makefile @@ -23,7 +23,7 @@ include $(INCLUDE_DIR)/kernel.mk 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 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 index c55dbce97..000000000 --- a/devel/oprofile/patches/10-use-insmod-instead-of-modprobe.patch +++ /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 index 000000000..c55dbce97 --- /dev/null +++ b/devel/oprofile/patches/100-use_insmod_instead_of_modprobe.patch @@ -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 index 000000000..586752030 --- /dev/null +++ b/devel/oprofile/patches/101-remove_24_support.patch @@ -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;