Bug 9541 - Resolve string formatting issues in cmake
Summary: Resolve string formatting issues in cmake
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.3 M4
Assignee: Jussi Kukkonen
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-04-28 10:36 UTC by Joshua Lock
Modified: 2017-03-20 07:50 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)