[memcached/f18] compile with full RELRO

Miroslav Lichvar mlichvar at fedoraproject.org
Thu Dec 20 10:26:42 UTC 2012


commit ec3ba775c190182615b239140f7012429345e924
Author: Miroslav Lichvar <mlichvar at redhat.com>
Date:   Thu Dec 20 11:25:26 2012 +0100

    compile with full RELRO

 memcached.spec |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/memcached.spec b/memcached.spec
index 3eb89d8..bccd4e2 100644
--- a/memcached.spec
+++ b/memcached.spec
@@ -53,6 +53,10 @@ access to the memcached binary include files.
 %setup -q
 
 %build
+# compile with full RELRO
+export CFLAGS="%{optflags} -pie -fpie"
+export LDFLAGS="-Wl,-z,relro,-z,now"
+
 %configure
 sed -i 's/-Werror/ /' Makefile
 make %{?_smp_mflags}


More information about the scm-commits mailing list