diff options
author | Gregory Becker <becker33@llnl.gov> | 2016-07-06 12:02:08 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-07-06 14:54:22 -0700 |
commit | 663b30b3e89f2025a2a4746a61efd98416aeecea (patch) | |
tree | a3b3db1050eeeb0bfe6cc645caa1bde4aa4fd53f | |
parent | 6bb31a9a4c6c430ade09cbaa061255a3fcfe3239 (diff) | |
download | spack-663b30b3e89f2025a2a4746a61efd98416aeecea.tar.gz spack-663b30b3e89f2025a2a4746a61efd98416aeecea.tar.bz2 spack-663b30b3e89f2025a2a4746a61efd98416aeecea.tar.xz spack-663b30b3e89f2025a2a4746a61efd98416aeecea.zip |
Update target autodetection for linux platform
-rw-r--r-- | lib/spack/spack/platforms/linux.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py index 4d8adac384..4d3f59c320 100644 --- a/lib/spack/spack/platforms/linux.py +++ b/lib/spack/spack/platforms/linux.py @@ -1,16 +1,23 @@ import subprocess +import platform from spack.architecture import Platform, Target from spack.operating_systems.linux_distro import LinuxDistro class Linux(Platform): priority = 90 - front_end = 'x86_64' - back_end = 'x86_64' - default = 'x86_64' def __init__(self): super(Linux, self).__init__('linux') - self.add_target(self.default, Target(self.default)) + self.add_target('x86_64', Target('x86_64')) + self.add_target('ppc64le', Target('ppc64le')) + + self.default = platform.machine() + self.front_end = platform.machine() + self.back_end = platform.machine() + + if self.default not in self.targets: + self.add_target(self.default, Target(self.default)) + linux_dist = LinuxDistro() self.default_os = str(linux_dist) self.front_os = self.default_os |