The command "make installworld" performs multiple invocations of "install -s -S" to install and strip binaries from obj directory to DESTDIR.
Currently, "install -s" behaviour is inefficient for upgrade. First it finds that destination file already exists and copies source file to temporary file. Then it calls strip(1) with name of temporary file as single agrument and our strip(1) creates another temporary file in the /tmp (or TMPDIR) making another copy that is finally copied to DESTDIR third time.
Meantime, strip(1) has an option "-o dst" to specify destination so install(1) is allowed to skip initial copying from obj to DESTDIR. This change makes it do so.
This optimization descreases total amount of data sent to both of /tmp and DESTDIR during "make installworld" for 32% in case of upgrade of 11.4-RELEASE/amd64 to stable/11 r362797 comparing unpatched xinstall.c: 679MB vs. 999MB
Also, this change decreases required amount of free space for /usr partition and may prevent installworld from failing for small UFS2 partitions. Currently, installworld may fail if /usr has less than 140M-200M free (depending on tunefs(8) space/speed optimization setting and usage of soft-updates) that makes it difficult to upgrade legacy servers installed when 1GB dedicated partition was more than enough for /usr when /usr/{local|obj|src} are kept separately .
The patch does not change behaviour of install(1) if "-s" flag is not used. My efficiency tests were performed after some standard src.conf optimizations already applied and found not enough for legacy servers:
WITHOUT_KERNEL_SYMBOLS=
WITHOUT_DEBUG_FILES=
WITHOUT_TESTS=
WITHOUT_LLVM_TARGET_ALL=
WITH_LLVM_TARGET_X86=
WITHOUT_CLANG_FULL=
32% gained in addition to these options.