Browse Source

Merge pull request #18339 from mwarning/zt-openwrt-22.03

[22.03] zerotier: fix segfault on ARM platforms
lilik-openwrt-22.03
Jeffery To 3 years ago
committed by GitHub
parent
commit
e593f1ebfb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions
  1. +1
    -1
      net/zerotier/Makefile
  2. +15
    -0
      net/zerotier/patches/0001-fix-makefile.patch

+ 1
- 1
net/zerotier/Makefile View File

@ -56,7 +56,7 @@ endif
endef endef
# Make binary smaller # Make binary smaller
TARGET_CFLAGS += -ffunction-sections -fdata-sections -fPIE
TARGET_CFLAGS += -ffunction-sections -fdata-sections
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
define Package/zerotier/conffiles define Package/zerotier/conffiles


+ 15
- 0
net/zerotier/patches/0001-fix-makefile.patch View File

@ -29,6 +29,21 @@ Subject: [PATCH 1/3] fix makefile
ONE_OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o ONE_OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
else else
LDLIBS+=-lnatpmp LDLIBS+=-lnatpmp
@@ -66,11 +66,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
- CFLAGS?=-O3 -fstack-protector -fPIE
+ CFLAGS?=-O3 -fstack-protector
override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS)
- CXXFLAGS?=-O3 -fstack-protector -fPIE
+ CXXFLAGS?=-O3 -fstack-protector
override CXXFLAGS+=-Wall -Wno-deprecated -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
- LDFLAGS=-pie -Wl,-z,relro,-z,now
+ LDFLAGS+=-Wl,-z,relro,-z,now
RUSTFLAGS=--release
endif
@@ -300,7 +300,7 @@ ifeq ($(ZT_CONTROLLER),1) @@ -300,7 +300,7 @@ ifeq ($(ZT_CONTROLLER),1)
endif endif


Loading…
Cancel
Save