All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/dhrystone: fix musl compilation issue
@ 2015-09-01 12:39 Brendan Heading
  2015-09-13 21:13 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Brendan Heading @ 2015-09-01 12:39 UTC (permalink / raw)
  To: buildroot

Fixes:
http://autobuild.buildroot.net/results/1b6cb1b40431bf484db2d99bfdc8237cbae6a9d7/
http://autobuild.buildroot.net/results/20e669d6e4bc3d872a355ef658ddad8f34676624/

Include a more appropriate header file to pick up the definition of HZ
from the kernel headers.

Signed-off-by: Brendan Heading <brendanheading@gmail.com>

---
v1 - This looks a bit hacky, but it seems to compile fine against
the uclibc, glibc and musl toolchain combos without any other packages
enabled. Comments welcome.
---
 package/dhrystone/0002-HZ.patch | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/dhrystone/0002-HZ.patch b/package/dhrystone/0002-HZ.patch
index e3b8a0e..9572b59 100644
--- a/package/dhrystone/0002-HZ.patch
+++ b/package/dhrystone/0002-HZ.patch
@@ -2,6 +2,11 @@ Get HZ value from system rather than requiring via CPPFLAGS
 
 Patch by Robin Getz <rgetz@blackfin.uclinux.org>
 
+Tweaked by Brendan Heading <brendanheading@gmail.com> - musl
+doesn't define HZ within sys/param.h (and strictly speaking
+it's not wise to depend on the glibc def either). Changed it
+here to grab the kernel version.
+
 --- a/dhry.h
 +++ b/dhry.h
 @@ -359,6 +359,10 @@
@@ -9,7 +14,7 @@ Patch by Robin Getz <rgetz@blackfin.uclinux.org>
  #endif
  
 +#ifndef HZ
-+#include <sys/param.h>
++#include <linux/param.h>
 +#endif
 +
  #define Mic_secs_Per_Second     1000000.0
-- 
2.4.3

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

* [Buildroot] [PATCH 1/1] package/dhrystone: fix musl compilation issue
  2015-09-01 12:39 [Buildroot] [PATCH 1/1] package/dhrystone: fix musl compilation issue Brendan Heading
@ 2015-09-13 21:13 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2015-09-13 21:13 UTC (permalink / raw)
  To: buildroot

>>>>> "Brendan" == Brendan Heading <brendanheading@gmail.com> writes:

 > Fixes:
 > http://autobuild.buildroot.net/results/1b6cb1b40431bf484db2d99bfdc8237cbae6a9d7/
 > http://autobuild.buildroot.net/results/20e669d6e4bc3d872a355ef658ddad8f34676624/

 > Include a more appropriate header file to pick up the definition of HZ
 > from the kernel headers.

 > Signed-off-by: Brendan Heading <brendanheading@gmail.com>

 > ---
 > v1 - This looks a bit hacky, but it seems to compile fine against
 > the uclibc, glibc and musl toolchain combos without any other packages
 > enabled. Comments welcome.

Looking at the implementation I see we end up using the times(2)
interface, which returns clock_t values. The kernel defines clock_t in
terms of USER_HZ which is always 100 (see kernel/time/time.c::jiffies_to_clock_t()).
So it is simpler to just pass -DHZ=100 to dhrystone.

So I have committed a fix to do so instead, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2015-09-13 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-01 12:39 [Buildroot] [PATCH 1/1] package/dhrystone: fix musl compilation issue Brendan Heading
2015-09-13 21:13 ` Peter Korsgaard

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.