Bug 32212 - Makefile:142: ../.././gcc/libgcc.mvars: No such file or directory
Summary: Makefile:142: ../.././gcc/libgcc.mvars: No such file or directory
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.3.0
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-04 23:32 UTC by Thomas Kleffel
Modified: 2007-11-21 14:44 UTC (History)
1 user (show)

See Also:
Host: host-i686-pc-linux-gnu
Target: fr30-elf
Build: host-i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Kleffel 2007-06-04 23:32:56 UTC
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
Comment 1 Andrew Pinski 2007-06-04 23:37:57 UTC
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 .
Comment 2 Thomas Kleffel 2007-06-05 00:06:47 UTC
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!
Comment 3 Rask Ingemann Lambertsen 2007-11-21 14:44:54 UTC
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.