HomeFreeBSD

boot: Fall back to objcopy if usable for EFI components

Description

boot: Fall back to objcopy if usable for EFI components

In commit b885643b63e4 ("boot: Always use ELF Tool Chain elfcopy for EFI
builds") I switched to using elfcopy for EFI_OBJCOPY, as llvm-objcopy
lacks support for translating ELF objects to PE32+. This broke building
on older releases with WITHOUT_ELFTOOLCHAIN_BOOTSTRAP set, as the host
did not provide elfcopy and it was not built as a bootstrap tool.

Now, if we're not bootstrapping ELF Tool Chain we check the output of
${OBJCOPY} --version, and will use that ${OBJCOPY} as long as it is
not llvm-objcopy.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49722

Details

Provenance
emasteAuthored on Mar 25 2025, 1:34 PM
Reviewer
imp
Differential Revision
D49722: boot: Only use elfcopy if in-tree toolchain was built
Parents
rG3620d70511dc: OpenSSH: Fix logic error in DisableForwarding option
Branches
Unknown
Tags
Unknown