Initial commit
This commit is contained in:
126
package/devel/binutils/Makefile
Normal file
126
package/devel/binutils/Makefile
Normal file
@@ -0,0 +1,126 @@
|
||||
#
|
||||
# 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.27
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=@GNU/binutils
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_VERSION:=$(PKG_VERSION)
|
||||
PKG_HASH:=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88
|
||||
|
||||
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@nbd.name>
|
||||
PKG_LICENSE:=GPL-3.0+
|
||||
PKG_CPE_ID:=cpe:/a:gnu:binutils
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libbfd
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=libbfd
|
||||
DEPENDS:=+zlib $(ICONV_DEPENDS) $(INTL_DEPENDS)
|
||||
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))
|
||||
@@ -0,0 +1,65 @@
|
||||
From 183eb37e25d903ccd68cc2d8f8a37e75872c03d2 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Tue, 6 Sep 2016 17:35:35 +0100
|
||||
Subject: [PATCH 1/2] Do not pass host compiler sanitization flags on to linker
|
||||
testsuite.
|
||||
|
||||
* Makefile.am (CFLAGS_FOR_TARGET): Define as a copy of CFLAGS but
|
||||
without any sanitization options.
|
||||
(CXXFLAGS_FOR_TARGET): Define as a copy of CXXFLAGS but without
|
||||
any sanitization options.
|
||||
(check-DEJAGNU): Pass CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET
|
||||
as CFLAGS and CXXFLAGS respectively.
|
||||
---
|
||||
ld/Makefile.am | 8 ++++++--
|
||||
ld/Makefile.in | 8 ++++++--
|
||||
2 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -136,6 +136,10 @@ CXX_FOR_TARGET = ` \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
+# Strip out sanitization options as we want to test building binaries without any extra paraphernalia
|
||||
+CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
|
||||
+CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
|
||||
+
|
||||
transform = s/^ld-new$$/$(installed_linker)/;@program_transform_name@
|
||||
bin_PROGRAMS = ld-new
|
||||
info_TEXINFOS = ld.texinfo
|
||||
@@ -2075,8 +2079,8 @@ check-DEJAGNU: site.exp
|
||||
runtest=$(RUNTEST); \
|
||||
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
|
||||
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
|
||||
- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
|
||||
- CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
|
||||
+ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS_FOR_TARGET)" \
|
||||
+ CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
|
||||
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
|
||||
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
|
||||
LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -507,6 +507,10 @@ CXX_FOR_TARGET = ` \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
+
|
||||
+# Strip out sanitization options as they require special host libraries.
|
||||
+CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
|
||||
+CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
|
||||
info_TEXINFOS = ld.texinfo
|
||||
ld_TEXINFOS = configdoc.texi
|
||||
noinst_TEXINFOS = ldint.texinfo
|
||||
@@ -3644,8 +3648,8 @@ check-DEJAGNU: site.exp
|
||||
runtest=$(RUNTEST); \
|
||||
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
|
||||
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
|
||||
- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
|
||||
- CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
|
||||
+ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS_FOR_TARGET)" \
|
||||
+ CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
|
||||
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
|
||||
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
|
||||
LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
|
||||
File diff suppressed because it is too large
Load Diff
94
package/devel/gdb-arc/Makefile
Normal file
94
package/devel/gdb-arc/Makefile
Normal file
@@ -0,0 +1,94 @@
|
||||
#
|
||||
# Copyright (C) 2006-2016 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-arc
|
||||
PKG_VERSION:=arc-2017.09-gdb
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=gdb-arc-2017.09-gdb.tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_VERSION)
|
||||
PKG_HASH:=6a91f86cc487c1548d3f5d4f29f7226d2019c0db8a63633aeabd5914a340f3f9
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/binutils-gdb-arc-2017.09-gdb
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
PKG_LICENSE:=GPL-3.0+
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/gdb-arc/Default
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
DEPENDS:=+!USE_MUSL:libthread-db +PACKAGE_zlib:zlib @arc
|
||||
URL:=http://www.gnu.org/software/gdb/
|
||||
endef
|
||||
|
||||
define Package/gdb-arc
|
||||
$(call Package/gdb-arc/Default)
|
||||
TITLE:=GNU Debugger for ARC
|
||||
DEPENDS+=+libreadline +libncurses +zlib
|
||||
endef
|
||||
|
||||
define Package/gdb-arc/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-arc
|
||||
$(call Package/gdb-arc/Default)
|
||||
TITLE:=Remote server for GNU Debugger
|
||||
endef
|
||||
|
||||
define Package/gdbserver-arc/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 \
|
||||
--disable-binutils \
|
||||
--disable-ld \
|
||||
--disable-gas \
|
||||
--disable-sim
|
||||
|
||||
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-arc/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/gdbserver-arc/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,gdb-arc))
|
||||
$(eval $(call BuildPackage,gdbserver-arc))
|
||||
32
package/devel/gdb-arc/patches/100-no_extern_inline.patch
Normal file
32
package/devel/gdb-arc/patches/100-no_extern_inline.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
--- a/sim/common/sim-arange.c
|
||||
+++ b/sim/common/sim-arange.c
|
||||
@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a
|
||||
build_search_tree (ar);
|
||||
}
|
||||
|
||||
-#endif /* DEFINE_NON_INLINE_P */
|
||||
-
|
||||
-#if DEFINE_INLINE_P
|
||||
-
|
||||
-SIM_ARANGE_INLINE int
|
||||
+int
|
||||
sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr)
|
||||
{
|
||||
ADDR_RANGE_TREE *t = ar->range_tree;
|
||||
@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#endif /* DEFINE_INLINE_P */
|
||||
+#endif /* DEFINE_NON_INLINE_P */
|
||||
--- a/sim/common/sim-arange.h
|
||||
+++ b/sim/common/sim-arange.h
|
||||
@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_
|
||||
|
||||
/* Return non-zero if ADDR is in range AR, traversing the entire tree.
|
||||
If no range is specified, that is defined to mean "everything". */
|
||||
-SIM_ARANGE_INLINE int
|
||||
+extern int
|
||||
sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/);
|
||||
#define ADDR_RANGE_HIT_P(ar, addr) \
|
||||
((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr)))
|
||||
21
package/devel/gdb-arc/patches/110-no_testsuite.patch
Normal file
21
package/devel/gdb-arc/patches/110-no_testsuite.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -870,8 +870,7 @@ MAKEINFOFLAGS
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
-ac_subdirs_all='testsuite
|
||||
-gdbtk
|
||||
+ac_subdirs_all='gdbtk
|
||||
multi-ice
|
||||
gdbserver'
|
||||
|
||||
@@ -5610,7 +5610,7 @@ $as_echo "$with_auto_load_safe_path" >&6
|
||||
|
||||
|
||||
|
||||
-subdirs="$subdirs testsuite"
|
||||
+subdirs="$subdirs"
|
||||
|
||||
|
||||
# Check whether to support alternative target configurations
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/gdb/gdbserver/configure
|
||||
+++ b/gdb/gdbserver/configure
|
||||
@@ -2468,7 +2468,7 @@ $as_echo "$as_me: error: \`$ac_var' was
|
||||
ac_cache_corrupted=: ;;
|
||||
,);;
|
||||
*)
|
||||
- if test "x$ac_old_val" != "x$ac_new_val"; then
|
||||
+ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then
|
||||
# differences in whitespace do not lead to failure.
|
||||
ac_old_val_w=`echo x $ac_old_val`
|
||||
ac_new_val_w=`echo x $ac_new_val`
|
||||
87
package/devel/gdb/Makefile
Normal file
87
package/devel/gdb/Makefile
Normal file
@@ -0,0 +1,87 @@
|
||||
#
|
||||
# Copyright (C) 2006-2016 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:=8.0.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNU/gdb
|
||||
PKG_HASH:=3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
PKG_LICENSE:=GPL-3.0+
|
||||
PKG_CPE_ID:=cpe:/a:gnu:gdb
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/gdb/Default
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
DEPENDS:=+!USE_MUSL:libthread-db +PACKAGE_zlib:zlib @!arc
|
||||
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-sim \
|
||||
--disable-werror
|
||||
|
||||
CONFIGURE_VARS+= \
|
||||
ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
|
||||
|
||||
TARGET_LDFLAGS+= \
|
||||
-static-libstdc++ \
|
||||
-Wl,--gc-sections
|
||||
|
||||
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))
|
||||
@@ -0,0 +1,16 @@
|
||||
See http://sourceware.org/bugzilla/show_bug.cgi?id=14523
|
||||
---
|
||||
--- a/gdb/common/signals.c
|
||||
+++ b/gdb/common/signals.c
|
||||
@@ -348,6 +348,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"));
|
||||
53
package/devel/gdb/patches/100-musl_fix.patch
Normal file
53
package/devel/gdb/patches/100-musl_fix.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
--- 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"
|
||||
@@ -71,6 +72,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
|
||||
+
|
||||
--- a/gdb/nat/ppc-linux.h
|
||||
+++ b/gdb/nat/ppc-linux.h
|
||||
@@ -18,7 +18,10 @@
|
||||
#ifndef PPC_LINUX_H
|
||||
#define PPC_LINUX_H 1
|
||||
|
||||
+#define pt_regs __pt_regs
|
||||
#include <asm/ptrace.h>
|
||||
+#undef pt_regs
|
||||
+
|
||||
#include <asm/cputable.h>
|
||||
|
||||
/* This sometimes isn't defined. */
|
||||
--- a/gdb/gdbserver/linux-ppc-low.c
|
||||
+++ b/gdb/gdbserver/linux-ppc-low.c
|
||||
@@ -21,7 +21,9 @@
|
||||
#include "linux-low.h"
|
||||
|
||||
#include <elf.h>
|
||||
+#define pt_regs __pt_regs
|
||||
#include <asm/ptrace.h>
|
||||
+#undef pt_regs
|
||||
|
||||
#include "nat/ppc-linux.h"
|
||||
#include "linux-ppc-tdesc.h"
|
||||
76
package/devel/gdb/patches/110-shared_libgcc.patch
Normal file
76
package/devel/gdb/patches/110-shared_libgcc.patch
Normal file
@@ -0,0 +1,76 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1300,13 +1300,13 @@ if test -z "$LD"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
-# Check whether -static-libstdc++ -static-libgcc is supported.
|
||||
+# Check whether -static-libstdc++ is supported.
|
||||
have_static_libs=no
|
||||
if test "$GCC" = yes; then
|
||||
saved_LDFLAGS="$LDFLAGS"
|
||||
|
||||
- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
|
||||
- AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
|
||||
+ LDFLAGS="$LDFLAGS -static-libstdc++"
|
||||
+ AC_MSG_CHECKING([whether g++ accepts -static-libstdc++])
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE([
|
||||
#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
|
||||
@@ -1632,7 +1632,7 @@ AC_ARG_WITH(stage1-ldflags,
|
||||
# if supported. But if the user explicitly specified the libraries to use,
|
||||
# trust that they are doing what they want.
|
||||
if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then
|
||||
- stage1_ldflags="-static-libstdc++ -static-libgcc"
|
||||
+ stage1_ldflags="-static-libstdc++"
|
||||
fi])
|
||||
AC_SUBST(stage1_ldflags)
|
||||
|
||||
@@ -1661,7 +1661,7 @@ AC_ARG_WITH(boot-ldflags,
|
||||
# statically. But if the user explicitly specified the libraries to
|
||||
# use, trust that they are doing what they want.
|
||||
if test "$poststage1_libs" = ""; then
|
||||
- poststage1_ldflags="-static-libstdc++ -static-libgcc"
|
||||
+ poststage1_ldflags="-static-libstdc++"
|
||||
fi])
|
||||
AC_SUBST(poststage1_ldflags)
|
||||
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5005,14 +5005,14 @@ if test -z "$LD"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
-# Check whether -static-libstdc++ -static-libgcc is supported.
|
||||
+# Check whether -static-libstdc++ is supported.
|
||||
have_static_libs=no
|
||||
if test "$GCC" = yes; then
|
||||
saved_LDFLAGS="$LDFLAGS"
|
||||
|
||||
- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5
|
||||
-$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; }
|
||||
+ LDFLAGS="$LDFLAGS -static-libstdc++"
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++" >&5
|
||||
+$as_echo_n "checking whether g++ accepts -static-libstdc++... " >&6; }
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
@@ -5795,7 +5795,7 @@ else
|
||||
# if supported. But if the user explicitly specified the libraries to use,
|
||||
# trust that they are doing what they want.
|
||||
if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then
|
||||
- stage1_ldflags="-static-libstdc++ -static-libgcc"
|
||||
+ stage1_ldflags="-static-libstdc++"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -5831,7 +5831,7 @@ else
|
||||
# statically. But if the user explicitly specified the libraries to
|
||||
# use, trust that they are doing what they want.
|
||||
if test "$poststage1_libs" = ""; then
|
||||
- poststage1_ldflags="-static-libstdc++ -static-libgcc"
|
||||
+ poststage1_ldflags="-static-libstdc++"
|
||||
fi
|
||||
fi
|
||||
|
||||
38
package/devel/gdb/patches/120-sigprocmask-invalid-call.patch
Normal file
38
package/devel/gdb/patches/120-sigprocmask-invalid-call.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
From 56893a61aa4f0270fa8d1197b9848247f90fce0d Mon Sep 17 00:00:00 2001
|
||||
From: Yousong Zhou <yszhou4tech@gmail.com>
|
||||
Date: Fri, 24 Mar 2017 10:36:03 +0800
|
||||
Subject: [PATCH] Fix invalid sigprocmask call
|
||||
|
||||
The POSIX document says
|
||||
|
||||
The pthread_sigmask() and sigprocmask() functions shall fail if:
|
||||
|
||||
[EINVAL]
|
||||
The value of the how argument is not equal to one of the defined values.
|
||||
|
||||
and this is how musl-libc is currently doing. Fix the call to be safe
|
||||
and correct
|
||||
|
||||
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html
|
||||
|
||||
gdb/ChangeLog:
|
||||
2017-03-24 Yousong Zhou <yszhou4tech@gmail.com>
|
||||
|
||||
* common/signals-state-save-restore.c (save_original_signals_state):
|
||||
Fix invalid sigprocmask call.
|
||||
---
|
||||
gdb/ChangeLog | 5 +++++
|
||||
gdb/common/signals-state-save-restore.c | 2 +-
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/gdb/common/signals-state-save-restore.c
|
||||
+++ b/gdb/common/signals-state-save-restore.c
|
||||
@@ -41,7 +41,7 @@ save_original_signals_state (void)
|
||||
int i;
|
||||
int res;
|
||||
|
||||
- res = sigprocmask (0, NULL, &original_signal_mask);
|
||||
+ res = sigprocmask (SIG_BLOCK, NULL, &original_signal_mask);
|
||||
if (res == -1)
|
||||
perror_with_name (("sigprocmask"));
|
||||
|
||||
82
package/devel/perf/Makefile
Normal file
82
package/devel/perf/Makefile
Normal file
@@ -0,0 +1,82 @@
|
||||
#
|
||||
# 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
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
# Perf's makefile and headers are not relocatable and must be built from the
|
||||
# Linux sources directory
|
||||
PKG_BUILD_DIR:=$(LINUX_DIR)/tools/perf-$(TARGET_DIR_NAME)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/perf
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
DEPENDS:= +libelf1 +libdw +(mips||mipsel||powerpc||i386||x86_64||arm||aarch64):libunwind +libpthread +librt +objdump @!LINUX_3_18 @!IN_SDK @!TARGET_arc770 @KERNEL_PERF_EVENTS
|
||||
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
|
||||
|
||||
define Build/Prepare
|
||||
$(CP) $(LINUX_DIR)/tools/perf/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
|
||||
MAKE_FLAGS = \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
NO_LIBPERL=1 \
|
||||
NO_LIBPYTHON=1 \
|
||||
NO_NEWT=1 \
|
||||
NO_LZMA=1 \
|
||||
NO_BACKTRACE=1 \
|
||||
NO_LIBNUMA=1 \
|
||||
NO_GTK2=1 \
|
||||
NO_LIBAUDIT=1 \
|
||||
NO_LIBCRYPTO=1 \
|
||||
NO_LIBUNWIND=1 \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CC="$(TARGET_CC)" \
|
||||
LD="$(TARGET_CROSS)ld" \
|
||||
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
|
||||
WERROR=0 \
|
||||
prefix=/usr
|
||||
|
||||
ifdef CONFIG_LINUX_4_4
|
||||
ifdef CONFIG_USE_MUSL
|
||||
MAKE_FLAGS += EXTRA_CFLAGS="-I$(CURDIR)/musl-include -include $(CURDIR)/musl-compat.h -D__UCLIBC__"
|
||||
endif
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE_FLAGS) $(MAKE) $(PKG_JOBS) \
|
||||
-C $(PKG_BUILD_DIR) \
|
||||
-f Makefile.perf \
|
||||
--no-print-directory
|
||||
endef
|
||||
|
||||
define Package/perf/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/perf $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,perf))
|
||||
43
package/devel/perf/musl-compat.h
Normal file
43
package/devel/perf/musl-compat.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef __PERF_MUSL_COMPAT_H
|
||||
#define __PERF_MUSL_COMPAT_H
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#undef _IOWR
|
||||
#undef _IOR
|
||||
#undef _IOW
|
||||
#undef _IOC
|
||||
#undef _IO
|
||||
|
||||
#define _SC_LEVEL1_DCACHE_LINESIZE -1
|
||||
|
||||
static inline long sysconf_wrap(int name)
|
||||
{
|
||||
FILE *f;
|
||||
int val;
|
||||
|
||||
switch (name) {
|
||||
case _SC_LEVEL1_DCACHE_LINESIZE:
|
||||
f = fopen("/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size", "r");
|
||||
if (!f)
|
||||
return 0;
|
||||
|
||||
if (fscanf(f, "%d", &val) != 1)
|
||||
return 0;
|
||||
|
||||
fclose(f);
|
||||
return val;
|
||||
default:
|
||||
return sysconf(name);
|
||||
}
|
||||
}
|
||||
|
||||
#define sysconf(_n) sysconf_wrap(_n)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
8
package/devel/perf/musl-include/asm/errno.h
Normal file
8
package/devel/perf/musl-include/asm/errno.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef __MUSL_COMPAT_ASM_ERRNO_H
|
||||
#define __MUSL_COMPAT_ASM_ERRNO_H
|
||||
|
||||
/* Avoid including different versions of errno.h, the defines (incorrectly)
|
||||
* cause a redefinition error on PowerPC */
|
||||
#include <errno.h>
|
||||
|
||||
#endif
|
||||
18
package/devel/perf/musl-include/string.h
Normal file
18
package/devel/perf/musl-include/string.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef __MUSL_COMPAT_STRING_H
|
||||
#define __MUSL_COMPAT_STRING_H
|
||||
|
||||
#include_next <string.h>
|
||||
|
||||
/* Change XSI compliant version into GNU extension hackery */
|
||||
static inline char *
|
||||
gnu_strerror_r(int err, char *buf, size_t buflen)
|
||||
{
|
||||
if (strerror_r(err, buf, buflen))
|
||||
return NULL;
|
||||
return buf;
|
||||
}
|
||||
#ifdef _GNU_SOURCE
|
||||
#define strerror_r gnu_strerror_r
|
||||
#endif
|
||||
|
||||
#endif
|
||||
71
package/devel/strace/Makefile
Normal file
71
package/devel/strace/Makefile
Normal file
@@ -0,0 +1,71 @@
|
||||
#
|
||||
# Copyright (C) 2006-2016 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.22
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
|
||||
PKG_HASH:=068cd09264c95e4d591bbcd3ea08f99a693ed8663cd5169b0fdad72eb5bdb39d
|
||||
|
||||
PKG_LICENSE:=BSD-3c
|
||||
PKG_LICENSE_FILES:=COPYRIGHT
|
||||
PKG_CPE_ID:=cpe:/a:paul_kranenburg:strace
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_strace_libunwind
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
HOST_CFLAGS += -I$(LINUX_DIR)/user_headers/include
|
||||
|
||||
ifeq ($(ARCH),aarch64)
|
||||
CONFIGURE_ARGS += --enable-mpers=check
|
||||
endif
|
||||
|
||||
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
|
||||
DEPENDS:=+PACKAGE_strace_libunwind:libunwind
|
||||
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
|
||||
|
||||
define Package/strace/config
|
||||
config PACKAGE_strace_libunwind
|
||||
bool "Enable stack tracing support using libunwind (experimental)"
|
||||
default n
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += --with-libunwind=$(if $(CONFIG_PACKAGE_strace_libunwind),yes,no)
|
||||
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))
|
||||
@@ -0,0 +1,17 @@
|
||||
--- a/ptrace.h
|
||||
+++ b/ptrace.h
|
||||
@@ -48,7 +48,14 @@
|
||||
# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
|
||||
#endif
|
||||
|
||||
+#if POWERPC
|
||||
+#include <linux/types.h>
|
||||
+#define __ASSEMBLY__
|
||||
+#endif
|
||||
#include <linux/ptrace.h>
|
||||
+#if POWERPC
|
||||
+#undef __ASSEMBLY__
|
||||
+#endif
|
||||
|
||||
#ifdef HAVE_STRUCT_IA64_FPREG
|
||||
# undef ia64_fpreg
|
||||
60
package/devel/trace-cmd/Makefile
Normal file
60
package/devel/trace-cmd/Makefile
Normal file
@@ -0,0 +1,60 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=trace-cmd
|
||||
PKG_VERSION:=v2.6.1
|
||||
PKG_RELEASE=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/
|
||||
PKG_HASH:=4eb79001778a77c0ada10265e7f4b5515a3e21a46f0a15c2e8cc614efdf3f5df
|
||||
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))
|
||||
@@ -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");
|
||||
|
||||
185
package/devel/valgrind/Makefile
Normal file
185
package/devel/valgrind/Makefile
Normal file
@@ -0,0 +1,185 @@
|
||||
#
|
||||
# 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.13.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=http://sourceware.org/pub/valgrind/
|
||||
PKG_HASH:=d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=GPL-2.0+
|
||||
PKG_CPE_ID:=cpe:/a:valgrind:valgrind
|
||||
|
||||
PKG_FIXUP = autoreconf
|
||||
PKG_INSTALL := 1
|
||||
PKG_BUILD_PARALLEL := 1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_SSP:=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 ($(CONFIG_ARCH_64BIT),y)
|
||||
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/$(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/
|
||||
|
||||
ifneq ($(ARCH),aarch64)
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/valgrind/$(CPU)-*.xml \
|
||||
$(1)/usr/lib/valgrind/
|
||||
endif
|
||||
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))
|
||||
42
package/devel/valgrind/files/default.supp
Normal file
42
package/devel/valgrind/files/default.supp
Normal file
@@ -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:*
|
||||
}
|
||||
11
package/devel/valgrind/patches/100-fix_configure_check.patch
Normal file
11
package/devel/valgrind/patches/100-fix_configure_check.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -323,7 +323,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
|
||||
0.*|1.*|2.0.*|2.1.*|2.2.*|2.3.*|2.4.*|2.5.*)
|
||||
@@ -0,0 +1,17 @@
|
||||
Description: Fix FTBFS on armhf by correctly detecting the architecture
|
||||
Origin: vendor
|
||||
Bug-Debian: http://bugs.debian.org/730844
|
||||
Author: Alessandro Ghedini <ghedo@debian.org>
|
||||
Last-Update: 2013-11-30
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -234,7 +234,7 @@ case "${host_cpu}" in
|
||||
ARCH_MAX="s390x"
|
||||
;;
|
||||
|
||||
- armv7*)
|
||||
+ arm*)
|
||||
AC_MSG_RESULT([ok (${host_cpu})])
|
||||
ARCH_MAX="arm"
|
||||
;;
|
||||
Reference in New Issue
Block a user