diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2021-04-21 22:17:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-21 22:17:08 +0200 |
commit | 730fbae463589816ffec55bc9db75949b8e68688 (patch) | |
tree | d4dc5b9d21758e7e19bf8c9b68e2dd426feb32d9 | |
parent | ee76c329f85cb5cd5226f8045be43253ac0837a5 (diff) | |
download | spack-730fbae463589816ffec55bc9db75949b8e68688.tar.gz spack-730fbae463589816ffec55bc9db75949b8e68688.tar.bz2 spack-730fbae463589816ffec55bc9db75949b8e68688.tar.xz spack-730fbae463589816ffec55bc9db75949b8e68688.zip |
Disable multithreaded version of zstd by default (#23167)
* Disable multithreaded version of zstd by default
* zstd pthreads by default again! but configurable, and turned off in GCC
-rw-r--r-- | var/spack/repos/builtin/packages/gcc/package.py | 5 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/zstd/package.py | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index c1f5393bf1..d584568b8b 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -122,7 +122,10 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): depends_on('isl@0.15:0.20', when='@9:9.9 +graphite') depends_on('isl@0.15:', when='@10: +graphite') depends_on('zlib', when='@6:') - depends_on('zstd', when='@10:') + # GCC only tries to link with -lzstd but it requires + # -pthread too when linking against libzstd.a, so + # disable multithreading by default + depends_on('zstd ~multithread', when='@10:') depends_on('diffutils', type='build') depends_on('iconv', when='platform=darwin') depends_on('gnat', when='languages=ada') diff --git a/var/spack/repos/builtin/packages/zstd/package.py b/var/spack/repos/builtin/packages/zstd/package.py index 9a5d519faf..ca696279a7 100644 --- a/var/spack/repos/builtin/packages/zstd/package.py +++ b/var/spack/repos/builtin/packages/zstd/package.py @@ -39,6 +39,7 @@ class Zstd(CMakePackage): variant('zlib', default=False, description='Build programs with zlib support') variant('lzma', default=False, description='Build programs with lzma support') variant('lz4', default=False, description='Build programs with zlib support') + variant('multithread', default=True, description='Build with pthread support') conflicts('+zlib', when='~programs', msg="zlib requires programs to be built") conflicts('+lzma', when='~programs', msg="lzma requires programs to be built") @@ -53,5 +54,6 @@ class Zstd(CMakePackage): self.define_from_variant('ZSTD_BUILD_PROGRAMS', 'programs'), self.define_from_variant('ZSTD_BUILD_STATIC', 'static'), self.define_from_variant('ZSTD_BUILD_SHARED', 'shared'), - self.define_from_variant('ZSTD_LEGACY_SUPPORT', 'legacy') + self.define_from_variant('ZSTD_LEGACY_SUPPORT', 'legacy'), + self.define_from_variant('ZSTD_MULTITHREAD_SUPPORT', 'multithread') ] |