This is the mail archive of the gcc-patches@gcc.gnu.org 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


Ranjit Mathew 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.
> 
> Can you elaborate on the "and arrange for the entire toolchain to be
> relocatable" please? Is there something one needs to do beyond
> "--prefix=$prefix --with-sysroot=$prefix/sysroot"? And just to be clear,
> you're suggesting something like:
> 
>  1. mkdir $prefix/sysroot
>  2. <extract mingw-runtime and w32api into $prefix/sysroot>
>  3. <configure GCC with "--prefix=$prefix --with-sysroot=$prefix/sysroot>
> 
> Right?

Yes, I think so.  GCC configuration is complicated, so I wouldn't want
to swear that's all that you need to do, but that's a key step.  You
also want to make sure your linker is built with a relocatable sysroot,
IIRC.  You definitely have the right idea.

> That's an example of an articulation problem on my part. Let
> me try again. What I meant by "weird" was that that is not
> how the "standard" MinGW installation looks - normally, you
> get the GCC, binutils, mingw-runtime and w32api packages
> from the MinGW SF.net pages and extract into a single folder
> to have a working GCC. (The folder you extract all this stuff
> into does *not* have to be "/mingw" by the way.) If you put

It should work just to do --with-sysroot=$prefix, which, if I understand
correctly, would do what you want.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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