diff options
author | James <> | 2015-11-04 11:49:21 +0000 |
---|---|---|
committer | James <> | 2015-11-04 11:49:21 +0000 |
commit | 716ca530e1c4515d8683c9d5be3d56b301758b66 (patch) | |
tree | 700eb5bcc1a462a5f21dcec15ce7c97ecfefa772 /package/devel | |
download | trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.tar.gz trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.tar.bz2 trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.zip |
Diffstat (limited to 'package/devel')
19 files changed, 1143 insertions, 0 deletions
diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile new file mode 100644 index 0000000..f8549ad --- /dev/null +++ b/package/devel/binutils/Makefile @@ -0,0 +1,124 @@ +# +# Copyright (C) 2006-2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=binutils +PKG_VERSION:=2.24 +PKG_RELEASE:=3 + +PKG_SOURCE_URL:=@GNU/binutils +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_VERSION:=$(PKG_VERSION) +PKG_MD5SUM:=e0f71a7b2ddab0f8612336ac81d9636b + +PKG_FIXUP:=autoreconf +PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl +PKG_REMOVE_FILES:=libtool.m4 +PKG_INSTALL:=1 + +PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org> +PKG_LICENSE:=GPL-3.0+ +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/libbfd + SECTION:=libs + CATEGORY:=Libraries + TITLE:=libbfd + DEPENDS:=+zlib +endef + +define Package/libopcodes + SECTION:=libs + CATEGORY:=Libraries + TITLE:=libbfd + DEPENDS:=+libbfd +endef + +define Package/binutils + SECTION:=devel + CATEGORY:=Development + TITLE:=binutils + DEPENDS:=+objdump +ar +endef + +define Package/objdump + SECTION:=devel + CATEGORY:=Development + TITLE:=objdump + DEPENDS:=+libopcodes +endef + +define Package/ar + SECTION:=devel + CATEGORY:=Development + TITLE:=ar + DEPENDS:=+zlib +libbfd +endef + +define Package/binutils/description + The Binutils package contains a linker, an assembler, and other tools for handling object files +endef + +TARGET_CFLAGS += $(FPIC) -Wno-unused-value + +CONFIGURE_ARGS += \ + --host=$(REAL_GNU_TARGET_NAME) \ + --target=$(REAL_GNU_TARGET_NAME) \ + --enable-shared \ + --enable-install-libiberty \ + --enable-install-libbfd + +define Build/Install + $(call Build/Install/Default) + $(MAKE) -C $(PKG_BUILD_DIR)/libiberty \ + target_header_dir=libiberty \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + MULTIOSDIR="" \ + install +endef + +define Build/InstallDev + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +define Package/libbfd/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbfd*.so $(1)/usr/lib/ +endef + +define Package/libopcodes/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopcodes*.so $(1)/usr/lib/ +endef + +define Package/objdump/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/objdump $(1)/usr/bin/ +endef + +define Package/ar/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ar $(1)/usr/bin/ +endef + +define Package/binutils/install + $(INSTALL_DIR) $(1)/usr $(1)/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/ + mv $(1)/usr/bin/strings $(1)/bin/strings + rm -f $(1)/usr/bin/objdump + rm -f $(1)/usr/bin/ar +endef + +$(eval $(call BuildPackage,libbfd)) +$(eval $(call BuildPackage,libopcodes)) +$(eval $(call BuildPackage,binutils)) +$(eval $(call BuildPackage,objdump)) +$(eval $(call BuildPackage,ar)) diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile new file mode 100644 index 0000000..a7ba205 --- /dev/null +++ b/package/devel/gdb/Makefile @@ -0,0 +1,88 @@ +# +# Copyright (C) 2006-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gdb +PKG_VERSION:=7.10 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@GNU/gdb +PKG_MD5SUM:=2a35bac41fa8e10bf04f3a0dd7f7f363 + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 +PKG_LICENSE:=GPL-3.0+ + +include $(INCLUDE_DIR)/package.mk + +define Package/gdb/Default + SECTION:=devel + CATEGORY:=Development + DEPENDS:=+!USE_MUSL:libthread-db +PACKAGE_zlib:zlib + URL:=http://www.gnu.org/software/gdb/ +endef + +define Package/gdb +$(call Package/gdb/Default) + TITLE:=GNU Debugger + DEPENDS+=+libreadline +libncurses +zlib +endef + +define Package/gdb/description +GDB, the GNU Project debugger, allows you to see what is going on `inside' +another program while it executes -- or what another program was doing at the +moment it crashed. +endef + +define Package/gdbserver +$(call Package/gdb/Default) + TITLE:=Remote server for GNU Debugger +endef + +define Package/gdbserver/description +GDBSERVER is a program that allows you to run GDB on a different machine than the +one which is running the program being debugged. +endef + +# XXX: add --disable-werror to prevent build failure with arm +CONFIGURE_ARGS+= \ + --with-system-readline \ + --without-expat \ + --without-lzma \ + --disable-werror + +CONFIGURE_VARS+= \ + ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline" + +define Build/Compile + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + all +endef + +define Build/Install + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + install-gdb +endef + +define Package/gdb/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/ +endef + +define Package/gdbserver/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,gdb)) +$(eval $(call BuildPackage,gdbserver)) diff --git a/package/devel/gdb/patches/001-gdb-pr14523-mips-signal-number.patch b/package/devel/gdb/patches/001-gdb-pr14523-mips-signal-number.patch new file mode 100644 index 0000000..4171424 --- /dev/null +++ b/package/devel/gdb/patches/001-gdb-pr14523-mips-signal-number.patch @@ -0,0 +1,16 @@ +See http://sourceware.org/bugzilla/show_bug.cgi?id=14523 +--- +--- a/gdb/common/signals.c ++++ b/gdb/common/signals.c +@@ -344,6 +344,11 @@ gdb_signal_from_host (int hostsig) + else if (64 <= hostsig && hostsig <= 127) + return (enum gdb_signal) + (hostsig - 64 + (int) GDB_SIGNAL_REALTIME_64); ++ else if (hostsig == 128) ++ /* Some platforms, such as Linux MIPS, have NSIG == 128, in which case ++ signal 128 is the highest realtime signal. There is no constant for ++ that though. */ ++ return GDB_SIGNAL_UNKNOWN; + else + error (_("GDB bug: target.c (gdb_signal_from_host): " + "unrecognized real-time signal")); diff --git a/package/devel/gdb/patches/100-musl_fix.patch b/package/devel/gdb/patches/100-musl_fix.patch new file mode 100644 index 0000000..c0c1e0a --- /dev/null +++ b/package/devel/gdb/patches/100-musl_fix.patch @@ -0,0 +1,28 @@ +--- a/gdb/linux-nat.c ++++ b/gdb/linux-nat.c +@@ -17,6 +17,7 @@ + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + ++#include "stopcode.h" + #include "defs.h" + #include "inferior.h" + #include "infrun.h" +@@ -73,6 +74,10 @@ + #define SPUFS_MAGIC 0x23c9b64e + #endif + ++#ifndef __SIGRTMIN ++#define __SIGRTMIN SIGRTMIN ++#endif ++ + /* This comment documents high-level logic of this file. + + Waiting for events in sync mode +--- /dev/null ++++ b/gdb/stopcode.h +@@ -0,0 +1,4 @@ ++#ifndef W_STOPCODE ++#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) ++#endif ++ diff --git a/package/devel/oprofile/Makefile b/package/devel/oprofile/Makefile new file mode 100644 index 0000000..cdeeec2 --- /dev/null +++ b/package/devel/oprofile/Makefile @@ -0,0 +1,94 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=oprofile +PKG_VERSION:=1.1.0rc2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/oprofile/ +PKG_MD5SUM:=ebc27a8478068cb986efd295cc4ac877 + +PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org> + +PKG_BUILD_DEPENDS:=binutils +PKG_LICENSE:=GPL-2.0+ +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk + +define Package/oprofile + SECTION:=devel + CATEGORY:=Development + TITLE:=OProfile System Profiler + URL:=http://oprofile.sourceforge.net + DEPENDS:=+libpopt +libstdcpp +objdump +librt @(!TARGET_uml||BROKEN) +endef + +define Package/oprofile/description + A transparent low-overhead system-wide profiler. +endef + +define Package/oprofile-utils + SECTION:=devel + CATEGORY:=Development + TITLE:=OProfile System Profiler (extra utilities) + URL:=http://oprofile.sourceforge.net + DEPENDS:=oprofile +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --with-kernel-support \ + --with-kernel=$(LINUX_DIR)/user_headers \ + --without-x \ + ) +endef + +TARGET_CXXFLAGS += -fpermissive +TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS) + +define Package/oprofile-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/opannotate \ + $(PKG_INSTALL_DIR)/usr/bin/oparchive \ + $(PKG_INSTALL_DIR)/usr/bin/opgprof \ + $(1)/usr/bin +endef + +define Package/oprofile/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin + + rm -f \ + $(1)/usr/bin/opannotate \ + $(1)/usr/bin/oparchive \ + $(1)/usr/bin/opgprof + + $(INSTALL_DIR) $(1)/usr/lib/oprofile + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \ + $(1)/usr/lib/oprofile/ + + $(INSTALL_DIR) $(1)/usr/share/oprofile + $(CP) \ + $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \ + $(PKG_INSTALL_DIR)/usr/share/oprofile/$(patsubst x86,i386,$(LINUX_KARCH)) \ + $(1)/usr/share/oprofile/ +endef + +$(eval $(call BuildPackage,oprofile)) +$(eval $(call BuildPackage,oprofile-utils)) diff --git a/package/devel/oprofile/patches/100-musl.patch b/package/devel/oprofile/patches/100-musl.patch new file mode 100644 index 0000000..05a5283 --- /dev/null +++ b/package/devel/oprofile/patches/100-musl.patch @@ -0,0 +1,39 @@ +--- a/pe_profiling/operf.cpp ++++ b/pe_profiling/operf.cpp +@@ -857,11 +857,14 @@ static int __delete_old_previous_sample_ + int tflag __attribute__((unused)), + struct FTW *ftwbuf __attribute__((unused))) + { ++ int err; ++ + if (remove(fpath)) { ++ err = errno; + perror("sample data removal error"); +- return FTW_STOP; ++ return err; + } else { +- return FTW_CONTINUE; ++ return 0; + } + } + +@@ -896,7 +899,7 @@ static void convert_sample_data(void) + return; + + if (!operf_options::append) { +- int flags = FTW_DEPTH | FTW_ACTIONRETVAL; ++ int flags = FTW_DEPTH; + errno = 0; + if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 && + errno != ENOENT) { +--- a/libop/op_events.c ++++ b/libop/op_events.c +@@ -83,7 +83,7 @@ static int parse_hex(char const * str) + static u64 parse_long_hex(char const * str) + { + u64 value; +- if (sscanf(str, "%Lx", &value) != 1) ++ if (sscanf(str, "0x%llx", &value) != 1) + parse_error("expected long hexadecimal value"); + + fflush(stderr); diff --git a/package/devel/oprofile/patches/200-add_mips_1004kc.patch b/package/devel/oprofile/patches/200-add_mips_1004kc.patch new file mode 100644 index 0000000..038cd7d --- /dev/null +++ b/package/devel/oprofile/patches/200-add_mips_1004kc.patch @@ -0,0 +1,10 @@ +--- a/libop/op_cpu_type.c ++++ b/libop/op_cpu_type.c +@@ -609,6 +609,7 @@ static struct mips_cpu_descr mips_cpu_de + { .key = "MIPS 25Kc", .value = "mips/25K" }, /* CPU_25KF */ + { .key = "MIPS 34Kc", .value = "mips/34K" }, /* CPU_34K */ + { .key = "MIPS 74Kc", .value = "mips/74K" }, /* CPU_74K */ ++ { .key = "MIPS 1004Kc", .value = "mips/1004K" }, /* CPU_1004K */ + { .key = "MIPS M14Kc", .value = "mips/M14Kc" }, /* CPU_M14KC */ + { .key = "RM9000", .value = "mips/rm9000" }, /* CPU_RM9000 */ + { .key = "R10000", .value = "mips/r10000" }, /* CPU_R10000 */ diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile new file mode 100644 index 0000000..5e3d63f --- /dev/null +++ b/package/devel/perf/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2011-2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=perf +PKG_VERSION:=$(LINUX_VERSION) +PKG_RELEASE:=2 + +PKG_USE_MIPS16:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/perf + SECTION:=devel + CATEGORY:=Development + DEPENDS:= @USE_GLIBC +libelf1 +libdw +libpthread +librt +binutils + TITLE:=Linux performance monitoring tool + VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE) + URL:=http://www.kernel.org +endef + +define Package/perf/description + perf is the Linux performance monitoring tool +endef + +# Perf's makefile and headers are not relocatable and must be built from the +# Linux sources directory +define Build/Prepare + $(RM) -r $(PKG_BUILD_DIR) + $(LN) $(LINUX_DIR)/tools/perf $(PKG_BUILD_DIR) +endef + +# MAKE_FLAGS should be passed again upon cleaning because Perf's makefile +# always performs checks before processing any rule +define Build/Clean + -$(MAKE) -C $(PKG_BUILD_DIR) \ + NO_DWARF=1 \ + $(MAKE_FLAGS) \ + clean +endef + +MAKE_FLAGS = \ + ARCH="$(LINUX_KARCH)" \ + NO_LIBPERL=1 \ + NO_LIBPYTHON=1 \ + NO_NEWT=1 \ + NO_LZMA=1 \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_CROSS)ld" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + WERROR=0 \ + V=1 \ + prefix=/usr + +define Package/perf/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(LINUX_DIR)/tools/perf/perf $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,perf)) diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile new file mode 100644 index 0000000..76c140a --- /dev/null +++ b/package/devel/strace/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2006-2012 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=strace + +PKG_VERSION:=4.10 +PKG_RELEASE:=1 +PKG_MD5SUM:=107a5be455493861189e9b57a3a51912 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) + +PKG_LICENSE:=BSD-3c +PKG_LICENSE_FILES:=COPYRIGHT + +PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org> + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +HOST_CFLAGS += -I$(LINUX_DIR)/user_headers/include + +CONFIGURE_VARS+= \ + LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \ + CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \ + CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \ + CC_FOR_BUILD="$(HOST_CC)" + +define Package/strace + SECTION:=utils + CATEGORY:=Utilities + TITLE:=System call tracer + URL:=http://strace.sourceforge.net/ +endef + +define Package/strace/description +A useful diagnostic, instructional, and debugging tool. Allows you to track what +system calls a program makes while it is running. +endef + +MAKE_FLAGS := \ + CCOPT="$(TARGET_CFLAGS)" + +define Package/strace/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/strace $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,strace)) diff --git a/package/devel/strace/patches/001-upstream-musl_includes.patch b/package/devel/strace/patches/001-upstream-musl_includes.patch new file mode 100644 index 0000000..a35d7fd --- /dev/null +++ b/package/devel/strace/patches/001-upstream-musl_includes.patch @@ -0,0 +1,53 @@ +--- a/evdev.c ++++ b/evdev.c +@@ -28,6 +28,8 @@ + + #include "defs.h" + ++#include <linux/ioctl.h> ++ + #ifdef HAVE_LINUX_INPUT_H + #include <linux/input.h> + #include "xlat/evdev_abs.h" +--- a/ioctl.c ++++ b/ioctl.c +@@ -29,7 +29,7 @@ + */ + + #include "defs.h" +-#include <asm/ioctl.h> ++#include <linux/ioctl.h> + #include "xlat/ioctl_dirs.h" + + #ifdef HAVE_LINUX_INPUT_H +--- a/ioctlsort.c ++++ b/ioctlsort.c +@@ -33,7 +33,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-#include <asm/ioctl.h> ++#include <linux/ioctl.h> + + struct ioctlent { + const char *info; +--- a/mknod.c ++++ b/mknod.c +@@ -1,6 +1,7 @@ + #include "defs.h" + + #include <fcntl.h> ++#include <sys/stat.h> + + #ifdef MAJOR_IN_SYSMACROS + # include <sys/sysmacros.h> +--- a/printmode.c ++++ b/printmode.c +@@ -1,6 +1,7 @@ + #include "defs.h" + + #include <fcntl.h> ++#include <sys/stat.h> + + #include "xlat/modetypes.h" + diff --git a/package/devel/trace-cmd/Makefile b/package/devel/trace-cmd/Makefile new file mode 100644 index 0000000..6ed6673 --- /dev/null +++ b/package/devel/trace-cmd/Makefile @@ -0,0 +1,63 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=trace-cmd +PKG_VERSION:=v2.4.2 +PKG_RELEASE=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=01f8e669cb035aa911f1ee0e3f94d535cbcca78f +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +# PKG_MIRROR_MD5SUM:=6a08dfa2519a969d184e7bb5bb390620 +PKG_INSTALL:=1 +PKG_USE_MIPS16:=0 +PKG_LICENSE:=GPL-2.0 + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/trace-cmd + SECTION:=devel + CATEGORY:=Development + TITLE:=Linux trace command line utility + DEPENDS:= +endef + +define Package/trace-cmd-extra + SECTION:=devel + CATEGORY:=Development + TITLE:=Extra plugins for trace-cmd + DEPENDS:= +endef + +MAKE_FLAGS += \ + NO_PYTHON=1 \ + prefix=/usr + +PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/trace-cmd/plugins +PLUGINS_MAIN := function hrtimer mac80211 sched_switch + +TARGET_CFLAGS += --std=gnu99 -D_GNU_SOURCE + +define Package/trace-cmd/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/trace-cmd/plugins + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trace-cmd $(1)/usr/bin/ + $(CP) \ + $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \ + $(1)/usr/lib/trace-cmd/plugins +endef + +define Package/trace-cmd-extra/install + $(INSTALL_DIR) $(1)/usr/lib/trace-cmd/plugins + $(CP) \ + $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \ + $$(filter-out $(PLUGINS_MAIN), \ + $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \ + $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \ + $(1)/usr/lib/trace-cmd/plugins +endef + +$(eval $(call BuildPackage,trace-cmd)) +$(eval $(call BuildPackage,trace-cmd-extra)) diff --git a/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch b/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch new file mode 100644 index 0000000..e2a6897 --- /dev/null +++ b/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch @@ -0,0 +1,24 @@ +--- a/plugin_mac80211.c ++++ b/plugin_mac80211.c +@@ -179,12 +179,15 @@ static int drv_config(struct trace_seq * + { 2, "IDLE" }, + { 3, "QOS"}, + ); +- pevent_print_num_field(s, " chan:%d/", event, "center_freq", record, 1); +- print_enum(s, event, "channel_type", data, +- { 0, "noht" }, +- { 1, "ht20" }, +- { 2, "ht40-" }, +- { 3, "ht40+" }); ++ pevent_print_num_field(s, " chan:%d@", event, "control_freq", record, 1); ++ print_enum(s, event, "chan_width", data, ++ { 0, "20_noht" }, ++ { 1, "20" }, ++ { 2, "40" }, ++ { 3, "80" }, ++ { 4, "80p80" }, ++ { 5, "160" }); ++ + trace_seq_putc(s, ' '); + SF("power_level"); + diff --git a/package/devel/valgrind/Makefile b/package/devel/valgrind/Makefile new file mode 100644 index 0000000..3abed9c --- /dev/null +++ b/package/devel/valgrind/Makefile @@ -0,0 +1,178 @@ +# +# Copyright (C) 2006-2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=valgrind +PKG_VERSION:=3.10.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://valgrind.org/downloads/ +PKG_MD5SUM:=60ddae962bc79e7c95cfc4667245707f + +PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org> +PKG_LICENSE:=GPL-2.0+ + +PKG_FIXUP = autoreconf +PKG_INSTALL := 1 +PKG_BUILD_PARALLEL := 1 +PKG_USE_MIPS16:=0 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk + +define Package/valgrind + SECTION:=devel + CATEGORY:=Development + DEPENDS:=@mips||mipsel||i386||x86_64||powerpc||arm_v7 +libpthread +librt + TITLE:=debugging and profiling tools for Linux + URL:=http://www.valgrind.org +endef + +define Package/valgrind/default + $(Package/valgrind) + DEPENDS := valgrind +endef + +define Package/valgrind-cachegrind + $(Package/valgrind/default) + TITLE += (cache profiling) +endef + +define Package/valgrind-callgrind + $(Package/valgrind/default) + TITLE += (callgraph profiling) +endef + +define Package/valgrind-drd + $(Package/valgrind/default) + TITLE += (thread error detection) +endef + +define Package/valgrind-massif + $(Package/valgrind/default) + TITLE += (heap profiling) +endef + +define Package/valgrind-helgrind + $(Package/valgrind/default) + TITLE += (thread debugging) +endef + +define Package/valgrind-vgdb + $(Package/valgrind/default) + TITLE += (GDB interface) +endef + +define Package/valgrind/description + Valgrind is an award-winning suite of tools for debugging and + profiling Linux programs. With the tools that come with Valgrind, + you can automatically detect many memory management and threading + bugs, avoiding hours of frustrating bug-hunting, making your + programs more stable. You can also perform detailed profiling, + to speed up and reduce memory use of your programs. +endef + +CPU := $(patsubst x86_64,amd64,$(patsubst x86,i386,$(patsubst um,$(ARCH),$(LINUX_KARCH)))) + +CONFIGURE_VARS += \ + UNAME_R=$(LINUX_VERSION) + +ifeq ($(ARCH),x86_64) + CONFIGURE_ARGS += \ + --enable-only64bit + BITS := 64bit +else + CONFIGURE_ARGS += \ + --enable-only32bit + BITS := 32bit +endif + +CONFIGURE_ARGS += \ + --enable-tls \ + --without-x \ + --without-mpicc \ + --without-uiout \ + --disable-valgrindmi \ + --disable-tui \ + --disable-valgrindtk \ + --without-included-gettext \ + --with-pagesize=4 \ + +define Package/valgrind/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/valgrind* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/valgrind + $(CP) \ + ./files/default.supp \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/none-* \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_core*.so \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/$(CPU)-*.xml \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/$(BITS)-core*.xml \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/$(BITS)-linux*.xml \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/memcheck-* \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_memcheck*.so \ + $(1)/usr/lib/valgrind/ +endef + +define Package/valgrind-cachegrind/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cg_* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/valgrind + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/cachegrind-* \ + $(1)/usr/lib/valgrind/ +endef + +define Package/valgrind-callgrind/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/callgrind* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/valgrind + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/callgrind-* \ + $(1)/usr/lib/valgrind/ +endef + +define Package/valgrind-drd/install + $(INSTALL_DIR) $(1)/usr/lib/valgrind + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/drd-* \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_drd*.so \ + $(1)/usr/lib/valgrind/ +endef + +define Package/valgrind-massif/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ms_print $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/valgrind + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/massif-* \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_massif*.so \ + $(1)/usr/lib/valgrind/ +endef + +define Package/valgrind-helgrind/install + $(INSTALL_DIR) $(1)/usr/lib/valgrind + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/helgrind-* \ + $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_helgrind*.so \ + $(1)/usr/lib/valgrind/ +endef + +define Package/valgrind-vgdb/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vgdb $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,valgrind)) +$(eval $(call BuildPackage,valgrind-cachegrind)) +$(eval $(call BuildPackage,valgrind-callgrind)) +$(eval $(call BuildPackage,valgrind-drd)) +$(eval $(call BuildPackage,valgrind-massif)) +$(eval $(call BuildPackage,valgrind-helgrind)) +$(eval $(call BuildPackage,valgrind-vgdb)) diff --git a/package/devel/valgrind/files/default.supp b/package/devel/valgrind/files/default.supp new file mode 100644 index 0000000..beff559 --- /dev/null +++ b/package/devel/valgrind/files/default.supp @@ -0,0 +1,42 @@ +{ + ld(Addr1) + Memcheck:Addr1 + fun:* + obj:/lib/ld-* +} +{ + ld(Addr2) + Memcheck:Addr2 + fun:* + obj:/lib/ld-* +} +{ + ld(Addr4) + Memcheck:Addr4 + fun:* + obj:/lib/ld-* +} +{ + ld(Cond) + Memcheck:Cond + fun:* + obj:/lib/ld-* +} +{ + strlen(Cond) + Memcheck:Cond + fun:strlen + fun:* +} +{ + strnlen(Cond) + Memcheck:Cond + fun:strnlen + fun:* +} +{ + index(Cond) + Memcheck:Cond + fun:index + fun:* +} diff --git a/package/devel/valgrind/patches/100-fix_configure_check.patch b/package/devel/valgrind/patches/100-fix_configure_check.patch new file mode 100644 index 0000000..87ef3b3 --- /dev/null +++ b/package/devel/valgrind/patches/100-fix_configure_check.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -300,7 +300,7 @@ case "${host_os}" in + # Ok, this is linux. Check the kernel version + AC_MSG_CHECKING([for the kernel version]) + +- kernel=`uname -r` ++ kernel=${UNAME_R:-`uname -r`} + + case "${kernel}" in + 2.6.*|3.*) diff --git a/package/devel/valgrind/patches/110-add_a_out_h.patch b/package/devel/valgrind/patches/110-add_a_out_h.patch new file mode 100644 index 0000000..7d95fb3 --- /dev/null +++ b/package/devel/valgrind/patches/110-add_a_out_h.patch @@ -0,0 +1,157 @@ +--- /dev/null ++++ b/include/a.out.h +@@ -0,0 +1,138 @@ ++#ifndef __A_OUT_GNU_H__ ++#define __A_OUT_GNU_H__ ++ ++#include <bits/a.out.h> ++ ++#define __GNU_EXEC_MACROS__ ++ ++struct exec ++{ ++ unsigned long a_info; /* Use macros N_MAGIC, etc for access. */ ++ unsigned int a_text; /* Length of text, in bytes. */ ++ unsigned int a_data; /* Length of data, in bytes. */ ++ unsigned int a_bss; /* Length of uninitialized data area for file, in bytes. */ ++ unsigned int a_syms; /* Length of symbol table data in file, in bytes. */ ++ unsigned int a_entry; /* Start address. */ ++ unsigned int a_trsize;/* Length of relocation info for text, in bytes. */ ++ unsigned int a_drsize;/* Length of relocation info for data, in bytes. */ ++}; ++ ++enum machine_type ++{ ++ M_OLDSUN2 = 0, ++ M_68010 = 1, ++ M_68020 = 2, ++ M_SPARC = 3, ++ M_386 = 100, ++ M_MIPS1 = 151, ++ M_MIPS2 = 152 ++}; ++ ++#define N_MAGIC(exec) ((exec).a_info & 0xffff) ++#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff)) ++#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff) ++#define N_SET_INFO(exec, magic, type, flags) \ ++ ((exec).a_info = ((magic) & 0xffff) \ ++ | (((int)(type) & 0xff) << 16) \ ++ | (((flags) & 0xff) << 24)) ++#define N_SET_MAGIC(exec, magic) \ ++ ((exec).a_info = ((exec).a_info & 0xffff0000) | ((magic) & 0xffff)) ++#define N_SET_MACHTYPE(exec, machtype) \ ++ ((exec).a_info = \ ++ ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16)) ++#define N_SET_FLAGS(exec, flags) \ ++ ((exec).a_info = \ ++ ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24)) ++ ++/* Code indicating object file or impure executable. */ ++#define OMAGIC 0407 ++/* Code indicating pure executable. */ ++#define NMAGIC 0410 ++/* Code indicating demand-paged executable. */ ++#define ZMAGIC 0413 ++/* This indicates a demand-paged executable with the header in the text. ++ The first page is unmapped to help trap NULL pointer references. */ ++#define QMAGIC 0314 ++/* Code indicating core file. */ ++#define CMAGIC 0421 ++ ++#define N_TRSIZE(a) ((a).a_trsize) ++#define N_DRSIZE(a) ((a).a_drsize) ++#define N_SYMSIZE(a) ((a).a_syms) ++#define N_BADMAG(x) \ ++ (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \ ++ && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC) ++#define _N_HDROFF(x) (1024 - sizeof (struct exec)) ++#define N_TXTOFF(x) \ ++ (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : \ ++ (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec))) ++#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text) ++#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data) ++#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x)) ++#define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x)) ++#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x)) ++ ++/* Address of text segment in memory after it is loaded. */ ++#define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? 4096 : 0) ++ ++/* Address of data segment in memory after it is loaded. */ ++#define SEGMENT_SIZE 1024 ++ ++#define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1)) ++#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text) ++ ++#define N_DATADDR(x) \ ++ (N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x)) \ ++ : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) ++#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data) ++ ++#if !defined (N_NLIST_DECLARED) ++struct nlist ++{ ++ union ++ { ++ char *n_name; ++ struct nlist *n_next; ++ long n_strx; ++ } n_un; ++ unsigned char n_type; ++ char n_other; ++ short n_desc; ++ unsigned long n_value; ++}; ++#endif /* no N_NLIST_DECLARED. */ ++ ++#define N_UNDF 0 ++#define N_ABS 2 ++#define N_TEXT 4 ++#define N_DATA 6 ++#define N_BSS 8 ++#define N_FN 15 ++#define N_EXT 1 ++#define N_TYPE 036 ++#define N_STAB 0340 ++#define N_INDR 0xa ++#define N_SETA 0x14 /* Absolute set element symbol. */ ++#define N_SETT 0x16 /* Text set element symbol. */ ++#define N_SETD 0x18 /* Data set element symbol. */ ++#define N_SETB 0x1A /* Bss set element symbol. */ ++#define N_SETV 0x1C /* Pointer to set vector in data area. */ ++ ++#if !defined (N_RELOCATION_INFO_DECLARED) ++/* This structure describes a single relocation to be performed. ++ The text-relocation section of the file is a vector of these structures, ++ all of which apply to the text section. ++ Likewise, the data-relocation section applies to the data section. */ ++ ++struct relocation_info ++{ ++ int r_address; ++ unsigned int r_symbolnum:24; ++ unsigned int r_pcrel:1; ++ unsigned int r_length:2; ++ unsigned int r_extern:1; ++ unsigned int r_pad:4; ++}; ++#endif /* no N_RELOCATION_INFO_DECLARED. */ ++ ++#endif /* __A_OUT_GNU_H__ */ +--- /dev/null ++++ b/include/bits/a.out.h +@@ -0,0 +1,13 @@ ++#ifndef __A_OUT_GNU_H__ ++# error "Never use <bits/a.out.h> directly; include <a.out.h> instead." ++#endif ++ ++#include <bits/wordsize.h> ++ ++#if __WORDSIZE == 64 ++ ++/* Signal to users of this header that this architecture really doesn't ++ support a.out binary format. */ ++#define __NO_A_OUT_SUPPORT 1 ++ ++#endif diff --git a/package/devel/valgrind/patches/120-Fix-configure-for-Linux-kernel-4.0-rc1.patch b/package/devel/valgrind/patches/120-Fix-configure-for-Linux-kernel-4.0-rc1.patch new file mode 100644 index 0000000..b833f18 --- /dev/null +++ b/package/devel/valgrind/patches/120-Fix-configure-for-Linux-kernel-4.0-rc1.patch @@ -0,0 +1,42 @@ +From bf803555d10b5b4c9223b24bf13845ee88d8f3b5 Mon Sep 17 00:00:00 2001 +From: cborntra <cborntra@a5019735-40e9-0310-863c-91ae7b9d1cf9> +Date: Mon, 23 Feb 2015 20:19:03 +0000 +Subject: [PATCH] Fix configure for Linux kernel >= 4.0-rc1 In addition raise + the minimal Linux version to 2.6 as there is almost no test coverage for 2.4 + and 2.6 was released in 2003. + +git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14955 a5019735-40e9-0310-863c-91ae7b9d1cf9 +--- + NEWS | 3 +++ + configure.ac | 18 ++++++------------ + 2 files changed, 9 insertions(+), 12 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -303,20 +303,14 @@ case "${host_os}" in + kernel=${UNAME_R:-`uname -r`} + + case "${kernel}" in +- 2.6.*|3.*) +- AC_MSG_RESULT([2.6.x/3.x family (${kernel})]) +- AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x]) +- ;; +- +- 2.4.*) +- AC_MSG_RESULT([2.4 family (${kernel})]) +- AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you're using Linux 2.4.x]) +- ;; +- +- *) ++ 0.*|1.*|2.0.*|2.1.*|2.2.*|2.3.*|2.4.*|2.5.*) + AC_MSG_RESULT([unsupported (${kernel})]) +- AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6]) ++ AC_MSG_ERROR([Valgrind needs a Linux kernel >= 2.6]) + ;; ++ ++ *) ++ AC_MSG_RESULT([2.6 or later (${kernel})]) ++ ;; + esac + + ;; diff --git a/package/devel/valgrind/patches/200-musl_fix.patch b/package/devel/valgrind/patches/200-musl_fix.patch new file mode 100644 index 0000000..e61e822 --- /dev/null +++ b/package/devel/valgrind/patches/200-musl_fix.patch @@ -0,0 +1,45 @@ +--- a/coregrind/vg_preloaded.c ++++ b/coregrind/vg_preloaded.c +@@ -56,7 +56,7 @@ + void VG_NOTIFY_ON_LOAD(freeres)( void ); + void VG_NOTIFY_ON_LOAD(freeres)( void ) + { +-# if !defined(__UCLIBC__) \ ++# if !defined(__UCLIBC__) && defined(__GLIBC__) \ + && !defined(VGPV_arm_linux_android) && !defined(VGPV_x86_linux_android) \ + && !defined(VGPV_mips32_linux_android) + extern void __libc_freeres(void); +--- a/include/pub_tool_redir.h ++++ b/include/pub_tool_redir.h +@@ -241,7 +241,7 @@ + /* --- Soname of the standard C library. --- */ + + #if defined(VGO_linux) +-# define VG_Z_LIBC_SONAME libcZdsoZa // libc.so* ++# define VG_Z_LIBC_SONAME libcZdZa // libc.* + + #elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6) + # define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib +@@ -273,7 +273,11 @@ + /* --- Soname of the pthreads library. --- */ + + #if defined(VGO_linux) ++# if defined(__GLIBC__) || defined(__UCLIBC__) + # define VG_Z_LIBPTHREAD_SONAME libpthreadZdsoZd0 // libpthread.so.0 ++# else ++# define VG_Z_LIBPTHREAD_SONAME libcZdZa // libc.* ++# endif + #elif defined(VGO_darwin) + # define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib + #else +--- a/configure.ac ++++ b/configure.ac +@@ -1025,8 +1025,6 @@ case "${GLIBC_VERSION}" in + + *) + AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}]) +- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.19]) +- AC_MSG_ERROR([or Darwin or Bionic libc]) + ;; + esac + diff --git a/package/devel/valgrind/src/abort.c b/package/devel/valgrind/src/abort.c new file mode 100644 index 0000000..0b4ad98 --- /dev/null +++ b/package/devel/valgrind/src/abort.c @@ -0,0 +1,3 @@ +void abort(void) +{ +} |