build-sys: Enable optional hardening flags

With the configure option --enable-harden-flags the CFLAGS and
LDFLAGS are manipulated to provide some hardening protection
to the binaries.

psmisc uses these flags on by default with no troubles, however
it doesn't have a library in it either.

References:
  https://wiki.debian.org/Hardening
This commit is contained in:
Craig Small
2016-04-25 17:07:22 +10:00
parent 1e6452fe65
commit 9c877bf636
2 changed files with 27 additions and 1 deletions

View File

@@ -7,7 +7,10 @@ AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
-DLOCALEDIR=\"$(localedir)\"
-DLOCALEDIR=\"$(localedir)\" \
@HARDEN_CFLAGS@
AM_LDFLAGS = @HARDEN_LDFLAGS@
PACKAGE_VERSION = @PACKAGE_VERSION@