{"id":15662984,"url":"https://github.com/nihui/riscv-v-toolchain","last_synced_at":"2025-04-23T21:43:31.823Z","repository":{"id":139969719,"uuid":"442327671","full_name":"nihui/riscv-v-toolchain","owner":"nihui","description":"prebuild package for cross compiling riscv","archived":false,"fork":false,"pushed_at":"2021-12-28T02:51:28.000Z","size":3,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T03:44:10.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nihui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-28T02:31:17.000Z","updated_at":"2025-02-27T13:34:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc9559e4-c941-46ee-bebb-6d7da51b8fad","html_url":"https://github.com/nihui/riscv-v-toolchain","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Friscv-v-toolchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Friscv-v-toolchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Friscv-v-toolchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Friscv-v-toolchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nihui","download_url":"https://codeload.github.com/nihui/riscv-v-toolchain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250522284,"owners_count":21444508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T13:35:10.081Z","updated_at":"2025-04-23T21:43:31.797Z","avatar_url":"https://github.com/nihui.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Build the latest riscv toolchain with v and zfh extension on ubuntu 20.04.3\n\nYou need to build qemu from the git for running the binary\n\n```shell\n# install build requirements\nsudo apt-get update\nsudo apt-get install autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev device-tree-compiler\n\ngit clone https://github.com/riscv/riscv-gnu-toolchain.git\ncd riscv-gnu-toolchain\ngit checkout 28271f03bb538d926ad2889dc8ad1b0cb1b3b45c\n\ngit submodule update --init --recursive --depth 1 riscv-binutils\ngit submodule update --init --recursive --depth 1 riscv-glibc\ngit submodule update --init --recursive --depth 1 riscv-dejagnu\ngit submodule update --init --recursive --depth 1 riscv-newlib\ngit submodule update --init --recursive --depth 1 riscv-gdb\n\n# upgrade the riscv-gcc folder manually\nrm -rf riscv-gcc\ngit clone -b riscv-gcc-10.1-rvv-dev --single-branch --depth=1 https://github.com/riscv-collab/riscv-gcc.git\n\n# revert vfredsum -\u003e vfredusum changes for compatibility atm\npushd riscv-gcc\nwget https://github.com/riscv-collab/riscv-gcc/commit/227d14bbdbcef65cc3f8ea96e6e3fb905d32368f.patch\npatch -p1 -R -i 227d14bbdbcef65cc3f8ea96e6e3fb905d32368f.patch\npopd\n\n# fix compile error\nsed -i '/__OBSOLETE_MATH/d' riscv-newlib/newlib/libm/common/math_errf.c\n\n# build toolchain, you need at least 20GB free memory for 4 parallel jobs\n./configure --prefix=`pwd`/rv64gcv-install --with-arch=rv64gcv_zfh\nmake linux -j 4\n\n# strip debug symbols\nfind rv64gcv-install -type f | xargs -i strip -g {} || true\n\n# fix sysroot/lib/tls missing error\npushd rv64gcv-install/sysroot/lib\nln -s ./ tls\npopd\n\nzip -9 --symlinks -r rv64gcv-install.zip rv64gcv-install\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihui%2Friscv-v-toolchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnihui%2Friscv-v-toolchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihui%2Friscv-v-toolchain/lists"}