iPXE - Open Source Boot Firmware

[build] Disable gcc stringop-truncation warnings
authorBruce Rogers <brogers@suse.com>
Tue, 24 Apr 2018 14:47:32 +0000 (08:47 -0600)
committerMichael Brown <mcb30@ipxe.org>
Sat, 7 Jul 2018 18:46:16 +0000 (19:46 +0100)
commit8ed4e3049f5fcb3a0b32f5190940e78c61654cff
treed7fc30f501b05feeb375ba24a4f86d340fc7d4bc
parente7f67d5a4c6e9f06aa7a9db1b4245f5e16f00bb2
[build] Disable gcc stringop-truncation warnings

The gcc 8 compiler introduces a warning for certain string
manipulation functions, flagging usages which _may_ not be intended.
An audit of the iPXE sources indicates all usages of strncat and
strncpy are as intended, so the warnings currently issued are not
helpful, especially if warnings are considered errors.

Fix by detecting gcc's support for -Wno-stringop-truncation and, if
detected, using that option to avoid the warning.

Signed-off-by: Bruce Rogers <brogers@suse.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Also-fixed-by: Christian Hesse <list@eworm.de>
Also-fixed-by: Roman Kagan <rkagan@virtuozzo.com>
Also-fixed-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Also-fixed-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/Makefile.housekeeping