librtld_db demo should be built separately
The librtld_db directory contains a separate demo application that shows how one might use librtld_db. The way this is constructed it is always built as ancillary subdirectory that is descended into when librtld_db is being built, which follow the normal Makefile.lib style build. This demo requires not only librld_db, but it also uses libelf, libl, and liby.
librtld_db is built in two different paths. There's the normal path in cmd/sgs where it's listed as a target; however, there is a second path. It is listed as one of the items that are to be built in usr/src/lib. This means that the demo directory is built in this early phase, but it has additional dependencies that librtld_db doesn't have. The build attempts to recognize this by trying to make comments about using a native libl, liby, and libelf; however, it tries to use a proto libc and librtld_db. This ends in chaos in certain situations.
The solution here is to no longer try and build the demo in ancillary fashion and make it a top-level target in its own directory in cmd/sgs that can have all the appropriate dependencies met. At the same time, this allows us to make sure that it always builds against the proto area, which is what will be shipped.
Updated by Electric Monk 6 months ago
- Status changed from New to Closed
- % Done changed from 80 to 100
commit d9328cd43f1300af79f6fc8a3ad4760137618c63 Author: Robert Mustacchi <firstname.lastname@example.org> Date: 2020-11-04T15:31:48.000Z 13260 librtld_db demo should be built separately Reviewed by: Richard Lowe <email@example.com> Reviewed by: C Fraire <firstname.lastname@example.org> Reviewed by: Patrick Mooney <email@example.com> Approved by: Gordon Ross <firstname.lastname@example.org>