[Nix-dev] Support for debugging symbols
Ludovic Courtès
ludo at gnu.org
Wed Apr 22 16:37:39 CEST 2009
Hello,
Currently, `stdenv' blindly strips anything that's strippable upon
install. However, for developers, it's often useful to have debugging
symbols, e.g., for Glibc.
The `objcopy' command has `--only-keep-debug' and `--add-gnu-debuglink',
which allow the creation of a debugging symbol files separate from the
binary itself (info "(binutils) objcopy")---this is what Debian does
with dh_strip(1) to produce `-dbg' packages.
We could use this feature in Nixpkgs for individual packages, e.g., for
Glibc, or we could have it available in `stdenv'. A simple idea would
be to:
1. Build the derivation and install it unstripped.
2. Create a `-dbg' derivation containing the output of
`--only-keep-debug' for that package.
3. Create a stripped derivation of (1) with a "debuglink" to (2).
However, this approach is pointless since (3) would hold a reference to
both (1) and (2), thereby occupying as much space as a simple unstripped
install.
Ideas?
Thanks,
Ludo'.
More information about the nix-dev
mailing list