Author: ludo
Date: Wed Apr 11 16:38:21 2012
New Revision: 33748
URL: https://nixos.org/websvn/nix/?rev=33748&sc=1
Log:
GMP 5.0.3: Fix FreeBSD builds.
Modified:
nixpkgs/trunk/pkgs/development/libraries/gmp/5.0.3.nix
Modified: nixpkgs/trunk/pkgs/development/libraries/gmp/5.0.3.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/gmp/5.0.3.nix Wed Apr 11
13:46:49 2012 (r33747)
+++ nixpkgs/trunk/pkgs/development/libraries/gmp/5.0.3.nix Wed Apr 11
16:38:21 2012 (r33748)
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, m4, cxx ? true }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (rec {
name = "gmp-5.0.3";
src = fetchurl {
@@ -51,3 +51,21 @@
platforms = stdenv.lib.platforms.all;
};
}
+
+//
+
+(if stdenv.isFreeBSD
+ then {
+ # On FreeBSD, GMP's `config.guess' detects the sub-architecture (e.g.,
+ # "k8") and generates code specific to that sub-architecture, in spite of
+ # `--enable-fat', leading to illegal instructions and similar errors on
+ # machines with a different sub-architecture.
+ # See <http://hydra.nixos.org/build/2269915/nixlog/1/raw>, for an example.
+ # Thus, use GNU's standard `config.guess' so that it assumes the generic
+ # architecture (e.g., "x86_64").
+ preConfigure =
+ '' rm config.guess && ln -s configfsf.guess config.guess
+ chmod +x configfsf.guess.
+ '';
+ }
+ else { }))
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits