Tuesday, July 7, 2015

Building a Toolchain for OR1K

I recently have started looking more into the site OpenCores.org, and came across its page on building a toolchain for OR1K.

I ran into a couple of problems when following the instructions for building the Newlib toolchain. One was this error when building stage 1 of gcc:

        "configure: error: cannot compute suffix of object files: cannot compile"

Instructions for resolving this error are given on the gcc website here. However, the tips there along with most help I found given on other sites suggest that the problem is that the locations of the MPC, MPFR, and GMP libraries are not in LD_LIBRARY_PATH. I am running Ubuntu, made sure that these libraries were installed and were in the LD_LIBRARY_PATH, and was still getting the error. I noticed that my versions of these libraries were newer than those listed in the or1k-gcc/contrib/download_prerequesites script, so I tried running it to get those versions. Unfortunately, it seems the download locations listed in that script don't exist anymore. So I downloaded the listed versions of these libraries from the projects' websites (MPC 0.8.1, MPFR 2.4.2, and GMP 4.3.2), commented out the commands from the script that downloaded the tarballs, and reran the script. After this, the building of stage 1 of gcc worked. I'll post updates here with further information that might be useful.

No comments:

Post a Comment