This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [MinGW] Set NATIVE_SYSTEM_HEADER_DIR relative to configured prefix

On Wed, Jun 07, 2006 at 05:33:56PM +0530, Ranjit Mathew wrote:
> 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
> folder.
> 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.
> - --
> Ranjit Mathew      Email: rmathew AT gmail DOT com
> Bangalore, INDIA.    Web:

Hi Ranjit, 

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.

Bob Rossi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]