RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/ configure.ac

From: Anders F Björklund <afb@rpm5.org>
Date: Mon 28 Sep 2009 - 18:11:52 CEST
Message-Id: <432DE067-EE24-4ED3-9E61-0DFB453FD319@rpm5.org>
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
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.