Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] shadowsocks-libev: fix build on riscv
@ 2018-11-13 21:30 Fabrice Fontaine
  2018-11-13 21:39 ` Thomas Petazzoni
  2018-11-13 21:53 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2018-11-13 21:30 UTC (permalink / raw)
  To: buildroot

Define _REENTRANT otherwise pthread detection will fail

Fixes:
 - http://autobuild.buildroot.org/results/c5406206190b46e15d35d05c5ed026ee7632f5b1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/shadowsocks-libev/shadowsocks-libev.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/shadowsocks-libev/shadowsocks-libev.mk b/package/shadowsocks-libev/shadowsocks-libev.mk
index caae2176b4..7fdcd3f772 100644
--- a/package/shadowsocks-libev/shadowsocks-libev.mk
+++ b/package/shadowsocks-libev/shadowsocks-libev.mk
@@ -14,4 +14,11 @@ SHADOWSOCKS_LIBEV_CONF_OPTS = \
 	--with-pcre=$(STAGING_DIR)/usr \
 	--disable-ssp
 
+# gcc on riscv doesn't define _REENTRANT when -pthread is passed while
+# it should. Compensate this deficiency here otherwise shadowsocks-libev
+# configure script doesn't find that thread support is enabled.
+ifeq ($(BR2_riscv),y)
+SHADOWSOCKS_LIBEV_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_REENTRANT"
+endif
+
 $(eval $(autotools-package))
-- 
2.14.1

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

end of thread, other threads:[~2018-11-13 21:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-13 21:30 [Buildroot] [PATCH 1/1] shadowsocks-libev: fix build on riscv Fabrice Fontaine
2018-11-13 21:39 ` Thomas Petazzoni
2018-11-13 21:53 ` Thomas Petazzoni

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