summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJohn Wohlbier <wohlbier@users.noreply.github.com>2020-12-29 02:46:00 -0500
committerGitHub <noreply@github.com>2020-12-29 08:46:00 +0100
commit76d23d9ee4232af3b78de45a4e0268832706d0dc (patch)
tree7475d4286c48ae48653b4548bab3db5bea5e7318 /var
parente62676b2453468d22463a18d69f0911e0be02d14 (diff)
downloadspack-76d23d9ee4232af3b78de45a4e0268832706d0dc.tar.gz
spack-76d23d9ee4232af3b78de45a4e0268832706d0dc.tar.bz2
spack-76d23d9ee4232af3b78de45a4e0268832706d0dc.tar.xz
spack-76d23d9ee4232af3b78de45a4e0268832706d0dc.zip
squashfs: fix build with GCC 10 (#20592)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/squashfs/gcc-10.patch13
-rw-r--r--var/spack/repos/builtin/packages/squashfs/package.py5
2 files changed, 18 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/squashfs/gcc-10.patch b/var/spack/repos/builtin/packages/squashfs/gcc-10.patch
new file mode 100644
index 0000000000..e7f4a721c7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/squashfs/gcc-10.patch
@@ -0,0 +1,13 @@
+diff --git a/squashfs-tools/mksquashfs.h b/squashfs-tools/mksquashfs.h
+index 1beefef7..b6503063 100644
+--- a/squashfs-tools/mksquashfs.h
++++ b/squashfs-tools/mksquashfs.h
+@@ -143,7 +143,7 @@ struct append_file {
+ #endif
+
+ extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;
+-struct cache *bwriter_buffer, *fwriter_buffer;
++extern struct cache *bwriter_buffer, *fwriter_buffer;
+ extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer,
+ *to_frag, *locked_fragment, *to_process_frag;
+ extern struct append_file **file_mapping;
diff --git a/var/spack/repos/builtin/packages/squashfs/package.py b/var/spack/repos/builtin/packages/squashfs/package.py
index 55d3b0db7b..cd7b7b4358 100644
--- a/var/spack/repos/builtin/packages/squashfs/package.py
+++ b/var/spack/repos/builtin/packages/squashfs/package.py
@@ -44,6 +44,11 @@ class Squashfs(MakefilePackage):
depends_on('xz', when='+xz')
depends_on('zstd', when='+zstd')
+ # patch from
+ # https://github.com/plougher/squashfs-tools/commit/fe2f5da4b0f8994169c53e84b7cb8a0feefc97b5.patch
+ patch('gcc-10.patch', when="%gcc@10:")
+ patch('gcc-10.patch', when="%clang@11:")
+
def build(self, spec, prefix):
with working_dir('squashfs-tools'):
default = spec.variants['default_compression'].value