From 5896a4941d5d60598e3ad23a904a72c81501ba5f Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Sat, 24 Jun 2017 01:01:11 +0800 Subject: test for -pie linker flag as well, for Linux --- configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 5d792df..70ed1a7 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,15 @@ if test "$hardenbuild" -eq 1; then LDFLAGS="$LDFLAGS $TESTFLAGS" AC_LINK_IFELSE([AC_LANG_PROGRAM([])], [AC_MSG_NOTICE([Setting $TESTFLAGS])], - [AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ] + [ + LDFLAGS="$OLDLDFLAGS" + TESTFLAGS="-pie" + LDFLAGS="$LDFLAGS $TESTFLAGS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([])], + [AC_MSG_NOTICE([Setting $TESTFLAGS])], + [AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ] + ) + ] ) # readonly elf relocation sections (relro) OLDLDFLAGS="$LDFLAGS" -- cgit v1.2.3