configure: Fix -D_FORTIFY_SOURCE=2 check when CFLAGS contains -Wno-error
authorOmar Sandoval <osandov@fb.com>
Thu, 12 Dec 2019 00:23:27 +0000 (16:23 -0800)
committerMark Wielaard <mark@klomp.org>
Thu, 12 Dec 2019 11:08:51 +0000 (12:08 +0100)
commitc435a33811428ebad7b8d420821d0b8e10cd84d2
tree80918bbe939e54bd260c8ae0434ff037a2c07f32
parentef99c782042ea6f1d47b94a511dbf667b0d474cb
configure: Fix -D_FORTIFY_SOURCE=2 check when CFLAGS contains -Wno-error

If CFLAGS contains -Wno-error, then the check for -D_FORTIFY_SOURCE=2
won't fail when appropriate. E.g., compiling with:

  ./configure CFLAGS='-Wno-error -O0' &&

Results in a flood of "_FORTIFY_SOURCE requires compiling with
optimization (-O)" warnings.

Make sure we add -Werror after the user-defined CFLAGS.

Signed-off-by: Omar Sandoval <osandov@fb.com>
ChangeLog
configure.ac