I want to build a gcc 4.3.0 fresh from svn for the fr30-elf target. Binutils 2.17 are already installed in /usr/local/fr30-elf-new/. In the gcc source directory I do: # ./configure --target=fr30-elf --prefix=/usr/local/fr30-elf-new/ [...] # make [...] The build fails with the following error message: Adding multilib support to Makefile in ../.././libgcc multidirs= with_multisubdir= make[2]: Entering directory `/mnt/space/home/tk/gcc-svn/gcc/fr30-elf/libgcc' Makefile:142: ../.././gcc/libgcc.mvars: No such file or directory make[2]: *** No rule to make target `../.././gcc/libgcc.mvars'. Stop. make[2]: Leaving directory `/mnt/space/home/tk/gcc-svn/gcc/fr30-elf/libgcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory `/mnt/space/home/tk/gcc-svn/gcc' make: *** [all] Error 2 In fr30-elf/libgcc/Makefile, line 142 reads: include $(gcc_objdir)/libgcc.mvars and $(gcc_objdir) is defined in line 27 as gcc_objdir = $(MULTIBUILDTOP)../../$(host_subdir)/gcc and $(host_subdir) is defined in line 24 as host_subdir = . I found that in my build tree, the file libgcc.mvars is located in host-i686-pc-linux-gnu/gcc/libgcc.mvars So I changed line 24 of fr30-elf/libgcc/Makefile to host_subdir = host-i686-pc-linux-gnu after that, I could build without problems. I not familiar enough with autoconf and the gcc build system to hunt down that bug, so I can't offer a patch for it. Best regards, Thomas
Building in the source directory is one of the least tested features of GCC, you should try building in a different directory as recommended by http://gcc.gnu.org/install .
Ok, if I build outside the source tree, the problem doesn't appear. I'm not sure if this is still a bug or not, so I'm leaving the ticket open. Thanks for the hint!
Strictly speaking, it is a bug that building in the source tree doesn't work, but IIRC, the instructions on building GCC do mention that building in the source tree doesn't work, and no fix seem likely any time soon.