From c1dd4327dc55b7530f181b5ad83b5b3c9f1a6862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 9 May 2012 13:42:46 +0000 Subject: [PATCH] GNU Guile 2.0: Fix cross-GNU builds. svn path=/nixpkgs/trunk/; revision=34029 --- pkgs/development/interpreters/guile/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/guile/default.nix b/pkgs/development/interpreters/guile/default.nix index 19b9d26c7de..127e49087d3 100644 --- a/pkgs/development/interpreters/guile/default.nix +++ b/pkgs/development/interpreters/guile/default.nix @@ -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";