Hi,
After hours of struggling in the undergrounds of configure and his friends,
I now have a long awaited compiler: cegcc on windows, cygwin free.

I did not use msys to build it, because I was unable to sort out the
libiberty problem. I did a (n in)famous canadian cross build. For those who
want to better known this monster, see [1]

The build was a success with the gcc 4.1 source, as well as the gcc 4.4
source.

The required steps are:

1 build mingw32ce for linux in /opt/mingw32ce. This step is mandatory and
made me loose a lot of time before I understand my error: I was building a
WINDOWS compiler, so linux was unable to build the target libs. ah ah ah
neebie pwnt.

1.bis drink coffee

2 install the mingw cross compiler for your distro, on my debian it was
"sudo apt-get install mingw", or else you can also build it following the
instructions from [3], by asking gcc-4.2.1 (the default settings resulted in
a malfunctional compiler, and I still have issues with a just-built mingw)

3 patch build-mingw32ce.sh with the following little patch [2]
cd (cegcc root dir)
wget 
http://www.unsads.com/~squalyl/cegcc/ccbpatch.txt<http://www.unsads.com/%7Esqualyl/cegcc/ccbpatch.txt>
patch -p0 < ccbpatch.txt

this basically adds easy support of the --with-gmp and --with-mpfr for gcc
compilation

3 Add MinGW to your path

4 download gmp and mpfr, build these friends for mingw

mkdir $HOME/mingwlibs
cd $HOME/mingwlibs

wget ftp://ftp.gmplib.org/pub/gmp-4.3.1/gmp-4.3.1.tar.gz
tar zxvf gmp-4.3.1.tar.gz
mkdir build-gmp
cd build-gmp
../gmp-4.3.1/configure --host=i586-mingw32msvc --prefix=$HOME/mingwlibs
make
drink coffee
make install

wget http://www.mpfr.org/mpfr-current/mpfr-2.4.1.tar.gz
tar zxvf mpfr-2.4.1.tar.gz
mkdir build-mpfr
cd build-mpfr
../mpfr-2.4.1/configure --host=i586-mingw32msvc --prefix=$HOME/mingwlibs
--with-gmp=$HOME/mingwlibs
make
drink coffee or use a quadcore build machine and do it in 20 seconds
make install

5 add /opt/mingw32ce/bin to the path

6 build the cross cross compiler using the patched build script to support
additional gcc options:
cd
mkdir $HOME/mingw32ce-win
mkdir $HOME/build-cegcc-cross
cd build-cegcc-cross
host=i586-mingw32msvc HOSTLIBS=$HOME/mingwlibs
../src/scripts/build-mingw32ce.sh --prefix=$HOME/mingw32ce-win

6.bis stop drinking coffee, that's too much for today. Ask your friends if
they know what a canadian cross build is.

7 That's done. You can zip the $HOME/mingw/sysroot directory and unzip it on
your windows box.

Simple, isn't it?

I've attached a binary package that can be unzipped on any win32 box, also
at [2]

I've tried to build haret as a demo, but I first need python.

Regards,
Sebastien

[1] http://www.airs.com/ian/configure/configure_6.html
[2] 
http://www.unsads.com/~squalyl/cegcc/<http://www.unsads.com/%7Esqualyl/cegcc/>
[3] http://www.mingw.org/wiki/LinuxCrossMinGW
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to