Packaging question about -Wformat-security on Rawhide

Dan Mashal dan.mashal at gmail.com
Tue Feb 4 03:28:45 UTC 2014


On Mon, Feb 3, 2014 at 6:42 PM, Orion Poplawski <orion at cora.nwra.com> wrote:
> The crux is that you need with -Wall or -Wformat as well on the compile
> line test for perl.h.  I'm not sure why the default -Wall is being
> dropped from that line (it is on other tests).  You might work around it
> by explicitly adding -Wformat.

Yes, configuring with the following line:

"./configure '--build=x86_64-redhat-linux-gnu'
'--host=x86_64-redhat-linux-gnu' '--program-prefix='
'--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include'
'--libdir=/usr/lib64' '--libexecdir=/usr/libexec'
'--localstatedir=/var' '--sharedstatedir=/var/lib'
'--mandir=/usr/share/man' '--infodir=/usr/share/info'
'--enable-gnutls=no' '--enable-nss=yes' '--enable-cyrus-sasl'
'--enable-tcl' '--enable-tk' '--disable-schemas-install'
'build_alias=x86_64-redhat-linux-gnu'
'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall
-Werror=format-security -Wformat -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches  -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro '
'PKG_CONFIG_PATH=%{_PKG_CONFIG_PATH}:/usr/lib64/pkgconfig:/usr/share/pkgconfig'"

Works.


Can we change the macro from

"%__global_cflags        -O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches %{_hardened_cflags}"

to

"%__global_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 %{_hardened_cflags}"

?

Dan


More information about the devel mailing list