mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 22:32:43 -04:00
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 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46271
This commit is contained in:
parent
6ea4d95f6c
commit
f5ce3f4ef5
1 changed files with 5 additions and 0 deletions
|
|
@ -105,6 +105,11 @@ LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -pie
|
||||||
LDFLAGS+= -Wl,--no-dynamic-linker
|
LDFLAGS+= -Wl,--no-dynamic-linker
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
# When lld is using multiple threads, which it does by default, it can
|
||||||
|
# result in non-reproducible output with the custom linker script. Work
|
||||||
|
# around this by disabling threading.
|
||||||
|
LDFLAGS.lld+= -Wl,--threads=1
|
||||||
|
|
||||||
CLEANFILES+= ${LOADER}.efi
|
CLEANFILES+= ${LOADER}.efi
|
||||||
|
|
||||||
${LOADER}.efi: ${PROG}
|
${LOADER}.efi: ${PROG}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue