Author: ludo
Date: Wed May  9 13:42:46 2012
New Revision: 34029
URL: https://nixos.org/websvn/nix/?rev=34029&sc=1

Log:
GNU Guile 2.0: Fix cross-GNU builds.

Modified:
   nixpkgs/trunk/pkgs/development/interpreters/guile/default.nix

Modified: nixpkgs/trunk/pkgs/development/interpreters/guile/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/interpreters/guile/default.nix       Wed May 
 9 11:49:52 2012        (r34028)
+++ nixpkgs/trunk/pkgs/development/interpreters/guile/default.nix       Wed May 
 9 13:42:46 2012        (r34029)
@@ -1,5 +1,5 @@
 { fetchurl, stdenv, libtool, readline, gmp, pkgconfig, boehmgc, libunistring
-, libffi, gawk, makeWrapper, coverageAnalysis ? null }:
+, libffi, gawk, makeWrapper, coverageAnalysis ? null, gnu ? null }:
 
 # Do either a coverage analysis build or a standard build.
 (if coverageAnalysis != null
@@ -48,6 +48,15 @@
 
   setupHook = ./setup-hook.sh;
 
+  crossAttrs.preConfigure =
+    stdenv.lib.optionalString (stdenv.cross.config == "i586-pc-gnu")
+       # On GNU, libgc depends on libpthread, but the cross linker doesn't
+       # know where to find libpthread, which leads to erroneous test failures
+       # in `configure', where `-pthread' and `-lpthread' aren't explicitly
+       # passed.  So it needs some help (XXX).
+       "export LDFLAGS=-Wl,-rpath-link=${gnu.libpthreadCross}/lib";
+
+
   meta = {
     description = "GNU Guile 2.0, an embeddable Scheme implementation";
 
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to