x11/kitty: rewritten and updated to v0.20.3
jbeich at FreeBSD.org
Mon May 17 23:15:42 UTC 2021
Alexis Praga <alexis.praga at gmail.com> writes:
> Hi guys,
> Thanks to Li-Wen Hsu , I now know the new version does not build on 11.4 with :
> /usr/bin/ld: unrecognized option '-plugin'
> Which seems due to the '-flto' flag according to this issue :
> I've tried the fix mentioned there (adding '-fuse-ld=lld'), but it's not a flag recognized by clang.
> Removing '-flto' allows to build kitty but some tests fails.
> Does someone knows on how to get around this compiler issue (only for 11x)?
-fuse-ld=lld should work fine on 11.4 aarch64/amd64/armv6/armv7/i386 as
it uses clang as /usr/bin/cc and has /usr/bin/ld.lld but may break
11.4 powerpc/powerpc64 which still has gcc as /usr/bin/cc. I've used
-fuse-ld=lld in a number of ports to unbreak -flto or workaround
/usr/bin/ld.bfd bugs which weren't present in ld.bfd from devel/binutils.
Other port maintainers do something similar.
Can you show the build error from -fuse-ld=lld?
 When a port defines USES=compiler:c11 (or similar due to -std=*) it uses
lang/gcc10 on FreeBSD < 13 powerpc* which doesn't need -fuse-ld=lld
because /usr/local/bin/ld is used by default. However, lang/gcc* with
-flto will probably ignore -fuse-ld=lld due to IR/bytecode incompatibility
and coincidentally avoid https://bugs.llvm.org/show_bug.cgi?id=47353
 Examples: multimedia/svt-*, graphics/mesa-devel
 Examples: devel/basu, games/veloren, SVT* options in multimedia/ffmpeg
More information about the freebsd-ports