diff options
author | Kevin Pedretti <ktpedre@users.noreply.github.com> | 2021-10-05 13:22:55 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-05 19:22:55 +0000 |
commit | 47607dcac5928432be8abad1360c4c357809e363 (patch) | |
tree | c5e60fac2e9486dceacc99e8040d58ea5cb3f616 /lib/spack/external | |
parent | d998ea1bd41b4cf7f47caa734b7c7df86178ef0c (diff) | |
download | spack-47607dcac5928432be8abad1360c4c357809e363.tar.gz spack-47607dcac5928432be8abad1360c4c357809e363.tar.bz2 spack-47607dcac5928432be8abad1360c4c357809e363.tar.xz spack-47607dcac5928432be8abad1360c4c357809e363.zip |
Use gnuconfig package for config file replacement for RISC-V. (#26364)
* Use gnuconfig package for config file replacement for RISC-V.
This extends the changes in #26035 to handle RISC-V. Before this change,
many packages fail to configure on riscv64 due to config.guess being too
old to know about RISC-V. This is seen out of the box when clingo fails
to build from source due to pkgconfig failing to configure, throwing
error: "configure: error: cannot guess build type; you must specify one".
* Add riscv64 architecture
* Update vendored archspec from upstream project.
These archspec updates include changes needed to support riscv64.
* Update archspec's __init__.py to reflect the commit hash of archspec being used.
Diffstat (limited to 'lib/spack/external')
-rw-r--r-- | lib/spack/external/__init__.py | 2 | ||||
-rw-r--r-- | lib/spack/external/archspec/README.md | 13 | ||||
-rw-r--r-- | lib/spack/external/archspec/cpu/detect.py | 19 | ||||
-rw-r--r-- | lib/spack/external/archspec/json/cpu/microarchitectures.json | 38 |
4 files changed, 71 insertions, 1 deletions
diff --git a/lib/spack/external/__init__.py b/lib/spack/external/__init__.py index 112ad9e9af..b2acccd8cc 100644 --- a/lib/spack/external/__init__.py +++ b/lib/spack/external/__init__.py @@ -11,7 +11,7 @@ archspec * Homepage: https://pypi.python.org/pypi/archspec * Usage: Labeling, comparison and detection of microarchitectures -* Version: 0.1.2 (commit 8940a8b099a54ded21f8cf4314c4b83b558bb6d1) +* Version: 0.1.2 (commit 85757b6666422fca86aa882a769bf78b0f992f54) argparse -------- diff --git a/lib/spack/external/archspec/README.md b/lib/spack/external/archspec/README.md index 015eb684b5..fb1eaebda3 100644 --- a/lib/spack/external/archspec/README.md +++ b/lib/spack/external/archspec/README.md @@ -49,6 +49,19 @@ $ tox congratulations :) ``` +## Citing Archspec + +If you are referencing `archspec` in a publication, please cite the following +paper: + + * Massimiliano Culpo, Gregory Becker, Carlos Eduardo Arango Gutierrez, Kenneth + Hoste, and Todd Gamblin. + [**`archspec`: A library for detecting, labeling, and reasoning about + microarchitectures**](https://tgamblin.github.io/pubs/archspec-canopie-hpc-2020.pdf). + In *2nd International Workshop on Containers and New Orchestration Paradigms + for Isolated Environments in HPC (CANOPIE-HPC'20)*, Online Event, November + 12, 2020. + ## License Archspec is distributed under the terms of both the MIT license and the diff --git a/lib/spack/external/archspec/cpu/detect.py b/lib/spack/external/archspec/cpu/detect.py index 56b73b3a75..31cde2af6d 100644 --- a/lib/spack/external/archspec/cpu/detect.py +++ b/lib/spack/external/archspec/cpu/detect.py @@ -306,3 +306,22 @@ def compatibility_check_for_aarch64(info, target): and (target.vendor == vendor or target.vendor == "generic") and target.features.issubset(features) ) + + +@compatibility_check(architecture_family="riscv64") +def compatibility_check_for_riscv64(info, target): + """Compatibility check for riscv64 architectures.""" + basename = "riscv64" + uarch = info.get("uarch") + + # sifive unmatched board + if uarch == "sifive,u74-mc": + uarch = "u74mc" + # catch-all for unknown uarchs + else: + uarch = "riscv64" + + arch_root = TARGETS[basename] + return (target == arch_root or arch_root in target.ancestors) and ( + target == uarch or target.vendor == "generic" + ) diff --git a/lib/spack/external/archspec/json/cpu/microarchitectures.json b/lib/spack/external/archspec/json/cpu/microarchitectures.json index 40f59bfd9e..0be30c25e0 100644 --- a/lib/spack/external/archspec/json/cpu/microarchitectures.json +++ b/lib/spack/external/archspec/json/cpu/microarchitectures.json @@ -2017,6 +2017,44 @@ "features": [], "compilers": { } + }, + "riscv64": { + "from": [], + "vendor": "generic", + "features": [], + "compilers": { + "gcc": [ + { + "versions": "7.1:", + "flags" : "-march=rv64gc" + } + ], + "clang": [ + { + "versions": "9.0:", + "flags" : "-march=rv64gc" + } + ] + } + }, + "u74mc": { + "from": ["riscv64"], + "vendor": "SiFive", + "features": [], + "compilers": { + "gcc": [ + { + "versions": "10.2:", + "flags" : "-march=rv64gc -mtune=sifive-7-series" + } + ], + "clang" : [ + { + "versions": "12.0:", + "flags" : "-march=rv64gc -mtune=sifive-7-series" + } + ] + } } }, "feature_aliases": { |