Pinto Elia wrote:
> Log:
> rework security CFLAGS without autofu. Add also some other
> -AC_ARG_ENABLE(build-optimization,
> - AS_HELP_STRING([--enable-build-optimization], [build RPM
> instrumented for extra optimization/security (GCC only)]), [dnl
> - if test ".$enableval" = .yes; then
> - if test ".`$CC --version 2>&1 | grep 'GCC'`" != .; then
> - dnl # GNU GCC (usually "gcc")
> - CFLAGS="$CFLAGS -fno-delete-null-pointer-checks"
> - fi
> - fi
> -])
> +dnl # build RPM instrumented for extra optimization/security
> (GCC only)
> +dnl # -fno-delete-null-pointer as the kernel does http://
> patchwork.kernel.org/patch/36060/
> +if test ".`$CC --version 2>&1 | grep 'GCC'`" != .; then
> +dnl # GNU GCC (usually "gcc")
> + CFLAGS="$CFLAGS -fno-delete-null-pointer-checks -
> D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector"
> +fi
If you absolutely *must* hack CFLAGS inside configure,
as opposed to outside, it was better with the enablers.
cc1: error: unrecognized command line option "-fstack-protector"
--anders
Received on Mon Sep 28 18:28:16 2009