All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] blktrace: re-enable on uClibc
@ 2016-08-23 14:40 Thomas Petazzoni
  2016-08-23 21:14 ` Peter Korsgaard
  2016-08-26 14:01 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-08-23 14:40 UTC (permalink / raw
  To: 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 <thomas.petazzoni@free-electrons.com>
---
 .../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 <thomas.petazzoni@free-electrons.com>
+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 <thomas.petazzoni@free-electrons.com>
+---
+ 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)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] blktrace: re-enable on uClibc
  2016-08-23 14:40 [Buildroot] [PATCH] blktrace: re-enable on uClibc Thomas Petazzoni
@ 2016-08-23 21:14 ` Peter Korsgaard
  2016-08-23 21:36   ` Thomas Petazzoni
  2016-08-26 14:01 ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2016-08-23 21:14 UTC (permalink / raw
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > With a small patch, blktrace can work on uClibc: we simply need to link
 > with librt to use the posix_spawn*() functions.

> @@ -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)

I see you created this against master and not next. I know it is a small
patch, but it is still a feature addition. Is there any reason this
should go in 2016.08?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] blktrace: re-enable on uClibc
  2016-08-23 21:14 ` Peter Korsgaard
@ 2016-08-23 21:36   ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-08-23 21:36 UTC (permalink / raw
  To: buildroot

Hello,

On Tue, 23 Aug 2016 23:14:18 +0200, Peter Korsgaard wrote:

>  > With a small patch, blktrace can work on uClibc: we simply need to link
>  > with librt to use the posix_spawn*() functions.  
> 
> > @@ -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)  
> 
> I see you created this against master and not next. I know it is a small
> patch, but it is still a feature addition. Is there any reason this
> should go in 2016.08?

Not at all. Having the patch based on master is an oversight, it's
definitely intended at the next branch.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] blktrace: re-enable on uClibc
  2016-08-23 14:40 [Buildroot] [PATCH] blktrace: re-enable on uClibc Thomas Petazzoni
  2016-08-23 21:14 ` Peter Korsgaard
@ 2016-08-26 14:01 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-08-26 14:01 UTC (permalink / raw
  To: buildroot

Hello,

On Tue, 23 Aug 2016 16:40:00 +0200, Thomas Petazzoni wrote:
> 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 <thomas.petazzoni@free-electrons.com>
> ---
>  .../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

I've applied to next, after adding in the patch a reference to the
upstream commit, since my fix has already been merged upstream.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-26 14:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23 14:40 [Buildroot] [PATCH] blktrace: re-enable on uClibc Thomas Petazzoni
2016-08-23 21:14 ` Peter Korsgaard
2016-08-23 21:36   ` Thomas Petazzoni
2016-08-26 14:01 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.