diff options
author | Pedro Demarchi Gomes <pedrodemargomes@gmail.com> | 2021-10-07 20:01:40 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-08 01:01:40 +0200 |
commit | 28529f9eaf59a0ad98eeecd07d3572fcb96057c4 (patch) | |
tree | d82ecd9b1994b286d8a1ebd8fa4859de14b744cd | |
parent | da31c7e894b4042e893d361e3c6dbbf2d38805b6 (diff) | |
download | spack-28529f9eaf59a0ad98eeecd07d3572fcb96057c4.tar.gz spack-28529f9eaf59a0ad98eeecd07d3572fcb96057c4.tar.bz2 spack-28529f9eaf59a0ad98eeecd07d3572fcb96057c4.tar.xz spack-28529f9eaf59a0ad98eeecd07d3572fcb96057c4.zip |
re2 pic support (#26513)
-rw-r--r-- | var/spack/repos/builtin/packages/grpc/package.py | 3 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/re2/package.py | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/grpc/package.py b/var/spack/repos/builtin/packages/grpc/package.py index 40ee6574bd..f7ad7d21f9 100644 --- a/var/spack/repos/builtin/packages/grpc/package.py +++ b/var/spack/repos/builtin/packages/grpc/package.py @@ -51,8 +51,7 @@ class Grpc(CMakePackage): depends_on('zlib') depends_on('c-ares') depends_on('abseil-cpp', when='@1.27:') - depends_on('re2+shared', when='@1.33.1:+shared') - depends_on('re2', when='@1.33.1:') + depends_on('re2+pic', when='@1.33.1:') def cmake_args(self): args = [ diff --git a/var/spack/repos/builtin/packages/re2/package.py b/var/spack/repos/builtin/packages/re2/package.py index 61a5d595ef..bcae22283e 100644 --- a/var/spack/repos/builtin/packages/re2/package.py +++ b/var/spack/repos/builtin/packages/re2/package.py @@ -19,9 +19,15 @@ class Re2(CMakePackage): variant('shared', default=False, description='Build shared instead of static libraries') + variant('pic', default=True, + description='Enable position independent code') + + # shared libs must have position-independent code + conflicts('+shared ~pic') def cmake_args(self): args = [ - self.define_from_variant('BUILD_SHARED_LIBS', 'shared') + self.define_from_variant('BUILD_SHARED_LIBS', 'shared'), + self.define_from_variant('CMAKE_POSITION_INDEPENDENT_CODE', 'pic') ] return args |