$ show riscv-collab/riscv-gnu-toolchain
This repository is the RISC-V GNU Compiler Toolchain build system. It provides the infrastructure to build cross-compilation toolchains targeting RISC-V architectures (RV32/RV64) with various C libraries (newlib, picolibc, glibc, musl, uClibc). The codebase consists of autotools-based configure scripts, Makefile templates, vendored Linux kernel UAPI headers for RISC-V, CI workflows, and test infrastructure including DejaGnu board configurations and regression test allowlists. It is not an end-user application but a build orchestration project that compiles GCC, binutils, and associated libraries from source. The architecture is a classic GNU autotools build system with submodule dependencies. Key entry points are the top-level `configure` script and `Makefile.in`, which drive the build of all toolchain components. The repository also includes scripts for running tests on QEMU and Spike simulators, and CI pipelines for continuous integration and nightly releases.
The LLM identified 3 files worth highlighting for reuse:
A comprehensive collection of Linux kernel userspace API headers for RISC-V, including architecture-specific definitions (asm/*), generic asm-generic headers, and subsystem headers for networking, DRM, RDMA, sound, virtualization, and more. This directory is a self-contained snapshot that can be extracted and used as a standalone kernel headers package for cross-compilation or userspace tool development targeting RISC-V Linux. It demonstrates careful curation of kernel interfaces required for building a complete Linux toolchain sysroot.
A Python script that processes GCC regression test logs to generate categorized allowlists (common, rv32, rv64, glibc, newlib intersections). It parses test result files, extracts failure patterns, and outputs allowlist files used to filter expected failures in CI. This pattern is reusable for any project that needs to maintain a known-failures list from test suite logs, especially when testing across multiple target configurations.
A DejaGnu board configuration file for the Spike RISC-V simulator. It sets up the simulator with the proxy kernel (`spike pk`) and passes flags for static linking and pthread support. This file is a reusable pattern for integrating a custom simulator into a DejaGnu-based test framework, enabling automated testing of compiled binaries on a RISC-V ISA simulator.