Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Oct 2019 11:31:41 -0700
From:      Enji Cooper <yaneurabeya@gmail.com>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r353937 - in head/share: man/man5 mk
Message-ID:  <2B855247-5097-442D-8D4A-77D68D2F6186@gmail.com>
In-Reply-To: <201910231702.x9NH2jQv045130@repo.freebsd.org>
References:  <201910231702.x9NH2jQv045130@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

> On Oct 23, 2019, at 10:02, Dimitry Andric <dim@freebsd.org> wrote:
>=20
> =EF=BB=BFAuthor: dim
> Date: Wed Oct 23 17:02:45 2019
> New Revision: 353937
> URL: https://svnweb.freebsd.org/changeset/base/353937
>=20
> Log:
>  Build toolchain components as dynamically linked executables by default
>=20
>  Summary:
>  Historically, we have built toolchain components such as cc, ld, etc as
>  statically linked executables.  One of the reasons being that you could
>  sometimes save yourself from botched upgrades, by e.g. recompiling a
>  "known good" libc and reinstalling it.
>=20
>  In this day and age, we have boot environments, virtual machine
>  snapshots, cloud backups, and other much more reliable methods to
>  restore systems to working order.  So I think the time is ripe to flip
>  this default, and link the toolchain components dynamically, just like
>  almost all other executables on FreeBSD.
>=20
>  Maybe at some point they can even become PIE executables by default! :)

There might be a different reason for this being the case than the one posed=
.

Using dynamic binaries instead of static binaries might actually regress per=
formance in a way you don=E2=80=99t expect, depending on -j values, etc. Sta=
tic binaries avoid the dynamic linker, which (obviously) results in a perf h=
it at scale, at the potential cost of the in-memory image. Static binaries c=
ould also better optimize away less optimal code paths, which could result i=
n worse performing code.

Did you calculate the perf trade offs for the static binaries at low -j vs h=
igh -j, system and user time, etc?

Cheers,
-Enji

PS Thank you for keeping the SHARED_TOOLCHAIN option.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2B855247-5097-442D-8D4A-77D68D2F6186>