source: packages/utils/valgrind/Makefile @ 25824

Last change on this file since 25824 was 25824, checked in by nbd, 5 years ago

valgrind: fix libgcc linking

File size: 2.3 KB
Line 
1#
2# Copyright (C) 2006 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=valgrind
11PKG_VERSION:=3.3.1
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=http://valgrind.org/downloads/
16PKG_MD5SUM:=0539e2fa4aadb2cd4ca4bba65b1fe8b5
17
18include $(INCLUDE_DIR)/package.mk
19
20define Package/valgrind
21  SECTION:=utils
22  CATEGORY:=Utilities
23  DEPENDS:=@TARGET_x86||@TARGET_rdc||@TARGET_ps3||@TARGET_magicbox||@TARGET_amcc||@TARGET_uml
24  TITLE:=debugging and profiling Linux programs
25  URL:=http://www.valgrind.org
26endef
27
28define Package/valgrind/description
29        Valgrind is an award-winning suite of tools for debugging and
30        profiling Linux programs. With the tools that come with Valgrind,
31        you can automatically detect many memory management and threading
32        bugs, avoiding hours of frustrating bug-hunting, making your
33        programs more stable. You can also perform detailed profiling,
34        to speed up and reduce memory use of your programs.
35endef
36
37CONFIGURE_ARGS += \
38        --disable-tls \
39        --enable-only32bit \
40        --without-x \
41        --without-uiout \
42        --disable-valgrindmi \
43        --disable-tui \
44        --disable-valgrindtk \
45        --without-included-gettext
46
47DEFAULT_SUPP += "uclibc.supp"
48
49define Build/Compile
50        $(TARGET_CC) $(TARGET_CFLAGS) -c -o $(PKG_BUILD_DIR)/abort.o ./src/abort.c
51        $(TARGET_CROSS)ar rcu $(PKG_BUILD_DIR)/abort.a $(PKG_BUILD_DIR)/abort.o
52        $(MAKE) -C $(PKG_BUILD_DIR) \
53                $(TARGET_CONFIGURE_OPTS) \
54                DESTDIR="$(PKG_INSTALL_DIR)" \
55                CFLAGS="$(TARGET_CFLAGS)" \
56                AM_CFLAGS_X86_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
57                AM_CFLAGS_AMD64_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
58                AM_CFLAGS_PPC32_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
59                AM_CFLAGS_PPC64_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
60                TOOL_LDADD_COMMON="$(LIBGCC_S) $(PKG_BUILD_DIR)/abort.a" \
61                all install
62endef
63
64define Package/valgrind/install
65        $(INSTALL_DIR) $(1)/usr/bin
66        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
67        $(INSTALL_BIN) ./files/valgrind.sh $(1)/usr/bin/
68        $(INSTALL_DIR) $(1)/usr/lib/valgrind
69        $(CP) ./files/uclibc.supp $(1)/usr/lib/valgrind/
70        $(CP) $(PKG_INSTALL_DIR)/usr/lib/valgrind/*-linux $(1)/usr/lib/valgrind/
71endef
72
73$(eval $(call BuildPackage,valgrind))
Note: See TracBrowser for help on using the repository browser.