openwrt_helloworld/ipt2socks/Makefile
MoetaYuko 1501b8caf2 ipt2socks: Readd -pthread to ipt2socks compile options
Fix linker error for arc_archs and arc_arc700:

2022-05-26T02:00:59.1207911Z /home/build/openwrt/staging_dir/toolchain-arc_archs_gcc-8.4.0_glibc/bin/../lib/gcc/arc-openwrt-linux-gnu/8.4.0/../../../../arc-openwrt-linux-gnu/bin/ld: /home/build/openwrt/tmp/ccUGK6zX.ltrans0.ltrans.o: in function `main':
2022-05-26T02:00:59.1208788Z <artificial>:(.text.startup+0xee8): undefined reference to `pthread_create'
2022-05-26T02:00:59.1209619Z /home/build/openwrt/staging_dir/toolchain-arc_archs_gcc-8.4.0_glibc/bin/../lib/gcc/arc-openwrt-linux-gnu/8.4.0/../../../../arc-openwrt-linux-gnu/bin/ld: <artificial>:(.text.startup+0xee8): undefined reference to `pthread_create'
2022-05-26T02:00:59.1210305Z collect2: error: ld returned 1 exit status
2022-05-26T02:00:59.1214282Z make[4]: *** [Makefile:25: ipt2socks] Error 1
2022-05-30 21:13:22 +08:00

45 lines
1.0 KiB
Makefile

# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=ipt2socks
PKG_VERSION:=1.1.3
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/zfl9/ipt2socks/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=73a2498dc95934c225d358707e7f7d060b5ce81aa45260ada09cbd15207d27d1
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILE:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/ipt2socks
SECTION:=net
CATEGORY:=Network
TITLE:=Convert iptables to socks5
URL:=https://github.com/zfl9/ipt2socks
endef
define Package/ipt2socks/description
Utility for converting iptables (redirect/tproxy) to socks5.
endef
TARGET_CFLAGS+= $(FPIC) -flto -pthread
MAKE_FLAGS+= \
CFLAGS="-std=c99 $(TARGET_CFLAGS)" \
EVCFLAGS="$(TARGET_CFLAGS)"
define Package/ipt2socks/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ipt2socks $(1)/usr/bin
endef
$(eval $(call BuildPackage,ipt2socks))