From d25b3f6cfcf28716f030b7a7fea3206a5fc4dffd Mon Sep 17 00:00:00 2001 From: Maide Date: Thu, 26 Sep 2024 13:00:25 -0400 Subject: sys-boot/gnu-efi: Fix compile when LLVM `binutils-plugin` USE flag is set LLVM's objcopy is being used instead of the GNU version when `binutils-plugin` is enabled. I tried to avoid this by explictly using the GNU path for objcopy when our initial test fails. Let me know if this isn't acceptable, or if you need me to open a new bug for this. It was basically the same repo as the linked issue, but the fix did not work, as `which objcopy` returns '/usr/lib/llvm/18/bin/objcopy' instead of '/usr/bin/objcopy'. Bug: https://bugs.gentoo.org/931792 Signed-off-by: Maide Closes: https://github.com/gentoo/gentoo/pull/38785 Signed-off-by: Viorel Munteanu --- sys-boot/gnu-efi/gnu-efi-3.0.18-r5.ebuild | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sys-boot/gnu-efi/gnu-efi-3.0.18-r5.ebuild') diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.18-r5.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.18-r5.ebuild index adfad0c0f98e..d3d5d12d57b7 100644 --- a/sys-boot/gnu-efi/gnu-efi-3.0.18-r5.ebuild +++ b/sys-boot/gnu-efi/gnu-efi-3.0.18-r5.ebuild @@ -42,6 +42,16 @@ check_and_set_objcopy() { # llvm-objcopy does not support EFI target, try to use binutils objcopy or fail tc-export OBJCOPY OBJCOPY="${OBJCOPY/llvm-/}" + # Test OBJCOPY to see if it supports EFI targets, and return if it does + LC_ALL=C "${OBJCOPY}" --help | grep -q '\