From 4a3e3fb28652b3d8d87dcaf933fcf2577de73399 Mon Sep 17 00:00:00 2001 From: Deng Qingfang Date: Sat, 8 Jun 2019 01:28:28 +0800 Subject: [PATCH] zerotier: remove ARM32 conservative CFLAGS OpenWrt toolchains already use correct CFLAGS for every ARM target There is no reason to use conservative CFLAGS now It also causes compile error with GCC 9.1.0 Signed-off-by: Deng Qingfang --- net/zerotier/Makefile | 2 +- net/zerotier/patches/0002-remove-pie.patch | 2 +- .../0003-remove-arm32-conservative-CFLAGS.patch | 11 +++++++++++ .../patches/0004-accept-external-linker-flags.patch | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 net/zerotier/patches/0003-remove-arm32-conservative-CFLAGS.patch diff --git a/net/zerotier/Makefile b/net/zerotier/Makefile index c5725aad9..50a270a87 100644 --- a/net/zerotier/Makefile +++ b/net/zerotier/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zerotier PKG_VERSION:=1.2.12 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LICENSE:=GPL-3.0 diff --git a/net/zerotier/patches/0002-remove-pie.patch b/net/zerotier/patches/0002-remove-pie.patch index 369698ff7..849cb20f9 100644 --- a/net/zerotier/patches/0002-remove-pie.patch +++ b/net/zerotier/patches/0002-remove-pie.patch @@ -13,7 +13,7 @@ diff --git a/make-linux.mk b/make-linux.mk index 0cd955d1..add1d3ae 100644 --- a/make-linux.mk +++ b/make-linux.mk -@@ -71,11 +71,11 @@ ifeq ($(ZT_DEBUG),1) +@@ -63,11 +63,11 @@ ifeq ($(ZT_DEBUG),1) # C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box! node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CXXFLAGS=-Wall -O2 -g -pthread $(INCLUDES) $(DEFS) else diff --git a/net/zerotier/patches/0003-remove-arm32-conservative-CFLAGS.patch b/net/zerotier/patches/0003-remove-arm32-conservative-CFLAGS.patch new file mode 100644 index 000000000..ea74d0d8c --- /dev/null +++ b/net/zerotier/patches/0003-remove-arm32-conservative-CFLAGS.patch @@ -0,0 +1,11 @@ +--- a/make-linux.mk ++++ b/make-linux.mk +@@ -231,7 +231,7 @@ ifeq ($(ZT_OFFICIAL),1) + endif + + # ARM32 hell -- use conservative CFLAGS +-ifeq ($(ZT_ARCHITECTURE),3) ++ifeq (0,3) + ifeq ($(shell if [ -e /usr/bin/dpkg ]; then dpkg --print-architecture; fi),armel) + override CFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm + override CXXFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm diff --git a/net/zerotier/patches/0004-accept-external-linker-flags.patch b/net/zerotier/patches/0004-accept-external-linker-flags.patch index d14692b23..d50143a61 100644 --- a/net/zerotier/patches/0004-accept-external-linker-flags.patch +++ b/net/zerotier/patches/0004-accept-external-linker-flags.patch @@ -11,7 +11,7 @@ diff --git a/make-linux.mk b/make-linux.mk index 49e14f70..8e766bfb 100644 --- a/make-linux.mk +++ b/make-linux.mk -@@ -75,7 +75,7 @@ else +@@ -67,7 +67,7 @@ else override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS) CXXFLAGS?=-O3 -fstack-protector override CXXFLAGS+=-Wall -Wno-deprecated -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS)