Spotted through failed attempts to test libutil/opendev(3) changes
with LD_LIBRARY_PATH.

Regular installboot(8) has been linking statically since import in
2013, which probably stems from when early reach arounds of the
installer to the installation's installboot binary.

These days all architectures except two use their own static
installboot build in install media as usual:
        $ grep -L installboot /usr/src/distrib/*/*/list
        /usr/src/distrib/alpha/miniroot/list
        /usr/src/distrib/luna88k/ramdisk/list

alpha still uses its own sys/arch/alpha/stand/installboot as per
distrib/alpha/miniroot/install.md:
        md_installboot() {
                # Use cat to avoid holes created by cp(1)
                cat /mnt/usr/mdec/boot > /mnt/boot
                /mnt/usr/mdec/installboot /mnt/boot /mnt/usr/mdec/bootxx 
/dev/r${1}c
        }

luna88k does not use installboot at all in
distrib/alpha/miniroot/install.md:
        md_installboot() {
                cat /mnt/usr/mdec/boot > /mnt/boot
        }

So none of our currently supported install media reach around;
all use their own static copy from distrib/special/installboot,
thus we can link regular installboot dynamically.

Thanks to moid for some alpha hints.

Feedback? Objection? OK?


Index: Makefile
===================================================================
RCS file: /cvs/src/usr.sbin/installboot/Makefile,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile
--- Makefile    15 Aug 2022 17:06:43 -0000      1.25
+++ Makefile    25 Aug 2022 17:29:23 -0000
@@ -8,8 +8,6 @@ CPPFLAGS=       -I${.CURDIR}
 LDADD=         -lutil
 DPADD=         ${LIBUTIL}
 
-LDSTATIC=      ${STATIC}
-
 .if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
 CFLAGS += -DSOFTRAID
 SRCS += i386_installboot.c

Reply via email to