From 6ab18ea64d197f4f5c2b744ac684dfc02c0e18cd Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 23 Oct 2019 17:02:45 +0000 Subject: [PATCH] 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! :) Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D22061 --- share/man/man5/src.conf.5 | 4 ++-- share/mk/src.opts.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 16d959faee9b..b915f2b2bf29 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1710,8 +1710,8 @@ as a set-user-ID root program. Set to not build the .Bx 4.4 legacy docs. -.It Va WITH_SHARED_TOOLCHAIN -Set to build the toolchain binaries as dynamically linked executables. +.It Va WITHOUT_SHARED_TOOLCHAIN +Set to build the toolchain binaries as statically linked executables. The set includes .Xr cc 1 , .Xr make 1 diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index ace17c573fef..7eaca39aafe2 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -166,6 +166,7 @@ __DEFAULT_YES_OPTIONS = \ SENDMAIL \ SERVICESDB \ SETUID_LOGIN \ + SHARED_TOOLCHAIN \ SHAREDOCS \ SOURCELESS \ SOURCELESS_HOST \ @@ -210,7 +211,6 @@ __DEFAULT_NO_OPTIONS = \ OPENLDAP \ REPRODUCIBLE_BUILD \ RPCBIND_WARMSTART_SUPPORT \ - SHARED_TOOLCHAIN \ SORT_THREADS \ SVN \ ZONEINFO_LEAPSECONDS_SUPPORT \