summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorWanlin Wang <32032219+wanlinwang@users.noreply.github.com>2024-03-01 04:11:40 +0800
committerGitHub <noreply@github.com>2024-02-29 12:11:40 -0800
commit1f919255fdc641038c3380cdfd53cdb977b64a99 (patch)
tree7ee185c9f7342719645a5fc28313d1991b394d92 /var
parent5140a9b6a3588d9e44a98a6a1f3993e7687ef2fe (diff)
downloadspack-1f919255fdc641038c3380cdfd53cdb977b64a99.tar.gz
spack-1f919255fdc641038c3380cdfd53cdb977b64a99.tar.bz2
spack-1f919255fdc641038c3380cdfd53cdb977b64a99.tar.xz
spack-1f919255fdc641038c3380cdfd53cdb977b64a99.zip
Update riscv-gnu-toolchain package.py (#42893)
* Update package.py 1. add one compiler type named 'musl' 2. add a variant name 'multilib' 3. add a variant name 'cmodel' * Added one compiler type named 'musl'. Added a variant named 'multilib'. Added a variant named 'cmodel'. Added several versions. * aarch64 is not supported.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py71
1 files changed, 70 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py b/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py
index c12d5209ae..64b880da33 100644
--- a/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py
+++ b/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py
@@ -19,6 +19,54 @@ class RiscvGnuToolchain(AutotoolsPackage):
version("develop", branch="master", submodules=True)
version(
+ "2024.02.02",
+ tag="2024.02.02",
+ commit="59ab58e8a4aed4ed8f711ebab307757a5ebaa1f5",
+ submodules=True,
+ )
+ version(
+ "2023.12.20",
+ tag="2023.12.20",
+ commit="8c969a9efe68a811cf524174d25255632029f3d3",
+ submodules=True,
+ )
+ version(
+ "2023.12.14",
+ tag="2023.12.14",
+ commit="99e2d2bac5144f5152ba6d3fbf04bdd9b9ba4381",
+ submodules=True,
+ )
+ version(
+ "2023.12.12",
+ tag="2023.12.12",
+ commit="ae9efcc33c4968f97ab89b4b13c7f6520b145f94",
+ submodules=True,
+ )
+ version(
+ "2023.11.22",
+ tag="2023.11.22",
+ commit="8e9fb09a0c4b1e566492ee6f42e8c1fa5ef7e0c2",
+ submodules=True,
+ )
+ version(
+ "2023.11.20",
+ tag="2023.11.20",
+ commit="82c3d6550a26f03c3b4acb6cbefe5c5e98855ddb",
+ submodules=True,
+ )
+ version(
+ "2023.11.17",
+ tag="2023.11.17",
+ commit="9b2ad263050085543a1ad57c13039e49a79a7def",
+ submodules=True,
+ )
+ version(
+ "2023.11.08",
+ tag="2023.11.08",
+ commit="b86b2b37d0acc607156ff56ff17ee105a9b48897",
+ submodules=True,
+ )
+ version(
"2023.10.18",
tag="2023.10.18",
commit="b86b2b37d0acc607156ff56ff17ee105a9b48897",
@@ -85,14 +133,33 @@ class RiscvGnuToolchain(AutotoolsPackage):
depends_on("gmake@4.3:", type="build")
conflicts("platform=windows", msg="Windows is not supported.")
+ conflicts("arch=aarch64", msg="aarch64 is not supported.")
variant(
"compiler_type",
default="newlib",
- values=("newlib", "linux"),
+ values=("newlib", "linux", "musl"),
description="Compiler back-end to build",
)
+ variant("multilib", default=False, description="Enable multilib support")
+ variant(
+ "cmodel",
+ default="medlow",
+ values=("medlow", "medany"),
+ description="The name of the cmodel",
+ )
+
+ def configure_args(self):
+ args = super(RiscvGnuToolchain, self).configure_args()
+ if "+multilib" in self.spec:
+ args.append("--enable-multilib")
+
+ cmodel_value = self.spec.variants["cmodel"].value
+ if cmodel_value:
+ args.append("--with-cmodel={}".format(cmodel_value))
+ return args
+
def build(self, spec, prefix):
"""Makes the build targets specified by
:py:attr:``~.AutotoolsPackage.build_targets``
@@ -109,5 +176,7 @@ class RiscvGnuToolchain(AutotoolsPackage):
params = []
if self.spec.satisfies("compiler_type=linux"):
params.append("linux")
+ elif self.spec.satisfies("compiler_type=musl"):
+ params.append("musl")
make(*params)