autoconf: add --enable-pie and --enable-relro
authorJeff Layton <jlayton@samba.org>
Mon, 9 Jul 2012 18:12:33 +0000 (14:12 -0400)
committerJeff Layton <jlayton@samba.org>
Tue, 10 Jul 2012 17:17:03 +0000 (13:17 -0400)
commit233e17db8ef7edba1fea660e076a03a56b0117d2
tree82e98a584a34735c39d56f46b56e51b08588c3a0
parenta8611e25d44211cd57a91dce4fe7d7a7ad7534d4
autoconf: add --enable-pie and --enable-relro

-pie and -fpie enable the building of position-independent executables,
and -Wl,-z,relro turns on read-only relocation support in gcc. These
options are important for security purposes to guard against possible
buffer overflows that lead to exploits.

Follow the example of samba here and enable these by default, but add
configure options that allow people to turn them off at build-time if
necessary.

We may also want to eventually add checks to ensure that the compiler
and linker understand these options, but I'll wait until we have some
evidence that it's needed before I expend the effort.

Reported-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Jeff Layton <jlayton@samba.org>
Makefile.am
configure.ac