kumquat-buildroot/package/shadowsocks-libev/shadowsocks-libev.mk
Fabrice Fontaine ebffca8ba4 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>
2018-11-13 22:52:55 +01:00

25 lines
1.0 KiB
Makefile

################################################################################
#
# shadowsocks-libev
#
################################################################################
SHADOWSOCKS_LIBEV_VERSION = 3.2.0
SHADOWSOCKS_LIBEV_SITE = https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(SHADOWSOCKS_LIBEV_VERSION)
SHADOWSOCKS_LIBEV_LICENSE = GPL-3.0+, BSD-2-Clause (libbloom), BSD-3-Clause (libcork, libipset)
SHADOWSOCKS_LIBEV_LICENSE_FILES = COPYING libbloom/LICENSE libcork/COPYING
SHADOWSOCKS_LIBEV_DEPENDENCIES = host-pkgconf c-ares libev libsodium mbedtls pcre
SHADOWSOCKS_LIBEV_INSTALL_STAGING = YES
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))