Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
13 user(s) are online (12 user(s) are browsing Forum)

Members: 0
Guests: 13

more...

Browsing this Thread:   1 Anonymous Users



« 1 (2) 3 »


Re: ZeroHero cross compilers

Joined:
2008/3/17 0:28
Group:
Member
Posts: 29
Offline
@kas1e_ar

Yes, but the problem is finding Linux hosted crosscompilers...

Posted on: 2012/1/20 8:05
Transfer the post to other applications Transfer


Re: ZeroHero cross compilers
Guest_
@amidog_aros

Ive just emailed you what I had, both gcc and binutils, to the address on your website. Let me know if it's not your current address.

Posted on: 2012/1/20 9:05
Transfer the post to other applications Transfer


Re: ZeroHero cross compilers

Joined:
2008/11/15 15:27
Group:
Member
Posts: 514
Offline
It may be worthwhile to create a bounty for updating the AROS SDK target for real cross-compilers that are current (4.6.x) support all AROS target platforms (arm, m68k, i386, x86_64) If the dev wants to go beyond AROS to support morphos and os4 and amigaos 3.x, then all the better.

While the AROS build system makes a real cross compiler for the platform its on, it doesn't neatly install it "machine local" outside the build system as the SDK and its fake compiler did. The fake compiler didn't work for C++, so its not really suitable for general uses these days. With the interest in that obj-c framework support there's another reason for an update.

App developers generally don't really want to touch the whole AROS metamake system build to work on their code, they'd rather just set CC=aros-i386-gcc in a shell or in their Makefile they can run directly from their linux shell or IDE app, find compile time errors and quickly move the binary over to a fixed test environment.

I really don't recommend anyone go back to old GCCs which aren't being supported, since their code will break on other AROS platforms like linux-arm-hosted.

Posted on: 2012/1/20 9:56
Transfer the post to other applications Transfer


Re: ZeroHero cross compilers

Joined:
2009/10/28 4:25
From Finland
Group:
Member
Posts: 181
Offline
@AmigaDog_AROS

OK here is more or less how I built my i386-aros crosscompiler on ubuntu linux:

Quote:


1. Download contrib-source archive from here:

http://aros.sourceforge.net/download.php

Extract it to your work directory:
$ tar -jxf ~/Downloads/AROS-20111119-contrib-source.tar.bz2

2. Download binutils-2.21.1 from here:

http://ftp.gnu.org/gnu/binutils/

Extract it:
$ tar -jxf ~/Downloads/binutils-2.21.1.tar.bz2
$ cd binutils-2.21.1/

Patch it:
$ patch -p 1 < ../AROS-20111119-contrib-source/gnu/binutils/binutils-2.21.1-aros.diff

Configure:
$ ./configure --prefix=/usr/local/amiga --target=i386-aros

Build and install:
$ make
$ sudo make install

3. Download pc-i386-sdk:

http://aros.sourceforge.net/download.php

Extract it:
$ tar -jxf ~/Downloads/AROS-20111119-pc-i386-sdk.tar.bz2

Install the include and lib directories:
$ cd AROS-20111119-pc-i386-sdk/i386/
$ mv include sys-include
$ sudo mv * /usr/local/amiga/i386-aros/

Make sure that libm.a and libz.a are symbolic links that point to libarosm.a and libarosz.a respectively.

4. Build and install collect-aros:

$ cd AROS-20111119-pc-i386-sdk/tools/collect-aros
$ cp env.h.cross env.h
$ make
$ sudo cp collect-aros /usr/local/amiga/i386-aros/bin/

5. Download gcc-4.5.2 source code:

http://gcc.gnu.org/mirrors.html

Extract it:
$ tar -jxf ~/Downloads/gcc-4.5.2.tar.bz2

Patch it:
$ cd gcc-4.5.2/
$ patch -p 1 < ../AROS-20111119-contrib-source/gnu/gcc/gcc-4.5.2-aros.diff

6. Download gmp, mpc and mpfr:

http://gmplib.org/
http://www.multiprecision.org/index.php?prog=mpc
http://www.mpfr.org/

