svn commit: r353937 - in head/share: man/man5 mk

Enji Cooper yaneurabeya at gmail.com
Wed Oct 23 18:31:46 UTC 2019


> On Oct 23, 2019, at 10:02, Dimitry Andric <dim at freebsd.org> wrote:
> 
> Author: dim
> Date: Wed Oct 23 17:02:45 2019
> New Revision: 353937
> URL: https://svnweb.freebsd.org/changeset/base/353937
> 
> Log:
>  Build toolchain components as dynamically linked executables by default
> 
>  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.
> 
>  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.
> 
>  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 performance in a way you don’t expect, depending on -j values, etc. Static binaries avoid the dynamic linker, which (obviously) results in a perf hit at scale, at the potential cost of the in-memory image. Static binaries could also better optimize away less optimal code paths, which could result in worse performing code.

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

Cheers,
-Enji

PS Thank you for keeping the SHARED_TOOLCHAIN option.


More information about the svn-src-all mailing list