From 1b05fc228a1ea4ed161f4fc40cab1675e0e853a8 Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Tue, 25 Oct 2016 13:09:29 -0700 Subject: [PATCH 1/2] valgrind: add package --- packages/debug/valgrind/package.mk | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 packages/debug/valgrind/package.mk diff --git a/packages/debug/valgrind/package.mk b/packages/debug/valgrind/package.mk new file mode 100644 index 0000000000..e8163f3a8a --- /dev/null +++ b/packages/debug/valgrind/package.mk @@ -0,0 +1,42 @@ +################################################################################ +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2016 Team LibreELEC +# +# LibreELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# LibreELEC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LibreELEC. If not, see . +################################################################################ + +PKG_NAME="valgrind" +PKG_VERSION="3.12.0" +PKG_REV="0" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://valgrind.org/" +PKG_URL="http://valgrind.org/downloads/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS_TARGET="toolchain" +PKG_SECTION="debug" +PKG_SHORTDESC="A tool to help find memory-management problems in programs" +PKG_LONGDESC="A tool to help find memory-management problems in programs" + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + +if [ "$TARGET_ARCH" = "arm" ]; then + PKG_CONFIGURE_OPTS_TARGET="--enable-only32bit" +elif [ "$TARGET_ARCH" = "aarch64" -o "$TARGET_ARCH" = "x86_64" ]; then + PKG_CONFIGURE_OPTS_TARGET="--enable-only64bit" +fi + +pre_configure_target() { + strip_lto +} From 0fcfdb7d2e1cf6598f25394c57f34e4c1d41b5d8 Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Tue, 25 Oct 2016 13:17:02 -0700 Subject: [PATCH 2/2] virtual/debug: add valgrind to debug builds --- packages/virtual/debug/package.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/virtual/debug/package.mk b/packages/virtual/debug/package.mk index 517d2608b3..1a8619924c 100644 --- a/packages/virtual/debug/package.mk +++ b/packages/virtual/debug/package.mk @@ -38,3 +38,6 @@ if [ "$VDPAU_SUPPORT" = "yes" -a "$DISPLAYSERVER" = "x11" ]; then PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET vdpauinfo" fi +if [ "$DEBUG" = "yes" ]; then + PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET valgrind" +fi