summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r--meta-oe/recipes-extended/libleak/libleak/0001-respect-environment-variables.patch25
-rw-r--r--meta-oe/recipes-extended/libleak/libleak_git.bb38
2 files changed, 63 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 000000000..bbdfa3c96
--- /dev/null
+++ b/meta-oe/recipes-extended/libleak/libleak/0001-respect-environment-variables.patch
@@ -0,0 +1,25 @@
1From ea3f11a7846ad27926c6eacc0534914f4873504f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 5 Mar 2021 19:30:09 -0800
4Subject: [PATCH] respect environment variables
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 Makefile | 4 ++--
9 1 file changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/Makefile b/Makefile
12index 1d70f17..c7e726e 100644
13--- a/Makefile
14+++ b/Makefile
15@@ -1,5 +1,5 @@
16-CFLAGS = -g -O2 -Wall -fPIC -Ilibwuya
17-LDFLAGS = -Llibwuya
18+CFLAGS += -g -O2 -Wall -fPIC -Ilibwuya
19+LDFLAGS += -Llibwuya
20
21 libleak.so: libleak.o
22 CFLAGS='-fPIC' make -C libwuya
23--
242.30.1
25
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 000000000..309553c90
--- /dev/null
+++ b/meta-oe/recipes-extended/libleak/libleak_git.bb
@@ -0,0 +1,38 @@
1# Copyright (C) 2021 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4SUMMARY = "libleak detects memory leak by hooking memory functions (e.g. malloc) by LD_PRELOAD"
5HOMEPAGE = "https://github.com/WuBingzheng/libleak"
6LICENSE = "GPL-2.0"
7LIC_FILES_CHKSUM = "file://README.md;beginline=18;endline=21;md5=de4f705f12cdedbe452b2c3524572b03"
8
9DEPENDS += "libbacktrace"
10
11SRC_URI = "gitsm://github.com/WuBingzheng/libleak;protocol=https \
12 file://0001-respect-environment-variables.patch \
13 "
14
15PV = "1.0+git${SRCPV}"
16SRCREV = "ea2bb608ae25701692269a37d39d77e966b887ac"
17
18S = "${WORKDIR}/git"
19
20do_configure () {
21 :
22}
23
24do_compile () {
25 oe_runmake
26}
27
28do_install () {
29 install -Dm 0755 ${B}/libleak.so ${D}${libdir}/libleak.so
30}
31
32FILES_SOLIBSDEV = ""
33
34FILES_${PN} += "${libdir}/libleak.so"
35
36# libunwind does not support RISCV yet
37COMPATIBLE_HOST_riscv64 = "null"
38COMPATIBLE_HOST_riscv32 = "null"