This is due to upstream bug: https://github.com/systemd/systemd/issues/31637. Package fails to link when using lld-18 as linker with the following error: [675/1798] /var/tmp/portage/sys-apps/systemd-255.4/work/systemd-stable-255.4/tools/elf2efi.py --version-major=255 --version-minor=0 --efi-major=1 --efi-minor=1 --subsystem=10 --minimum-sections=15 --copy-section s=.sbat,.sdmagic,.osrel src/boot/efi/linuxx64.elf.stub src/boot/efi/linuxx64.efi.stub FAILED: src/boot/efi/linuxx64.efi.stub /var/tmp/portage/sys-apps/systemd-255.4/work/systemd-stable-255.4/tools/elf2efi.py --version-major=255 --version-minor=0 --efi-major=1 --efi-minor=1 --subsystem=10 --minimum-sections=15 --copy-sections=.sbat,.sd magic,.osrel src/boot/efi/linuxx64.elf.stub src/boot/efi/linuxx64.efi.stub Traceback (most recent call last): File "/var/tmp/portage/sys-apps/systemd-255.4/work/systemd-stable-255.4/tools/elf2efi.py", line 699, in <module> main() File "/var/tmp/portage/sys-apps/systemd-255.4/work/systemd-stable-255.4/tools/elf2efi.py", line 695, in main elf2efi(parser.parse_args()) File "/var/tmp/portage/sys-apps/systemd-255.4/work/systemd-stable-255.4/tools/elf2efi.py", line 600, in elf2efi sections = convert_sections(elf, opt) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/tmp/portage/sys-apps/systemd-255.4/work/systemd-stable-255.4/tools/elf2efi.py", line 330, in convert_sections raise RuntimeError("Overlapping PE sections.")
Created attachment 889208 [details, diff] fix-lld-18.patch Patch backported to systemd-255.4 from the upstream bug report (https://github.com/systemd/systemd/commit/6d03e5523cc26a4f4cecf277788ae62bba44f88e)
Created attachment 889209 [details] build.log
had same issue, attached fix works on both 23.0 (gcc)/desktop/systemd 23.0 llvm/systemd LGTM
I assume this has been fixed in a subsequent 255.x release.