This is the mail archive of the
mailing list for the GCC project.
Re: [MinGW] Set NATIVE_SYSTEM_HEADER_DIR relative to configured prefix
- From: Bob Rossi <bob_rossi at cox dot net>
- To: Ranjit Mathew <rmathew at gmail dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, Danny Smith <dannysmith at clear dot net dot nz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 16 Dec 2006 08:49:39 -0500
- Subject: Re: [MinGW] Set NATIVE_SYSTEM_HEADER_DIR relative to configured prefix
- References: <000901c686c5$3ad69ae0$d94861cb@anykey> <44845DDD.firstname.lastname@example.org> <email@example.com> <4485AE19.firstname.lastname@example.org> <4486C0AC.email@example.com>
On Wed, Jun 07, 2006 at 05:33:56PM +0530, Ranjit Mathew wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Mark Mitchell wrote:
> >>> Yes, we use a similar technique for our cross releases; the "system
> >>> headers" are in $prefix/sysroot/include. We point the system root at
> >>> that $prefix/sysroot, and arrange for the entire toolchain to be
> >>> relocatable. Then, you can put it anywhere you like, and it still finds
> >>> the system headers.
> With a bit of trial and error, I finally got a relocatable
> toolchain for MinGW for cross and crossed-native configurations
> using unpatched mainline GCC and unpatched binutils 2.16.1. I
> only tried out C and am yet to try out C++ and Java.
> For either configuration, I started with a clean $PREFIX
> folder, created "sys-root/mingw" under that folder and
> then extracted mingw-runtime and w32api binaries into this
> I then configured binutils with
> "--with-sysroot=$PREFIX/sys-root" and GCC with
> "--with-sysroot=$PREFIX/sys-root --with-build-sysroot=$PREFIX/sys-root"
> (for both cross and crossed-native configurations).
> I *had* to use "--with-build-sysroot" and I had to make "sys-root"
> a sub-folder of $PREFIX for the toolchains to be relocatable. I
> had to configure binutils with the sysroot option as well as
> had been pointed out by Mark.
> Now that I have things working with an unpatched mainline GCC,
> I withdraw my patch that started this discussion.
> If C++ and Java also work with this incantation, I will update
> my article and scripts:
> Thanks, (especially Mark and Danny)
> - --
> Ranjit Mathew Email: rmathew AT gmail DOT com
> Bangalore, INDIA. Web: http://rmathew.com/
Did you ever create a script that makes a relocatable gcc on mingw that
was built nativly?
I'm currently working on this and do not have a solution yet. It takes
so long to continually build gcc and determine if it works.