From 4256c220731205cdd68bcc0cc6b4324acc09451e Mon Sep 17 00:00:00 2001 From: bdrewery Date: Wed, 8 Aug 2018 18:55:32 +0000 Subject: [PATCH] MFC r322565,r323323: r322565: Use -S for library installations except for -DNO_ROOT builds. r323323: Tweak comment for install -S usage since it does not impact the build. --- share/mk/bsd.lib.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 47597a79bb9..b92e4fe092c 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -319,6 +319,11 @@ _EXTRADEPEND: .if !defined(NO_FSCHG) SHLINSTALLFLAGS+= -fschg .endif +.endif +# Install libraries with -S to avoid risk of modifying in-use libraries when +# installing to a running system. It is safe to avoid this for NO_ROOT builds +# that are only creating an image. +.if !defined(NO_SAFE_LIBINSTALL) && !defined(NO_ROOT) SHLINSTALLFLAGS+= -S .endif -- 2.45.0