Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 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 = "GPL-2.0-only" |
| 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 = "04d73dc31cafef4161321e3c2443a5490ef93018" |
| 14 | SRC_URI = "git://github.com/namhyung/${BPN};branch=master;protocol=https" |
| 15 | S = "${WORKDIR}/git" |
| 16 | |
| 17 | LDFLAGS:append:libc-musl = " -largp" |
| 18 | |
| 19 | def set_target_arch(d): |
| 20 | import re |
| 21 | arch = d.getVar('TARGET_ARCH') |
| 22 | if re.match(r'i.86', arch, re.I): |
| 23 | return 'i386' |
| 24 | elif re.match('armeb', arch, re.I): |
| 25 | return 'arm' |
| 26 | else: |
| 27 | return arch |
| 28 | |
| 29 | EXTRA_UFTRACE_OECONF = "ARCH=${@set_target_arch(d)} \ |
| 30 | with_elfutils=/use/libelf/from/sysroot" |
| 31 | |
| 32 | do_configure() { |
| 33 | ${S}/configure ${EXTRA_UFTRACE_OECONF} |
| 34 | } |
| 35 | |
| 36 | FILES_SOLIBSDEV = "" |
| 37 | FILES:${PN} += "${libdir}/*.so" |
| 38 | |
| 39 | COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm)" |
| 40 | |
| 41 | # uftrace supports armv6 and above |
| 42 | COMPATIBLE_HOST:armv4 = 'null' |
| 43 | COMPATIBLE_HOST:armv5 = 'null' |