Page MenuHomeFreeBSD

OptionalObsoleteFiles.inc: Treat compat runtime loaders as libraries
Needs ReviewPublic

Authored by jhb on Aug 28 2025, 3:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 7:42 PM
Unknown Object (File)
Thu, Oct 9, 9:02 PM
Unknown Object (File)
Thu, Oct 9, 1:15 PM
Unknown Object (File)
Thu, Oct 9, 1:15 PM
Unknown Object (File)
Thu, Oct 9, 1:15 PM
Unknown Object (File)
Thu, Oct 9, 12:29 PM
Unknown Object (File)
Wed, Oct 8, 8:54 PM
Unknown Object (File)
Thu, Oct 2, 10:54 PM
Subscribers

Details

Reviewers
des
jrtc27
Summary

Binaries require the runtime loader to use shared libraries, and
removing the runtime loader in make delete-old while leaving the
libraries around makes it impossible to use those shared libraries.
Treat rtld as a de facto dependency of shared libraries to ensure it
is not removed until the corresponding shared libraries are removed.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66603
Build 63486: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Aug 28 2025, 3:15 PM

Replaces part of D52194 where there is some discussion. This was broken in the original addition of MK_LIB32==no removal in rG74c52c652633228dead1f7f5e7e46e21cb518a67.

Does delete-old-libs even delete all of a given libcompat if you set WITHOUT_LIBFOO? Oh that's what this code is trying to do.

I guess my view is that OLD_LIBS is really there so that soname bumps don't break existing binaries; you need the new library to be able to build the new binary, but don't want a window between installing the new library and being able to build the new binary where it doesn't work. That isn't really important for this case, because you can just not set WITHOUT_LIBFOO until you've updated all your binaries to not use that ABI. But at the same time, if we're using OLD_LIBS for all the libraries here, then yes, that's pointless if you're using OLD_FILES for rtld itself.

I guess my view is that OLD_LIBS is really there so that soname bumps don't break existing binaries; you need the new library to be able to build the new binary, but don't want a window between installing the new library and being able to build the new binary where it doesn't work. That isn't really important for this case, because you can just not set WITHOUT_LIBFOO until you've updated all your binaries to not use that ABI. But at the same time, if we're using OLD_LIBS for all the libraries here, then yes, that's pointless if you're using OLD_FILES for rtld itself.

Hmmm, I think for other things in this file (e.g. WITHOUT_PAM or WITHOUT_KERBEROS), we still treat those libraries as libraries via OLD_LIBS rather than OLD_FILES. So I think leaving these all as OLD_LIBS is probably most consistent with that? I do agree that the libraries and rtld should be in the same class (FILES vs LIBS). It is a good question of, in general, should shared libraries for optional things being remove due to WITHOUT_FOO be treated as OLD_FILES vs OLD_LIBS.