This is the mail archive of the
mailing list for the GCC project.
Re: [MinGW] Set NATIVE_SYSTEM_HEADER_DIR relative to configured prefix
On Sun, Dec 17, 2006 at 05:57:19PM -0500, Bob Rossi wrote:
> On Sun, Dec 17, 2006 at 01:27:14PM -0500, Bob Rossi wrote:
> > On Sun, Dec 17, 2006 at 09:09:16PM +0530, Ranjit Mathew wrote:
> > > On 12/17/06, Bob Rossi <email@example.com> wrote:
> > > >> >Did you ever create a script that makes a relocatable gcc on mingw that
> > > >> >was built nativly?
> > > >>
> > > >> The workarounds that finally worked for me at the time (around June/July
> > > >> of this year) for getting a native GCC (C/C++) for MinGW on MSYS are
> > > >> listed in the "Building a Native Compiler" section of:
> > > >>
> > > >> http://rmathew.com/articles/gcj/bldgcj.html#ngcc
> > > >
> > > >Thanks for the reply. I actually used this site in the first place, to
> > > >get as far as I did. I wonder if the gcc-4.1 snapshot doesn't work. Of
> > > >course, I may have messed something up.
> > >
> > > You're not using "/mingw" as the value for "--prefix". I remember
> > > stuff not working because of this, though I cannot be sure if that
> > > indeed is the problem here.
> > Duh! OK, I'll try that change. Do I need to do this for binutils also?
> > Do I even need to build binutils? The only reason I am, is because you
> > did it on your web page when cross compiling.
> Well, i've been working at this for days. With the changes I'm pasting,
> I can't even get the main.c example to find stdio.h anymore. I would
> VERY much appreciate some help on this.
> Attached is the scripts I'm using. I'm wondering, what does the
> --with-local-prefix=$sysroot \
> line in the gcc configure do? Is it necessary?
> Also, look at the lines in the 'gcc -v -o main main.c' output.Please
> ignoring nonexistent directory "C:/mingw/sys-rootC:/mingw/include"
> ignoring nonexistent directory "C:/mingw/lib/gcc/mingw32/4.1.1/include"
> ignoring nonexistent directory "C:/mingw/mingw32/include"
> ignoring nonexistent directory "C:/mingw/sys-root/mingw/include"
> The first thing I notice is that gcc is looking in an absolute path for
> the files. If I was to get this to work properly, shouldn't gcc be
> looking in ../mingw/sys-root or something like that? As it is now, I'd
> have to always relocate my gcc to the C:/
> Second, the very first line shows a path that is doubled up. Is that my
> fault from the configuration command?
> I've spent the entire day building and testing gcc's, so if anyone has
> any knowledge, please help!
I just tried the latest snapshot of gcc-4.1 with the same results.
Actually, I wonder if the problem is with the make install rule that I'm
If I compile gcc, and then do a
make DESTDIR=/e/black/files/gcc-4.1 install,
and then on the same machine do the
gcc-4.1 -o main.c command it works. However, the g++-4.1 -o main
main.cpp fails with the 'can not find iostream' error.
This seems odd, since I haven't relocated gcc yet. Any ideas?