Bug 59621 - configure check for -Wformat-security is broken
Summary: configure check for -Wformat-security is broken
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
Depends on:
Reported: 2013-01-20 13:28 UTC by Christian Persch (GNOME)
Modified: 2013-01-22 17:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Christian Persch (GNOME) 2013-01-20 13:28:08 UTC
The configure check for -Wformat-security is broken because it checks the flags one-by-one, but -Wformat-security only works together with -Wformat:

configure:15548: checking if gcc -std=gnu99 supports flag -Wformat-security in envvar CFLAGS
configure:15559: gcc -std=gnu99 -c -Werror -Wformat-security  conftest.c >&5
cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]
cc1: all warnings being treated as errors
configure:15559: $? = 1

I think this broke in commit eb2e280f9c59b66965c9316eadc4c113a13ca744 ; prior to that commit, the flags were appended to CFLAGS directly and there is a check for -Wformat=2 before the -Wformat-security check.

systemd is git master, gcc is gcc (GCC) 4.7.2 20120921 (Red Hat 4.7.2-2)
Comment 1 Kay Sievers 2013-01-22 17:29:38 UTC
Just combined the format options into one argument for now. Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.