aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Fabrice Fontaine <fontaine.fabrice@gmail.com>2018-11-13 22:30:43 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-11-13 22:52:55 +0100
commitebffca8ba483610478f33cdc52a24a165e4da87e (patch)
tree405db69829e54d5da5c6b9c689e0b4f2590fd168
parent06a7d3af66ada3081c654d043eae3effe8cf0302 (diff)
downloadbuildroot-ebffca8ba483610478f33cdc52a24a165e4da87e.tar.gz
buildroot-ebffca8ba483610478f33cdc52a24a165e4da87e.tar.bz2
shadowsocks-libev: fix build on riscv
Define _REENTRANT otherwise pthread detection will fail Fixes: - http://autobuild.buildroot.org/results/c5406206190b46e15d35d05c5ed026ee7632f5b1 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--package/shadowsocks-libev/shadowsocks-libev.mk7
1 files changed, 7 insertions, 0 deletions
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))