summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/architecture.py6
-rw-r--r--lib/spack/spack/build_environment.py6
-rw-r--r--lib/spack/spack/platforms/cray_xc.py7
3 files changed, 19 insertions, 0 deletions
diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py
index a7cda2bf68..2701fa9a0c 100644
--- a/lib/spack/spack/architecture.py
+++ b/lib/spack/spack/architecture.py
@@ -190,6 +190,12 @@ class Platform(object):
return self.operating_sys.get(name, None)
+ @classmethod
+ def setup_platform_environment(self, env):
+ """ Subclass can override this method if it requires any
+ platform-specific build environment modifications.
+ """
+ pass
@classmethod
def detect(self):
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 93fb0690f7..4e799eeea1 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -248,6 +248,11 @@ def set_build_environment_variables(pkg, env, dirty=False):
ci = join_path(item, 'case-insensitive')
if os.path.isdir(ci):
env_paths.append(ci)
+
+# for item in pkg.spec.platform.env_paths:
+# env_paths.append(item)
+ # TODO: move platform-specific knowledge to platform.
+ # (join_path(spack.build_env_path, 'cray'))
for item in reversed(env_paths):
env.prepend_path('PATH', item)
@@ -444,6 +449,7 @@ def setup_package(pkg, dirty=False):
set_compiler_environment_variables(pkg, spack_env)
set_build_environment_variables(pkg, spack_env, dirty)
+ pkg.spec.architecture.platform.setup_platform_environment(spack_env)
load_external_modules(pkg)
# traverse in postorder so package can use vars from its dependencies
spec = pkg.spec
diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py
index e3c7761a94..aee375ac89 100644
--- a/lib/spack/spack/platforms/cray_xc.py
+++ b/lib/spack/spack/platforms/cray_xc.py
@@ -45,6 +45,13 @@ class CrayXc(Platform):
self.add_operating_system('CNL10', Cnl())
@classmethod
+ def setup_platform_environment(self, env):
+ """ Change the linker to default dynamic to be more
+ similar to linux/standard linker behavior
+ """
+ env.set('CRAYPE_LINK_TYPE', 'dynamic')
+
+ @classmethod
def detect(self):
try:
cc_verbose = which('ftn')