Bug 1219722

Summary: QEMU: [ipxe] Apply patch to build with newer Binutils
Product: [openSUSE] openSUSE Tumbleweed Reporter: Tobias Burnus <burnus>
Component: KVMAssignee: E-mail List <kvm-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: dfaggioli, matz
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
See Also: https://bugzilla.suse.com/show_bug.cgi?id=1219733
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Tobias Burnus 2024-02-08 08:59:58 UTC
Namely, a patch like

https://gitlab.com/qemu-project/ipxe/-/commit/6ca597eee9f95b846a3c2dc1231e63cfc02272c1

--------<cut>-------------
[build] Fix building with newer binutils

Newer versions of the GNU assembler (observed with binutils 2.41) will
complain about the ".arch i386" in files assembled with "as --64",
with the message "Error: 64bit mode not supported on 'i386'".

In files such as stack.S that contain no instructions to be assembled,
the ".arch i386" is redundant and may be removed entirely.

In the remaining files, fix by moving ".arch i386" below the relevant
".code16" or ".code32" directive, so that the assembler is no longer
expecting 64-bit instructions to be used by the time that the ".arch
i386" directive is encountered.
-----------</cut>--------------------------------------

This is visible the builds run for https://build.opensuse.org/request/show/1144349 - namely:

[ 2881s] arch/x86/core/patch_cf.S: Assembler messages:
[ 2881s] arch/x86/core/patch_cf.S:26: Warning: 64bit mode not supported on `i386' (consider swapping .arch and .code directives).
[ 2881s] {standard input}: Error: 1 warning, treating warnings as errors
Comment 1 Tobias Burnus 2024-02-08 09:49:14 UTC
Cross ref:
- ipxe git: https://github.com/ipxe/ipxe/commit/6ca597eee9f95b846a3c2dc1231e63cfc02272c1
- Original bug report: https://github.com/ipxe/ipxe/discussions/1121
Comment 2 Michael Matz 2024-02-08 13:37:38 UTC
Heh, this crossed lines, I had made a patch already, before looking at upstream.
( https://bugzilla.suse.com/show_bug.cgi?id=1219733 )
It's obviously nicer to just cherry-pick the upstream variant.
Comment 3 Tobias Burnus 2024-02-14 16:15:24 UTC
BTW: When updating QEMU with this fix for binutils, consider also to
   update QEMU to 8.2.1 (Jan 29th 2024)
(currently: 8.2.0, 19-Dec-2023).

It won't help with this issue but still...

Cf. https://www.qemu.org/download/ and fixed issues https://gitlab.com/qemu-project/qemu/-/issues/?state=all&milestone_title=8.2.1 and changes shown at https://gitlab.com/qemu-project/qemu/-/commits/v8.2.1 when stopping to read at 'v8.2.0'.
Comment 4 Dario Faggioli 2024-02-14 17:56:22 UTC
(In reply to Tobias Burnus from comment #3)
> BTW: When updating QEMU with this fix for binutils, consider also to
>    update QEMU to 8.2.1 (Jan 29th 2024)
> (currently: 8.2.0, 19-Dec-2023).
> 
Well, sure, I know that 8.2.1 is out. In fact, as QEMU package maintainer, I do track upstrem development and try to keep our packages as updated as I can.

So, yes, I will push a package update for QEMU 8.2.1 (and to later stable releases, when they'll be out), as soon as it will be ready.
Comment 5 Tobias Burnus 2024-02-16 09:38:13 UTC
Thanks for adding the required changes for this bug to:
  https://github.com/openSUSE/qemu/https://github.com/openSUSE/qemu/commit/5e2cb6ec31d05d2ec64185b826695a55c94d488e  :-)
Comment 6 OBSbugzilla Bot 2024-02-17 00:55:02 UTC
This is an autogenerated message for OBS integration:
This bug (1219722) was mentioned in
https://build.opensuse.org/request/show/1147249 Factory / qemu
Comment 10 Dario Faggioli 2024-02-28 15:27:07 UTC
Fixed, as the one it was duplicating (bug 1219733)