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.
This commit is contained in:
2
lib/spack/external/__init__.py
vendored
2
lib/spack/external/__init__.py
vendored
@@ -11,7 +11,7 @@
|
||||
|
||||
* 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
|
||||
--------
|
||||
|
13
lib/spack/external/archspec/README.md
vendored
13
lib/spack/external/archspec/README.md
vendored
@@ -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
|
||||
|
19
lib/spack/external/archspec/cpu/detect.py
vendored
19
lib/spack/external/archspec/cpu/detect.py
vendored
@@ -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"
|
||||
)
|
||||
|
@@ -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": {
|
||||
|
Reference in New Issue
Block a user