Welcome, Guest. Please login or register.

Author Topic: Free C Compilers for Amiga?  (Read 4201 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline freqmaxTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Free C Compilers for Amiga?
« on: June 09, 2013, 04:30:27 PM »
What are the options for free C Compilers on Amiga ..?
Both under AmigaOS-68k environment and crosscompiled from Unix.

Ie like Borland Turbo C & Bcc..

(assembler can be handy too)
 

Offline hishamk

Re: Free C Compilers for Amiga?
« Reply #1 on: June 09, 2013, 04:52:23 PM »
VBCC is pretty good: http://sun.hasenbraten.de/vbcc/
2x A1000, 2x A2000, 1x A3000, 4x A1200, 3x A500, 1x CDTV, 1x CD32, 2x Pegasos II, 1x EFIKA
 

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show only replies by Mrs Beanbag
Re: Free C Compilers for Amiga?
« Reply #2 on: June 09, 2013, 07:57:19 PM »
you can set up GCC to compile for 68k
Signature intentionally left blank
 

Offline nicholas

Re: Free C Compilers for Amiga?
« Reply #3 on: June 09, 2013, 08:27:39 PM »
If you want to cross compile from Linux:

http://cross.zerohero.se/os3.html

If you want to cross compile from Windows:

http://amidevcpp.amiga-world.de/index.php?HR_LANG=english

On real hardware use SAS/C  6.58 (get it from TOSEC on archive.org) or VBCC (You'll need the NDK from Amiga. com or Haage &Partner website).

If you want to use GCC on real hardware without committing suicide during the installation process then get Cubic IDE.  The demo version is fully functional.

http://www.softwareandcircuits.com/division/amiga/products/cubic/index.html
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline freqmaxTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Re: Free C Compilers for Amiga?
« Reply #4 on: June 10, 2013, 12:19:39 AM »
What compiler would parse anfs ?

Anyway if I use GCC, will the binaries be alright? I have the feeling those executables re fine on multi-MHz and multi-MB machines with swap.. but not much else ;)
 

Offline nicholas

Re: Free C Compilers for Amiga?
« Reply #5 on: June 10, 2013, 01:48:10 AM »
Quote from: freqmax;737354
What compiler would parse anfs ?


I just check out the svn repo and the makefile requires SAS/C.  It shouldn't take much tweaking to compile with GCC or VBCC.

Quote
Anyway if I use GCC, will the binaries be alright? I have the feeling those executables re fine on multi-MHz and multi-MB machines with swap.. but not much else ;)


gcc -s -noixemul filename.c :)
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Free C Compilers for Amiga?
« Reply #6 on: June 10, 2013, 01:59:16 AM »
If you are after an NFS client then you can just grab the client binaries from this archive.

http://aminet.net/package/comm/net/AmiTCP-bin-30b2
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline freqmaxTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Re: Free C Compilers for Amiga?
« Reply #7 on: June 10, 2013, 02:18:38 AM »
Need the source to seriously tweak it..
 

Offline nicholas

Re: Free C Compilers for Amiga?
« Reply #8 on: June 10, 2013, 08:15:02 AM »
Quote from: freqmax;737362
Need the source to seriously tweak it..


The source is on that sourceforge page you posted.
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline lsmart

  • Sr. Member
  • ****
  • Join Date: Jun 2009
  • Posts: 433
    • Show only replies by lsmart
Re: Free C Compilers for Amiga?
« Reply #9 on: June 10, 2013, 03:20:24 PM »
Quote from: freqmax;737354

Anyway if I use GCC, will the binaries be alright? I have the feeling those executables re fine on multi-MHz and multi-MB machines with swap.. but not much else ;)


GCC needs a lot of stack and then some, so on a vanilla Amiga 500 it will be somewhat tiring to even compile your source. I was using the DICE C-Compiler (freeware by Matt Dillon). It was a great choice for the small machine, but if you want to compile Unix code with it, you needed to fiddle with the Makefiles a lot. DICE had a much simpler yet effective approach to the build process.

I have used GCC on my Amiga 3000 and it worked fine (once you increased the stack of the shell!), but I haven't done any GUI stuff then.

On Amiga OS 4 GCC is the compiler of choice and works like a charm for all native code I have seen and a small GUI-Utility I wrote myself.
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Free C Compilers for Amiga?
« Reply #10 on: June 10, 2013, 03:40:08 PM »
I recommend SASC since it has the best source level debugger by far.

I recommend SASC since it supports defining how much stack space you want allocated for your program by using the __STACK__ built-in var.

I recommend SASC since it is really easy to link asm code .o files into your project.

I recommend SASC because it features many nifty amigatized features like __CHIP etc.

I recommend SASC because you can run your code on one machine while remote controlling it with the Source Level Debugger GUI on another machine.

The very latest version of DICE is nice too.

If you are writing your own original code then AmigaE and PortableE should definitely be considered, as the E language syntax is a giant upgrade from primitive old C.

If you are just porting old C code then of course you should probably just stick with C.  As one of the projects you are interested is already set up for SASC makefile, compiler and linker then you should really just use that.  Otherwise you will just waste time fiddling with makefile adjustments.  p.s. I hate makefiles :)
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline freqmaxTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Re: Free C Compilers for Amiga?
« Reply #11 on: June 10, 2013, 03:53:09 PM »
My concern regarding GCC was how the binariers used would turn out. The system requirements of the compile process is a lesser concern because it's most likely will be done using cross compilation if possible. As that would be way faster. ;)

The problem with SAS/C is getting the bits.. :P
(I proberbly has it on a few floppies which I think I know where they are which can be read in a likely working amiga computer which perhaps would like to do some RS232 - now where is improbability drive when you need it! :D)

The most desired setup considering the answers here would be a unix system running DICE using SAS/C Makefiles to produce binaries which is then tested with UAE.

I have done SAS/C years ago with 1 MB A500 using a floppy drive.. *pain* but it made it possible to code C at home..! then I got a HDD.. tight memory but less pain. Had to quit editor for each compile to free upp memory.. no swap.
 

Offline nicholas

Re: Free C Compilers for Amiga?
« Reply #12 on: June 10, 2013, 04:20:04 PM »
Quote
The most desired setup considering the answers here would be a unix system running DICE using SAS/C Makefiles to produce binaries which is then tested with UAE.


DICE and SAS are for the Amiga OS not UNIX.

If you want to compile binaries that are small with GCC then you can use the -nostdlib argument and write your own startup code.
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline mongo

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 964
    • Show only replies by mongo
Re: Free C Compilers for Amiga?
« Reply #13 on: June 10, 2013, 05:19:11 PM »
Quote from: nicholas;737406
DICE and SAS are for the Amiga OS not UNIX.

If you want to compile binaries that are small with GCC then you can use the -nostdlib argument and write your own startup code.


DICE is pretty portable and will compile and run on a UNIX system no problem.
 

Offline nicholas

Re: Free C Compilers for Amiga?
« Reply #14 on: June 10, 2013, 05:44:26 PM »
Quote from: mongo;737413
DICE is pretty portable and will compile and run on a UNIX system no problem.


Cool.

What's it like at handling code full of gnuisms?
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini