lm-sensors: respect compiler choice (#38890)

Currently lm-sensors defaults to the compiler specified in the Makefile
(gcc) rather than the one specified in the spec. This patch appends the
CC flag to the make invocation with the spec compiler to fix this
behavior.
This commit is contained in:
Aiden Grossman
2023-07-27 10:58:21 -07:00
committed by GitHub
parent 51fa4e5fc4
commit 9e0629213c

View File

@@ -31,6 +31,14 @@ class LmSensors(MakefilePackage):
depends_on("flex", type="build") depends_on("flex", type="build")
depends_on("perl", type="run") depends_on("perl", type="run")
@property
def build_targets(self):
targets = []
targets.append("CC={0}".format(spack_cc))
return targets
def install(self, spec, prefix): def install(self, spec, prefix):
make("install", "PREFIX={0}".format(prefix), "ETCDIR={0}/etc".format(prefix)) make("install", "PREFIX={0}".format(prefix), "ETCDIR={0}/etc".format(prefix))