Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] libwebsockets: add patch to fix musl build
@ 2016-03-30 20:22 Jörg Krause
  2016-03-30 20:22 ` [Buildroot] [PATCH 2/3] libwebsockets: fix build with nothread toolchains Jörg Krause
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jörg Krause @ 2016-03-30 20:22 UTC (permalink / raw)
  To: buildroot

Add patch from upstream [1] to fix musl build:
fatal error: sys/cdefs.h: No such file or directory

Fixes:
http://autobuild.buildroot.net/results/564/564675be0d4fbfa113a0f2e52874e0dce2d5ba5e/
http://autobuild.buildroot.net/results/c41/c41d87c0cf22f3b88e5f80ad6bf5e81900603c1d/

Backported from: 9eec5e4470397632af035c429295a41b74bd0585

[1] https://github.com/warmcat/libwebsockets/commit/9eec5e4470397632af035c429295a41b74bd0585

Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
 package/libwebsockets/libwebsockets.hash | 1 +
 package/libwebsockets/libwebsockets.mk   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/package/libwebsockets/libwebsockets.hash b/package/libwebsockets/libwebsockets.hash
index 7727ac5..745bc49 100644
--- a/package/libwebsockets/libwebsockets.hash
+++ b/package/libwebsockets/libwebsockets.hash
@@ -1,2 +1,3 @@
 # Locally computed:
 sha256  c6f3272d7e0234a9ef92b38622f36c4166eede4225e36fe4f78dd2ade03e9c52  libwebsockets-v1.7.3.tar.gz
+sha256  c7627d8e3d9d695b965a6c5fe30f4b4c04666984b384acd9e24c3b59cef13816  9eec5e4470397632af035c429295a41b74bd0585.patch
diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk
index 72bb280..395a2ed 100644
--- a/package/libwebsockets/libwebsockets.mk
+++ b/package/libwebsockets/libwebsockets.mk
@@ -11,6 +11,7 @@ LIBWEBSOCKETS_LICENSE_FILES = LICENSE
 LIBWEBSOCKETS_DEPENDENCIES = zlib
 LIBWEBSOCKETS_INSTALL_STAGING = YES
 LIBWEBSOCKETS_CONF_OPTS = -DLWS_WITHOUT_TESTAPPS=ON -DLWS_IPV6=ON
+LIBWEBSOCKETS_PATCH = https://github.com/warmcat/libwebsockets/commit/9eec5e4470397632af035c429295a41b74bd0585.patch
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBWEBSOCKETS_DEPENDENCIES += openssl host-openssl
-- 
2.7.4

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

* [Buildroot] [PATCH 2/3] libwebsockets: fix build with nothread toolchains
  2016-03-30 20:22 [Buildroot] [PATCH 1/3] libwebsockets: add patch to fix musl build Jörg Krause
@ 2016-03-30 20:22 ` Jörg Krause
  2016-03-30 20:22 ` [Buildroot] [PATCH 3/3] libwebsockets: bump to version 1.7.4 Jörg Krause
  2016-03-31  1:49 ` [Buildroot] [PATCH 1/3] libwebsockets: add patch to fix musl build Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Jörg Krause @ 2016-03-30 20:22 UTC (permalink / raw)
  To: buildroot

From upstream changelog:
> If LWS_MAX_SMP=1, then there is no code related to pthreads compiled in the
  library. If more than 1, a small amount of pthread mutex code is built into
  the library.

Set LWS_MAX_SMP=1 for toolchains without thread support, otherwise leave it
unset so upstreams CMakeLists.txt will take care of it.

Fixes:
http://autobuild.buildroot.net/results/dbf/dbf45a52b9aef602fd62ad1ca10957bafe656923/
http://autobuild.buildroot.net/results/26c/26c2ac28f44f8f1b227caa715af60bcd92a5f740/
http://autobuild.buildroot.net/results/d65/d65dcbfb96b249e01b034c01a52884b522c778b3/
http://autobuild.buildroot.net/results/e55/e550ebfdd1e8f459ca7b12f2708a704eaec52474/
.. and more.

Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
 package/libwebsockets/libwebsockets.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk
index 395a2ed..8d3663f 100644
--- a/package/libwebsockets/libwebsockets.mk
+++ b/package/libwebsockets/libwebsockets.mk
@@ -13,6 +13,15 @@ LIBWEBSOCKETS_INSTALL_STAGING = YES
 LIBWEBSOCKETS_CONF_OPTS = -DLWS_WITHOUT_TESTAPPS=ON -DLWS_IPV6=ON
 LIBWEBSOCKETS_PATCH = https://github.com/warmcat/libwebsockets/commit/9eec5e4470397632af035c429295a41b74bd0585.patch
 
