wireguard: no longer need portability patch

Drop package/network/services/wireguard/patches/100-portability.patch

Instead pass 'PLATFORM=linux' to make since we are always building FOR
linux.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
This commit is contained in:
Kevin Darbyshire-Bryant 2018-05-17 23:08:21 +01:00 committed by John Crispin
parent d91953cb53
commit f06def4221
2 changed files with 1 additions and 19 deletions

View file

@ -60,6 +60,7 @@ include $(INCLUDE_DIR)/package-defaults.mk
# Used by Build/Compile/Default
MAKE_PATH:=src/tools
MAKE_VARS += PLATFORM=linux
define Build/Compile
$(MAKE) $(KERNEL_MAKEOPTS) M="$(PKG_BUILD_DIR)/src" modules

View file

@ -1,19 +0,0 @@
tools: fix portability issue
Check if the compiler defines __linux__, instead of assuming that the
host OS is the same as the target OS.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/src/tools/Makefile
+++ b/src/tools/Makefile
@@ -36,6 +36,9 @@ endif
endif
PLATFORM ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
+ifeq ($(strip $(shell echo __linux__ | $(CC) -E - | grep -v '^\#')),1)
+PLATFORM := linux
+endif
CFLAGS ?= -O3
CFLAGS += -std=gnu11 -D_GNU_SOURCE