Project

General

Profile

Actions

Bug #13260

closed

librtld_db demo should be built separately

Added by Robert Mustacchi over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

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.


Related issues

Related to illumos gate - Bug #13284: demo_rdb build fails on SPARCClosedPeter Tribble

Actions
Blocks illumos gate - Feature #13274: enable -fstack-protector-strong by default in user landClosedRobert Mustacchi

Actions
Actions #1

Updated by Robert Mustacchi over 2 years ago

  • Blocks Feature #13274: enable -fstack-protector-strong by default in user land added
Actions #2

Updated by Electric Monk over 2 years ago

  • Gerrit CR set to 1021
Actions #3

Updated by Robert Mustacchi over 2 years ago

I tested this primarily through wsdiff and verified that there were no changes induced by this. I also verified the build on systems with and without the stack protector work that led to me discovering this.

Actions #4

Updated by Electric Monk over 2 years ago

  • Status changed from New to Closed
  • % Done changed from 80 to 100

git commit d9328cd43f1300af79f6fc8a3ad4760137618c63

commit  d9328cd43f1300af79f6fc8a3ad4760137618c63
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2020-11-04T15:31:48.000Z

    13260 librtld_db demo should be built separately
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Reviewed by: C Fraire <cfraire@me.com>
    Reviewed by: Patrick Mooney <pmooney@pfmooney.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Actions #5

Updated by Peter Tribble over 2 years ago

  • Related to Bug #13284: demo_rdb build fails on SPARC added
Actions

Also available in: Atom PDF