Packaging question about -Wformat-security on Rawhide

Dan Mashal dan.mashal at gmail.com
Tue Feb 4 04:31:23 UTC 2014


On Mon, Feb 3, 2014 at 8:16 PM, Michael Catanzaro <mcatanzaro at gnome.org> wrote:
> On Mon, 2014-02-03 at 19:42 -0700, Orion Poplawski wrote:
>> I'm not sure why the default -Wall is being
>> dropped from that line (it is on other tests).
>
> It's explicitly dropped on configure.ac:1265
>
>         dnl We enable -Wall later.
>         dnl If it's set after the warning CFLAGS in the compiler invocation, it
> counteracts the -Wno... flags.
>         dnl This leads to warnings we don't want.
>         CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
>
> Second-guessing the user's choice of compiler warnings is certainly
> "unconventional."
>
> Anyway, this from the build log looks bad too; hope it's the same issue:
>
> checking EXTERN.h usability... no
> checking EXTERN.h presence... yes
> configure: WARNING: EXTERN.h: present but cannot be compiled
> configure: WARNING: EXTERN.h:     check for missing prerequisite
> headers?
> configure: WARNING: EXTERN.h: see the Autoconf documentation
> configure: WARNING: EXTERN.h:     section "Present But Cannot Be
> Compiled"
> configure: WARNING: EXTERN.h: proceeding with the compiler's result
> configure: WARNING:     ## ------------------------------ ##
> configure: WARNING:     ## Report this to devel at pidgin.im ##
> configure: WARNING:     ## ------------------------------ ##
> checking for EXTERN.h... no


I've worked around the problem. by doing the following:

export CFLAGS="-O2 -g -pipe -Wall -Wformat -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -fstack-protector
-fstack-protector-all"


I think it's more of a problem with the rpm-redhat-config macro which
should have -Wformat in it (I could be wrong).

Anyways, doing one final build test before committing this.

Dan


More information about the devel mailing list