Extract in gcc directory:

$ tar -jxf ~/Downloads/gmp-4.3.2.tar.bz2
$ tar -jxf ~/Downloads/mpc-0.8.1.tar.gz
$ tar -jxf ~/Downloads/mpfr-2.4.2.tar.bz2
$ mv gmp-4.3.2 gmp
$ mv mpc-0.8.1 mpc
$ mv mpfr-2.4.2 mpfr

7. Create another directory at same level as gcc-4.5.2 directory

$ cd ..
$ mkdir gcc-4.5.2-aros
$ cd gcc-4.5.2-aros/

Configure gcc:

$ ../gcc-4.5.2/configure --prefix=/usr/local/amiga --target=i386-aros --enable-sjlj-exceptions --enable-long-long --with-headers=/usr/local/amiga/i386-aros/sys-include --with-libs=/usr/local/amiga/i386-aros/lib

Build and install gcc:

$ make
$ sudo make install


Hope it helps.

Posted on: 2012/1/20 12:15
Transfer the post to other applications Transfer


Re: ZeroHero cross compilers

Joined:
2008/3/17 0:28
Group:
Member
Posts: 29
Offline
@fishy_fis

Many thanks. Got it. Seems to be working. Hello World compiled atleast

Posted on: 2012/1/20 12:21
Transfer the post to other applications Transfer


Re: ZeroHero cross compilers

Joined:
2008/3/17 0:28
Group:
Member
Posts: 29
Offline
@salass00

Thanks a lot! As soon as I've got FPSE itself sorted, I'll have a go at building an up-to-date GCC.

Posted on: 2012/1/20 12:22
Transfer the post to other applications Transfer


Re: ZeroHero cross compilers

Joined:
2008/3/17 0:28
Group:
Member
Posts: 29
Offline
@salass00

Just trying to build the cross compiler(s). I get as far as building libstdc++-v3 which just give:

checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.

when configuring...

I don't need the C++ compiler right now, so I'll try with:

--enable-languages=c

and see how it goes...

Posted on: 2012/2/11 23:38
Transfer the post to other applications Transfer


Re: ZeroHero cross compilers

Joined:
2009/10/28 4:25
From Finland
Group:
Member
Posts: 181
Offline
@AmiDog_AROS

Forgot to add you need --enable-languages=c,c++ when configuring gcc but apart from that the instructions should be correct as I just used them last week to build and install i386-aros-gcc on my laptop. Note that you need to get mpfr-2.4.2 as the latest mpfr version (3.x.x) isn't compatible.

Posted on: 2012/2/12 0:15
Transfer the post to other applications Transfer


Re: ZeroHero cross compilers

Joined:
2008/3/17 0:28
Group:
Member
Posts: 29
Offline
@salass00

...
make[2]: Leaving directory `/usr/local/build/gcc-4.5.2-aros/i386-aros/libssp'
Checking multilib configuration for libiberty...
mkdir -p -- i386-aros/libiberty
...
checking for library containing strerror... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.

Aaarg. If only people would drop that almost-never-works configure crap and use something which actually does work...

I'm using latest stable debian BTW.

Posted on: 2012/2/12 0:31
Transfer the post to other applications Transfer


Re: ZeroHero cross compilers

Joined:
2008/3/17 0:28
Group:
Member
Posts: 29
Offline
Aaargh, again. After it failed, I added --disable-libiberty and configured again. Now it built fine. I then configured once more, this time WITHOUT --disable-libiberty, and it configured and then built without any issues.

Posted on: 2012/2/12 1:31
Transfer the post to other applications Transfer



« 1 (2) 3 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
3636
2 nikolaos
nikolaos
3451
3 phoenixkonsole
phoenixkonsole
2979
4 magorium
magorium
2867
5 deadwood
deadwood
2315
6 mazze
mazze
2058
7 clusteruk
clusteruk
2052
8 ncafferkey
ncafferkey
2048
9 damocles
damocles
1788
10 Kalamatee
Kalamatee
1711
© 2004-2013 AROS Exec