This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Crossed-Native Builds, Toolchain Relocation and MinGW
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Daniel Jacobowitz wrote:
> On Wed, Apr 26, 2006 at 06:29:46PM +0530, Ranjit Mathew wrote:
>> $SYSTEM_HEADER_DIR is supposed to be "/mingw/include"
>> for a native MinGW target (and since host == target, the
>> build is being considered native). However, in a crossed-
>> native build, I cannot have MinGW headers in this path, so
>> the way I work around this problem is to additionally specify
>> "--with-sysroot=$PREFIX" and extract MinGW headers into
>> "$PREFIX/mingw". This lets the build and installation
>> complete successfully, but when I tar this installation
>> and install it on a Windows machine, GCC fails to find
>> the system headers. The workaround *then* is to rename
>> the "mingw" folder to "$TARGET" (i.e. i686-pc-mingw32)
>> again. Needless to say, this is painful. In earlier
>> releases, I used to be able to just extract the headers
>> to $PREFIX/$TARGET, do the crossed-native build, install
>> the compiler and then bundle this installation up to
>> create a relocatable toolchain. This was the whole point
>> of the article:
>
> If you look at HEAD, you'll find a new --with-build-sysroot
> option. Does that help? We added it for some very similar
> configurations...
I found the documentation of the option in:
http://gcc.gnu.org/install/configure.html
a bit confusing and I had to actually look at Mark's
original message:
http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01579.html
to understand this option. That said, I was not able to
come up with a description that is short *and* properly
conveys the intention of the option. :-(
Actually I still don't understand what "libraries
whose sysroot lives within the installation prefix"
(see Mark's message) means. Why does a library have a
sysroot? Is this for doing something like "-rpath"?
In any case, I don't readily see how --with-build-sysroot
solves the particular problem I'm facing. Perhaps I'm
missing something. What I want to be able to do is:
1. Create a folder and extract the C runtime headers and
libraries into this folder (whether directly under it,
or under $TARGET within it, or under "mingw" within it).
2. Configure and build binutils and GCC for MinGW using a
cross-compiler and install them into the folder in #1.
3. Archive the folder and extract it on Windows boxen,
possibly under different paths, and have GCC work
properly without any changes.
As I said, this *used* to be possible once upon a time.
Thanks,
Ranjit.
- --
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://rmathew.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEUChgYb1hx2wRS48RAmw9AJ9hwGNKGvH22sZCP90EMtV3dVuITQCfUF0t
UvWTg8YVxWoe0vHq45Sp4FY=
=G5IW
-----END PGP SIGNATURE-----