Page MenuHomeFreeBSD

Makefile.inc1: Rework ELF Tool Chain bootstrapping
ClosedPublic

Authored by emaste on Mar 25 2025, 2:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 14, 10:53 PM
Unknown Object (File)
Wed, Apr 9, 4:02 PM
Unknown Object (File)
Wed, Apr 9, 4:02 PM
Unknown Object (File)
Wed, Apr 9, 4:02 PM
Unknown Object (File)
Wed, Apr 9, 4:02 PM
Unknown Object (File)
Wed, Apr 9, 8:19 AM
Unknown Object (File)
Mon, Apr 7, 9:25 PM
Unknown Object (File)
Mon, Apr 7, 9:25 PM
Subscribers
None

Details

Summary
Remove additional conditions and bootstrap elfctl, elfdump, and elfcopy
(aka objdump) if ELFTOOLCHAIN_BOOTSTRAP is true.  The first two are
bespoke tools that won't exist in an external GNU or LLVM binutils, and
elfcopy is also not provided by that name.

This should fix GCC CI builds, which was skipping the elfcopy build
because of the ${TARGET_ARCH} != ${MACHINE_ARCH} condition.

Reported by:    olce
Fixes: b885643b63e4 ("boot: Always use ELF Tool Chain elfcopy for EFI builds")
Sponsored by:   The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste created this revision.

Seems fine conceptually, a couple comments.

Makefile.inc1
2914

I wonder if this comment should mention elfctl since it has other uses (I should bring over ELF_FEATURES from CheriBSD).

2922

I wonder if we should change this guard (maybe ${XNM}) given that we don't actually use AS any more.

This revision is now accepted and ready to land.Mar 27 2025, 4:31 PM

Update comments per @brooks, use XNM instead of XAS

This revision now requires review to proceed.Mar 27 2025, 4:36 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 27 2025, 4:39 PM
This revision was automatically updated to reflect the committed changes.