diff options
author | Leo Famulari <leo@famulari.name> | 2017-04-18 20:35:08 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-04-18 20:36:04 -0400 |
commit | 165d45540a879c4b1d8b8aeb5a3c79bda91b7641 (patch) | |
tree | de863855a483ad45f385430bce9f02b2998515ba | |
parent | fbdd3526a1cab61602da1fcbfbc3ff02d99b23fe (diff) | |
download | guix-165d45540a879c4b1d8b8aeb5a3c79bda91b7641.tar.gz |
gnu: mesa: Fix build for 32-bit systems.
* gnu/packages/patches/mesa-fix-32bit-test-failures.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gl.scm (mesa)[source]: Use it.
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/gl.scm | 3 | ||||
-rw-r--r-- | gnu/packages/patches/mesa-fix-32bit-test-failures.patch | 58 |
3 files changed, 61 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index e6dee58397..265157a319 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -776,6 +776,7 @@ dist_patch_DATA = \ %D%/packages/patches/mcrypt-CVE-2012-4409.patch \ %D%/packages/patches/mcrypt-CVE-2012-4426.patch \ %D%/packages/patches/mcrypt-CVE-2012-4527.patch \ + %D%/packages/patches/mesa-fix-32bit-test-failures.patch \ %D%/packages/patches/mesa-skip-disk-cache-test.patch \ %D%/packages/patches/mesa-wayland-egl-symbols-check-mips.patch \ %D%/packages/patches/metabat-remove-compilation-date.patch \ diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index f43f464390..40b756394e 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -229,7 +229,8 @@ also known as DXTn or DXTC) for Mesa.") (base32 "0im3ca1vwwmkjf5w761vh7vabr4vrrdxpckr0wm974x18n2xqs8j")) (patches - (search-patches "mesa-wayland-egl-symbols-check-mips.patch" + (search-patches "mesa-fix-32bit-test-failures.patch" + "mesa-wayland-egl-symbols-check-mips.patch" "mesa-skip-disk-cache-test.patch")))) (build-system gnu-build-system) (propagated-inputs diff --git a/gnu/packages/patches/mesa-fix-32bit-test-failures.patch b/gnu/packages/patches/mesa-fix-32bit-test-failures.patch new file mode 100644 index 0000000000..e21e87cef6 --- /dev/null +++ b/gnu/packages/patches/mesa-fix-32bit-test-failures.patch @@ -0,0 +1,58 @@ +Fix a test failure when building for 32 bit architectures: + +http://lists.gnu.org/archive/html/guix-devel/2017-04/msg00381.html + +Patch copied from upstream source repository: + +https://cgit.freedesktop.org/mesa/mesa/commit/?id=61bbb25a080e48a8ca897ba7f6e73cc6a8e9b5b8 + +From 61bbb25a080e48a8ca897ba7f6e73cc6a8e9b5b8 Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas <notasas@gmail.com> +Date: Thu, 9 Mar 2017 02:54:53 +0200 +Subject: [PATCH] util/disk_cache: fix size subtraction on 32bit + +Negating size_t on 32bit produces a 32bit result. This was effectively +adding values close to UINT_MAX to the cache size (the files are usually +small) instead of intended subtraction. +Fixes 'make check' disk_cache failures on 32bit. + +Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> +Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> +--- + src/util/disk_cache.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c +index 5470688df3..facdcecf7c 100644 +--- a/src/util/disk_cache.c ++++ b/src/util/disk_cache.c +@@ -603,7 +603,7 @@ evict_random_item(struct disk_cache *cache) + free(dir_path); + + if (size) { +- p_atomic_add(cache->size, - size); ++ p_atomic_add(cache->size, - (uint64_t)size); + return; + } + +@@ -624,7 +624,7 @@ evict_random_item(struct disk_cache *cache) + free(dir_path); + + if (size) +- p_atomic_add(cache->size, - size); ++ p_atomic_add(cache->size, - (uint64_t)size); + } + + void +#@@ -646,7 +646,7 @@ disk_cache_remove(struct disk_cache *cache, const cache_key key) +# free(filename); +# +# if (sb.st_size) +#- p_atomic_add(cache->size, - sb.st_size); +#+ p_atomic_add(cache->size, - (uint64_t)sb.st_size); +# } +# +# /* From the zlib docs: +-- +2.12.2 + |