# Copyright 2004-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit toolchain-funcs DESCRIPTION="Library for build EFI Applications" HOMEPAGE="https://sourceforge.net/projects/gnu-efi/" SRC_URI="https://downloads.sourceforge.net/gnu-efi/${P}.tar.bz2" # inc/, lib/ dirs (README.efilib) # - BSD-2 # gnuefi dir: # - BSD (3-cluase): crt0-efi-ia32.S # - GPL-2+ : setjmp_ia32.S LICENSE="GPL-2+ BSD BSD-2" SLOT="0" KEYWORDS="-* ~amd64 ~arm ~arm64 ~ia64 ~riscv ~x86" IUSE="abi_x86_32 abi_x86_64 custom-cflags" REQUIRED_USE=" amd64? ( || ( abi_x86_32 abi_x86_64 ) ) x86? ( || ( abi_x86_32 abi_x86_64 ) ) " # for ld.bfd and objcopy BDEPEND="sys-devel/binutils" # These objects get run early boot (i.e. not inside of Linux), # so doing these QA checks on them doesn't make sense. QA_EXECSTACK="usr/*/lib*efi.a:* usr/*/crt*.o" RESTRICT="strip" PATCHES=( "${FILESDIR}"/${P}-clang.patch "${FILESDIR}"/${PN}-3.0.18-remove-linux-headers.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-/}" LANG=C LC_ALL=C "${OBJCOPY}" --help | grep -q '\