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: [PATCH] Fix mingw32 bootstrap regression.


> 
> On Sat, Dec 23, 2006 at 11:50:57AM +1300, Danny Smith wrote:
> > 
> > > On Fri, Dec 22, 2006 at 09:15:57PM +1300, Danny Smith wrote:
> > > > This way:
> > > > bash, sed, configure, make, expect, dejagnu, etc are 
> cygwin tools
> > > > (cygwin1.dll-dependent).
> > > > The build gcc, binutils are from mingw (msvcrt.dll-dependent).
> > > > I've done it this way since well before msys. 
> > > 
> > > You run a native bootstrap using these tools?
> > 
> > Yes.  
> > 
> > 
> > mingw binaries precede cygwin binaries in PATH (unless I 
> actually logon
> > to cygwin).
> > mount table contains:
> > c:\cygwin\lib on /usr/lib type system (binm
> > c:\cygwin\usr on /usr type system (binmode)
> > c:\cygwin\bin on /bin type system (binmode)
> > c:\cygwin\bin on /usr/bin type system (binm
> > c:\cygwin on / type system (binmode)
> > c:\mingw on /mingw type system (binmode)
> > c:\developex on /developex type system (binmode
> > 
> > mingw binaries live in /mingw/bin
> > cygwin binaries live in /cygwin/bin
> > development sources and builds are all rooted in /developex
> > 
> > Thus native pathnames of all native components are same as cygwin
> > pathname
> > 
> > I have never needed to use msys.  The cygwin tools have been more
> > reliable.
> 
> Hi Danny,
> 
> This is interesting. I have a few more questions, sorry if they are
> obvious. Do you do this from a cygwin shell?
 
Yes, I just run cygwin bash from a DOS command console. 

I ask this 
> because of your
> comments in the first sentence.
> 
> I also just want to double check, it sounds like you are 
> saying that you
> are directly calling the mingw gcc from cygwin, and not using
> -mno-cygwin. Is that true? 

Yes.

When I tried this, I found that 
> the mingw gcc
> couldn't handle the paths that it was given. I believe I was 
> told on the
> mingw mailing list that the mingw sh resolved the paths 
> somehow, so that
> mingw gcc would be ok.

Don't use mingw sh. I use the sh in /bin (==/cygwin/bin)

> 
> So, are you actually doing a cross compile then, from cygwin to mingw?
> ie. --host=cygwin --target=mingw?

No.

> 
> Can you post the script that you use, if available? Even just the
> configure line would be nice.
> 
This is run from /developex/gcc/svn/gcc-trunk/build dir. The sources are
in 
/developex/gcc/svn/gcc-trunk/gcc.


#!/bin/sh
../gcc/configure  --with-gcc  --enable-libgomp --host=i686-pc-mingw32dw2
--build=i686-pc-mingw32dw2 --target=i686-pc-mingw32dw2 --with-arch=i486
--with-tune=i686 --disable-werror --prefix=/mingw
--with-local-prefix=/mingw --enable-threads --disable-nls
--enable-languages=c,c++,objc,fortran --disable-win32-registry
--disable-sjlj-exceptions --enable-libstdcxx-debug
--enable-cxx-flags='-fno-function-sections -fno-data-sections'
-enable-shared --enable-version-specific-runtime-libs
make  CXXFLAGS="-mthreads -O2" bootstrap  2>err.log 1>out.log

The 'dw2' suffix in target-triplet is because I use a patched tree that
allows Dwarf2 EH unwind.
I install this into /mingw.  There are lots of gcc versions in /mingw,
each qualified with version.

Danny  

> Thanks,
> Bob Rossi
 


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