HomeFreeBSD

Fix EFI loader reproducibility with lld

Description

Fix EFI loader reproducibility with lld

When the various loaders under stand/efi are built, the resulting
binaries differ over multiple runs, even if WITH_REPRODUCIBLE_BUILD is
used. This is caused by lld multithreading and the custom linker scripts
for the loaders, and affects the following binaries:

  • loader_4th.efi
  • loader_4th.sym
  • loader_4th.sym.full
  • loader_lua.efi
  • loader_lua.sym
  • loader_lua.sym.full
  • loader_simp.efi
  • loader_simp.sym
  • loader_simp.sym.full

Work around this by disabling lld threading for these binaries.

Reviewed by: emaste
Approved by: re (cperciva)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D46271

(cherry picked from commit f5ce3f4ef562ea9fc4d8f9c13c268f48a5bacba7)
(cherry picked from commit 8a4fd438ef6c874110b9ed320d3cd54e2bf93459)

Details

Provenance
dimAuthored on Aug 11 2024, 7:48 PM
Reviewer
emaste
Differential Revision
D46271: Fix EFI loader reproducibility with lld
Parents
rG7088bf662d46: calendar: don't setlogin(2) in the -a user handlers
Branches
Unknown
Tags
Unknown