Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937610 - sys-firmware/edk2-ovmf-202405: fails to build with >=sys-devel/binutils-2.41 on hardened systems
Summary: sys-firmware/edk2-ovmf-202405: fails to build with >=sys-devel/binutils-2.41 ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Virtualization Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: binutils-2.41
  Show dependency tree
 
Reported: 2024-08-09 09:36 UTC by Attila Tóth
Modified: 2024-10-10 16:33 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
edk2-ovmf-202405-binutils-2.41-textrels.patch (edk2-ovmf-202405-binutils-2.41-textrels.patch,2.74 KB, patch)
2024-08-09 09:39 UTC, Attila Tóth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Tóth 2024-08-09 09:36:48 UTC
It has been patched on Gentoo for previous versions, see bug 913110.
While edk2-ovmf-202202-lld-textrels.patch got into upstreams, the other patch (edk2-ovmf-202202-binutils-2.41-textrels.patch) is missing. Since that one does not apply cleanly, I've created an updated patch.

Reproducible: Always
Comment 1 Attila Tóth 2024-08-09 09:39:43 UTC
Created attachment 899664 [details, diff]
edk2-ovmf-202405-binutils-2.41-textrels.patch

Updated patch solves the issue for me.
Comment 2 Another Mortal 2024-08-10 12:10:10 UTC
Thanks for the patch!  Build passed.
Comment 3 Alex D-Bug 2024-09-03 22:51:25 UTC
Awesome!This fixes build for me on handened with binutils-2.42. Also, with updated path it works for xen-tools (which has same problem with ovmf). Thanks!
Comment 4 Mattias Merilai 2024-09-17 09:14:39 UTC
+1
Comment 5 James Le Cuirot gentoo-dev 2024-09-25 11:26:03 UTC
I'm confused by this for two reasons. The patch only changes the GCC48 and GCC49 toolchain config, but we use GCC5. We also set these flags in environment variables anyway. I'll double check whether these flags are appearing with my new updated ebuild.
Comment 6 James Le Cuirot gentoo-dev 2024-09-25 16:24:10 UTC
I can't see the flags at all. It seems the environment variables don't do anything. These are not regular build scripts. I now see the patch works because the GCC49 config is included in GCC5. Patch it is then.
Comment 7 Attila Tóth 2024-09-26 10:16:12 UTC
(In reply to James Le Cuirot from comment #6)
> I can't see the flags at all. It seems the environment variables don't do
> anything. These are not regular build scripts. I now see the patch works
> because the GCC49 config is included in GCC5. Patch it is then.

It is also not clear for me exactly how it happens, but it works for me. It would be good to have a deeper understanding.
Comment 8 Larry the Git Cow gentoo-dev 2024-10-10 16:33:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94a911f6b4a29c7187ee9a60a96239a2ee77b869

commit 94a911f6b4a29c7187ee9a60a96239a2ee77b869
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2024-09-25 16:39:52 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2024-10-10 16:29:33 +0000

    sys-firmware/edk2: Apply missing -Werror and hardened patches to 202405
    
    Closes: https://bugs.gentoo.org/937610
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 sys-firmware/edk2/edk2-202405.ebuild               |  5 ++
 .../files/edk2-202408-binutils-2.41-textrels.patch | 13 +++++
 sys-firmware/edk2/files/edk2-202408-werror.patch   | 56 ++++++++++++++++++++++
 3 files changed, 74 insertions(+)