diff options
author | Michael Brown | 2019-07-22 15:51:28 +0200 |
---|---|---|
committer | Michael Brown | 2019-07-22 15:51:28 +0200 |
commit | a4f8c6e31f6c62522cfc633bbbffa81b22f9d6f3 (patch) | |
tree | b6c39c8a0450839720fe0f2295dbdf6e48ce5b9e /src/Makefile.housekeeping | |
parent | [build] Workaround compilation error with gcc 9.1 (diff) | |
download | ipxe-a4f8c6e31f6c62522cfc633bbbffa81b22f9d6f3.tar.gz ipxe-a4f8c6e31f6c62522cfc633bbbffa81b22f9d6f3.tar.xz ipxe-a4f8c6e31f6c62522cfc633bbbffa81b22f9d6f3.zip |
[build] Do not apply WORKAROUND_CFLAGS for host compiler
The WORKAROUND_CFLAGS list is constructed based on running tests on
the target compiler, and the results may not be valid for the host
compiler.
The only relevant workaround required for the host compiler is
-Wno-stringop-truncation, which is needed to avoid a spurious compiler
warning for a totally correct usage of strncpy() in util/elf2efi.c.
Duplicating the workaround tests for the host compiler is messy, as is
conditionally applying __attribute__((nonstring)). Fix instead by
disapplying WORKAROUND_CFLAGS for the host compiler, and using
memcpy() with an explicitly calculated length instead of strncpy() in
util/elf2efi.c.
Reported-by: Ignat Korchagin <ignat@cloudflare.com>
Reported-by: Christopher Clark <christopher.w.clark@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/Makefile.housekeeping')
-rw-r--r-- | src/Makefile.housekeeping | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index 4b09e81f..1b175b95 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -454,7 +454,7 @@ endif CFLAGS += $(WORKAROUND_CFLAGS) $(EXTRA_CFLAGS) ASFLAGS += $(WORKAROUND_ASFLAGS) $(EXTRA_ASFLAGS) LDFLAGS += $(WORKAROUND_LDFLAGS) $(EXTRA_LDFLAGS) -HOST_CFLAGS += $(WORKAROUND_CFLAGS) -O2 -g +HOST_CFLAGS += -O2 -g # Inhibit -Werror if NO_WERROR is specified on make command line # |