Skip to contentSkip to conversation

shadowsocks-libev: fix build on riscv

PATCH New Fabrice Fontaine 2 participants 3 messages Nov 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 shadowsocks-libev: fix build on riscv

Define _REENTRANT otherwise pthread detection will fail

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

---
 package/shadowsocks-libev/shadowsocks-libev.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/shadowsocks-libev/shadowsocks-libev.mk +7 -0
index caae2176b4..7fdcd3f772 100644
@@ -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))
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 shadowsocks-libev: fix build on riscv

Hello,

Quoted 6 lines · Fabrice Fontaine

Define _REENTRANT otherwise pthread detection will fail

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

Thanks. I'm wondering if we shouldn't patch gcc instead of fixing all packages for this issue.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 shadowsocks-libev: fix build on riscv

In reply to Fabrice Fontaine

Hello,

Quoted 9 lines · Fabrice Fontaine

Define _REENTRANT otherwise pthread detection will fail

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

---
 package/shadowsocks-libev/shadowsocks-libev.mk | 7 +++++++
 1 file changed, 7 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com