Skip to contentSkip to conversation

libbacktrace: Add recipe

PATCH Superseded Khem Raj 1 participant 2 messages Mar 6, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 libbacktrace: Add recipe

---
 .../libbacktrace/libbacktrace_git.bb          | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 meta-oe/recipes-extended/libbacktrace/libbacktrace_git.bb
meta-oe/recipes-extended/libbacktrace/libbacktrace_git.bb new file +24 -0
new file mode 100644
index 0000000000..2ee017cb0c
@@ -0,0 +1,24 @@
+# Copyright (C) 2021 Khem Raj <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "A C library that may be linked into a C/C++ program to produce symbolic backtraces"
+HOMEPAGE = "https://github.com/ianlancetaylor/libbacktrace"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=24b5b3feec63c4be0975e1fea5100440"
+
+DEPENDS += "libunwind"
+
+SRC_URI = "git://github.com/ianlancetaylor/libbacktrace;protocol=https"
+
+PV = "1.0+git${SRCPV}"
+SRCREV = "4f57c999716847e45505b3df170150876b545088"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTR_OECONF += "--with-system-libunwind"
+
+do_configure() {
+    oe_runconf
+}
Signature · 1 line
2.30.1
author
#1 lore raw

PATCH 2/2 libleak: Add recipe

---
 .../0001-respect-environment-variables.patch  | 25 ++++++++++++++
 .../recipes-extended/libleak/libleak_git.bb   | 34 +++++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 meta-oe/recipes-extended/libleak/libleak/0001-respect-environment-variables.patch
 create mode 100644 meta-oe/recipes-extended/libleak/libleak_git.bb
meta-oe/recipes-extended/libleak/libleak/0001-respect-environment-variables.patch new file +25 -0
new file mode 100644
index 0000000000..bbdfa3c960
@@ -0,0 +1,25 @@
+From ea3f11a7846ad27926c6eacc0534914f4873504f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 5 Mar 2021 19:30:09 -0800
+Subject: [PATCH] respect environment variables
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ 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
+
meta-oe/recipes-extended/libleak/libleak_git.bb new file +34 -0
new file mode 100644
index 0000000000..b711112710
@@ -0,0 +1,34 @@
+# Copyright (C) 2021 Khem Raj <[email protected]>
+# 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"
Signature · 1 line
2.30.1