Skip to content

Commit f46089b

Browse files
configure: add -Wformat to CFLAGS
Without -Wformat for -Wformat-security, gcc will complain: checking whether the C compiler accepts -Wformat-security... no configure: error: Cannot enable -Wformat-security, consider configuring with --disable-hardening Related to: tpm2-software#899 Signed-off-by: Bill Roberts <bill.c.roberts@gmail.com>
1 parent e39e5e0 commit f46089b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ AS_IF([test x"$enable_hardening" != xno], [
520520
AS_IF([test "x$ax_is_release" = "xno"], [add_hardened_c_flag([-Werror])])
521521
522522
add_hardened_c_flag([-Wformat])
523-
add_hardened_c_flag([-Wformat-security])
523+
add_hardened_c_flag([-Wformat -Wformat-security])
524524
add_hardened_c_flag([-Wstack-protector])
525525
add_hardened_c_flag([-fstack-protector-all])
526526
add_hardened_c_flag([-Wstrict-overflow=5])

0 commit comments

Comments
 (0)