837c7a8012
a few fixes. OBS-URL: https://build.opensuse.org/request/show/668736 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=450
43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
From 0ee72a15887b838d967c3b05070d5ad86f0d729a Mon Sep 17 00:00:00 2001
|
|
From: Bruce Rogers <brogers@suse.com>
|
|
Date: Fri, 25 Jan 2019 10:29:16 -0700
|
|
Subject: [PATCH] [build] Disable gcc address of packed member warning
|
|
|
|
GCC 9.0 introduces a new warning for using pointers to packed
|
|
structure and union members. ipxe code is replete with this usage,
|
|
partly because the architectures it is designed for handle unaligned
|
|
accesses. Therefore this warning is not very helpful and since the
|
|
default build considers warnings to be errors, needs to be disabled.
|
|
|
|
[BR: BSC#1121464]
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
|
---
|
|
src/Makefile.housekeeping | 11 +++++++++++
|
|
1 file changed, 11 insertions(+)
|
|
|
|
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
|
|
index f8334921..e7f1ece0 100644
|
|
--- a/src/Makefile.housekeeping
|
|
+++ b/src/Makefile.housekeeping
|
|
@@ -646,6 +646,17 @@ $(BIN)/.certificate.der.% : $(BIN)/.cert
|
|
CERT_ALL := $(foreach i,$(call seq,1,$(CERT_COUNT)),\
|
|
CERT ( $(i), \"$(word $(i),$(CERT_DERS))\" ))
|
|
|
|
+
|
|
+# GCC 9.0 introduces a new warning for using pointers to packed
|
|
+# structure and union members. ipxe code is replete with this usage,
|
|
+# partly because the architectures it is designed for handle unaligned
|
|
+# accesses. Therefore this warning is not very helpful and since the
|
|
+# default build considers warnings to be errors, needs to be disabled.
|
|
+#
|
|
+WNAOPM_TEST = $(CC) -Waddress-of-packed-member -x c -c /dev/null -o /dev/null \
|
|
+ >/dev/null 2>&1
|
|
+WNAOPM_FLAGS := $(shell $(WNAOPM_TEST) && $(ECHO) '-Wno-address-of-packed-member')
|
|
+WORKAROUND_CFLAGS += $(WNAOPM_FLAGS)
|
|
endif
|
|
|
|
certstore_DEPS += $(CERT_LIST) $(CERT_FILES) $(CERT_PEMS) $(CERT_DERS)
|
|
--
|
|
2.20.1
|
|
|