From: Marcela Mašláňová Date: Tue, 15 Mar 2011 12:04:10 +0000 (+0100) Subject: Split relro and pie into two options. X-Git-Tag: cronie1.4.7~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a826fb6a7504dd40c8cee4b6cd183d5601eb8ac;p=cronie Split relro and pie into two options. --- diff --git a/configure.ac b/configure.ac index 1af3496..ab46d2e 100644 --- a/configure.ac +++ b/configure.ac @@ -121,8 +121,8 @@ if test "x$enable_pie" = xyes; then save_CFLAGS="$CFLAGS" save_LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS -fPIE -DPIE" - LDFLAGS="$LDFLAGS -pie -Wl,-z,relro -Wl,-z,now" - AC_CACHE_CHECK([whether compiler accepts -pie & relro], ac_cv_pie_fpie, + LDFLAGS="$LDFLAGS -pie" + AC_CACHE_CHECK([whether compiler accepts -pie], ac_cv_pie_fpie, [AC_TRY_LINK([], [], ac_cv_pie_fpie=yes, ac_cv_pie_fpie=no)]) if test $ac_cv_pie_fpie = no; then @@ -131,6 +131,13 @@ if test "x$enable_pie" = xyes; then fi fi +AC_ARG_ENABLE(relro,CRONIE_HELP_STRING(--enable-relro,Build cronie with relro flag)) +if test "x$enable_relro" = xyes; then + save_CFLAGS="$CFLAGS" + save_LDFLAGS="$LDFLAGS" + LDFLAGS="-Wl,-z,relro -Wl,-z,now" +fi + # Check whether user wants SELinux support SELINUX_MSG="no" LIBSELINUX=""