Bug 1496272

Summary: Perl's ccflags do not include a -Wformat option
Product: [Fedora] Fedora Reporter: Scott Baker <scott>
Component: perlAssignee: Jitka Plesnikova <jplesnik>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: alexl, caillon+fedoraproject, iarnell, jplesnik, kasal, mbarnes, perl-devel, ppisar, psabata, rc040203, rhughes, sandmann, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-27 11:56:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Scott Baker 2017-09-26 21:09:33 UTC
Description of problem:

Perl's ccflags do not include a -Wformat option. Attempting to compile Vim with Perl support I ran in to this bug: https://github.com/vim/vim/issues/2068

How reproducible:
Easily

Steps to Reproduce:
1. Run: perl -V:ccflags
2. Note the output includes "-Werror=format-security" but no corresponding -Wformat

Actual results:
bakers@yellow(~/github/vim)
:perl -V:ccflags
ccflags='-D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64';

Expected results:
Some type of -Wformat would be included

Additional info:
Vim calls ExtUtils::Embed to get the cflags and it is also incorrect (I assume they're closely related).

bakers@yellow(~/github/vim)
:perl -Mlib=src/ -MExtUtils::Embed -e 'ccflags;perl_inc;print"\n"'
 -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib64/perl5/CORE

Comment 1 Jitka Plesnikova 2017-09-27 07:25:25 UTC
I look at man page and there is mention "-Wformat is enabled by -Wall."

-Wall is included in ccflags.