Dario Faggioli
367937cadb
- Fix virtiofs crashing with glibc >= 2.35, due to rseq syscall (bsc#1196924) * Patches added: tools-virtiofsd-Add-rseq-syscall-to-the-.patch - Avoid warnings caused by a GCC 12 bug, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98503 (bsc#1197018) * Patches added: hw-i386-amd_iommu-Fix-maybe-uninitialize.patch Silence-GCC-12-spurious-warnings.patch Ignore-spurious-GCC-12-warning.patch OBS-URL: https://build.opensuse.org/request/show/964331 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=696
63 lines
2.3 KiB
Diff
63 lines
2.3 KiB
Diff
From: =?UTF-8?q?Martin=20Li=C5=A1ka?= <martin.liska@suse.com>
|
|
Date: Tue, 22 Mar 2022 10:52:19 +0100
|
|
Subject: Silence GCC 12 spurious warnings
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Git-commit: 0000000000000000000000000000000000000000
|
|
References: bsc#1197018
|
|
|
|
With GCC 12, build fails like this:
|
|
|
|
[ 6245s] inlined from 'memcpy_user' at
|
|
arch/x86/include/librm.h:155:2,
|
|
[ 6245s] inlined from 'copy_from_user' at
|
|
include/ipxe/uaccess.h:338:2,
|
|
[ 6245s] inlined from 'acpi_sx_zsdt' at core/acpi.c:217:3:
|
|
[ 6245s] arch/x86/include/bits/string.h:79:32: error: array subscript
|
|
'union <anonymous>[0]' is partly outside array bounds of 'union
|
|
<anonymous>[1]' [-Werror=array-bounds]
|
|
[ 6245s] 79 | dest_u->u32[0] = src_u->u32[0];
|
|
[ 6245s] | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
|
|
[ 6245s] core/acpi.c: In function 'acpi_sx_zsdt':
|
|
[ 6245s] core/acpi.c:191:11: note: object 'buf' of size 4
|
|
[ 6245s] 191 | } buf;
|
|
[ 6245s] | ^~~
|
|
|
|
Which is a false positive reported by GCC compiler:
|
|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98503
|
|
|
|
Silence the watning.
|
|
|
|
Signed-off-by: Martin Liška <martin.liska@suse.com>
|
|
Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
|
|
---
|
|
src/Makefile.housekeeping | 13 +++++++++++++
|
|
1 file changed, 13 insertions(+)
|
|
|
|
diff --git a/roms/ipxe/src/Makefile.housekeeping b/roms/ipxe/src/Makefile.housekeeping
|
|
index 36cfb950e014914232f254b7edbb..cad327d31dbe0bd69d956c32d28d 100644
|
|
--- a/roms/ipxe/src/Makefile.housekeeping
|
|
+++ b/roms/ipxe/src/Makefile.housekeeping
|
|
@@ -183,6 +183,19 @@ WNAPM_TEST = $(CC) -Wno-address-of-packed-member -x c -c /dev/null \
|
|
WNAPM_FLAGS := $(shell $(WNAPM_TEST) && \
|
|
$(ECHO) '-Wno-address-of-packed-member')
|
|
WORKAROUND_CFLAGS += $(WNAPM_FLAGS)
|
|
+
|
|
+# gcc 12.1 generates false positive warnings. Inhibit the warnings.
|
|
+WNAB_TEST = $(CC) -Wno-array-bounds -x c -c /dev/null \
|
|
+ -o /dev/null >/dev/null 2>&1
|
|
+WNAB_FLAGS := $(shell $(WNAB_TEST) && \
|
|
+ $(ECHO) '-Wno-array-bounds')
|
|
+WORKAROUND_CFLAGS += $(WNAB_FLAGS)
|
|
+
|
|
+WNDP_TEST = $(CC) -Wno-dangling-pointer-x c -c /dev/null \
|
|
+ -o /dev/null >/dev/null 2>&1
|
|
+WNDP_FLAGS := $(shell $(WNAB_TEST) && \
|
|
+ $(ECHO) '-Wno-dangling-pointer')
|
|
+WORKAROUND_CFLAGS += $(WNDP_FLAGS)
|
|
endif
|
|
|
|
# Some versions of gas choke on division operators, treating them as
|