diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-07-15 13:51:02 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-07-15 13:57:41 +0200 |
commit | 2c4093ebc396037d53b5087a528fa4c86a3cd096 (patch) | |
tree | 052f22fdba3be842e5f9aa1aa1c2a5c9cefdd68a /src/test/fuzz/crypto_chacha20_poly1305_aead.cpp | |
parent | 3d57015aa228f3504ce056243c8b8dfd74fd8c76 (diff) | |
parent | 6cef3652d143a1dddad1254cab0953561d24c1fa (diff) |
Merge #18882: build: fix -Wformat-security check when compiling with GCC
6cef3652d143a1dddad1254cab0953561d24c1fa build: fix -Wformat-security check when compiling with GCC (fanquake)
Pull request description:
GCC expects `-Wformat` to be passed with [`-Wformat-security`](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html), which means
when we test for it in configure it currently fails:
```bash
checking whether C++ compiler accepts -Wformat-security... no
...
configure:15907: checking whether C++ compiler accepts -Wformat-security
configure:15926: g++ -std=c++11 -c -g -O2 -Werror -Wformat-security conftest.cpp >&5
cc1plus: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]
cc1plus: all warnings being treated as errors
```
and never gets added to our CXX flags. Note that Clang does not have this requirement and the check is working correctly there.
The change in this PR is the simple fix, however we might want to consider using something like `-Wformat=2` in future, which in GCC is equivalent to `-Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k.` and similar [in Clang](https://clang.llvm.org/docs/DiagnosticsReference.html#wformat-2).
ACKs for top commit:
practicalswift:
ACK 6cef3652d143a1dddad1254cab0953561d24c1fa
laanwj:
ACK 6cef3652d143a1dddad1254cab0953561d24c1fa
Tree-SHA512: f9230d42af39f85ea9d2f55dbbebd2bae4740fe59b0da2e092af3ac9ef7e6799d3a4cf83eb64574c63982e5f6b14e226d44c84fa0335255d65c9947d86a1ea38
Diffstat (limited to 'src/test/fuzz/crypto_chacha20_poly1305_aead.cpp')
0 files changed, 0 insertions, 0 deletions