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 12:00:33PM -0500, 'Bob Rossi' wrote:
> On Sat, Dec 23, 2006 at 09:48:09AM -0500, 'Bob Rossi' wrote:
> > On Sat, Dec 23, 2006 at 01:36:24PM +1300, Danny Smith wrote:
> > > 
> > > > 
> > > > 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,
> > > > 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.
> > 
> > Thanks very much Danny. I'm going to try this out today. One thing I
> > noticed is that you are doing -enable-shared, whereas every other mingw
> > build script that I've found does --disable-shared. Does mingw need to
> > have static libraries or is shared ok also?
> 
> Hi,
> 
> I'm using svn trunk. I'll continue to debug this problem, but if you
> know what it is ....
> 
> $ mount
> C:\Program Files\NX Client for Windows\X11R6\lib\X11\fonts on /mnt/NX/fonts type user (textmode)
> C:\cygwin\bin on /usr/bin type system (binmode)
> C:\cygwin\lib on /usr/lib type system (binmode)
> C:\cygwin on / type system (binmode)
> C:\mingw on /mingw type system (binmode)
> c: on /cygdrive/c type system (binmode,noumount)
> e: on /cygdrive/e type system (binmode,noumount)
> f: on /cygdrive/f type system (binmode,noumount)
> 
> O, I also got the silly Make error, where I need to change 
>   ORIGINAL_LD_FOR_TARGET =
>   C:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/bin/ld.exe
> to
>   ORIGINAL_LD_FOR_TARGET =
>   /mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/bin/ld.exe
> Do you do this each time?
> 
> #!/bin/sh                                                                                               
> PATH=/mingw/bin:$PATH
> 
> ../gcc/configure \
> --with-gmp=c:/msys/1.0/home/bobbybrasko/gcc/gmp/gmp \
> --with-mpfr=c:/msys/1.0/home/bobbybrasko/gcc/mpfr/prefixdir \
> --with-gcc  --enable-libgomp --host=i686-pc-mingw32 \
> --build=i686-pc-mingw32 --target=i686-pc-mingw32 --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 2>&1 | tee configure-out.txt
> 
> make  CXXFLAGS="-mthreads -O2" bootstrap  2>&1 | tee make-out.txt
> 
> 
> make[4]: Entering directory `/home/bobbybrasko/gcc/svn/build/gcc'
> /home/bobbybrasko/gcc/svn/build/./gcc/xgcc 
>   -B/home/bobbybrasko/gcc/svn/build/./gcc/ 
>   -L/home/bobbybrasko/gcc/svn/build/i686-pc-mingw32/winsup/mingw 
>   -L/home/bobbybrasko/gcc/svn/build/i686-pc-mingw32/winsup/w32api/lib 
>   -isystem /home/bobbybrasko/gcc/svn/gcc/winsup/mingw/include 
>   -isystem /home/bobbybrasko/gcc/svn/gcc/winsup/w32api/include 
>   -B/mingw/i686-pc-mingw32/bin/ -B/mingw/i686-pc-mingw32/lib/ 
>   -isystem /mingw/i686-pc-mingw32/include 
>   -isystem /mingw/i686-pc-mingw32/sys-include -O2 
>   -I../../gcc/gcc/../winsup/w32api/include -O2 -g -O2  -DIN_GCC    
>   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
>   -Wold-style-definition  -isystem ./include   -g -DHAVE_GTHR_DEFAULT 
>   -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc/gcc 
>   -I../../gcc/gcc/. -I../../gcc/gcc/../include 
>   -I../../gcc/gcc/../libcpp/include 
>   -Ic:/msys/1.0/home/bobbybrasko/gcc/gmp/gmp/include 
>   -Ic:/msys/1.0/home/bobbybrasko/gcc/mpfr/prefixdir/include 
>   -I../../gcc/gcc/../libdecnumber -I../libdecnumber 
>   -DL_chkstk -xassembler-with-cpp -c ../../gcc/gcc/config/i386/cygwin.asm 
>   -o libgcc/./_chkstk.o
> xgcc.exe: CreateProcess: No such file or directory
> make[4]: *** [libgcc/./_chkstk.o] Error 1
> make[4]: Leaving directory `/home/bobbybrasko/gcc/svn/build/gcc'
> make[3]: *** [libgcc.a] Error 2
> make[3]: Leaving directory `/home/bobbybrasko/gcc/svn/build/gcc'
> make[2]: *** [all-stage1-gcc] Error 2
> make[2]: Leaving directory `/home/bobbybrasko/gcc/svn/build'
> make[1]: *** [stage1-bubble] Error 2
> make[1]: Leaving directory `/home/bobbybrasko/gcc/svn/build'
> make: *** [bootstrap] Error 2
> 
> 
> Now, I'm thinking the problem is, that it's using 
> -B/mingw/i686-pc-mingw32/include instead of just /mingw/include.
> 
> Is this an easy thing to change in gcc with configuration, or do I need
> to modify my mingw setup?

Well, I changed the --target, --build and --host to mingw32, and now it
looks for -B/mingw/mingw32/lib. I still get the same error though.

Bob Rossi


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