From mint-bounce@lists.fishpool.fi  Thu Mar 16 16:52:50 2006
X-Original-To: fnaumann@mail.boerde.de
Delivered-To: fnaumann@mail.boerde.de
Subject: Re: [MiNT] cross compiling again
From: Mark Duckworth <mduckworth@atari-source.com>
To: Stephane Capo <Stephane.Capo@ema.fr>
Cc: Mint List <mint@fishpool.com>
In-Reply-To: <44194F8C.3070405@ema.fr>
References: <44194F8C.3070405@ema.fr>
Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-6gM+HRZeN/8YhzPrpy9G"
Date: Thu, 16 Mar 2006 10:45:15 -0500
Message-Id: <1142523915.15435.6.camel@mduckworth.phillypark.net>
Mime-Version: 1.0
X-Mailer: Evolution 2.2.3 (2.2.3-2.1.fc4.nr) 
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-To: mint-bounce@lists.fishpool.fi
X-original-sender: mduckworth@atari-source.com
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-Id: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
List-subscribe: <mailto:mint-request@lists.fishpool.fi?Subject=subscribe>
List-owner: <mailto:tjhukkan@fishpool.fi>
List-post: <mailto:mint@lists.fishpool.fi>
X-Virus-Scanned: by amavisd-new at relay.boerde.de
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on relay.boerde.de
X-Spam-Status: No, hits=-1.0 tagged_above=-50.5 required=7.0 tests=AWL,
 BAYES_00
X-Spam-Level: 


--=-6gM+HRZeN/8YhzPrpy9G
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

First,

Use Binutils 2.16.1 which is proven to work well, then, use GCC 3.3.6
which has instructions which can be searched on the CT60 BBS,
ct60.dhs.nu, ... It should work I think, at least for gcc (not g++
maybe).  If you want to use 3.4.2, you're in uncharted waters ;)

Thanks,
Mark


