From 76d23d9ee4232af3b78de45a4e0268832706d0dc Mon Sep 17 00:00:00 2001 From: John Wohlbier Date: Tue, 29 Dec 2020 02:46:00 -0500 Subject: squashfs: fix build with GCC 10 (#20592) --- var/spack/repos/builtin/packages/squashfs/gcc-10.patch | 13 +++++++++++++ var/spack/repos/builtin/packages/squashfs/package.py | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/squashfs/gcc-10.patch (limited to 'var') 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 -- cgit v1.2.3-70-g09d2