+# If LWS_MAX_SMP=1, then there is no code related to pthreads compiled
+# in the library. If unset, LWS_MAX_SMP defaults to 32 and a small
+# amount of pthread mutex code is built into the library.
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
+LIBWEBSOCKETS_CONF_OPTS += -DLWS_MAX_SMP=1
+else
+LIBWEBSOCKETS_CONF_OPTS += -DLWS_MAX_SMP=
+endif
+
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBWEBSOCKETS_DEPENDENCIES += openssl host-openssl
 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SSL=ON
-- 
2.7.4

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

* [Buildroot] [PATCH 3/3] libwebsockets: bump to version 1.7.4
  2016-03-30 20:22 [Buildroot] [PATCH 1/3] libwebsockets: add patch to fix musl build Jörg Krause
  2016-03-30 20:22 ` [Buildroot] [PATCH 2/3] libwebsockets: fix build with nothread toolchains Jörg Krause
@ 2016-03-30 20:22 ` Jörg Krause
  2016-03-31  1:49 ` [Buildroot] [PATCH 1/3] libwebsockets: add patch to fix musl build Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Jörg Krause @ 2016-03-30 20:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
 package/libwebsockets/libwebsockets.hash | 2 +-
 package/libwebsockets/libwebsockets.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libwebsockets/libwebsockets.hash b/package/libwebsockets/libwebsockets.hash
index 745bc49..2559445 100644
--- a/package/libwebsockets/libwebsockets.hash
+++ b/package/libwebsockets/libwebsockets.hash
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256  c6f3272d7e0234a9ef92b38622f36c4166eede4225e36fe4f78dd2ade03e9c52  libwebsockets-v1.7.3.tar.gz
+sha256  8d99aa369cb972b97520a40270086bde24645fafc2deaf6ccca93753691a7a2f  libwebsockets-v1.7.4.tar.gz
 sha256  c7627d8e3d9d695b965a6c5fe30f4b4c04666984b384acd9e24c3b59cef13816  9eec5e4470397632af035c429295a41b74bd0585.patch
diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk
index 8d3663f..95d1309 100644
--- a/package/libwebsockets/libwebsockets.mk
+++ b/package/libwebsockets/libwebsockets.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBWEBSOCKETS_VERSION = v1.7.3
+LIBWEBSOCKETS_VERSION = v1.7.4
 LIBWEBSOCKETS_SITE = $(call github,warmcat,libwebsockets,$(LIBWEBSOCKETS_VERSION))
 LIBWEBSOCKETS_LICENSE = LGPLv2.1 with exceptions
 LIBWEBSOCKETS_LICENSE_FILES = LICENSE
-- 
2.7.4

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

* [Buildroot] [PATCH 1/3] libwebsockets: add patch to fix musl build
  2016-03-30 20:22 [Buildroot] [PATCH 1/3] libwebsockets: add patch to fix musl build Jörg Krause
  2016-03-30 20:22 ` [Buildroot] [PATCH 2/3] libwebsockets: fix build with nothread toolchains Jörg Krause
  2016-03-30 20:22 ` [Buildroot] [PATCH 3/3] libwebsockets: bump to version 1.7.4 Jörg Krause
@ 2016-03-31  1:49 ` Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-03-31  1:49 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 30 Mar 2016 22:22:36 +0200, J?rg Krause wrote:
> Add patch from upstream [1] to fix musl build:
> fatal error: sys/cdefs.h: No such file or directory
> 
> Fixes:
> http://autobuild.buildroot.net/results/564/564675be0d4fbfa113a0f2e52874e0dce2d5ba5e/
> http://autobuild.buildroot.net/results/c41/c41d87c0cf22f3b88e5f80ad6bf5e81900603c1d/
> 
> Backported from: 9eec5e4470397632af035c429295a41b74bd0585
> 
> [1] https://github.com/warmcat/libwebsockets/commit/9eec5e4470397632af035c429295a41b74bd0585
> 
> Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
> ---
>  package/libwebsockets/libwebsockets.hash | 1 +
>  package/libwebsockets/libwebsockets.mk   | 1 +
>  2 files changed, 2 insertions(+)

All three patches applied, 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-03-31  1:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-30 20:22 [Buildroot] [PATCH 1/3] libwebsockets: add patch to fix musl build Jörg Krause
2016-03-30 20:22 ` [Buildroot] [PATCH 2/3] libwebsockets: fix build with nothread toolchains Jörg Krause
2016-03-30 20:22 ` [Buildroot] [PATCH 3/3] libwebsockets: bump to version 1.7.4 Jörg Krause
2016-03-31  1:49 ` [Buildroot] [PATCH 1/3] libwebsockets: add patch to fix musl build Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox