diff --git a/var/spack/repos/builtin/packages/perl-forks/package.py b/var/spack/repos/builtin/packages/perl-forks/package.py index 7fbd843ac2..16e69a6b6a 100644 --- a/var/spack/repos/builtin/packages/perl-forks/package.py +++ b/var/spack/repos/builtin/packages/perl-forks/package.py @@ -19,3 +19,7 @@ class PerlForks(PerlPackage): depends_on('perl-devel-symdump', type=('build', 'run')) depends_on('perl-list-moreutils', type=('build', 'run')) depends_on('perl-sys-sigaction', type=('build', 'run')) + + def setup_build_environment(self, env): + if 'perl~threads' in self.spec: + env.set('FORKS_SIMULATE_USEITHREADS', '1')