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.
This commit is contained in:
Daryl W. Grunau 2019-02-21 14:43:29 -07:00 committed by Peter Scheibel
parent 5600c9f0d9
commit 4f5be841d4

View File

@ -315,12 +315,14 @@ def configure_args(self):
# run configure/make/make(install) for the nvptx-none target # run configure/make/make(install) for the nvptx-none target
# before running the host compiler phases # before running the host compiler phases
@when('+nvptx')
@run_before('configure') @run_before('configure')
def nvptx_install(self): def nvptx_install(self):
spec = self.spec spec = self.spec
prefix = self.prefix prefix = self.prefix
if not spec.satisfies('+nvptx'):
return
# config.guess returns the host triple, e.g. "x86_64-pc-linux-gnu" # config.guess returns the host triple, e.g. "x86_64-pc-linux-gnu"
guess = Executable('./config.guess') guess = Executable('./config.guess')
targetguess = guess(output=str).rstrip('\n') targetguess = guess(output=str).rstrip('\n')