summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden Grossman <39388941+boomanaiden154@users.noreply.github.com>2023-07-27 10:58:21 -0700
committerGitHub <noreply@github.com>2023-07-27 19:58:21 +0200
commit9e0629213cb4b43a2c333c044fc964c98000d899 (patch)
treef55acda8cde3f3b39856e0bc987eda87260ac36f
parent51fa4e5fc49eeb13118c8527dcc89ff3b6b01cfb (diff)
downloadspack-9e0629213cb4b43a2c333c044fc964c98000d899.tar.gz
spack-9e0629213cb4b43a2c333c044fc964c98000d899.tar.bz2
spack-9e0629213cb4b43a2c333c044fc964c98000d899.tar.xz
spack-9e0629213cb4b43a2c333c044fc964c98000d899.zip
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.
-rw-r--r--var/spack/repos/builtin/packages/lm-sensors/package.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/lm-sensors/package.py b/var/spack/repos/builtin/packages/lm-sensors/package.py
index 31780f155f..9f4fe23a6a 100644
--- a/var/spack/repos/builtin/packages/lm-sensors/package.py
+++ b/var/spack/repos/builtin/packages/lm-sensors/package.py
@@ -31,6 +31,14 @@ class LmSensors(MakefilePackage):
depends_on("flex", type="build")
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):
make("install", "PREFIX={0}".format(prefix), "ETCDIR={0}/etc".format(prefix))