From 4f5be841d4dfa403978763cc555e35324d68fdd8 Mon Sep 17 00:00:00 2001 From: "Daryl W. Grunau" Date: Thu, 21 Feb 2019 14:43:29 -0700 Subject: gcc package: skip nvptx_install for gcc~nvptx (#10672) The nvptx installation support phase (added in 040b658) was always running for gcc regardless of whether +nvptx was enabled. This removes the "@when" syntax (which apparently is not working) and adds a check inside of the "nvptx_install" function to bail out if +nvptx is not enabled. --- var/spack/repos/builtin/packages/gcc/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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') -- cgit v1.2.3-70-g09d2