Closed requested to merge kasperk81/aports:master into master
llvm's linker (lld) does not handle gcc lto files. https://github.com/llvm/llvm-project/issues/41791. the worst part is clang with bfd linker also does not handle for gcc lto files. so any static lib (
.a) compiled with
flto cannot be used with any version of clang. :(
either the static lib in packages needs to be compiled with
clang -flto instead of
gcc -flto so the well-known linkers bfd, gold and lld can link it with user code.
or drop lto from gcc build command.
either fix is fine. i've chosen the latter just bcoz that seems to be a go-to way in aports repo to solve lto-esque problems: "to lto or not to lto". i haven't found people switching the compiler in any of the previous patches. lmk, if i'm missing something.