From patchwork Tue Aug 23 14:40:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 661893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sJY4v4rlrz9t0w for ; Wed, 24 Aug 2016 00:40:15 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0CBA48A5F2; Tue, 23 Aug 2016 14:40:14 +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 hUokxXcMFOR2; Tue, 23 Aug 2016 14:40:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 55BC08A5C6; Tue, 23 Aug 2016 14:40:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A33591C2B2D for ; Tue, 23 Aug 2016 14:40:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9FFEC88ED5 for ; Tue, 23 Aug 2016 14:40:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l53v6G9ImKcH for ; Tue, 23 Aug 2016 14:40:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by whitealder.osuosl.org (Postfix) with ESMTP id 811EB88CEB for ; Tue, 23 Aug 2016 14:40:10 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 9CF2B1CC; Tue, 23 Aug 2016 16:40:08 +0200 (CEST) Received: from localhost (132.230.147.77.rev.sfr.net [77.147.230.132]) by mail.free-electrons.com (Postfix) with ESMTPSA id CD58B226; Tue, 23 Aug 2016 16:40:05 +0200 (CEST) From: Thomas Petazzoni To: Buildroot List , Waldemar Brodkorb Date: Tue, 23 Aug 2016 16:40:00 +0200 Message-Id: <1471963200-18857-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.7.4 Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH] blktrace: re-enable on uClibc X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" With a small patch, blktrace can work on uClibc: we simply need to link with librt to use the posix_spawn*() functions. Signed-off-by: Thomas Petazzoni --- .../blktrace/0001-iowatcher-link-with-lrt.patch | 29 ++++++++++++++++++++++ package/blktrace/Config.in | 6 ----- 2 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 package/blktrace/0001-iowatcher-link-with-lrt.patch diff --git a/package/blktrace/0001-iowatcher-link-with-lrt.patch b/package/blktrace/0001-iowatcher-link-with-lrt.patch new file mode 100644 index 0000000..3712b9f --- /dev/null +++ b/package/blktrace/0001-iowatcher-link-with-lrt.patch @@ -0,0 +1,29 @@ +From 80d87b99d72034441ea4fbab81f5c80c1ef3b067 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 23 Aug 2016 16:36:14 +0200 +Subject: [PATCH] iowatcher: link with -lrt + +Some C libraries (notably uClibc) have the posix_spawn*() functions in +librt, so let's link iowatcher with -lrt. + +Signed-off-by: Thomas Petazzoni +--- + iowatcher/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iowatcher/Makefile b/iowatcher/Makefile +index 7b5101c..502476d 100644 +--- a/iowatcher/Makefile ++++ b/iowatcher/Makefile +@@ -19,7 +19,7 @@ all: $(ALL) + $(CC) -o $*.o -c $(ALL_CFLAGS) $< + + iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o +- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm ++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm -lrt + + depend: + @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend +-- +2.7.4 + diff --git a/package/blktrace/Config.in b/package/blktrace/Config.in index c17de80..38c0947 100644 --- a/package/blktrace/Config.in +++ b/package/blktrace/Config.in @@ -1,7 +1,5 @@ config BR2_PACKAGE_BLKTRACE bool "blktrace" - # Uses posix_spawn() - depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL depends on BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS select BR2_PACKAGE_LIBAIO help @@ -10,7 +8,3 @@ config BR2_PACKAGE_BLKTRACE up to user space. http://git.kernel.dk/?p=blktrace.git;a=summary - -comment "blktrace needs a glibc or musl toolchain" - depends on BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS - depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)