libffi: 3.0.13 -> 3.2.1

+5 -44
+5 -7
pkgs/development/libraries/libffi/default.nix
··· 1 1 { fetchurl, stdenv, dejagnu }: 2 2 3 3 stdenv.mkDerivation rec { 4 - name = "libffi-3.0.13"; 4 + name = "libffi-3.2.1"; 5 5 6 6 src = fetchurl { 7 7 url = "ftp://sourceware.org/pub/libffi/${name}.tar.gz"; 8 - sha256 = "077ibkf84bvcd6rw1m6jb107br63i2pp301rkmsbgg6300adxp8x"; 8 + sha256 = "0dya49bnhianl0r65m65xndz6ls2jn1xngyn72gd28ls3n7bnvnh"; 9 9 }; 10 - 11 - patches = stdenv.lib.optional (stdenv.needsPax) ./libffi-3.0.13-emutramp_pax_proc.patch; 12 10 13 11 buildInputs = stdenv.lib.optional doCheck dejagnu; 14 12 15 13 configureFlags = [ 16 14 "--with-gcc-arch=generic" # no detection of -march= or -mtune= 17 - ] ++ stdenv.lib.optional (stdenv.needsPax) "--enable-pax_emutramp"; 15 + "--enable-pax_emutramp" 16 + ]; 18 17 19 - #doCheck = stdenv.isLinux; # until we solve dejagnu problems on darwin and expect on BSD 20 - doCheck = false; 18 + doCheck = stdenv.isLinux; # until we solve dejagnu problems on darwin and expect on BSD 21 19 22 20 dontStrip = stdenv ? cross; # Don't run the native `strip' when cross-compiling. 23 21
-37
pkgs/development/libraries/libffi/libffi-3.0.13-emutramp_pax_proc.patch
··· 1 - 2013-05-22 Magnus Granberg <zorry@gentoo.org> 2 - 3 - #457194 4 - * src/closuer.c (emutramp_enabled_check): Check with /proc. 5 - 6 - --- a/src/closures.c 2013-03-17 23:27:11.000000000 +0100 7 - +++ b/src/closures.c 2013-04-29 23:26:02.279022022 +0200 8 - @@ -181,10 +181,26 @@ static int emutramp_enabled = -1; 9 - static int 10 - emutramp_enabled_check (void) 11 - { 12 - - if (getenv ("FFI_DISABLE_EMUTRAMP") == NULL) 13 - - return 1; 14 - - else 15 - + char *buf = NULL; 16 - + size_t len = 0; 17 - + FILE *f; 18 - + int ret; 19 - + f = fopen ("/proc/self/status", "r"); 20 - + if (f == NULL) 21 - return 0; 22 - + ret = 0; 23 - + 24 - + while (getline (&buf, &len, f) != -1) 25 - + if (!strncmp (buf, "PaX:", 4)) 26 - + { 27 - + char emutramp; 28 - + if (sscanf (buf, "%*s %*c%c", &emutramp) == 1) 29 - + ret = (emutramp == 'E'); 30 - + break; 31 - + } 32 - + free (buf); 33 - + fclose (f); 34 - + return ret; 35 - } 36 - 37 - #define is_emutramp_enabled() (emutramp_enabled >= 0 ? emutramp_enabled \