diff mbox series

[OpenWrt-Devel] wireguard: no longer need portability patch

Message ID 20180517214209.78922-1-ldir@darbyshire-bryant.me.uk
State Superseded
Headers show
Series [OpenWrt-Devel] wireguard: no longer need portability patch | expand

Commit Message

Kevin 'ldir' Darbyshire-Bryant May 17, 2018, 9:42 p.m. UTC
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>
---
 package/network/services/wireguard/Makefile           |  3 ++-
 .../services/wireguard/patches/100-portability.patch  | 19 -------------------
 2 files changed, 2 insertions(+), 20 deletions(-)
 delete mode 100644 package/network/services/wireguard/patches/100-portability.patch
diff mbox series

Patch

diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile
index 5ca7b7da57..08412f75db 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -12,7 +12,7 @@  include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=wireguard
 
 PKG_VERSION:=0.0.20180514
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
@@ -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
diff --git a/package/network/services/wireguard/patches/100-portability.patch b/package/network/services/wireguard/patches/100-portability.patch
deleted file mode 100644
index 33a7373cc7..0000000000
--- a/package/network/services/wireguard/patches/100-portability.patch
+++ /dev/null
@@ -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