[Bug 1219733] New: qemu ipxe roms will stop compiling with binutils update

https://bugzilla.suse.com/show_bug.cgi?id=1219733 Bug ID: 1219733 Summary: qemu ipxe roms will stop compiling with binutils update Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Virtualization:Tools Assignee: virt-bugs@suse.de Reporter: matz@suse.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- We're preparing a binutils update to version 2.42 in openSUSE:Factory:Staging:A ( https://build.opensuse.org/request/show/1144349 ), and qemu-ipxe assembly sources hit a problem there: [ 3712s] gcc -E -DARCH=x86_64 -DPLATFORM=efi -DSECUREBOOT=0 -fstrength-reduce -fomit-frame-pointer -falign-jumps=1 -falign-loops=1 -falign-functions=1 -m64 -mno-mmx -mno-sse -fshort-wchar -Ui386 -Ulinux -DNVALGRIND -fpie -mno-red-zone -fstack-protector-strong -mstack-protector-guard=global -Iinclude -I. -Iarch/x86/include -Iarch/x86_64/include -Iarch/x86_64/include/efi -Os -g -ffreestanding -fcommon -Wall -W -Wformat-nonliteral -fno-dwarf2-cfi-asm -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-address -Wno-stringop-truncation -Wno-address-of-packed-member -Wno-array-bounds -Wno-dangling-pointer -Werror -ffunction-sections -include include/compiler.h -DASM_TCHAR='@' -DASM_TCHAR_OPS='@' -DCONFIG=qemu -DLOCAL_CONFIG=qemu -DASSEMBLY -DOBJECT=stack arch/x86/core/stack.S | as --64 --divide --fatal-warnings -o bin-x86_64-efi/stack.o [ 3712s] arch/x86/core/stack.S: Assembler messages: [ 3712s] arch/x86/core/stack.S:3: Warning: 64bit mode not supported on `i386' (consider swapping .arch and .code directives). [ 3712s] {standard input}: Error: 1 warning, treating warnings as errors The problem (see below) is newly diagnosed, from upstream it's an error. I made binutils only emit a warning for this (as also other packages hit this), but unfortunately qemu iPXE sources are built with --fatal-warnings, so the demotion to warnings doesn't help here. The problem is the following. Assembly files using the '.arch i386' directive need to have their code-size set _beforehand_ to either 32bit or 16bit. The '--64' cmdline argument sets it to 64bit resulting in the error message. You cannot get rid of this cmdline argument (or replace it with --32) because then a different kind of ELF object file would be generated. So, what needs to happen is for such code: .arch i386 ... other directives ... .code16 # or .code32 to move (or add) the .codeXX directive in front of the .arch directive. I will momentarily attach a patch to do that in all files from the roms/ipxe subdir. I've verified that this fixes the error message and lets qemu 8.2.0 build with the new binutils. Tumbleweed (or at least the Staging:A) still uses qemu 8.1.something, but as the iPXE repo gets virtually no changes at all the patch should also apply to that tree as is. (The build-test happens in home:matz2:branches:Virtualization/qemu/15.5 ) Can I convince someone from the qemu team to please integrate this patch into the qemu package for at least tumbleweed? -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1219733 https://bugzilla.suse.com/show_bug.cgi?id=1219733#c1 --- Comment #1 from Michael Matz <matz@suse.com> --- Created attachment 872588 --> https://bugzilla.suse.com/attachment.cgi?id=872588&action=edit patch for assembly files This is the patch fixing things for new binutils -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1219733 Michael Matz <matz@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dfaggioli@suse.com -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1219733 https://bugzilla.suse.com/show_bug.cgi?id=1219733#c3 --- Comment #3 from Michael Matz <matz@suse.com> --- Huh, after creating this bug report I became aware of https://bugzilla.suse.com/show_bug.cgi?id=1219722 about the same issue refering an upstream iPXE commit. So maybe use rather that. -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1219733 Charles Arnold <carnold@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|virt-bugs@suse.de |kvm-bugs@suse.de -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1219733 Dominique Leuenberger <dimstar@opensuse.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dimstar@opensuse.org, | |li.zhang@suse.com -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1219733 https://bugzilla.suse.com/show_bug.cgi?id=1219733#c5 --- Comment #5 from Dario Faggioli <dfaggioli@suse.com> --- (In reply to Michael Matz from comment #3)
Huh, after creating this bug report I became aware of https://bugzilla.suse.com/show_bug.cgi?id=1219722 about the same issue refering an upstream iPXE commit. So maybe use rather that.
Working on this here: - https://github.com/openSUSE/qemu/pull/54 - https://build.opensuse.org/package/show/Virtualization:Staging:PRs:openSUSE:... -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1219733 https://bugzilla.suse.com/show_bug.cgi?id=1219733#c8 Dario Faggioli <dfaggioli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matz@suse.com Flags| |needinfo?(matz@suse.com) --- Comment #8 from Dario Faggioli <dfaggioli@suse.com> --- Hey Michael, the fix should be in Factory(although, maybe not released in an actual TW snapshot yet... I didn't check). Let me know if you have a chance to test it and if things now work -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1219733 https://bugzilla.suse.com/show_bug.cgi?id=1219733#c9 --- Comment #9 from Dominique Leuenberger <dimstar@opensuse.org> --- (In reply to Dario Faggioli from comment #8)
Hey Michael, the fix should be in Factory(although, maybe not released in an actual TW snapshot yet... I didn't check). Let me know if you have a chance to test it and if things now work
Was checked in to snapshot 0418 (switching GCC libs to gcc14 - will take a while to settle the builds) -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1219733 https://bugzilla.suse.com/show_bug.cgi?id=1219733#c11 Michael Matz <matz@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(matz@suse.com) | --- Comment #11 from Michael Matz <matz@suse.com> --- Factory and friends look good from binutils plus qemu perspective. So, you can close this whenever you please :-) Thanks Dario. -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1219733 https://bugzilla.suse.com/show_bug.cgi?id=1219733#c13 Dario Faggioli <dfaggioli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #13 from Dario Faggioli <dfaggioli@suse.com> --- As per comment 11. Thanks everyone! -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1219733 Dario Faggioli <dfaggioli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.suse.com/s | |how_bug.cgi?id=1219722 -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1219733 https://bugzilla.suse.com/show_bug.cgi?id=1219733#c18 --- Comment #18 from Maintenance Automation <maint-coord+maintenance-robot@suse.de> --- SUSE-SU-2025:0692-1: An update that solves three vulnerabilities and has two security fixes can now be installed. URL: https://www.suse.com/support/update/announcement/2025/suse-su-20250692-1 Category: security (important) Bug References: 1219722, 1219733, 1222845, 1229007, 1230915 CVE References: CVE-2024-3447, CVE-2024-7409, CVE-2024-8612 Maintenance Incident: [SUSE:Maintenance:37352](https://smelt.suse.de/incident/37352/) Sources used: openSUSE Leap 15.3 (src): qemu-testsuite-5.2.0-150300.135.1, qemu-5.2.0-150300.135.1, qemu-linux-user-5.2.0-150300.135.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): qemu-5.2.0-150300.135.1 SUSE Linux Enterprise Server 15 SP3 LTSS (src): qemu-5.2.0-150300.135.1 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): qemu-5.2.0-150300.135.1 SUSE Enterprise Storage 7.1 (src): qemu-5.2.0-150300.135.1 SUSE Linux Enterprise Micro 5.1 (src): qemu-5.2.0-150300.135.1 SUSE Linux Enterprise Micro 5.2 (src): qemu-5.2.0-150300.135.1 SUSE Linux Enterprise Micro for Rancher 5.2 (src): qemu-5.2.0-150300.135.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com