[comp.sys.atari.st] Using a mainframe to run gcc for atari

peewee@ucscb.ucsc.edu (Paul Watson) (08/30/90)

Suppose I were to download the gcc source from an Atari archive, and compile
it on a mainframe like a VAX or an ISI or a SUN.  If I could get the
compiler to run, would it make usable Atari ST program files?  I mean,
is the compiler written taking for granted that it will be run on an atari with
specific bit widths for int, long, etc.

Would this work? has anyone done this before?  And does anyone know for sure that
I would be waisting my time...?

Paul Watson
peewee@ucscb.ucsc.edu

kentd@FtCollins.NCR.com (Kent.Dalton) (08/30/90)

FWIW, I know of someone who took the sources to Sozobon C and coerced
them into running on a VAX/VMS system... The output was a .prg file
suitable for execution on an ST. So, I would assume that gcc could be
used to produce ST executables (probably with a little "massaging" of the gcc
code on your part. :^)

I _love_ software that comes with source code.

--
/**************************************************************************/
/* Kent Dalton                     * EMail: Kent.Dalton@FtCollins.NCR.COM */
/* NCR Microelectronics            *   CIS: 72320,3306                    */
/* Fort Collins, Colorado          * "This mind intentionally left blank" */
/* (303)223-5100 X-319             *    All standard disclaimers apply    */
/**************************************************************************/

hyc@math.lsa.umich.edu (Howard Chu) (08/31/90)

In article <6428@darkstar.ucsc.edu> peewee@ucscb.ucsc.edu (Paul Watson) writes:
>Suppose I were to download the gcc source from an Atari archive, and compile
>it on a mainframe like a VAX or an ISI or a SUN.  If I could get the
>compiler to run, would it make usable Atari ST program files?  I mean,
>is the compiler written taking for granted that it will be run on an atari with
>specific bit widths for int, long, etc.
>
>Would this work? has anyone done this before?  And does anyone know for sure that
>I would be waisting my time...?
>
>Paul Watson
>peewee@ucscb.ucsc.edu

If you have a good enough compiler on your Vax or Sun, no problem. That's
how I compile most large programs for my ST these days. (I used a NeXT box
produce the executables for Fractint while I was porting it. I also used
it to produce my ST-Minix upgrade kit. Very handy.)

Specifically, you will need to transfer the source for the compiler,
assembler, and linker to your "mainframe" system, and you will also need
all the header files and library source code. After you compile the utilities,
you will need to compile the library using the ST header files, then you'll
be ready to produce ST executable files. Anyway, the gcc stuff from Jwahar
Bammi is already set up to allow creating this cross-development system, and
it works pretty well.
--
  -- Howard Chu @ University of Michigan
  one million data bits stored on a chip, one million bits per chip
	if one of those data bits happens to flip,
		one million data bits stored on the chip...

jensting@skinfaxe.diku.dk (Jens Tingleff) (08/31/90)

peewee@ucscb.ucsc.edu (Paul Watson) writes:


>Suppose I were to download the gcc source from an Atari archive, and compile
>it on a mainframe like a VAX or an ISI or a SUN.  If I could get the
>compiler to run, would it make usable Atari ST program files?  I mean,
>is the compiler written taking for granted that it will be run on an atari with
>specific bit widths for int, long, etc.

>Would this work? has anyone done this before?  And does anyone know for sure that
>I would be waisting my time...?

I've used GCC 1.37 (loaded of dsrgsun.ces.cwru.edu) as a cross compiler 
hosted on a SUN4 running SunOS 4.0.1, no problem. The only problem was
an alignment problem in the tool "size", j.bammi sent me a pacth, I don't
know if the patch made it into the distribution (or when).

The size assumptions are OK for running on a SUN4 (or so it seems).
I compiled the doodle demo program, and the PCCTS compiler-compiler tool.
These worked straight out of the box. The only thing i don't think 
I tried was floating point. As the SUN uses IEEE itself, it should be okay. I 
haven't got the executables for the SUN anymore, so I can't check it..

	Jens

Jens Tingleff MSc EE, Institute of Computer Science, Copenhagen University
Snail mail: DIKU Universitetsparken 1 DK2100 KBH O
"It never runs around here; it just comes crashing down"
	apologies to  Dire Straits