Wikia

coLinux

CygwinToolchain

238pages on
this wiki
Talk0

Building Cygwin cross compilation tools for Linux Edit

Cygwin as cross platform is currently not usable. Version 0.6.3 and later use mingw32 on Linux. Please read doc/building in source, and run the Linux typical commands ./configure && make


Even though Cygwin isn't the proper build environment for coLinux anymore, it's can still be useful for other purposes and these were some of the best directions around to setup this environment, so I've updated them to use current versions.

First, choose an installation directory, for example: /usr/local/cygwin. I'd refer to that directory as $PREFIX from this point in the document. You'll also need a temporary directory to execute this procedure (e.g. /tmp/cygbuild).

Download the Cygwin tarballs listed below from cygwin.com, or from http://mirrors.xmission.com/cygwin/release/cygwin. NOTE: the version numbers of the various downloaded tarballs below are for example only. You'll find that newer versions of these files are now available.

   cygwin-1.7.7-1.tar.bz2
   w32api-3.15-1.tar.bz2 
   libiconv-1.13.1-2.tar.bz2

Extract the tarballs in your build directory in this manner and move them into $PREFIX:

    tar xjf cygwin-1.7.7-1.tar.bz2 usr/lib usr/include usr/bin
    tar xjf w32api-3.15-1.tar.bz2 usr/lib usr/include
    tar xjf libiconv-1.13.1-2.tar.bz2 usr/lib usr/include
    mkdir -p $PREFIX
    mv usr $PREFIX/i686-pc-cygwin

Now you have a ready $PREFIX/i686-pc-cygwin directory.

Download the source of the latest binutils: http://ftp.gnu.org/gnu/binutils/. Extract, configure, build, install.

   tar -xzf binutils-2.21.tar.gz
   cd binutils-2.21
   ./configure --target=i686-pc-cygwin --prefix=$PREFIX
   make
   make install

Download the latest gcc sources from ( http://gcc.gnu.org/mirrors.html ). Extract them and build gcc using this procedure:

    tar xjf ~/dload/cygcross/gcc-4.5.2.tar.bz2
    mkdir obj-gcc
    cd obj-gcc
    ../gcc-4.5.2/configure --target=i686-pc-cygwin --prefix=$PREFIX --with-newlib --enable-languages=c,c++
    make
    make install

Here's the previous version of these directions, using GCC 3.3.4:

First, choose an installation directory, for example: /usr/local/w32build. I'd refer to that directory as $PREFIX from this point in the document.

Download the latest base cygwin tarball from cygwin.com, or from http://mirrors.xmission.com/cygwin/release/cygwin. NOTE: the version numbers of the various downloaded tarballs below are for example only. You'll find that newer versions of these files are now available.

Extract that tarball to the installation directory in this manner:

    tar -xjf cygwin-1.5.7-1.tar.bz2
    mv usr i686-pc-cygwin

Now you have a ready $PREFIX/i686-pc-cygwin directory.

Download the source of the latest binutils: http://ftp.gnu.org/gnu/binutils/. Extract, configure, build, install.

   tar -xzf binutils-2.15.tar.gz
   cd binutils-2.15
   ./configure --target=i686-pc-cygwin --prefix=$PREFIX
   make
   make install

Download the w32api package from www.mingw.org ( http://www.mingw.org/download.shtml ), and install it under $PREFIX in this manner:

   mkdir w32api
   tar -C w32api -zxf w32api-2.3.tar.gz
   mv w32api/include i686-pc-cygwin/include/w32api
   mv w32api/lib i686-pc-cygwin/lib/w32api
   rmdir w32api

Download the latest gcc sources, both the gcc-core and gcc-g++ parts ( http://gcc.gnu.org/mirrors.html ). Extract those in a separate directory, and build gcc using this procedure:

   tar -jxf gcc-core-3.3.4.tar.bz2
   tar -jxf gcc-g++-3.3.4.tar.bz2
   cd gcc-3.3.4
   ./configure --prefix=$PREFIX --target=i686-pc-cygwin --enable-languages=c,c++
   make
   make install

MassTranslated on 25 Dec 2004.


MassTranslated on Sun Apr 23 17:35:58 UTC 2006

Around Wikia's network

Random Wiki