Bug 40191 - fails to build a cross-compiler in-tree
Summary: fails to build a cross-compiler in-tree
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build, patch
Depends on:
Blocks:
 
Reported: 2009-05-18 20:42 UTC by Robert Millan
Modified: 2021-07-19 18:32 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
patch (297 bytes, patch)
2009-05-18 20:45 UTC, Robert Millan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Millan 2009-05-18 20:42:30 UTC
I found this when building a i586-mingw32 cross-compiler directly in srcdir.  Build fails with:

make[2]: Entering directory `/tmp/trunk/i586-mingw32msvc/libgcc'
Makefile:143: ../.././gcc/libgcc.mvars: No such file or directory
make[2]: *** No rule to make target `../.././gcc/libgcc.mvars'.  Stop.

This happens because ${host_subdir} gets the wrong path (fallbacks to ".").  The check in acx.m4 doesn't take into account that ${host_noncanonical} changes its meaning when we switched from gcc/ to libgcc/.

Patch attached.
Comment 1 Andrew Pinski 2009-05-18 20:43:36 UTC
I don't know that many folks who build in the source directory :).
Comment 2 Robert Millan 2009-05-18 20:45:16 UTC
Created attachment 17889 [details]
patch

2009-05-18  Robert Millan <rmh.gcc@aybabtu.com>

* acx.m4: Fix ${host_subdir} initialization for libgcc.
Comment 3 Robert Millan 2009-07-28 22:11:14 UTC
ping
Comment 4 Kai Tietz 2010-10-29 14:16:30 UTC
(In reply to comment #3)
> ping

Could you please post your patch to gcc's patches ML. So it has more chance to get reviewed. In general I wouldn't recomment to build gcc in source-tree. AFAIU it is even mentioned that this isn't anymore supported (but well, here I could be wrong).

Kai