Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 May 2021 01:15:39 +0200
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Alexis Praga <alexis.praga@gmail.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: x11/kitty: rewritten and updated to v0.20.3
Message-ID:  <8s4d-ymsk-wny@FreeBSD.org>
In-Reply-To: <86bl992mgs.fsf@ecchi.i-did-not-set--mail-host-address--so-tickle-me> (Alexis Praga's message of "Mon, 17 May 2021 21:23:47 %2B0200")
References:  <861ra5bq6h.fsf@ecchi.i-did-not-set--mail-host-address--so-tickle-me> <86bl992mgs.fsf@ecchi.i-did-not-set--mail-host-address--so-tickle-me>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexis Praga <alexis.praga@gmail.com> writes:

> Hi guys,
>
> Thanks to Li-Wen Hsu [1], 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 :
>     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230137
> 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[1] 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[2] or workaround
/usr/bin/ld.bfd bugs[3] 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?

[1] 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
[2] Examples: multimedia/svt-*, graphics/mesa-devel
[3] Examples: devel/basu, games/veloren, SVT* options in multimedia/ffmpeg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8s4d-ymsk-wny>