On Thu, 2006-03-16 at 12:44 +0100, Stephane Capo wrote:
> Hi there,
>=20
>    a long time ago, i've tried to cross compile gcc for
> m68k-atari-mint on a mingw host, but at this time, collect2 was not
> support by mingw and a lot of errors during the compile process has
> made me give up.=20
>  =20
>    My goal (dream ?) would be to have a native windows cross compiler
> so that i will be able to generate atari prg directly with dev-cpp IDE
> (or even VisualC++ ). Mingw can now build gcc with more less patch
> than before, so I decided to try again.
>=20
>    Starting from the Patrice Mandin tutorial :
> http://perso.wanadoo.fr/patrice.mandin/v3/fr/howto-cross333.html
>=20
>    I've done a "build-all.sh" file doing the whole process.
>=20
>    my starting files are :
>    - binutils-2.13.90-20021006-2-src.tar.gz ( mingw patched files )
>    - binutils-2.13.2.1-mint.diff.gz (Patrice Mandin patch)
>    - gcc-3.4.2.tar.bz2 (official GCC 3.4.2 sources from gnu)
>    - gcc-3.4.2-20040916-1-src.diff.gz (mingw patch)
>    - mintlib-devel-0.57.4.tar.gz (lib and include, from Patrice
> Mandin)
>=20
>    I've also done a short patch for binutils (avoid a build error)
>=20
>    and I've done a patch for gcc-3.4.2 based on gcc-3.3.3-mint.diff.gz
> from Patrice Mandin again.
>=20
>    I've managed to build binutils 2.13 for mingw, then gcc 3.4.2 (only
> c and c++) for mingw (using binutils 2.13), then binutils 2.13 for
> mint, but I'm now stuck at gcc-3.4.2 for mint. It seems that the
> compiler doesn't find some include path and if I patch the makefile to
> force the missing include path, there's a crash :
>=20
> m68k-atari-mint-ar.exe: ./libgcc.a: File truncated
>=20
>    If someone here want to help me a bit, I'm sure I'm doing more than
> one thing wrong ;-)=20
>=20
>    Here is the "build-all.sh" file, if someone can help me, I'll send
> him the patch files to have a look.
>=20
>    thanks
>=20
>      St=C3=A9phane
>=20
> -------------------------------------------------------
>=20
>=20
>=20
> #
> #    create install dir for host
> #
>=20
> # this directory
>=20
> MY_MSYS_DIR=3D/c/msys/1.0
>=20
> MY_ROOT_DIR=3D${MY_MSYS_DIR}`pwd`/
>=20
> mkdir ${MY_ROOT_DIR}install-dir
> cp -r /mingw/include  ${MY_ROOT_DIR}install-dir
> cp -r /mingw/lib  ${MY_ROOT_DIR}install-dir
>=20
> # ---------------------------
> #  build binutils for mingw
> # ---------------------------
>=20
> tar xvzf binutils-2.13.90-20021006-2-src.tar.gz
> cd binutills-2.13.90-20021006-2
> gunzip -c ../binutils-2.13.90-20021006-2-src.tar-mingw-diff.gz | patch
> -p1
> cd ..
> mkdir build-binutils
> cd build-binutils
> ../binutills-2.13.90-20021006-2/configure --with-gcc --with-gnu-ld
> --with-gnu-as --host=3Dmingw32 --target=3Dmingw32 --prefix=3D
> ${MY_ROOT_DIR}install-dir --enable-threads --disable-nls
> --enable-languages=3Dc,c++ --disable-win32-registry --disable-shared
> --enable-sjlj-exceptions --enable-libgcj --disable-java-awt
> --without-x --enable-java-gc=3Dboehm --disable-libgcj-debug
> --enable-interpreter --enable-hash-synchronization
> --enable-libstdcxx-debug
> make CFLAGS=3D"-O2 -fomit-frame-pointer" CXXFLAGS=3D"-mthreads
> -fno-omit-frame-pointer -O2" LDFLAGS=3D-s all
> make install
> cd ..
> rm -rf build-binutils
>=20
> # -----------------------------------
> #  set Path
> # -----------------------------------
>=20
> export PATH=3D${MY_ROOT_DIR}install-dir/bin:${PATH}
> export LD_LIBRARY_PATH=3D${MY_ROOT_DIR}install-dir/lib
> export INCLUDE_PATH=3D${MY_ROOT_DIR}install-dir/include
>=20
> # -----------------------------------
> #  build gcc for mingw
> # -----------------------------------
>=20
> tar xvjf gcc-3.4.2.tar.bz2
> cd gcc-3.4.2
> gunzip -c ../gcc-3.4.2-20040916-1-src.diff.gz | patch -p1
> cd ..
> mkdir build-gcc
> cd build-gcc
>=20
> ../gcc-3.4.2/configure --with-gcc --with-gnu-ld --with-gnu-as
> --host=3Dmingw32 --target=3Dmingw32  --prefix=3D${MY_ROOT_DIR}install-dir
> --enable-threads --disable-nls --enable-languages=3Dc,c++
> --disable-win32-registry --disable-shared --enable-sjlj-exceptions
> --enable-libgcj --disable-java-awt --without-x --enable-java-gc=3Dboehm
> --disable-libgcj-debug --enable-interpreter
> --enable-hash-synchronization --enable-libstdcxx-debug
> make CFLAGS=3D"-O2 -fomit-frame-pointer" CXXFLAGS=3D"-mthreads
> -fno-omit-frame-pointer -O2" LDFLAGS=3D-s  bootstrap
> make install
> cd ..
> rm -rf build-gcc
>=20
> # ---------------------------
> #  build binutils for atari mint
> # ---------------------------
>=20
> cd binutills-2.13.90-20021006-2
> gunzip -c ../binutils-2.13.2.1-mint.diff.gz | patch -p1
> cd ..
>=20
> mkdir binutils-2.13.2.1-mint
> cd binutils-2.13.2.1-mint
> ../binutills-2.13.90-20021006-2/configure --with-gcc --with-gnu-ld
> --with-gnu-as --host=3Dmingw32 --prefix=3D${MY_ROOT_DIR}install-dir
> --target=3Dm68k-atari-mint --disable-threads --disable-nls
> --enable-languages=3Dc,c++ --disable-win32-registry --disable-shared
> --disable-java-awt --without-x --disable-libgcj-debug=20
> make CFLAGS=3D"-O -fomit-frame-pointer"
> CXXFLAGS=3D"-fno-omit-frame-pointer -O" LDFLAGS=3D-s all
> make install
> cd ..
> rm -rf binutils-2.13.2.1-mint
>=20
> rm -rf binutills-2.13.90-20021006-2
>=20
> # ---------------------------
> #  build gcc for atari mint
> # ---------------------------
>=20
> cd gcc-3.4.2
> gunzip -c ../gcc-3.4.2-mint.diff.gz | patch -p1
> cd ..
>=20
> tar xvzf mintlib-devel-0.57.4.tar.gz
>=20
> mkdir build-gcc-mint
> cd build-gcc-mint
>=20
> ../gcc-3.4.2/configure --with-headers=3D
> ${MY_ROOT_DIR}mintlib-devel-0.57.4/usr/include --with-sysroot=3D
> ${MY_ROOT_DIR}mintlib-devel-0.57.4 --host=3Dmingw32
> --target=3Dm68k-atari-mint  --prefix=3D${MY_ROOT_DIR}install-dir
> --disable-threads --disable-nls --enable-languages=3Dc,c++
> --disable-win32-registry --disable-shared --disable-java-awt
> --without-x --disable-libgcj-debug --disable-multilib
> make CFLAGS=3D"-O -fomit-frame-pointer -I../../gcc-3.4.2/gcc/config "
> CXXFLAGS=3D"-fno-omit-frame-pointer -O -I../../gcc-3.4.2/gcc/config "
> LDFLAGS=3D-s=20
> make install
> cd ..
> rm -rf build-gcc-mint
> --=20
>=20

--=-6gM+HRZeN/8YhzPrpy9G
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)

iD8DBQBEGYgLG3ekuGovTz0RAvUFAJ9IVmhszc20YoVvLB00DYQRuuTE7ACeN77F
B9xhL8vM5RFBaJbbfqgcE8g=
=IrTO
-----END PGP SIGNATURE-----

--=-6gM+HRZeN/8YhzPrpy9G--


