Skip to content

Commit

Permalink
remove -pie for linking, fixes #27
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarning committed Apr 12, 2018
1 parent c61a611 commit 2ef2c02
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 61b69f74fecf3c34c0fd2003897c92790ca5a9f5 Mon Sep 17 00:00:00 2001
From 43079460744af0b959cd1ce6fd6b3e638e914144 Mon Sep 17 00:00:00 2001
From: Moritz Warning <moritzwarning@web.de>
Date: Thu, 4 May 2017 22:13:55 +0200
Subject: [PATCH 1/2] use external libminiupnpc and libnatpmp
Subject: [PATCH 1/5] use external libminiupnpc and libnatpmp

---
make-linux.mk | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/make-linux.mk b/make-linux.mk
index 87d29af..f5b3d8d 100644
index 87d29afe..f5b3d8df 100644
--- a/make-linux.mk
+++ b/make-linux.mk
@@ -22,20 +22,20 @@ OBJS+=ext/http-parser/http_parser.o
Expand Down Expand Up @@ -43,5 +43,5 @@ index 87d29af..f5b3d8d 100644
ifeq ($(ZT_ENABLE_CLUSTER),1)
DEFS+=-DZT_ENABLE_CLUSTER
--
2.1.4
2.16.3

8 changes: 4 additions & 4 deletions zerotier/patches/0002-pin-target-to-linux.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From b8a0598002fd08618d20cd1bbfb03559435241a8 Mon Sep 17 00:00:00 2001
From d19cda1165276dcd0920665328adfec03c0ceeba Mon Sep 17 00:00:00 2001
From: Moritz Warning <moritzwarning@web.de>
Date: Thu, 4 May 2017 22:35:58 +0200
Subject: [PATCH 2/2] pin target to linux
Subject: [PATCH 2/5] pin target to linux

---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 9511862..d5b0dfc 100644
index 95118621..d5b0dfc6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
Expand All @@ -20,5 +20,5 @@ index 9511862..d5b0dfc 100644
ifeq ($(OSTYPE),Darwin)
include make-mac.mk
--
2.1.4
2.16.3

20 changes: 16 additions & 4 deletions zerotier/patches/0003-gcc48.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
Index: ZeroTierOne-1.2.4/ext/json/json.hpp
===================================================================
--- ZeroTierOne-1.2.4.orig/ext/json/json.hpp
+++ ZeroTierOne-1.2.4/ext/json/json.hpp
From 46a714008e89f86ba84eca65c80ee727d51414b2 Mon Sep 17 00:00:00 2001
From: Moritz Warning <moritzwarning@web.de>
Date: Thu, 12 Apr 2018 17:11:49 +0200
Subject: [PATCH 3/5] gcc48

---
ext/json/json.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/json/json.hpp b/ext/json/json.hpp
index 9d48e7a6..bc5345aa 100644
--- a/ext/json/json.hpp
+++ b/ext/json/json.hpp
@@ -64,7 +64,7 @@ SOFTWARE.
#endif
#elif defined(__GNUC__)
Expand All @@ -11,3 +20,6 @@ Index: ZeroTierOne-1.2.4/ext/json/json.hpp
#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
#endif
#endif
--
2.16.3

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
From ab8ececbe70f7c83667d6ebb592fc1df17ad26a4 Mon Sep 17 00:00:00 2001
From e8b097e5a0e62e8c9fdfad0fb3bb39d79fee9b76 Mon Sep 17 00:00:00 2001
From: Moritz Warning <moritzwarning@web.de>
Date: Sat, 20 Jan 2018 21:55:52 +0100
Subject: [PATCH] Revert "Do not serve controller requests until init is done."
Subject: [PATCH 4/5] Revert "Do not serve controller requests until init is
done."

This reverts commit f4feccc6265cc480b84c85f897b225714072d4ec.
---
Expand Down Expand Up @@ -134,5 +135,5 @@ index beafbaf5..c19112ed 100644

} // namespace ZeroTier
--
2.15.1
2.16.3

26 changes: 26 additions & 0 deletions zerotier/patches/0005-remove-pie.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 14a8fe1f7cdef1f1e0c0842f6fedde154cf4ab57 Mon Sep 17 00:00:00 2001
From: Moritz Warning <moritzwarning@web.de>
Date: Thu, 12 Apr 2018 17:09:16 +0200
Subject: [PATCH 5/5] remove -pie

this prevents immediate segfault on start
---
make-linux.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/make-linux.mk b/make-linux.mk
index f5b3d8df..8589e5d6 100644
--- a/make-linux.mk
+++ b/make-linux.mk
@@ -67,7 +67,7 @@ else
override CFLAGS+=-Wall -fPIE -pthread $(INCLUDES) -DNDEBUG $(DEFS)
CXXFLAGS?=-O3 -fstack-protector
override CXXFLAGS+=-Wall -Wno-unused-result -Wreorder -fPIE -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
- override LDFLAGS+=-pie -Wl,-z,relro,-z,now
+ override LDFLAGS+=-Wl,-z,relro,-z,now
STRIP?=strip
STRIP+=--strip-all
endif
--
2.16.3

0 comments on commit 2ef2c02

Please sign in to comment.