aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-03-05 19:00:44 -0800
committerKhem Raj <raj.khem@gmail.com>2021-03-05 19:33:44 -0800
commit12080e4106d3b1dfc313fc1be82d3d6f72eacad0 (patch)
treeb3e764f3a312f8818d924803f79cd31a315655f5
parent355693ce1815fd10a2c7b6d83c865ea0f414bd69 (diff)
downloadmeta-openembedded-contrib-kraj/libleak.tar.gz
meta-openembedded-contrib-kraj/libleak.tar.bz2
meta-openembedded-contrib-kraj/libleak.zip
libleak: Add recipekraj/libleak
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-extended/libleak/libleak/0001-respect-environment-variables.patch25
-rw-r--r--meta-oe/recipes-extended/libleak/libleak_git.bb34
2 files changed, 59 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/libleak/libleak/0001-respect-environment-variables.patch b/meta-oe/recipes-extended/libleak/libleak/0001-respect-environment-variables.patch
new file mode 100644
index 0000000000..bbdfa3c960
--- /dev/null
+++ b/meta-oe/recipes-extended/libleak/libleak/0001-respect-environment-variables.patch
@@ -0,0 +1,25 @@
+From ea3f11a7846ad27926c6eacc0534914f4873504f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 5 Mar 2021 19:30:09 -0800
+Subject: [PATCH] respect environment variables
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1d70f17..c7e726e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+-CFLAGS = -g -O2 -Wall -fPIC -Ilibwuya
+-LDFLAGS = -Llibwuya
++CFLAGS += -g -O2 -Wall -fPIC -Ilibwuya
++LDFLAGS += -Llibwuya
+
+ libleak.so: libleak.o
+ CFLAGS='-fPIC' make -C libwuya
+--
+2.30.1
+
diff --git a/meta-oe/recipes-extended/libleak/libleak_git.bb b/meta-oe/recipes-extended/libleak/libleak_git.bb
new file mode 100644
index 0000000000..b711112710
--- /dev/null
+++ b/meta-oe/recipes-extended/libleak/libleak_git.bb
@@ -0,0 +1,34 @@
+# Copyright (C) 2021 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "libleak detects memory leak by hooking memory functions (e.g. malloc) by LD_PRELOAD"
+HOMEPAGE = "https://github.com/WuBingzheng/libleak"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://README.md;beginline=18;endline=21;md5=de4f705f12cdedbe452b2c3524572b03"
+
+DEPENDS += "libbacktrace"
+
+SRC_URI = "gitsm://github.com/WuBingzheng/libleak;protocol=https \
+ file://0001-respect-environment-variables.patch \
+ "
+
+PV = "1.0+git${SRCPV}"
+SRCREV = "ea2bb608ae25701692269a37d39d77e966b887ac"
+
+S = "${WORKDIR}/git"
+
+do_configure () {
+ :
+}
+
+do_compile () {
+ oe_runmake
+}
+
+do_install () {
+ install -Dm 0755 ${B}/libleak.so ${D}${libdir}/libleak.so
+}
+
+FILES_SOLIBSDEV = ""
+
+FILES_${PN} += "${libdir}/libleak.so"