packages/net/zerotier/patches/0002-remove-pie.patch
Deng Qingfang 4a3e3fb286 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 <dengqf6@mail2.sysu.edu.cn>
2019-06-08 01:32:29 +08:00

33 lines
1.1 KiB
Diff

From 7cfe751128d412a9b780ba5e4cb11908fc71cd3d Mon Sep 17 00:00:00 2001
From: Moritz Warning <moritzwarning@web.de>
Date: Mon, 30 Apr 2018 16:14:30 +0200
Subject: [PATCH 2/4] remove -pie
fixes relocation "against `a local symbol' can not be used
when making a shared object; recompile with -fPIC" error
---
make-linux.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/make-linux.mk b/make-linux.mk
index 0cd955d1..add1d3ae 100644
--- a/make-linux.mk
+++ b/make-linux.mk
@@ -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
- 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
STRIP?=strip
STRIP+=--strip-all
endif
--
2.17.0