3
0
Fork 0
forked from mirrors/nixpkgs

glibc 2.12: Add an option to keep debugging symbols.

svn path=/nixpkgs/trunk/; revision=30284
This commit is contained in:
Ludovic Courtès 2011-11-06 21:06:05 +00:00
parent 18fcb0f5f8
commit 84888ac3f1

View file

@ -4,6 +4,7 @@
, installLocales ? true , installLocales ? true
, profilingLibraries ? false , profilingLibraries ? false
, gccCross ? null , gccCross ? null
, debugSymbols ? false
}: }:
assert stdenv.gcc.gcc != null; assert stdenv.gcc.gcc != null;
@ -13,7 +14,7 @@ let
cross = if gccCross != null then gccCross.target else null; cross = if gccCross != null then gccCross.target else null;
in in
build cross ({ build cross ({
name = "glibc"; name = "glibc${if debugSymbols then "-debug" else ""}";
inherit fetchurl stdenv kernelHeaders installLocales profilingLibraries inherit fetchurl stdenv kernelHeaders installLocales profilingLibraries
gccCross; gccCross;
@ -39,6 +40,18 @@ in
// //
(if debugSymbols
then {
# Build with debugging symbols, but leave optimizations on and don't
# attempt to keep the build tree.
dontStrip = true;
dontCrossStrip = true;
NIX_STRIP_DEBUG = 0;
}
else {})
//
(if hurdHeaders != null (if hurdHeaders != null
then rec { then rec {
inherit machHeaders hurdHeaders libpthreadHeaders mig fetchgit; inherit machHeaders hurdHeaders libpthreadHeaders mig fetchgit;