From patchwork Mon Oct 26 23:14:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giacomo Longo X-Patchwork-Id: 1388181 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=jBS14Ujz; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CKrJb4Tmhz9sSs for ; Tue, 27 Oct 2020 10:14:37 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id BE840870E2; Mon, 26 Oct 2020 23:14:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HGUmpYS2fVtx; Mon, 26 Oct 2020 23:14:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 73A44870C1; Mon, 26 Oct 2020 23:14:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id C005A1BF3DE for ; Mon, 26 Oct 2020 23:14:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BCA1B85EBE for ; Mon, 26 Oct 2020 23:14:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PKotnIlaHndx for ; Mon, 26 Oct 2020 23:14:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 2384F85B2F for ; Mon, 26 Oct 2020 23:14:26 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id b15so12899416iod.13 for ; Mon, 26 Oct 2020 16:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=48jTtLOCTn8AkiOPHyLlB7+BtYJgjgU9AGC1rDGdkCA=; b=jBS14UjztKZVm/qc1kjhkdM6SkbgdTqLuB+2N6wT4NF/mLOIbuXSHoxAzDIULNg6QS mrV6bdS2/jE5QD3GZMtsdAZLirsXYRSHX6MgnByRCnfbWJdnvKvzLE/2pmId7WRcg5hY hveQfdhlkH4wzHYxVLCcnmSVbIY8Qdm+eyoRvDDO4coCGUQ8w1HYyb3Sr/qCUOKEufA/ TOfO+wyqug9OVSZKo2AWRtmUy/hDLzcXwUaYBBCiyIBq+BfpsWnlQFnjk0O+EBctomvB 4nmlv4ikbUz8Wa4iz6mt69HQY0hjeKqX4oRbWwaKxPyk2qmEO1xeE2Y1cWBouA6Kziip Ly1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=48jTtLOCTn8AkiOPHyLlB7+BtYJgjgU9AGC1rDGdkCA=; b=N28ex5slVlaTqM+oVcMr/QWvohkQP1YaE/IQIXO6gmr74J0JkAkvb+36kGVliUdDya G4T7JufEgH58NPOEcZh7GG7wZmBZ6pl0QvfSgmYHibx0EkfxJee60VMUfVe1z5Bcm2ZC +UwKKgjD4uqzHPinaFetYdt+zm+j9+LP5Rjgway0lxies1gqedhmYMZlj3Bqbm+hGylt YXE0LgDQQ92HxcRoMyGk+9AIDOwd1CEB81WidPdzmL2lJpvUf/8aOq2Mw7+/GibQs07x 2VEVQjg4eSt+yfqQndHbg1vkw90ryzknooRpXJCa6lJqoAVahoSPm8MY5h2rzF4Q3b0T gUtg== X-Gm-Message-State: AOAM531Bqup/O8wJeWXFYYNqSuBxZshrl8ZbK5/IVr/tvOuRMuv3Qqot 7wpzMRKTvQF1jWxwxjw4wut7Ac0/L3jpcC9E43mFiONUtcU= X-Google-Smtp-Source: ABdhPJzVdr+pyIpvlQs6wrtDAPvllTEXeehTl51Cv1hL1KRs4DiKq0GEZbUEGMUC1g6914vIHQ7YdzOkEUL4pFHAFcs= X-Received: by 2002:a05:6602:1352:: with SMTP id i18mr12703063iov.148.1603754065183; Mon, 26 Oct 2020 16:14:25 -0700 (PDT) MIME-Version: 1.0 From: Giacomo Longo Date: Tue, 27 Oct 2020 00:14:14 +0100 Message-ID: To: buildroot@buildroot.org Subject: [Buildroot] [PATCH 1/1] package/uftrace: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From 57e136108b4ff900f3b7972f1f1c19a59ef9cf12 Mon Sep 17 00:00:00 2001 From: Giacomo Longo Date: Mon, 26 Oct 2020 23:11:41 +0100 Subject: [PATCH 1/1] package/uftrace: new package Hello, first time trying to package something for BuildRoot and sending a patch via email. The package is a tracing utility similar to ltrace and strace that allows profiling of programs and their library calls. I have performed a run of ./utils/check-package package/uftrace/* with the following result: > 78 lines processed > 0 warnings generated I have performed a run of ./utils/test-pkg -d ../test-pkg -c ../uftrace.config -p uftrace -a > 45 builds, 36 skipped, 0 build failed, 0 legal-info failed The only architectures supported upstream are aarch64, arm and x86_64/i386. I could not build the program without glibc so it's marked as requiring a glibc toolchain. I am looking for some pointers on how to upstream my modification and feedback on the patch in its current state. Signed-off-by: Giacomo Longo --- package/Config.in | 1 + package/uftrace/Config.in | 41 ++++++++++++++++++++++++++++++++++++ package/uftrace/uftrace.hash | 3 +++ package/uftrace/uftrace.mk | 34 ++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 package/uftrace/Config.in create mode 100644 package/uftrace/uftrace.hash create mode 100644 package/uftrace/uftrace.mk -- 2.28.0 diff --git a/package/Config.in b/package/Config.in index ee05467479..b9c51dc3f1 100644 --- a/package/Config.in +++ b/package/Config.in @@ -140,6 +140,7 @@ menu "Debugging, profiling and benchmark" source "package/trace-cmd/Config.in" source "package/trinity/Config.in" source "package/uclibc-ng-test/Config.in" + source "package/uftrace/Config.in" source "package/valgrind/Config.in" source "package/vmtouch/Config.in" source "package/whetstone/Config.in" diff --git a/package/uftrace/Config.in b/package/uftrace/Config.in new file mode 100644 index 0000000000..4912d1d8cc --- /dev/null +++ b/package/uftrace/Config.in @@ -0,0 +1,41 @@ +config BR2_PACKAGE_UFTRACE_ARCH_SUPPORTS + bool + default y if BR2_aarch64 + default y if BR2_arm + default y if BR2_i386 + default y if BR2_x86_64 + +config BR2_PACKAGE_UFTRACE + bool "uftrace" + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_UFTRACE_ARCH_SUPPORTS + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_ELFUTILS + select BR2_PACKAGE_UTIL_LINUX + select BR2_INSTALL_LIBSTDCPP + help + Tool to trace and analyze execution of a program. + + https://uftrace.github.io/slide + +comment "uftrace needs a glibc toolchain w/ C++, dynamic library" + depends on !BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP + +if BR2_PACKAGE_UFTRACE + +config BR2_PACKAGE_UFTRACE_LUAJIT + bool "luajit scripting support" + default n + select BR2_PACKAGE_LUAJIT + help + Enable luajit scripting support + +config BR2_PACKAGE_UFTRACE_TUI + bool "TUI support" + default n + depends on BR2_USE_WCHAR + select BR2_PACKAGE_NCURSES + help + Enable TUI support + +endif diff --git a/package/uftrace/uftrace.hash b/package/uftrace/uftrace.hash new file mode 100644 index 0000000000..8f38e7431d --- /dev/null +++ b/package/uftrace/uftrace.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha512 f73ad4461051b9c61668161e077897d118ac556d234ff204e32bf14ecdc2c0df148da30ea5d5054641e79ea20b29261d6f637908f5047f5669207ef244865358 uftrace-v0.9.4.tar.gz +sha512 aee80b1f9f7f4a8a00dcf6e6ce6c41988dcaedc4de19d9d04460cbfb05d99829ffe8f9d038468eabbfba4d65b38e8dbef5ecf5eb8a1b891d9839cda6c48ee957 COPYING diff --git a/package/uftrace/uftrace.mk b/package/uftrace/uftrace.mk new file mode 100644 index 0000000000..4c60962151 --- /dev/null +++ b/package/uftrace/uftrace.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# uftrace +# +################################################################################ + +UFTRACE_VERSION = v0.9.4 +UFTRACE_SITE = $(call github,namhyung,uftrace,$(UFTRACE_VERSION)) +UFTRACE_LICENSE = GPL-2.0+ +UFTRACE_LICENSE_FILES = COPYING +UFTRACE_DEPENDENCIES = elfutils + +ifeq ($(BR2_PACKAGE_UFTRACE_LUAJIT),y) +UFTRACE_DEPENDENCIES += luajit +endif + +ifeq ($(BR2_PACKAGE_UFTRACE_TUI),y) +UFTRACE_DEPENDENCIES += ncurses +endif + +ifeq ($(BR2_aarch64),y) +UFTRACE_CONF_OPTS = --arch=aarch64 +else ifeq ($(BR2_arm),y) +UFTRACE_CONF_OPTS = --arch=arm +else ifeq ($(BR2_i386),y) +UFTRACE_CONF_OPTS = --arch=x86 +else ifeq ($(BR2_x86_64),y) +UFTRACE_CONF_OPTS = --arch=x86_64 +endif + +UFTRACE_CONF_OPTS += --without-libpython +UFTRACE_CONF_OPTS += --without-capstone + +$(eval $(autotools-package))