Closed Bug 88045 Opened 19 years ago Closed 19 years ago

NSPR needs build option for whether to strip libraries

Categories

(NSPR :: NSPR, defect, P2)

All
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: wtc)

Details

Attachments

(2 files)

NSPR's build system doesn't give the same level of control as mozilla's does
over the separate decisions of whether to whether to optimize and whether to
strip libraries.  This makes it hard to build NSPR libraries suitable for
profiling.  For running under a profiler one generally wants optimization
without stripping libraries.

nsprpub/config/rules.mk seems to always call $(STRIP) if BUILD_OPT is defined. 
  We should have a control for whether strip is called separately from the
control for whether to optimize (and for NSPR autoconf it would be nice to set
up Mozilla to automatically propagate its --enable-strip-libs build option to
NSPR and have NSPR use that for deciding whether to strip libraries in NSPR
rather than using the propagated --enable-optimize option).
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → 4.2
Please check this in!  I was chasing my tail wondering what those __end entries
in jprof were.
Well, if someone would like to review it.....
The usage message should say:
    Enable stripping of .so libs and executable programs

Instead of MOZ_POST_DSO_LIB_COMMAND and MOZ_POST_PROGRAM_COMMAND,
which imply that there can only be one post-lib or post-program
command, I'd like to see we use a variable like ENABLE_STRIP and
say
    ifdef ENABLE_STRIP
            $(STRIP) $@
    endif

Or we can define STRIP to be 'true' if strip-libs is disabled
and just say
            $(STRIP) $@
I've decided to deprecate --enable-strip-libs as it's a bit of a misnomer.  We
should use --enable-strip instead.  
The new patch is good.  r=wtc.  Thanks cls!

Now the logistics.  If you wait until NSPR 4.2 has landed,
you only need to check in the patch on the tip of NSPR.
Whatever you decide to do, always check in the patch on
the tip of NSPR.
sr=waterson
The patch has been checked into the NSPRPUB_CLIENT_BRANCH & the NSPR tip.  
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.