Hey there! I'm working on a program that uses Chez Scheme, written in Rust (which, at least on my configuration, by default uses ld.lld) and I'm having problems with this package due to the use of --kernelobj. The issue is that kernel.o is built with GCC LTO, which is (currently) impossible to link using ld.lld.
There are a few options I see towards solving this, in decreasing order of my preference:
-
Use
--libkerneland let downstream users deal with linking with a static library rather than just an object file. Looking at a few other package repositories (Debian, Fedora, NixOS) I find that using--kernelobjis quite nonstandard, so many downstream users would already expect alibkernel.a, I would think. EDIT: This would also require disabling LTO or fat LTO objects, but would still be more standard in my opinion. -
Enable -ffat-lto-objects:
./configure [...] CFLAGS+=-ffat-lto-objects -
Disable LTO entirely:
options=(!lto)in the PKGBUILD
Pinned Comments