Make runtimes depend on libc only on linux (#43981)

This commit is contained in:
Massimiliano Culpo 2024-05-03 15:40:02 +02:00 committed by GitHub
parent 7008bb6335
commit 5c96e67bb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -53,7 +53,8 @@ class GccRuntime(Package):
provides("libgfortran@4", when="%gcc@7")
provides("libgfortran@5", when="%gcc@8:")
depends_on("libc", type="link")
depends_on("libc", type="link", when="platform=linux")
depends_on("libc", type="link", when="platform=cray")
def install(self, spec, prefix):
if spec.platform in ["linux", "cray", "freebsd"]:

View file

@ -45,7 +45,8 @@ class IntelOneapiRuntime(Package):
conflicts("platform=windows", msg="IntelOneAPI can only be installed on Linux, and FreeBSD")
conflicts("platform=darwin", msg="IntelOneAPI can only be installed on Linux, and FreeBSD")
depends_on("libc", type="link")
depends_on("libc", type="link", when="platform=linux")
depends_on("libc", type="link", when="platform=cray")
def install(self, spec, prefix):
libraries = get_elf_libraries(compiler=self.compiler, libraries=self.LIBRARIES)