go: Fix cgo (#5052)

This commit is contained in:
Michael Kuhn 2017-08-10 18:42:02 +02:00 committed by becker33
parent c6cd447a8a
commit 887e4724c2

View File

@ -106,6 +106,10 @@ def install(self, spec, prefix):
def setup_environment(self, spack_env, run_env):
spack_env.set('GOROOT_FINAL', self.spec.prefix)
# We need to set CC/CXX_FOR_TARGET, otherwise cgo will use the
# internal Spack wrappers and fail.
spack_env.set('CC_FOR_TARGET', self.compiler.cc)
spack_env.set('CXX_FOR_TARGET', self.compiler.cxx)
def setup_dependent_package(self, module, dependent_spec):
"""Called before go modules' install() methods.