diff options
author | Changhyeok Bae <changhyeok.bae@gmail.com> | 2017-07-14 23:59:59 +0000 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-07-24 18:57:37 +0200 |
commit | d6a1c0e7b7ceaeffa111c259ef95b6f1f3831e52 (patch) | |
tree | 75a24188196c867e022fe32b05637eaa22cbbebf /meta-oe/recipes-devtools | |
parent | 1039afb073575d83fba4c5f488390b314d2c8dfe (diff) | |
download | meta-openembedded-d6a1c0e7b7ceaeffa111c259ef95b6f1f3831e52.tar.gz |
uftrace: add recipe
- Add recipe for uftrace v0.7.
- Support x86_64, arm (v6 or later), and aarch64.
- Disable for armv4 and armv5 in arm architecture which is only
supported armv6 or later.
- Attached 2 patches is merged to upstream.
Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
3 files changed, 97 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/uftrace/uftrace/0001-Makefile-Add-LDFLAGS-in-export.patch b/meta-oe/recipes-devtools/uftrace/uftrace/0001-Makefile-Add-LDFLAGS-in-export.patch new file mode 100644 index 000000000..f665051e9 --- /dev/null +++ b/meta-oe/recipes-devtools/uftrace/uftrace/0001-Makefile-Add-LDFLAGS-in-export.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From ec794945475d5792f2ae85afe461e64266613640 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changhyeok Bae <changhyeok.bae@gmail.com> | ||
3 | Date: Thu, 13 Jul 2017 16:44:52 +0900 | ||
4 | Subject: [PATCH 1/2] Makefile: Add LDFLAGS in export | ||
5 | |||
6 | To use build with musl, need to argp library. | ||
7 | So need to add LDFLAGS from outside. | ||
8 | |||
9 | Upstream-Status: Accepted | ||
10 | |||
11 | Signed-off-by: <Changhyeok Bae changhyeok.bae@gmail.com> | ||
12 | --- | ||
13 | Makefile | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/Makefile b/Makefile | ||
17 | index 67be2da..0ca649a 100644 | ||
18 | --- a/Makefile | ||
19 | +++ b/Makefile | ||
20 | @@ -48,7 +48,7 @@ endif | ||
21 | RM = rm -f | ||
22 | INSTALL = install | ||
23 | |||
24 | -export ARCH CC AR LD RM srcdir objdir | ||
25 | +export ARCH CC AR LD RM srcdir objdir LDFLAGS | ||
26 | |||
27 | COMMON_CFLAGS := -O2 -g -D_GNU_SOURCE $(CFLAGS) $(CPPFLAGS) | ||
28 | COMMON_CFLAGS += -iquote $(srcdir) -iquote $(objdir) -iquote $(srcdir)/arch/$(ARCH) | ||
29 | -- | ||
30 | 1.9.1 | ||
31 | |||
diff --git a/meta-oe/recipes-devtools/uftrace/uftrace/0002-utils-Add-limits-header-to-fix-build-error.patch b/meta-oe/recipes-devtools/uftrace/uftrace/0002-utils-Add-limits-header-to-fix-build-error.patch new file mode 100644 index 000000000..269001158 --- /dev/null +++ b/meta-oe/recipes-devtools/uftrace/uftrace/0002-utils-Add-limits-header-to-fix-build-error.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 3bda554766150705160fe2191d8761c7881e2433 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changhyeok Bae <changhyeok.bae@gmail.com> | ||
3 | Date: Thu, 13 Jul 2017 16:46:20 +0900 | ||
4 | Subject: [PATCH 2/2] utils: Add limits header to fix build error | ||
5 | |||
6 | [Error] | ||
7 | error: 'PATH_MAX' undeclared (first use in this function); did you mean | ||
8 | 'INT8_MAX'? | ||
9 | |||
10 | Upstream-Status: Accepted | ||
11 | |||
12 | Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com> | ||
13 | --- | ||
14 | utils/utils.c | 1 + | ||
15 | 1 file changed, 1 insertion(+) | ||
16 | |||
17 | diff --git a/utils/utils.c b/utils/utils.c | ||
18 | index 03522c9..30f9e81 100644 | ||
19 | --- a/utils/utils.c | ||
20 | +++ b/utils/utils.c | ||
21 | @@ -6,6 +6,7 @@ | ||
22 | #include <errno.h> | ||
23 | #include <sys/uio.h> | ||
24 | #include <sys/stat.h> | ||
25 | +#include <limits.h> | ||
26 | |||
27 | #include "utils/utils.h" | ||
28 | |||
29 | -- | ||
30 | 1.9.1 | ||
31 | |||
diff --git a/meta-oe/recipes-devtools/uftrace/uftrace_0.7.bb b/meta-oe/recipes-devtools/uftrace/uftrace_0.7.bb new file mode 100644 index 000000000..821d0bbc2 --- /dev/null +++ b/meta-oe/recipes-devtools/uftrace/uftrace_0.7.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "Trace and analyze execution of a program written in C/C++" | ||
2 | HOMEPAGE = "https://github.com/namhyung/uftrace" | ||
3 | BUGTRACKER = "https://github.com/namhyung/uftrace/issues" | ||
4 | SECTION = "devel" | ||
5 | LICENSE = "GPLv2" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
7 | |||
8 | DEPENDS = "elfutils" | ||
9 | DEPENDS_append_libc-musl = " argp-standalone" | ||
10 | |||
11 | inherit autotools | ||
12 | |||
13 | SRCREV = "712ad01fdde57893936d7e254451eec67ab41ca6" | ||
14 | SRC_URI = "\ | ||
15 | git://github.com/namhyung/${BPN} \ | ||
16 | file://0001-Makefile-Add-LDFLAGS-in-export.patch \ | ||
17 | file://0002-utils-Add-limits-header-to-fix-build-error.patch \ | ||
18 | " | ||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | LDFLAGS_append_libc-musl = " -largp" | ||
22 | EXTRA_OECONF = "ARCH=${TARGET_ARCH}" | ||
23 | |||
24 | do_configure() { | ||
25 | ${S}/configure ${EXTRA_OECONF} | ||
26 | } | ||
27 | |||
28 | FILES_SOLIBSDEV = "" | ||
29 | FILES_${PN} += "${libdir}/*.so" | ||
30 | |||
31 | COMPATIBLE_HOST = "(x86_64|aarch64|arm)" | ||
32 | |||
33 | # uftrace supports armv6 and above | ||
34 | COMPATIBLE_HOST_armv4 = 'null' | ||
35 | COMPATIBLE_HOST_armv5 = 'null' | ||