All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] iozone: depends on toolchain with NPTL support
@ 2016-07-31 12:05 Waldemar Brodkorb
  2016-07-31 12:20 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Waldemar Brodkorb @ 2016-07-31 12:05 UTC (permalink / raw)
  To: buildroot

The existent patch is not enough, as pthread_barrier_wait is used, which
isn't implemented in uClibc-ng Linuxthreads.
Remove the patch.

Fixes:
http://autobuild.buildroot.net/results/e5bbb80c81f4f170cf48d375e016e87a296ff754/
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
 package/iozone/0002-no-nptl-support.patch | 37 -------------------------------
 package/iozone/Config.in                  |  5 ++++-
 2 files changed, 4 insertions(+), 38 deletions(-)
 delete mode 100644 package/iozone/0002-no-nptl-support.patch

diff --git a/package/iozone/0002-no-nptl-support.patch b/package/iozone/0002-no-nptl-support.patch
deleted file mode 100644
index 493f52c..0000000
--- a/package/iozone/0002-no-nptl-support.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Dummy pthread_setaffinity_np() when not available
-
-On uClibc configurations that do not use the NPTL thread
-implementation, pthread_setaffinity_np() is not available. This patch
-defines a dummy (empty) implementation of this function for such
-cases.
-
-The only few architectures that do not provide the NPTL thread
-implementation are very likely to be non-SMP architectures, and
-therefore, setting the affinity of the thread is not doing anything
-useful, so having an empty stub for pthread_setaffinity_np() is not a
-problem.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/src/current/iozone.c
-===================================================================
---- a/src/current/iozone.c
-+++ b/src/current/iozone.c
-@@ -306,6 +306,17 @@
- #endif
- #endif
- 
-+#if defined (__linux__)
-+#include <features.h>
-+#if defined (__UCLIBC__) && !defined (__UCLIBC_HAS_THREADS_NATIVE__)
-+static int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize,
-+				  const cpu_set_t *cpuset)
-+{
-+	return 0;
-+}
-+#endif
-+#endif
-+
- #if ((defined(solaris) && defined(__LP64__)) || defined(__s390x__))
- /* If we are building for 64-bit Solaris, all functions that return pointers
-  * must be declared before they are used; otherwise the compiler will assume
diff --git a/package/iozone/Config.in b/package/iozone/Config.in
index 8cf50b1..052a958 100644
--- a/package/iozone/Config.in
+++ b/package/iozone/Config.in
@@ -1,9 +1,12 @@
 config BR2_PACKAGE_IOZONE
 	bool "iozone"
 	depends on BR2_USE_MMU # fork()
-	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	help
 	  IOzone is a filesystem benchmark tool.
 	  The benchmark generates and measures a variety of file operations
 
 	  http://www.iozone.org/
+
+comment "iozone needs a toolchain w/ NPTL"
+        depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
-- 
2.1.4

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

* [Buildroot] [PATCH] iozone: depends on toolchain with NPTL support
  2016-07-31 12:05 [Buildroot] [PATCH] iozone: depends on toolchain with NPTL support Waldemar Brodkorb
@ 2016-07-31 12:20 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-07-31 12:20 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 31 Jul 2016 14:05:45 +0200, Waldemar Brodkorb wrote:

> @@ -1,9 +1,12 @@
>  config BR2_PACKAGE_IOZONE
>  	bool "iozone"
>  	depends on BR2_USE_MMU # fork()

Since you have a dependency on BR2_USE_MMU here...

> -	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
>  	help
>  	  IOzone is a filesystem benchmark tool.
>  	  The benchmark generates and measures a variety of file operations
>  
>  	  http://www.iozone.org/
> +
> +comment "iozone needs a toolchain w/ NPTL"

it should be replicated here as well.

> +        depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL

I've fixed this, and also added another patch that removes dead code in
the .mk that was handling the !thread case.

Thanks,

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

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

end of thread, other threads:[~2016-07-31 12:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-31 12:05 [Buildroot] [PATCH] iozone: depends on toolchain with NPTL support Waldemar Brodkorb
2016-07-31 12:20 ` 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.