GCC 4.5: Augment `LIB_SPEC' so that GNU's libpthread's deps are visible.

svn path=/nixpkgs/trunk/; revision=22603
This commit is contained in:
Ludovic Courtès 2010-07-14 23:21:36 +00:00
parent 41fc0fba17
commit f0de698503
1 changed files with 6 additions and 4 deletions

View File

@ -163,16 +163,18 @@ stdenv.mkDerivation ({
extraCPPSpec = extraCPPSpec =
concatStrings (intersperse " " concatStrings (intersperse " "
(map (x: "-I${x}/include") extraCPPDeps)); (map (x: "-I${x}/include") extraCPPDeps));
pthreadLib = extraLibSpec =
if libpthreadCross != null then libpthreadCross else libpthread; if libpthreadCross != null
then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
else "-L${libpthread}/lib";
in in
'' echo "augmenting \`CPP_SPEC' in \`${i386_gnu_h}' with \`${extraCPPSpec}'..." '' echo "augmenting \`CPP_SPEC' in \`${i386_gnu_h}' with \`${extraCPPSpec}'..."
sed -i "${i386_gnu_h}" \ sed -i "${i386_gnu_h}" \
-es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g'
echo "augmenting \`LIB_SPEC' in \`${gnu_h}' for libpthread at \`${pthreadLib}'..." echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..."
sed -i "${gnu_h}" \ sed -i "${gnu_h}" \
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "-L${pthreadLib}/lib \1|g' -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
'' ''
else null; else null;