Summary: | sys-boot/grub-2.12-r2 fails to build on x32 (grub/efi/api.h:1117:3: error: X32 does not support ‘ms_abi’ attribute) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nick Bowler <nbowler> |
Component: | Current packages | Assignee: | Mike Gilbert <floppym> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | base-system, immoloism, nbowler, steve |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 393673 | ||
Attachments: |
build log
Patch |
Description
Nick Bowler
2024-03-25 16:06:29 UTC
Created attachment 888559 [details]
build log
x32 is pretty much dead on Gentoo. Please work with upstream to resolve this if desired. Note that I am happy to apply a patch that has been submitted upstream first. FWIW, I'm still working on x32, so it's not entirely dead. Regarding this bug though, I don't believe it is "FIXED UPSTREAM". The specific code in question *must* be built for -m64 with ms_abi since it needs to meet the efi-64 ABI. Likewise efi-32 support requires -m32. Fixing this is on my TODO list. (In reply to Steven Newbury from comment #4) RESOLVED UPSTREAM just means you should work with upstream to address the issue. Just to be clear, if I patch the build system to use -m64/-m32 for the firmware parts I'll need to get it accepted upstream before a patch can be accepted for this bug? (In reply to Steven Newbury from comment #6) I am happy to apply patches if they have been submitted upstream. They do not necessarily need to be merged yet. Note that if the changes are too complex for me to understand, I may choose to wait for upstream to review them. However, I doubt that would be the case for a simple flags change in the build system. I can also offer feedback on your changes before you send them upstream if desired. This is a little odd... TARGET_CFLAGS get correctly set with -m64 in the build for the efi-64 components, but grub-core seems to need it too, but just uses the normal host CFLAGS from the environment. All the utility programs obviously build fine with CHOST. It will take some time to unravel it. However, an easy workaround for x32 could be to just use -m32/-m64 for the host CFLAGS for 32 and 64 bit grub variants. I've tested this, and it does emerge fine. None of the utility programs link to anything more than the ld-linux, linux-vdso, and libc anyway. It's not like it's a component which benefits from x32 in any way. *** Bug 945484 has been marked as a duplicate of this bug. *** Working on a patch. Created attachment 912891 [details, diff]
Patch
Please give this a spin.
(In reply to Mike Gilbert from comment #11) > Created attachment 912891 [details, diff] [details, diff] > Patch > > Please give this a spin. Compiles and tested booting on BIOS booting. (In reply to Mike Gilbert from comment #11) > Created attachment 912891 [details, diff] [details, diff] > Patch > > Please give this a spin. Thanks for looking at this! With this patch, grub-2.12-r5 emerges OK, grub-install OK, UEFI boot OK. |