Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Nov 2018 21:48:33 +0100
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Mark Millard via freebsd-ports <freebsd-ports@freebsd.org>
Cc:        Mark Millard <marklmi@yahoo.com>
Subject:   Re: port building on small, single-board computers or cross building ports: for lld I'd like to use -Wl, --no-threads
Message-ID:  <1s7u-6kpq-wny@FreeBSD.org>
In-Reply-To: <D89E117C-9FCA-4598-AB33-58D7CAB1527B@yahoo.com> (Mark Millard via freebsd-ports's message of "Fri, 9 Nov 2018 11:36:21 -0800")
References:  <D89E117C-9FCA-4598-AB33-58D7CAB1527B@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Millard via freebsd-ports <freebsd-ports@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).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1s7u-6kpq-wny>