summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index 57d3ece2c8..f618d0f86e 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -315,12 +315,14 @@ class Gcc(AutotoolsPackage):
# run configure/make/make(install) for the nvptx-none target
# before running the host compiler phases
- @when('+nvptx')
@run_before('configure')
def nvptx_install(self):
spec = self.spec
prefix = self.prefix
+ if not spec.satisfies('+nvptx'):
+ return
+
# config.guess returns the host triple, e.g. "x86_64-pc-linux-gnu"
guess = Executable('./config.guess')
targetguess = guess(output=str).rstrip('\n')