From 02e4f7c252b043dfb7f4a0e3af05b129781aae7e Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 1 Aug 2012 00:15:34 +0200 Subject: [PATCH] configure.ac: Cleanup hardening flags. --- configure.ac | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index db5285c..e2f5480 100644 --- a/configure.ac +++ b/configure.ac @@ -28,12 +28,10 @@ if test "x$GCC" = xyes; then CFLAGS="-std=c89 -pedantic -Wall -Wextra -Werror $CFLAGS" CFLAGS="-Wno-error=int-to-pointer-cast $CFLAGS" CPPFLAGS="-D_XOPEN_SOURCE=500 $CPPFLAGS" - # Additional security flags. - CFLAGS="$CFLAGS -Wformat -Wformat-security -Werror=format-security" - CFLAGS="$CFLAGS -fstack-protector-all -Wstack-protector" - CFLAGS="$CFLAGS --param ssp-buffer-size=1" - CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fPIE" - LDFLAGS="$LDFLAGS -Wl,-z,relro -Wl,-z,now -fPIE -pie" + # Additional hardening flags. + CFLAGS="-fPIE -fstack-protector-all --param=ssp-buffer-size=1 -Wformat -Werror=format-security $CFLAGS" + CPPFLAGS="-D_FORTIFY_SOURCE=2 $CPPFLAGS" + LDFLAGS="-fPIE -pie -Wl,-z,relro -Wl,-z,now $LDFLAGS" fi AC_CHECK_LIB([pthread], [pthread_create], -- 2.45.2