On Wed, Jun 29, 2011 at 3:21 PM, R. Diez <rdiezmail-gcc@xxxxxxxx> wrote: > >> [...] Or you can continue the procedure you are >> using, but run "make all-gcc" and "make install-gcc" >> for the first phase. > > This advice worked, many thanks. And it not only works with 4.6.1 , it works with the older 4.5.3 too. > > >> [...] "make all-gcc", but your make command appear to be >> trying to build all of gcc before newlib has been built. > > I'm finding it difficult to build GCC cross-compilers. There is advice and patches all over the place, often for outdated GCC versions. I am sure I did not come up with the old "make" and "make install" method for the bootstrap phase myself, I must have found it somewhere, and it did work with 4.5.3 and some other older versions. Something must have changed in the meantime. > > Is there a "canonical" way to build GCC cross-compilers? Or some place to find the "right" information for a given version? The information under http://gcc.gnu.org/install/build.html is not enough, and I didn't have much luck on the newlib website either. > > Where can I find information about makefile targets like the "all-gcc" or "install-gcc" you mentioned? I tried "make help" to no avail. They're not mentioned under http://gcc.gnu.org/install/ either. > > Thanks again, > R. Diez Hi there, I've been doing something very similar myself, building a toolchain for Sparc Leon. I went through various configuration methods before I got something that worked, and had some very good help on this list from Kai Ruottu (look for some of his posts on the subject). Basically, the approach is to copy (or link) the two directories "libgloss" and "newlib" from the Newlib distribution into the top level of the GCC source directory, i.e. alongside libiberty, libstdc++-v3 etc. Then you can configure and build GCC and Newlib in one step instead of two. Just combine the config options you'd use for Newlib and the "full GCC", then run make all, make install, and bingo... I've just done a build using this method on 4.6.1, with Newlib 1.19.0, and it works fine :) In theory, and from what Kai said, you should also be able to build gmp, mpfr and mpc at the same time by copying them in as well, but I haven't been able to get that to work. You still have to build Binutils and GDB separately as well, but that's not a big job. Hope that helps, Regards, David P.