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


On Mon, Dec 18, 2006 at 05:11:56PM -0500, Bob Rossi wrote:
> On Mon, Dec 18, 2006 at 05:10:26PM -0500, Bob Rossi wrote:
> > On Mon, Dec 18, 2006 at 01:06:30PM -0800, Brian Dessent wrote:
> > > Bob Rossi wrote:
> > > 
> > > > OK. Thanks Brian. I'll admit this is new to me, so I could be making
> > > > some stupid mistakes here. Basically, I needed wchar_t support with
> > > > mingw, and I was told that this works with the 4.x series. Which indeed
> > > > it does! So, I went to this page,
> > > >   http://gcc.gnu.org/releases.html
> > > > and downloaded the most recent release. Is that not the proper thing to
> > > > do?
> > > 
> > > That's fine if you just want a stable compiler.  But the question you
> > > are asking seems to have morphed into "does support for a relocatable
> > > compiler on MinGW currently work" and for any kind of "what is the state
> > > of the code" sort of thing, you want to look at the current code (aka
> > > HEAD aka 4.3) and not the code on a release branch, which tends to be
> > > fairly static.  Because if you find that something doesn't work, then
> > > you are left wondering if it is still broken in the current sources or
> > > if it was just broken on that release branch.
> > 
> > Well, I'm sliding fast down a very large hill. I just compiled/installed
> > libgmp and libmpfr because svn needs those installed. Then, when I
> > bootstrap head, I the below error.
> > 
> > Is this well known? Here is the comment there,
> > 
> >           /* Should this directory start with the sysroot?  */
> >           if (sysroot && p->add_sysroot)
> >             str = concat (sysroot, p->fname, NULL);
> >           else if (!p->add_sysroot && relocated)
> >             {
> >               /* If the compiler is relocated, and this is a configured 
> >                  prefix relative path, then we use gcc_exec_prefix instead 
> >                  of the configured prefix.  */
> >               gcc_assert (strncmp (p->fname, cpp_PREFIX,
> >                                      cpp_PREFIX_len) == 0);
> >               str = concat (gcc_exec_prefix, p->fname
> >                               + cpp_PREFIX_len, NULL);
> >               str = update_path (str, p->component);
> >             }
> >           else
> >             str = update_path (p->fname, p->component);
> > 
> > Anyone run into this before? It looks like someone made this assertion,
> > which I'm very thankful for.
> 
> Sorry, here is my configure line,
> 
> ../gcc/configure \
> --with-gmp=/home/bobbybrasko/gcc/gmp/gmp \
> --with-mpfr=/home/bobbybrasko/gcc/mpfr/prefixdir \
> --host=mingw32 \
> --target=mingw32 \
> --prefix=/mingw \
> --program-suffix="-4.1" \
> --with-gcc \
> --with-gnu-ld \
> --with-gnu-as \
> --enable-threads=win32 \
> --disable-nls \
> --enable-languages=c,c++ \
> --disable-win32-registry \
> --disable-shared \
> --enable-static \
> --without-x \
> --enable-libstdcxx-debug \
> 2>&1 | tee configure-out.txt

As an update, I changed --prefix from /mingw to C:/mingw. Is that OK?
After that I made it past the problem above. I got this idea by looking
at the comment that said I was configuring gcc prefix with a relative
path.

Then I had to add --disable-werror because I hit a compile error. I
found this solution with google.

Now I have the following,

../gcc/configure \
--disable-werror \
--with-gmp=/home/bobbybrasko/gcc/gmp/gmp \
--with-mpfr=/home/bobbybrasko/gcc/mpfr/prefixdir \
--host=mingw32 \
--target=mingw32 \
--prefix=C:/mingw \
--program-suffix="-4.1" \
--with-gcc \
--with-gnu-ld \
--with-gnu-as \
--enable-threads=win32 \
--disable-nls \
--enable-languages=c,c++ \
--disable-win32-registry \
--disable-shared \
--enable-static \
--without-x \
--enable-libstdcxx-debug \
2>&1 | tee configure-out.txt

Which results in this error,

make[4]: Entering directory `/home/bobbybrasko/gcc/svn-head/gcc-builddir/prev-gcc'                      
../../gcc/gcc/ada/Make-lang.in:430: *** multiple target patterns.  Stop.                                
make[4]: Leaving directory `/home/bobbybrasko/gcc/svn-head/gcc-builddir/prev-gcc'                       
make[3]: *** [stmp-fixinc] Error 2                                                                      
make[3]: Leaving directory `/home/bobbybrasko/gcc/svn-head/gcc-builddir/gcc'                            
make[2]: *** [all-stage2-gcc] Error 2                                                                   
make[2]: Leaving directory `/home/bobbybrasko/gcc/svn-head/gcc-builddir'                                
make[1]: *** [stage2-bubble] Error 2                                                                    
make[1]: Leaving directory `/home/bobbybrasko/gcc/svn-head/gcc-builddir'                                
make: *** [bootstrap] Error 2                                                                           


Why do you think it's looking in the ada directory at all? I didn't
configure that language. Here's what is on line 430,

ada.install-info: $(DESTDIR)$(infodir)/gnat_ugn_unw.info \
        $(DESTDIR)$(infodir)/gnat_rm.info \
        $(DESTDIR)$(infodir)/gnat-style.info

Any advice? Is this a bug in the build system for mingw?

Thanks,
Bob Rossi


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