Re: Cross Compiler Host MinGW Target PowerPC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brian Dessent wrote:

> > I have read some good informations in the Web and use now a combined
> > build tree.
> > So I am able to compile the GCC in Linux now!
> > Today I tried the same procedure in MinGW and fail.
> 
> You need to provide more information.  What *exact* configure command
> are you using, specifically what are you providing for --host, --build,
> --target, and --prefix?  What is the build host, MSYS or Cygwin?  Are
> you providing a relative path to the location of configure or an
> absolute path?
> 
> > build/gengtype.exe
> > /home/seb/combined/gcc/input.h: No such file or directory
> 
> Here it looks like you have a mingw program trying to access posix
> paths.  That won't work, mingw programs need to use win32 paths.

Just to clarify, the reason that MinGW can be a difficult host is
because the build tools (MSYS) understand posix paths but native MinGW
binaries do not.  This means that you have to be careful that all paths
that are compiled into binaries/headers (such as in specs or the build
helper programs like gengtype) are either relative paths or win32 paths
(c:/foo/bar).

In the case above it looks like you've got a gengtype.exe that
apparently got a posix-style absolute path leaked into it somewhere.  So
you have to ensure that the $srcdir, $builddir, $prefix etc. in the
Makefile end up as either relative paths or win32 paths.  $srcdir gets
set based on the path used to invoke configure, which is why the
particulars of how you do this can matter greatly on MinGW.

It would be a lot easier to instead use Cygwin as the host for a cross
compiler because you don't have to worry about any of this, as all
Cygwin binaries understand posix paths so there is none of this
"cognitive dissonance" between the build system and the actual binaries.

Brian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux