From f0de6985038804fdc312337e999e4359c30776cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 14 Jul 2010 23:21:36 +0000 Subject: [PATCH] GCC 4.5: Augment `LIB_SPEC' so that GNU's libpthread's deps are visible. svn path=/nixpkgs/trunk/; revision=22603 --- pkgs/development/compilers/gcc-4.5/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/gcc-4.5/default.nix b/pkgs/development/compilers/gcc-4.5/default.nix index f495b07d2029..644626ee1682 100644 --- a/pkgs/development/compilers/gcc-4.5/default.nix +++ b/pkgs/development/compilers/gcc-4.5/default.nix @@ -163,16 +163,18 @@ stdenv.mkDerivation ({ extraCPPSpec = concatStrings (intersperse " " (map (x: "-I${x}/include") extraCPPDeps)); - pthreadLib = - if libpthreadCross != null then libpthreadCross else libpthread; + extraLibSpec = + if libpthreadCross != null + then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" + else "-L${libpthread}/lib"; in '' echo "augmenting \`CPP_SPEC' in \`${i386_gnu_h}' with \`${extraCPPSpec}'..." sed -i "${i386_gnu_h}" \ -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}" \ - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "-L${pthreadLib}/lib \1|g' + -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' '' else null;