port building on small, single-board computers or cross building ports: for lld I'd like to use -Wl, --no-threads
Jan Beich
jbeich at FreeBSD.org
Fri Nov 9 20:48:39 UTC 2018
Mark Millard via freebsd-ports <freebsd-ports at freebsd.org> writes:
> For lld I'd like to use -Wl,--no-threads during poudriere-devel use.
>
> ld.bfd and such reject --no-threads .
>
> It appears that for ports there is no analogous support
> of something like what buildworld has as notation for
> specifying such:
>
> LDFLAGS.lld+= -Wl,--no-threads
>
> Any recommendation on an appropriate way to have use of
> lld in ports also use --no-threads in its link commands
> --but other linkers not do so?
Can you try the following?
.if ${LDFLAGS:M-fuse-ld=*lld*} || ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld
LDFLAGS+= -Wl,--no-threads
.endif
> Without --no-threads, lld creates approximately one
> thread per "cpu" (as FreeBSD counts such). For
> cross building, this can run into bugs under
> qemu-arm-static and hang up. It may also use more
> memory in low memory contexts that might do better
> without such extra memory use.
Are those only ports using non-default Clang? If not maybe haven't used
-x flag from poudriere-jail(8).
More information about the freebsd-ports
mailing list