Browse Source

softethervpn: fix build on macos

host-compile fails on macos due to several reasons:
1. host-compile Makefile always selected for linux
2. macos host cc (clang) fails due to implicit-function-declaration
3. ar and ranlib tools are hardcoded in softethervpn Makefiles

All three issues are fixed by this patch

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
lilik-openwrt-22.03
Sergey V. Lobanov 2 years ago
committed by Rosen Penev
parent
commit
f01baee526
2 changed files with 1186 additions and 2 deletions
  1. +5
    -2
      net/softethervpn/Makefile
  2. +1181
    -0
      net/softethervpn/patches/140_allow-to-redefine-ar-and-ranlib.patch

+ 5
- 2
net/softethervpn/Makefile View File

@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=softethervpn
PKG_VERSION:=4.38-9760
PKG_VERREL:=rtm
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=softether-src-v$(PKG_VERSION)-$(PKG_VERREL).tar.gz
PKG_SOURCE_URL:=https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v$(PKG_VERSION)-$(PKG_VERREL)
@ -37,13 +37,16 @@ include $(INCLUDE_DIR)/host-build.mk
HOST_MAKE_FLAGS += -C $(HOST_BUILD_DIR)
# Select 32 or 64 bit Makefile for host build depending on host architecture
HOST_MAKE_FLAGS += -f src/makefiles/linux_$(if $(shell uname -m | grep 64),64,32)bit.mak
HOST_MAKE_FLAGS += \
-f src/makefiles/$(if $(CONFIG_HOST_OS_MACOS),macos,linux)_$(if $(shell uname -m | grep 64),64,32)bit.mak
HOST_LDFLAGS += -Wl,-rpath$(comma)$(STAGING_DIR_HOSTPKG)/lib
# Prevent calling upstream configure
define Host/Configure
endef
HOST_CFLAGS += $(if $(CONFIG_HOST_OS_MACOS),-Wno-implicit-function-declaration,)
define Host/Compile
# Build hamcorebuilder using host compiler and let it generate
# the hamcore.se2 archive file


+ 1181
- 0
net/softethervpn/patches/140_allow-to-redefine-ar-and-ranlib.patch
File diff suppressed because it is too large
View File


Loading…
Cancel
Save