summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages')
-rw-r--r--var/spack/repos/builtin/packages/gcc-runtime/package.py72
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py29
2 files changed, 31 insertions, 70 deletions
diff --git a/var/spack/repos/builtin/packages/gcc-runtime/package.py b/var/spack/repos/builtin/packages/gcc-runtime/package.py
index f0cd13dd14..ff13e05476 100644
--- a/var/spack/repos/builtin/packages/gcc-runtime/package.py
+++ b/var/spack/repos/builtin/packages/gcc-runtime/package.py
@@ -20,6 +20,8 @@ class GccRuntime(Package):
homepage = "https://gcc.gnu.org"
has_code = False
+ tags = ["runtime"]
+
maintainers("haampie")
license("GPL-3.0-or-later WITH GCC-exception-3.1")
@@ -42,76 +44,6 @@ class GccRuntime(Package):
"ubsan",
]
- for v in [
- "13.2",
- "13.1",
- "12.3",
- "12.2",
- "12.1",
- "11.4",
- "11.3",
- "11.2",
- "11.1",
- "10.5",
- "10.4",
- "10.3",
- "10.2",
- "10.1",
- "9.5",
- "9.4",
- "9.3",
- "9.2",
- "9.1",
- "8.5",
- "8.4",
- "8.3",
- "8.2",
- "8.1",
- "7.5",
- "7.4",
- "7.3",
- "7.2",
- "7.1",
- "6.5",
- "6.4",
- "6.3",
- "6.2",
- "6.1",
- "5.5",
- "5.4",
- "5.3",
- "5.2",
- "5.1",
- "4.9.4",
- "4.9.3",
- "4.9.2",
- "4.9.1",
- "4.9.0",
- "4.8.5",
- "4.8.4",
- "4.8.3",
- "4.8.2",
- "4.8.1",
- "4.8.0",
- "4.7.4",
- "4.7.3",
- "4.7.2",
- "4.7.1",
- "4.7.0",
- "4.6.4",
- "4.6.3",
- "4.6.2",
- "4.6.1",
- "4.6.0",
- "4.5.4",
- "4.5.3",
- "4.5.2",
- "4.5.1",
- "4.5.0",
- ]:
- version(v)
- requires(f"%gcc@{v}", when=f"@{v}")
-
def install(self, spec, prefix):
if spec.platform in ["linux", "cray", "freebsd"]:
libraries = self._get_libraries_elf()
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index f6dce2ea00..2fb8d23aed 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -1111,3 +1111,32 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
),
),
)
+
+ @classmethod
+ def runtime_constraints(cls, *, compiler, pkg):
+ """Callback function to inject runtime-related rules into the solver.
+
+ Rule-injection is obtained through method calls of the ``pkg`` argument.
+
+ Documentation for this function is temporary. When the API will be in its final state,
+ we'll document the behavior at https://spack.readthedocs.io/en/latest/
+
+ Args:
+ compiler: compiler object (node attribute) currently considered
+ pkg: object used to forward information to the solver
+ """
+ pkg("*").depends_on(
+ "gcc-runtime",
+ when="%gcc",
+ type="link",
+ description="If any package uses %gcc, it depends on gcc-runtime",
+ )
+ pkg("*").depends_on(
+ f"gcc-runtime@{str(compiler.version)}:",
+ when=f"%{str(compiler.spec)}",
+ type="link",
+ description=f"If any package uses %{str(compiler.spec)}, "
+ f"it depends on gcc-runtime@{str(compiler.version)}:",
+ )
+ # The version of gcc-runtime is the same as the %gcc used to "compile" it
+ pkg("gcc-runtime").requires(f"@={str(compiler.version)}", when=f"%{str(compiler.spec)}")