diff options
author | anne-glerum <a.c.glerum@uu.nl> | 2018-05-07 16:51:27 +0200 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2018-05-07 09:51:27 -0500 |
commit | 9557a6881f9ee4d4ce1147516d6afe3a2cb8b977 (patch) | |
tree | b6e69e33360fcc01947838c8e5c6c0cf63b17a3c /var | |
parent | 231664e22cfcc6f72fcd9d67b718d6723fdb29b2 (diff) | |
download | spack-9557a6881f9ee4d4ce1147516d6afe3a2cb8b977.tar.gz spack-9557a6881f9ee4d4ce1147516d6afe3a2cb8b977.tar.bz2 spack-9557a6881f9ee4d4ce1147516d6afe3a2cb8b977.tar.xz spack-9557a6881f9ee4d4ce1147516d6afe3a2cb8b977.zip |
Add patch (#8034)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/pixman/clang.patch | 28 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/pixman/package.py | 7 |
2 files changed, 35 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/pixman/clang.patch b/var/spack/repos/builtin/packages/pixman/clang.patch new file mode 100644 index 0000000000..9de9c1be60 --- /dev/null +++ b/var/spack/repos/builtin/packages/pixman/clang.patch @@ -0,0 +1,28 @@ +--- pixman-0.34.0/test/utils-prng.c.bak 2018-02-01 00:34:15.757691302 +0100 ++++ pixman-0.34.0/test/utils-prng.c 2018-02-01 00:36:38.285690995 +0100 +@@ -199,12 +199,24 @@ + } + else + { ++ ++#ifndef __has_builtin ++#define __has_builtin(x) 0 ++#endif ++ + #ifdef HAVE_GCC_VECTOR_EXTENSIONS ++# if !defined(__clang__) || __has_builtin(__builtin_shuffle) + const uint8x16 bswap_shufflemask = + { + 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 + }; + randdata.vb = __builtin_shuffle (randdata.vb, bswap_shufflemask); ++# elif __has_builtin(__builtin_shufflevector) ++ randdata.vb = __builtin_shufflevector(randdata.vb, randdata.vb, 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12); ++# else ++# error "GCC_VECTOR_EXTENSION is defined, but neither __builtin_shuffle nor __builtin_shufflevector is supported!" ++# endif ++ + store_rand_128_data (buf, &randdata, aligned); + buf += 16; + #else + diff --git a/var/spack/repos/builtin/packages/pixman/package.py b/var/spack/repos/builtin/packages/pixman/package.py index d6cab39732..7107148688 100644 --- a/var/spack/repos/builtin/packages/pixman/package.py +++ b/var/spack/repos/builtin/packages/pixman/package.py @@ -40,6 +40,13 @@ class Pixman(AutotoolsPackage): depends_on('pkgconfig', type='build') depends_on('libpng') + # As discussed here: + # https://bugs.freedesktop.org/show_bug.cgi?id=104886 + # __builtin_shuffle was removed in clang 5.0. + # From version 9.1 apple-clang is based on clang 5.0. + # Patch is obtained from above link. + patch('clang.patch', when='%clang@9.1.0-apple:') + def configure_args(self): args = [ '--enable-libpng', |