I want to install and build the riscv gnu toolchain in my machine. I have tried the following steps. My machine is running Fedora Linux distro.
1.Installing dependencies/prerequisites
sudo yum install autoconf automake python3 libmpc-devel mpfr-devel gmp-devel gawk bison flex texinfo patchutils gcc gcc-c++ zlib-devel expat-devel
2.directory creation
mkdir risc-v
cd risc-v
git clone https://github.com/riscv/riscv-gnu-toolchain
The repo mentions that the full download is 7GB but on cloning the size is only 2MB.
3.Configure and Make
mkdir /opt/riscv
./configure --prefix=/opt/riscv
make linux
When the 3rd step is executed the following happens
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for fgrep... /usr/bin/grep -F
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for bash... /bin/sh
checking for __gmpz_init in -lgmp... yes
checking for mpfr_init in -lmpfr... yes
checking for mpc_init2 in -lmpc... yes
checking for curl... /usr/bin/curl
checking for wget... /usr/bin/wget
checking for ftp... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating scripts/wrapper/awk/awk
config.status: creating scripts/wrapper/sed/sed
cd /home/mukund/risc-v/riscv-gnu-toolchain && \
flock `git rev-parse --git-dir`/config git submodule init /home/mukund/risc-v/riscv-gnu-toolchain/gcc/ && \
flock `git rev-parse --git-dir`/config git submodule update /home/mukund/risc-v/riscv-gnu-toolchain/gcc/
Submodule 'gcc' (https://gcc.gnu.org/git/gcc.git) registered for path 'gcc'
Cloning into '/home/mukund/risc-v/riscv-gnu-toolchain/gcc'...
It is stuck here and not moving forward. When I looked into /opt/riscv it was entirely empty which means nothing was happening.
Can anyone please help with a fix for this and explain how I can install and build the riscv gnu toolchain?
It takes time like 100-120 mins. If you are expecting the build to end in 5-10 minutes, be patient. I hope the suggestion of patience solve your problem.