riscv-old-gcc
riscv-old-gcc copied to clipboard
unable to build mpfr, native branch.
Dear All,
I am trying to build the native compiler for RISC-V. Steps followed: cd riscv-gcc git checkout native git pull // additional step performed. patch -p1 < native-host-linux.patch ./configure make -j1 native SYSROOT=$SYSROOT
...
make[5]: *** No rule to make target buildopt.lo', needed by
libmpfr.la'. Stop.
make[5]: Leaving directory /home/akini/riscv/riscv-tools/riscv-gcc/build-gcc-native/mpfr/src' make[4]: *** [all] Error 2 make[4]: Leaving directory
/home/akini/riscv/riscv-tools/riscv-gcc/build-gcc-native/mpfr/src'
env variables set: export TOP=/home/akini/riscv export RISCV=$TOP/riscv export SYSROOT=$TOP/sysroot export PATH=$PATH:$RISCV/bin
Let me know if you need the config.log or build log to help me further.
regards, Anup.
As @qmn responded on the RISC-V sw-dev mailing list, the working copy of mpfr may be corrupted, and refreshing the source directory typically resolves this. If the issue persists, I could take a look at the offending /home/akini/riscv/riscv-tools/riscv-gcc/build-gcc-native/mpfr/src/Makefile
that was generated by configure
.
However, please note that this native branch has not been maintained for at least a year. In its current state, it is severely outdated with regard to the kernel headers and ABI. Therefore it cannot be successfully cross-compiled by newer toolchains, irrespective of the MPFR issue, and the binaries it would produce would not be compatible with a recent Linux/RISC-V kernel (roughly any version that tracks an upstream branch later than 3.4).
My plan for the near future is to finally retire this branch when I work towards a native self-hosted toolchain based on riscv-gnu-toolchain.