2007-10-25 13:59:16 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 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
|
2008-08-17 11:49:42 +00:00
|
|
|
PKG_VERSION:=3.3.1
|
2007-10-25 13:59:16 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_URL:=http://valgrind.org/downloads/
|
2008-08-17 11:49:42 +00:00
|
|
|
PKG_MD5SUM:=0539e2fa4aadb2cd4ca4bba65b1fe8b5
|
2007-10-25 13:59:16 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/valgrind
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
DEPENDS:=@TARGET_x86||@TARGET_rdc||@TARGET_ps3||@TARGET_magicbox||@TARGET_amcc||@TARGET_uml
|
|
|
|
TITLE:=debugging and profiling Linux programs
|
|
|
|
URL:=http://www.valgrind.org
|
|
|
|
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
|
|
|
|
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-tls \
|
|
|
|
--enable-only32bit \
|
|
|
|
--without-x \
|
|
|
|
--without-uiout \
|
|
|
|
--disable-valgrindmi \
|
|
|
|
--disable-tui \
|
|
|
|
--disable-valgrindtk \
|
2007-11-01 17:12:09 +00:00
|
|
|
--without-included-gettext
|
|
|
|
|
|
|
|
DEFAULT_SUPP += "uclibc.supp"
|
2007-10-25 13:59:16 +00:00
|
|
|
|
2008-08-17 11:49:31 +00:00
|
|
|
define Build/Compile
|
|
|
|
$(TARGET_CC) $(TARGET_CFLAGS) -c -o $(PKG_BUILD_DIR)/abort.o ./src/abort.c
|
|
|
|
$(TARGET_CROSS)ar rcu $(PKG_BUILD_DIR)/abort.a $(PKG_BUILD_DIR)/abort.o
|
2007-10-25 13:59:16 +00:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2008-08-17 11:49:31 +00:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-10-25 13:59:16 +00:00
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
2008-08-05 22:00:32 +00:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
2008-08-17 11:49:42 +00:00
|
|
|
AM_CFLAGS_X86_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
|
|
|
|
AM_CFLAGS_AMD64_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
|
|
|
|
AM_CFLAGS_PPC32_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
|
|
|
|
AM_CFLAGS_PPC64_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
|
2011-03-02 12:03:46 +00:00
|
|
|
TOOL_LDADD_COMMON="$(LIBGCC_S) $(PKG_BUILD_DIR)/abort.a" \
|
2007-10-25 13:59:16 +00:00
|
|
|
all install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/valgrind/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
2007-12-09 18:59:01 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
2007-10-25 13:59:16 +00:00
|
|
|
$(INSTALL_BIN) ./files/valgrind.sh $(1)/usr/bin/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/valgrind
|
|
|
|
$(CP) ./files/uclibc.supp $(1)/usr/lib/valgrind/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/valgrind/*-linux $(1)/usr/lib/valgrind/
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,valgrind))
|