Merge 'staging' into closure-size

- there were many easy merge conflicts
- cc-wrapper needed nontrivial changes

Many other problems might've been created by interaction of the branches,
but stdenv and a few other packages build fine now.
This commit is contained in:
Vladimír Čunát
2015-04-18 11:00:58 +02:00
6303 changed files with 375447 additions and 91361 deletions

View File

@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
doCheck = false;
meta = {
branch = "4";
description = "GNU multiple precision arithmetic library";
longDescription =
@@ -55,7 +56,7 @@ stdenv.mkDerivation rec {
homepage = http://gmplib.org/;
license = stdenv.lib.licenses.lgpl3Plus;
maintainers = [ stdenv.lib.maintainers.ludo ];
maintainers = [ ];
platforms = stdenv.lib.platforms.all;
};
}

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, m4, cxx ? true, withStatic ? false }:
{ stdenv, fetchurl, m4, cxx ? true, withStatic ? true }:
with { inherit (stdenv.lib) optional; };
@@ -14,20 +14,26 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ m4 ];
patches = if stdenv.isDarwin then [ ./need-size-t.patch ] else null;
configureFlags =
# Build a "fat binary", with routines for several sub-architectures
# (x86), except on Solaris where some tests crash with "Memory fault".
# See <http://hydra.nixos.org/build/2760931>, for instance.
#
# no darwin because gmp uses ASM that clang doesn't like
optional (!stdenv.isSunOS) "--enable-fat"
++ (if cxx then [ "--enable-cxx" ]
else [ "--disable-cxx" ])
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
++ optional stdenv.isDarwin "ABI=64"
++ optional stdenv.is64bit "--with-pic"
;
dontDisableStatic = withStatic;
doCheck = true;
dontDisableStatic = withStatic;
enableParallelBuilding = true;
meta = with stdenv.lib; {
@@ -61,4 +67,3 @@ stdenv.mkDerivation rec {
maintainers = [ maintainers.simons ];
};
}

View File

@@ -1,37 +1,41 @@
{ stdenv, fetchurl, m4, cxx ? true }:
{ stdenv, fetchurl, m4, cxx ? true, withStatic ? true }:
with { inherit (stdenv.lib) optional; };
stdenv.mkDerivation rec {
name = "gmp-5.0.5";
name = "gmp-6.0.0a";
src = fetchurl {
url = "mirror://gnu/gmp/${name}.tar.bz2";
sha256 = "1jfymbr90mpn0zw5sg001llqnvf2462y77vgjknrmfs1rjn8ln0z";
src = fetchurl { # we need to use bz2, others aren't in bootstrapping stdenv
urls = [ "mirror://gnu/gmp/${name}.tar.bz2" "ftp://ftp.gmplib.org/pub/${name}/${name}.tar.bz2" ];
sha256 = "1bwsfmf0vrx3rwl4xmi5jhhy3v1qx1xj0m7p9hb0fvcw9f09m3kz";
};
patches = [ ./ignore-bad-cpuid.patch ];
nativeBuildInputs = [ m4 ];
configureFlags =
# Build a "fat binary", with routines for several sub-architectures
# (x86), except on Solaris where some tests crash with "Memory fault".
# See <http://hydra.nixos.org/build/2760931>, for instance.
(stdenv.lib.optional (!stdenv.isSunOS) "--enable-fat")
++ (if cxx then [ "--enable-cxx" ] else [ "--disable-cxx" ]);
#
# no darwin because gmp uses ASM that clang doesn't like
optional (!stdenv.isSunOS) "--enable-fat"
++ (if cxx then [ "--enable-cxx" ]
else [ "--disable-cxx" ])
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
++ optional stdenv.isDarwin "ABI=64"
++ optional stdenv.is64bit "--with-pic"
;
doCheck = true;
dontDisableStatic = withStatic;
enableParallelBuilding = true;
crossAttrs = {
# Disable stripping to avoid "libgmp.a: Archive has no index"
# (see <http://hydra.nixos.org/build/4268666>.)
dontStrip = true;
dontCrossStrip = true;
};
meta = {
meta = with stdenv.lib; {
homepage = "http://gmplib.org/";
description = "GNU multiple precision arithmetic library";
license = licenses.gpl3Plus;
longDescription =
'' GMP is a free library for arbitrary precision arithmetic, operating
@@ -55,10 +59,7 @@ stdenv.mkDerivation rec {
asymptotically faster algorithms.
'';
homepage = http://gmplib.org/;
license = stdenv.lib.licenses.lgpl3Plus;
maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.simons ];
platforms = stdenv.lib.platforms.all;
platforms = platforms.all;
maintainers = [ maintainers.simons ];
};
}

View File

@@ -1,31 +0,0 @@
Don't abort when seeing the default CPU model/platform returned by
QEMU.
diff -ru -x '*~' gmp-5.0.4-orig/mpn/x86_64/fat/fat.c gmp-5.0.4/mpn/x86_64/fat/fat.c
--- gmp-5.0.4-orig/mpn/x86_64/fat/fat.c 2012-02-10 11:23:05.000000000 +0100
+++ gmp-5.0.4/mpn/x86_64/fat/fat.c 2012-04-01 21:38:35.843066724 +0200
@@ -194,13 +194,16 @@
{
switch (family)
{
+#if 0
case 4:
case 5:
abort (); /* 32-bit processors */
+#endif
case 6:
switch (model)
{
+#if 0
case 0x00:
case 0x01:
case 0x02:
@@ -217,6 +220,7 @@
case 0x0d: /* Dothan */
case 0x0e: /* Yonah */
abort (); /* 32-bit processors */
+#endif
case 0x0f: /* Conroe Merom Kentsfield Allendale */
case 0x10:

View File

@@ -0,0 +1,18 @@
diff --git a/gmp-h.in b/gmp-h.in
index 7deb67a..240d663 100644
--- a/gmp-h.in
+++ b/gmp-h.in
@@ -46,13 +46,11 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#ifndef __GNU_MP__
#define __GNU_MP__ 5
-#define __need_size_t /* tell gcc stddef.h we only want size_t */
#if defined (__cplusplus)
#include <cstddef> /* for size_t */
#else
#include <stddef.h> /* for size_t */
#endif
-#undef __need_size_t
/* Instantiated by configure. */
#if ! defined (__GMP_WITHIN_CONFIGURE)