Bug 9541

Summary: Resolve string formatting issues in cmake
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Joshua Lock <joshuagloe>
Component: devtools / tool chainAssignee: Jussi Kukkonen <jku>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: elena.reshetova, jku, meta.mr.watcher, meta.watcher
Version: 2.2   
Target Milestone: 2.3 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Joshua Lock 2016-04-28 10:36:57 UTC
cmake fails to compile with compiler flags which elevate common string formatting issues into an error (-Wformat -Wformat-security -Werror=format-security).
Comment 1 Joshua Lock 2017-02-07 13:20:48 UTC
Setting assignee to recipe maintainer. Alexander, please update estimate, target, etc. to suit your workload.
Comment 2 Alexander Kanavin 2017-02-07 13:23:46 UTC
Maybe before 2.3 is out. 100% busy with dnf now.
Comment 3 Joshua Lock 2017-02-07 13:25:28 UTC
Note: to observe the failures comment out the recipe's SECURITY_STRINGFORMAT entry in security_cflags.inc and build the recipe with a configuration that utilises security_cflags (i.e. the poky-lsb distro).
Comment 4 Jussi Kukkonen 2017-03-16 12:29:02 UTC
(In reply to comment #3)
> Note: to observe the failures comment out the recipe's SECURITY_STRINGFORMAT
> entry in security_cflags.inc and build the recipe with a configuration that
> utilises security_cflags (i.e. the poky-lsb distro).

I'll take this: They drop "-Wformat" on purpose (because it's a test for that) and should drop -Wformat-security as well.
Comment 5 Jussi Kukkonen 2017-03-20 07:49:44 UTC
commit 6dcf5c6e6eadd0a572f9aa61783b54ccd39f0378
Author: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date:   Thu Mar 16 16:30:23 2017 +0200

    cmake: Backport fix to enable -Wformat-security
    
    Backport build fix that removes -Wformat-security for specific tests.
    Enable "-Wformat-security" for cmake in security_flags.inc.
    
    (From OE-Core rev: b00f9c77ebd211578ba133c28abcbc5752305e25)