Date: Sun, 8 Oct 2017 23:45:37 -0600 From: Warner Losh <imp@bsdimp.com> To: "freebsd-arch@freebsd.org" <arch@freebsd.org> Subject: deorbiting /usr/lib/libstand.a, moving to sysboot Message-ID: <CANCZdfrvD04cL3A1J3nKZ2uFNNkOrcVnMvobdoyXkRGx8VK8Vg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
I'd like to deorbit /usr/lib/stand.a and /usr/include/stand.h. These are really parts of the boot loader with an unstable API and shouldn't be installed into the system. It's really a private library to the boot loader. Further, I'd like to move the whole shooting match into sys/boot/libsa (the name change is on purpose to break anything that used libstand). With these changes, one can cd sys/boot and do a make clean; make all and have it not depend (too much) on the host computer. It will also let us clean up a lot of the cut and paste and only half working implementations of this idea we have now in a clean way. We can also move the files in sys/boot/common that aren't actually part of /boot/loader into libsa since there's would be no good reason to keep them separate (though ultra-tiny loaders can cherry pick individual files, or compile things in a custom way if that's really needed). I've been cleaning up the sys/boot Makefile technical debt and this will go a long way towards disentangling things (though there's a lot to do besides these fixes). History is against FreeBSD's practice, btw. We're the only BSD that cross-threads like this (dragonfly may also, I haven't checked, but they got it from us if so). NetBSD/OpenBSD have sys/lib/libsa for this stuff. 4.4bsd had each arch build its own libsa.a from files living in sys/ARCH/stand. 4.2BSD did install things as /usr/lib/libsa.a, but it was from inside of sys/stand and friends. v7 had a similar structure to 4.2BSD, but with files living in different directories (they installed libsa.a into /usr/lib, but again from sys directories). Since we've ditched the 4.4BSD structure that NetBSD/OpenBSD evolved, I don't think it makes sense to go the sys/lib route (since this is only used in the boot loader) Since sys/boot programs know its internals so much that claims of independence would be hard to sustain. Having it in sys/boot would also help the POLA this change might cause by fixing a POLA breakage now (it fixes when libstand API changes break the naive build, as well as ensuring hacks to libstand will get built when a new boot loader is built). So we invented the current situation, we can change it since nothing outside the boot loader uses it (and if there are out-of-tree examples that use it, they could be converted to the new structure). Any objections to my moving forward with this (assume I'll help people fix any in-flight work this disrupts)? I know the plans are a little vague, but I was hoping to get rough consensus while I came up with woking code and go all IETF old-school on the problem. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrvD04cL3A1J3nKZ2uFNNkOrcVnMvobdoyXkRGx8VK8Vg>