zookeeper/zookeeper-3.4.5-add-PIE-and-RELRO.patch

86 lines
3.9 KiB
Diff
Raw Normal View History

2013-06-11 16:58:39 +00:00
diff -Nru zookeeper-3.4.5/contrib/zktreeutil/src/Makefile.am zookeeper-3.4.5-gil/contrib/zktreeutil/src/Makefile.am
--- zookeeper-3.4.5/contrib/zktreeutil/src/Makefile.am 2012-09-30 19:53:30.000000000 +0200
+++ zookeeper-3.4.5-gil/contrib/zktreeutil/src/Makefile.am 2013-06-11 18:09:15.097330579 +0200
@@ -16,7 +16,7 @@
AM_CXXFLAGS = -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \
-I$(top_srcdir)/include -I${LOG4CXX_INCLUDE} -I/usr/include \
- -I${XML2_INCLUDE}
+ -I${XML2_INCLUDE} -fPIE
bin_PROGRAMS = zktreeutil
diff -Nru zookeeper-3.4.5/recipes/lock/src/c/Makefile.am zookeeper-3.4.5-gil/recipes/lock/src/c/Makefile.am
--- zookeeper-3.4.5/recipes/lock/src/c/Makefile.am 2012-09-30 19:53:31.000000000 +0200
+++ zookeeper-3.4.5-gil/recipes/lock/src/c/Makefile.am 2013-06-11 17:10:22.808629998 +0200
@@ -17,14 +17,14 @@
include $(top_srcdir)/aminclude.am
AM_CFLAGS = -Wall -fPIC -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \
- -I$(top_srcdir)/include -I/usr/include
+ -I$(top_srcdir)/include -I/usr/include -fPIE
AM_CPPFLAGS = -Wall -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated\
- -I${top_srcdir}/include -I/usr/include
+ -I${top_srcdir}/include -I/usr/include -fPIE
EXTRA_DIST = LICENSE
lib_LTLIBRARIES = libzoolock.la
libzoolock_la_SOURCES = src/zoo_lock.c include/zoo_lock.h
libzoolock_la_CPPFLAGS = -DDLOPEN_MODULE
-libzoolock_la_LDFLAGS = -version-info 0:1:0
+libzoolock_la_LDFLAGS = -version-info 0:1:0 -pie -Wl,-z,relro -Wl,-z,now
#run the tests now
diff -Nru zookeeper-3.4.5/recipes/queue/src/c/Makefile.am zookeeper-3.4.5-gil/recipes/queue/src/c/Makefile.am
--- zookeeper-3.4.5/recipes/queue/src/c/Makefile.am 2012-09-30 19:53:31.000000000 +0200
+++ zookeeper-3.4.5-gil/recipes/queue/src/c/Makefile.am 2013-06-11 17:09:50.816288611 +0200
@@ -17,14 +17,14 @@
include $(top_srcdir)/aminclude.am
AM_CFLAGS = -Wall -fPIC -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \
- -I$(top_srcdir)/include -I/usr/include
+ -I$(top_srcdir)/include -I/usr/include -fPIE
AM_CPPFLAGS = -Wall -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated\
- -I${top_srcdir}/include -I/usr/include
+ -I${top_srcdir}/include -I/usr/include -fPIE
EXTRA_DIST = LICENSE
lib_LTLIBRARIES = libzooqueue.la
libzooqueue_la_SOURCES = src/zoo_queue.c include/zoo_queue.h
libzooqueue_la_CPPFLAGS = -DDLOPEN_MODULE
-libzooqueue_la_LDFLAGS = -version-info 0:1:0
+libzooqueue_la_LDFLAGS = -version-info 0:1:0 -pie -Wl,-z,relro -Wl,-z,now
#run the tests now
diff -Nru zookeeper-3.4.5/src/c/Makefile.am zookeeper-3.4.5-gil/src/c/Makefile.am
--- zookeeper-3.4.5/src/c/Makefile.am 2012-09-30 19:53:31.000000000 +0200
+++ zookeeper-3.4.5-gil/src/c/Makefile.am 2013-06-11 17:02:31.701054099 +0200
@@ -1,11 +1,11 @@
# need this for Doxygen integration
include $(top_srcdir)/aminclude.am
-AM_CPPFLAGS = -I${srcdir}/include -I${srcdir}/tests -I${srcdir}/generated
-AM_CFLAGS = -Wall -Werror
-AM_CXXFLAGS = -Wall $(USEIPV6)
+AM_CPPFLAGS = -I${srcdir}/include -I${srcdir}/tests -I${srcdir}/generated -fPIE
+AM_CFLAGS = -Wall -Werror -fPIE
+AM_CXXFLAGS = -Wall $(USEIPV6) -fPIE
-LIB_LDFLAGS = -no-undefined -version-info 2
+LIB_LDFLAGS = -no-undefined -version-info 2 -pie -Wl,-z,relro -Wl,-z,now
pkginclude_HEADERS = include/zookeeper.h include/zookeeper_version.h include/zookeeper_log.h include/proto.h include/recordio.h generated/zookeeper.jute.h
EXTRA_DIST=LICENSE
diff -Nru zookeeper-3.4.5/src/contrib/zktreeutil/src/Makefile.am zookeeper-3.4.5-gil/src/contrib/zktreeutil/src/Makefile.am
--- zookeeper-3.4.5/src/contrib/zktreeutil/src/Makefile.am 2012-09-30 19:53:32.000000000 +0200
+++ zookeeper-3.4.5-gil/src/contrib/zktreeutil/src/Makefile.am 2013-06-11 18:12:03.908634751 +0200
@@ -16,7 +16,7 @@
AM_CXXFLAGS = -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \
-I$(top_srcdir)/include -I${LOG4CXX_INCLUDE} -I/usr/include \
- -I${XML2_INCLUDE}
+ -I${XML2_INCLUDE} -fPIE
bin_PROGRAMS = zktreeutil