summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py1
-rw-r--r--var/spack/repos/builtin/packages/python/package.py7
-rw-r--r--var/spack/repos/builtin/packages/silo/package.py8
3 files changed, 16 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index d6c53c92a6..1c6e25a6ae 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -174,6 +174,7 @@ class Hdf5(AutotoolsPackage):
if '+shared' in spec:
extra_args.append('--enable-shared')
else:
+ extra_args.append('--disable-shared')
extra_args.append('--enable-static-exec')
if '+cxx' in spec:
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index 1c48c41dda..e68870b412 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -81,6 +81,8 @@ class Python(AutotoolsPackage):
# builds then use a 32-bit type for Py_UNICODE and store Unicode data
# internally as UCS4. Note that UCS2 and UCS4 Python builds are not binary
# compatible.
+ variant('pic', default=True,
+ description='Produce position-independent code (for shared libs)')
depends_on("openssl")
depends_on("bzip2")
@@ -147,6 +149,8 @@ class Python(AutotoolsPackage):
if '+shared' in spec:
config_args.append('--enable-shared')
+ else:
+ config_args.append('--disable-shared')
if '+ucs4' in spec:
if spec.satisfies('@:2.7'):
@@ -161,6 +165,9 @@ class Python(AutotoolsPackage):
if spec.satisfies('@3:'):
config_args.append('--without-ensurepip')
+ if '+pic' in spec:
+ config_args.append('CFLAGS={0}'.format(self.compiler.pic_flag))
+
return config_args
@run_after('install')
diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py
index 3a18a1995f..9dd8fcc729 100644
--- a/var/spack/repos/builtin/packages/silo/package.py
+++ b/var/spack/repos/builtin/packages/silo/package.py
@@ -40,6 +40,8 @@ class Silo(Package):
variant('shared', default=True, description='Build shared libraries')
variant('silex', default=False,
description='Builds Silex, a GUI for viewing Silo files')
+ variant('pic', default=True,
+ description='Produce position-independent code (for shared libs)')
depends_on('hdf5')
depends_on('qt', when='+silex')
@@ -56,6 +58,12 @@ class Silo(Package):
if '+silex' in spec:
config_args.append('--with-Qt-dir=%s' % spec['qt'].prefix)
+ if '+pic' in spec:
+ config_args += [
+ 'CFLAGS={0}'.format(self.compiler.pic_flag),
+ 'CXXFLAGS={0}'.format(self.compiler.pic_flag),
+ 'FCFLAGS={0}'.format(self.compiler.pic_flag)]
+
configure(
'--prefix=%s' % prefix,
'--with-hdf5=%s,%s' % (spec['hdf5'].prefix.include,