diff --git a/app-crypt/efitools/efitools-1.9.2-r1.ebuild b/app-crypt/efitools/efitools-1.9.2-r1.ebuild index 19832a9ca84a..dfc140075e16 100644 --- a/app-crypt/efitools/efitools-1.9.2-r1.ebuild +++ b/app-crypt/efitools/efitools-1.9.2-r1.ebuild @@ -26,6 +26,7 @@ BDEPEND=" app-crypt/sbsigntools dev-perl/File-Slurp sys-apps/help2man + sys-devel/binutils virtual/pkgconfig" PATCHES=( @@ -34,6 +35,35 @@ PATCHES=( "${FILESDIR}"/1.9.2-gcc15.patch ) +check_and_set_objcopy() { + if [[ ${MERGE_TYPE} != "binary" ]]; then + # bug #931792 + # 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 '\