🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.linux.misc
6 messages
6 total messages Started by Trevor Boicey Mon, 09 Oct 1995 19:36
Porting Amiga-gcc to linux
#79
Author: Trevor Boicey
Date: Mon, 09 Oct 1995 19:36
19 lines
1298 bytes
  I am looking to generate Amiga binaries on a linux machine using GCC.

  I am developing software that runs on both platforms. Linux is
my preferred development OS, so my current system involves getting
it to work under linux, then modeming it over to my amiga and
compiling it with SAS/C. Then modeming the executable back for archiving.

  I am thinking about trying to compile amiga gcc on my linux box, with
the idea being that I could run it on linux to generate a binary that
should be Amiga runnable. Thus eliminating the back and forth and
extra compile step.

  Has this been done? Can this work?
--
------------- Trevor Boicey ------ Computer Engineer -------------
   Band Web page at http://www.achilles.net/~jrobbins/gold.html
        Personal web page at http://www.proton.com/zapper
            Neither web page particularily exciting...
Re: Porting Amiga-gcc to linux
#80
Author: Chris A. Mattingly
Date: Tue, 10 Oct 1995 00:21
28 lines
1494 bytes
ae718@FreeNet.Carleton.CA (Trevor Boicey) writes:


>  I am looking to generate Amiga binaries on a linux machine using GCC.

>  I am developing software that runs on both platforms. Linux is
>my preferred development OS, so my current system involves getting
>it to work under linux, then modeming it over to my amiga and
>compiling it with SAS/C. Then modeming the executable back for archiving.

>  I am thinking about trying to compile amiga gcc on my linux box, with
>the idea being that I could run it on linux to generate a binary that
>should be Amiga runnable. Thus eliminating the back and forth and
>extra compile step.

>  Has this been done? Can this work?

Why don't you just get the natively built gcc for ados?!

ftp.aminet.org:/pub/aminet/
Somewhere under gnu/ or dev/c

-Chris
-- 
Chris Mattingly       | My views are not necessarily those of my employers
camattin@eos.ncsu.edu |
                      | "Good programmers write good code; great programmers
                      | 'borrow' good code."  -- Mike Gancarz
Re: Porting Amiga-gcc to linux
#81
Author: Guillaume Laurent
Date: Tue, 10 Oct 1995 12:06
23 lines
1524 bytes
In article <camattin.813284518@c00037-5pa.eos.ncsu.edu> camattin@eos.ncsu.edu (Chris A. Mattingly) writes:

> >  I am looking to generate Amiga binaries on a linux machine using GCC.
> > [...]
 

> Why don't you just get the natively built gcc for ados?!

I think that the original poster actually wants to do is
cross-compiling. That is, compiling an amiga binary on a linux box.

I don't know if gcc can do that, although I'm certainly no expert. May
be compiling gcc itself, configured for the amiga, on a linux box
would produce a compiler that would generate amiga code. But what
would happen when linking ?? You need the amiga libraries on your
linux box as well, can a simple copy just work ?

Any answers to those questions is welcomed.

-- 
--
			Guillaume
			(laurent%metro.heidelbg.ibm.com@heidelbg.ibm.com)
Re: Porting Amiga-gcc to linux
#82
Author: Michal Jaegermann
Date: Tue, 10 Oct 1995 18:03
31 lines
1979 bytes
Guillaume Laurent (glaurent@nissart.lagaude.ibm.com) wrote:

: I don't know if gcc can do that,

Yes, it can.  For years gcc based cross-compilers for Atari ST
are running on different platforms.  Configuring gcc for a cross-compilation
is directly supported in gcc sources.

: be compiling gcc itself, configured for the amiga, on a linux box
: would produce a compiler that would generate amiga code. But what
: would happen when linking ??

You need a special linker which will produce Amiga binaries.

: You need the amiga libraries on your
: linux box as well, can a simple copy just work ?

Likely.  This depends on your (cross)linker.  It may be happier with
another format.  If you have library sources and a cross-compiler
than this is not a big problem.  You just have to recompile libraries.
The only point is that your compiler and linker have to agree what
an intermediate format is.  Once you decided on that you need also
a bunch of auxiliary tools (librarian, stripper, symbol table lister,
things like that - i.e. ar, strip, nm, ... for a cross-compiler).

In summary: this is a fair amount of work if you are doing that from
scratch but this is definitely possible.  Bits are bits and a compiler
is just producing a pile of them.  It is only OS and its loader which
later tries to make some sense of that. :-)

  Michal
Re: Porting Amiga-gcc to linux
#83
Author: Gunther Nikl
Date: Wed, 11 Oct 1995 11:50
17 lines
1343 bytes
Trevor Boicey (ae718@FreeNet.Carleton.CA) wrote:

:   I am looking to generate Amiga binaries on a linux machine using GCC.
:   I am thinking about trying to compile amiga gcc on my linux box, with
: the idea being that I could run it on linux to generate a binary that
: should be Amiga runnable. Thus eliminating the back and forth and
: extra compile step.

:   Has this been done? Can this work?

  Its not that complicate to generate a cross-compiler running under linux
  and compiling for AmigaDOS. Only to have the compiler is not enough. You
  also need a cross-assembler and -linker. To get the assembler is possible
  but the linker is a problem. The currently used ld on the amiga has some
  problems with the byte order thus its not useable on a i80x86...

  Gunther
Re: Porting Amiga-gcc to linux
#84
Author: Marc Espie
Date: Fri, 13 Oct 1995 01:16
40 lines
2400 bytes
In article <DG754E.4A8@freenet.carleton.ca>,
Trevor Boicey <ae718@FreeNet.Carleton.CA> wrote:

>  I am looking to generate Amiga binaries on a linux machine using GCC.

>  I am developing software that runs on both platforms. Linux is
>my preferred development OS, so my current system involves getting
>it to work under linux, then modeming it over to my amiga and
>compiling it with SAS/C. Then modeming the executable back for archiving.

>  I am thinking about trying to compile amiga gcc on my linux box, with
>the idea being that I could run it on linux to generate a binary that
>should be Amiga runnable. Thus eliminating the back and forth and
>extra compile step.

>  Has this been done? Can this work?
>--
Yes, this does work. gcc can be configured as a cross-compiler, and has been
in the recent past, for SparcStations for instance.

You will probably need to install gcc on your amiga first, just to get 
everything you need (link libraries, especially libamiga.a, might be very
important...). Don't forget the source tree, as you will need to reconfigure
and recompile to get a running cross-compiler under linux... it is even 
explained in the amiga documentation.

I'm afraid you will still need to use SAS/C though. 
As a programmer, I've got a big project that is developped under Unix, and
that I port back to AmigaDos from time to time. I ALWAYS find some bugs on
my amiga that slipped through in the Unix version: considering Unix memory
management, some errors don't show under Unix, and become deadly under
amigados (I believe that AmigaDos is a better system, precisely because
of that. It is much less forgiving of sloppy programming than Unix).
... and don't forget that we still don't have gdb under amigados!

-- 
[nosave]<http://www.eleves.ens.fr:8080/home/espie/index.html>
microsoft network is EXPLICITLY forbidden to redistribute this message.
`Moon purismu powa, make up.... Tsuki ni kawatte, oshiokyo !'
	Marc Espie (Marc.Espie@ens.fr)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads