mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-01 04:39:06 +08:00
zerotier: refresh patches (#811)
Co-authored-by: mwarning <moritzwarning@web.de>
This commit is contained in:
parent
579e94a275
commit
e79dcf9558
@ -0,0 +1,32 @@
|
||||
From f53004bd22365900a1dbb120dae62ce8b614d31d Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Warning <moritzwarning@web.de>
|
||||
Date: Mon, 6 May 2024 22:31:57 +0200
|
||||
Subject: [PATCH 1/5] fix miniupnpc/natpmp include paths
|
||||
|
||||
Signed-off-by: Moritz Warning <moritzwarning@web.de>
|
||||
---
|
||||
make-linux.mk | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/make-linux.mk
|
||||
+++ b/make-linux.mk
|
||||
@@ -26,8 +26,8 @@ TIMESTAMP=$(shell date +"%Y%m%d%H%M")
|
||||
# otherwise build into binary as done on Mac and Windows.
|
||||
ONE_OBJS+=osdep/PortMapper.o
|
||||
override DEFS+=-DZT_USE_MINIUPNPC
|
||||
-MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' /usr/include/miniupnpc/miniupnpc.h && echo 1)
|
||||
-#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1)
|
||||
+MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1)
|
||||
+#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1)
|
||||
ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
|
||||
override DEFS+=-DZT_USE_SYSTEM_MINIUPNPC
|
||||
LDLIBS+=-lminiupnpc
|
||||
@@ -35,7 +35,7 @@ else
|
||||
override DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING="\"Linux\"" -DMINIUPNPC_VERSION_STRING="\"2.0\"" -DUPNP_VERSION_STRING="\"UPnP/1.1\"" -DENABLE_STRNATPMPERR
|
||||
ONE_OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o
|
||||
endif
|
||||
-ifeq ($(wildcard /usr/include/natpmp.h),)
|
||||
+ifeq ($(wildcard $(STAGING_DIR)/usr/include/natpmp.h),)
|
||||
ONE_OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
|
||||
else
|
||||
LDLIBS+=-lnatpmp
|
41
net/zerotier/patches/0002-remove-PIE-options.patch
Normal file
41
net/zerotier/patches/0002-remove-PIE-options.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From c10b5ed4c6c44e36178b0a5a82da9e8eaa957008 Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Warning <moritzwarning@web.de>
|
||||
Date: Mon, 6 May 2024 22:34:15 +0200
|
||||
Subject: [PATCH 2/5] remove PIE options
|
||||
|
||||
Signed-off-by: Moritz Warning <moritzwarning@web.de>
|
||||
---
|
||||
make-linux.mk | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/make-linux.mk
|
||||
+++ b/make-linux.mk
|
||||
@@ -71,7 +71,7 @@ else
|
||||
override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
||||
CXXFLAGS?=-O3 -fstack-protector
|
||||
override CXXFLAGS+=-Wall -Wno-deprecated -std=c++17 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
||||
- LDFLAGS=-pie -Wl,-z,relro,-z,now
|
||||
+ LDFLAGS=-Wl,-z,relro,-z,now
|
||||
ZT_CARGO_FLAGS=--release
|
||||
endif
|
||||
|
||||
@@ -333,7 +333,7 @@ ifeq ($(ZT_CONTROLLER),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=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
|
||||
override CXXFLAGS+=-march=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
|
||||
@@ -360,8 +360,8 @@ ifeq ($(ZT_USE_ARM32_NEON_ASM_CRYPTO),1)
|
||||
endif
|
||||
|
||||
# Position Independence
|
||||
-override CFLAGS+=-fPIC -fPIE
|
||||
-override CXXFLAGS+=-fPIC -fPIE
|
||||
+#override CFLAGS+=-fPIC -fPIE
|
||||
+#override CXXFLAGS+=-fPIC -fPIE
|
||||
|
||||
# Non-executable stack
|
||||
override ASFLAGS+=--noexecstack
|
@ -1,4 +1,4 @@
|
||||
From 1689085363cf87deb3877139931a8a88d8c7bcd3 Mon Sep 17 00:00:00 2001
|
||||
From fee674d5a5c7cc847d7e1925ddf41eea89d915c4 Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Warning <moritzwarning@web.de>
|
||||
Date: Mon, 4 Jul 2022 00:10:52 +0200
|
||||
Subject: [PATCH 3/5] fix compilation for arm_cortex-a7+neon
|
||||
|
@ -1,6 +1,6 @@
|
||||
From b3879d721734862aa64433f7faf124a0862da029 Mon Sep 17 00:00:00 2001
|
||||
From f8b4c4a045a9711c316a5c48b238c24cc0948da1 Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Warning <moritzwarning@web.de>
|
||||
Date: Sun, 27 Aug 2023 22:27:12 +0200
|
||||
Date: Mon, 6 May 2024 22:35:41 +0200
|
||||
Subject: [PATCH 4/5] add missing libatomic
|
||||
|
||||
Signed-off-by: Moritz Warning <moritzwarning@web.de>
|
||||
@ -12,10 +12,10 @@ Signed-off-by: Moritz Warning <moritzwarning@web.de>
|
||||
+++ b/make-linux.mk
|
||||
@@ -11,7 +11,7 @@ endif
|
||||
|
||||
INCLUDES?=-Izeroidc/target -isystem ext -Iext/prometheus-cpp-lite-1.0/core/include -Iext-prometheus-cpp-lite-1.0/3rdparty/http-client-lite/include -Iext/prometheus-cpp-lite-1.0/simpleapi/include
|
||||
INCLUDES?=-Irustybits/target -isystem ext -Iext/prometheus-cpp-lite-1.0/core/include -Iext-prometheus-cpp-lite-1.0/3rdparty/http-client-lite/include -Iext/prometheus-cpp-lite-1.0/simpleapi/include
|
||||
DEFS?=
|
||||
-LDLIBS?=
|
||||
+LDLIBS?=-latomic
|
||||
DESTDIR?=
|
||||
EXTRA_DEPS?=
|
||||
|
||||
include objects.mk
|
||||
|
@ -1,4 +1,4 @@
|
||||
From adcc68c6c3de8460bd6263d3478873953a4cf894 Mon Sep 17 00:00:00 2001
|
||||
From 2a5a279ac0192bc444cd1c3059169f576817d8b9 Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Warning <moritzwarning@web.de>
|
||||
Date: Mon, 28 Aug 2023 09:48:28 +0200
|
||||
Subject: [PATCH 5/5] remove noexecstack
|
||||
@ -10,7 +10,7 @@ The compilers for arm_cortex-a9 do not recognize this argument.
|
||||
|
||||
--- a/make-linux.mk
|
||||
+++ b/make-linux.mk
|
||||
@@ -358,7 +358,7 @@ endif
|
||||
@@ -364,7 +364,7 @@ endif
|
||||
#override CXXFLAGS+=-fPIC -fPIE
|
||||
|
||||
# Non-executable stack
|
||||
|
Loading…
Reference in New Issue
Block a user