From d88cd100c994deabd9e56cb8245be527dc204075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 15 Jul 2010 14:06:09 +0000 Subject: [PATCH] GCC 4.5: Fix libpthread-related `LIB_SPEC' on GNU. svn path=/nixpkgs/trunk/; revision=22610 --- pkgs/development/compilers/gcc-4.5/default.nix | 2 +- pkgs/os-specific/gnu/libpthread/default.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc-4.5/default.nix b/pkgs/development/compilers/gcc-4.5/default.nix index 644626ee1682..39232c4988ec 100644 --- a/pkgs/development/compilers/gcc-4.5/default.nix +++ b/pkgs/development/compilers/gcc-4.5/default.nix @@ -283,7 +283,7 @@ stdenv.mkDerivation ({ if cross != null && libcCross != null then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" + (optionalString (libpthreadCross != null) - " -L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}") + " -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}") else null; passthru = { inherit langC langCC langAda langFortran langTreelang langVhdl diff --git a/pkgs/os-specific/gnu/libpthread/default.nix b/pkgs/os-specific/gnu/libpthread/default.nix index 87ad5f2b631d..6f978b0c76de 100644 --- a/pkgs/os-specific/gnu/libpthread/default.nix +++ b/pkgs/os-specific/gnu/libpthread/default.nix @@ -56,10 +56,12 @@ stdenv.mkDerivation ({ passthru = { # Extra target LDFLAGS to allow the cross-linker to find the # dependencies of the cross libpthread.so, namely libihash.so. + # Note: these are raw `ld' flags, so `-Wl,' must be prepended when using + # `gcc'. # # This is actually only useful while building the final cross-gcc, since # afterwards gcc-cross-wrapper should add the relevant flags. - TARGET_LDFLAGS = "-Wl,-rpath-link=${hurd}/lib"; + TARGET_LDFLAGS = "-rpath-link=${hurd}/lib"; }; } else { }))