All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] ipkg: fix no MMU musl build
@ 2016-07-26 11:08 Baruch Siach
  2016-07-26 11:48 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Baruch Siach @ 2016-07-26 11:08 UTC (permalink / raw)
  To: buildroot

Current code uses vfork() instead of fork() only when __UCLIBC__ is defined.
This breaks musl MMU-less build. Add a patch making direct use of HAVE_FORK
that configure defines when fork() is detected.

Fixes:
http://autobuild.buildroot.net/results/6cf/6cf75e08795d9ab194ce4e882c0f4858bad979c3/
http://autobuild.buildroot.net/results/964/964d8f694bc7d05b35411eabfbadf40bbf6337ae/
http://autobuild.buildroot.net/results/0f2/0f2cddf89af3ad4330556acd04ab6cb080370e24/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 package/ipkg/0002-fix-musl-nommu.patch | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 package/ipkg/0002-fix-musl-nommu.patch

diff --git a/package/ipkg/0002-fix-musl-nommu.patch b/package/ipkg/0002-fix-musl-nommu.patch
new file mode 100644
index 000000000000..4ef5474b98dc
--- /dev/null
+++ b/package/ipkg/0002-fix-musl-nommu.patch
@@ -0,0 +1,21 @@
+libbb: fix no MMU build with musl libc
+
+musl libc does not define __UCLIBC__. Since configure detects the presence of
+fork(), use HAVE_FORK directly.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Patch status: no active upstream
+
+diff -Nuar ipkg-0.99.163-orig/libbb/libbb.h ipkg-0.99.163/libbb/libbb.h
+--- ipkg-0.99.163-orig/libbb/libbb.h	2006-02-06 10:13:02.000000000 +0200
++++ ipkg-0.99.163/libbb/libbb.h	2016-07-26 13:50:09.296988855 +0300
+@@ -341,7 +341,7 @@
+ #define CONSOLE_DEV "/dev/console"
+ 
+ /* Cope with mmu-less systems somewhat gracefully */
+-#if defined(__UCLIBC__) && !defined(__ARCH_HAS_MMU__)
++#if !defined(HAVE_FORK)
+ #define fork	vfork
+ #endif
+ 
-- 
2.8.1

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

* [Buildroot] [PATCH] ipkg: fix no MMU musl build
  2016-07-26 11:08 [Buildroot] [PATCH] ipkg: fix no MMU musl build Baruch Siach
@ 2016-07-26 11:48 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-07-26 11:48 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 26 Jul 2016 14:08:20 +0300, Baruch Siach wrote:
> Current code uses vfork() instead of fork() only when __UCLIBC__ is defined.
> This breaks musl MMU-less build. Add a patch making direct use of HAVE_FORK
> that configure defines when fork() is detected.

See my previous reply: there is no platform in Buildroot that uses musl
on noMMU systems. The only noMMU architecture supported by musl is
SuperH as far as I know, so there is 0 chance that the ARM and m68k
noMMU failures are caused by musl related issues.

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-26 11:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-26 11:08 [Buildroot] [PATCH] ipkg: fix no MMU musl build Baruch Siach
2016-07-26 11:48 ` 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.