Welcome, Guest. Please login or register.

Author Topic: Compiling (esp C/C++) How do you like to do it?  (Read 1824 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline jennadkTopic starter

  • Newbie
  • *
  • Join Date: Mar 2015
  • Posts: 26
    • Show only replies by jennadk
Compiling (esp C/C++) How do you like to do it?
« on: March 03, 2016, 03:14:09 AM »
I'm curious as to how most people approach compiling new software for so many Amiga platforms, such as AROS x86/68k, OS4, MorphOS and OS3.X? I've seen directions for most on cross-compiling from Linux but each requires its own flavor of GCC/G++ and SDK/libraries. What do most folks seem to do?

Just from a speed perspective, it seems like cross compiling from Linux x86 is attractive, but do folks still compile directly on PPC & 68K? Also wondering if there's a good central guide on how to set up the various SDK / Compiler environments for all of those combinations out there?

This is not an inquiry about editors/IDEs, I view those as a separate preference. That said,  if you compile with whatever is included please reply!

Thank you,
JDK
________________________________________________
Amiga 1200 ACA1231|IDE2CF|16GB CF|Indivision|3ComLAN
Morphos Mini G4 1.4Ghz|1GB RAM
 

Offline HaukeVB

  • Newbie
  • *
  • Join Date: Feb 2016
  • Posts: 24
    • Show only replies by HaukeVB
Re: Compiling (esp C/C++) How do you like to do it?
« Reply #1 on: March 03, 2016, 10:22:33 AM »
This is actually an interesting question!
I am starting to experiment with AROS on Ubuntu on Parallels (OSX).

Of cause it depends on what you want to aim for. (AOS, AROS, AOS4, MorphOS...)
I find the lack of easy to set-up dev-enviroments one of the main obstactles to return to Amiga Development... (yet AROS was reasonable easy)  but maybe I havn't found the right solution.
| A1500, 2630, Merlin, XCalibur, Nexus, Emplant, 2320...
 

Offline kolla

Re: Compiling (esp C/C++) How do you like to do it?
« Reply #2 on: March 03, 2016, 10:30:26 AM »
For AROS, I use whatever build system that AROS project is using.

For classic Amiga OS, I use whatever compiler the project I am hacking on was written for, typically under UAE for speed. And likewise, for Linux/m68k I build natively but under emulator, in this case Aranym (and soon Qemu, maybe).

MorphOS and OS4 are of little interest, but I am not a developer as much as I am someone who happily tinker with existing code in attempts to make it do what I want :)
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline eliyahu

  • Lifetime Member
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Jan 2011
  • Posts: 1220
  • Country: us
  • Thanked: 4 times
  • Gender: Male
    • Show only replies by eliyahu
    • eliyahu.org
Re: Compiling (esp C/C++) How do you like to do it?
« Reply #3 on: March 03, 2016, 01:37:35 PM »
@jennadk

i use the gcc compiler and toolchain provided by hyperion in the AOS4 SDK (link). this way everything 'just works' on my next-gen systems, where i do the compilation. i haven't set up a cross-compiler environment on my x64 linux boxes, but i know folks who have.

-- eliyahu
"How do you know I’m mad?" said Alice.
"You must be," said the Cat, "or you wouldn’t have come here."
 

Offline jennadkTopic starter

  • Newbie
  • *
  • Join Date: Mar 2015
  • Posts: 26
    • Show only replies by jennadk
Re: Compiling (esp C/C++) How do you like to do it?
« Reply #4 on: March 03, 2016, 10:54:37 PM »
Yay, this is actually pretty handy. Something  I am thinking is, since it seems like all platforms 'support' using some form of  GCC + a SDK, it might be reasonable to set up vagrant or a similar downloadable compiling environment.

You'd download the vagrant 'box' and then point a predetermined share path in vagrant to your SDK (licensing) and another to your project and run vagrant to build. There would have to be a supporting site with documentation on use, set up and links to the supported SDKs as well. Might be a useful project?

That's in theory at least, it's what I do at work with Django and Laravel. I don't know what current developers in the Amiga community really use though, if most folks don't ever cross compile to multiple platforms it's not useful.

As a PHP/Python centric person I'm only aware of GCC/G++ from the perspective of compiling pre-packaged Python add-ons and Linux software. So getting all of the correct compiler settings, versions and flags is probably 90% of the work.
________________________________________________
Amiga 1200 ACA1231|IDE2CF|16GB CF|Indivision|3ComLAN
Morphos Mini G4 1.4Ghz|1GB RAM
 

Offline EDanaII

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 579
    • Show only replies by EDanaII
    • http://www.EdwardGDanaII.info
Re: Compiling (esp C/C++) How do you like to do it?
« Reply #5 on: March 03, 2016, 11:20:26 PM »
I prefer doing it in Eclipse, using ZeroHero's gcc crosscompiler. It supports all Amiga environments...
Ed.
 

Offline jennadkTopic starter

  • Newbie
  • *
  • Join Date: Mar 2015
  • Posts: 26
    • Show only replies by jennadk
Re: Compiling (esp C/C++) How do you like to do it?
« Reply #6 on: March 04, 2016, 02:47:36 AM »
That sounds fantastic, I see the .se site with that name but it doesn't seem to have anything for Amiga. Where are these stored at?
________________________________________________
Amiga 1200 ACA1231|IDE2CF|16GB CF|Indivision|3ComLAN
Morphos Mini G4 1.4Ghz|1GB RAM
 

Offline nicholas

Re: Compiling (esp C/C++) How do you like to do it?
« Reply #7 on: March 04, 2016, 12:29:07 PM »
Copy and paste is refusing to work here for some reason, but search github for Amiga Crosscompiling Toolchain
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline Varthall

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 633
    • Show only replies by Varthall
Re: Compiling (esp C/C++) How do you like to do it?
« Reply #8 on: March 04, 2016, 12:57:06 PM »
Quote from: nicholas;805369
Copy and paste is refusing to work here for some reason, but search github for Amiga Crosscompiling Toolchain


This page?

https://github.com/cahirwpz/amigaos-cross-toolchain

I have noticed that for OS4 it has an older build of gcc (4.2.4), while this page has a newer 4.4.3:

http://kas1e.mikendezign.com/zerohero_crosscompilers_backup/cross-compiler_os4.html

and on Aminet there's a native OS4 port of 5.3.0:

http://aminet.net/package/dev/gcc/adtools-os4

Same regarding 68k (2.95.3 vs. 3.4.0):

http://kas1e.mikendezign.com/zerohero_crosscompilers_backup/cross-compiler_os3.html

Varthall
AmigaOne XE - AmigaOS 4.1 - Freescale 7457 1GHz - 1GB ram
MPlayer for OS4: https://sourceforge.net/projects/mplayer-amigaos/
 

Offline Varthall

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 633
    • Show only replies by Varthall
Re: Compiling (esp C/C++) How do you like to do it?
« Reply #9 on: March 04, 2016, 12:58:24 PM »
Personally I compile natively for OS4, except for larger projects which are faster to crosscompile on my x64 laptop.

Varthall
AmigaOne XE - AmigaOS 4.1 - Freescale 7457 1GHz - 1GB ram
MPlayer for OS4: https://sourceforge.net/projects/mplayer-amigaos/
 

guest11527

  • Guest
Re: Compiling (esp C/C++) How do you like to do it?
« Reply #10 on: March 04, 2016, 01:02:14 PM »
Quote from: jennadk;805238
I'm curious as to how most people approach compiling new software for so many Amiga platforms, such as AROS x86/68k, OS4, MorphOS and OS3.X? I've seen directions for most on cross-compiling from Linux but each requires its own flavor of GCC/G++ and SDK/libraries. What do most folks seem to do?

Depends. I partially use the native development tools, like SAS/C or DevPac, on the native machine. I also partially run them on vamos now. Same tools, though no graphical interface.
 

Offline nicholas

Re: Compiling (esp C/C++) How do you like to do it?
« Reply #11 on: March 04, 2016, 01:53:58 PM »
Quote from: Varthall;805371
This page?

https://github.com/cahirwpz/amigaos-cross-toolchain

I have noticed that for OS4 it has an older build of gcc (4.2.4), while this page has a newer 4.4.3:

http://kas1e.mikendezign.com/zerohero_crosscompilers_backup/cross-compiler_os4.html

and on Aminet there's a native OS4 port of 5.3.0:

http://aminet.net/package/dev/gcc/adtools-os4

Same regarding 68k (2.95.3 vs. 3.4.0):

http://kas1e.mikendezign.com/zerohero_crosscompilers_backup/cross-compiler_os3.html

Varthall

Yeah that's the one.

On MorphOS I compile natively, but for 68k I generally do it under emulation or cross compile.

I really should look into setting up a functioning distcc server tbh.
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline jennadkTopic starter

  • Newbie
  • *
  • Join Date: Mar 2015
  • Posts: 26
    • Show only replies by jennadk
Re: Compiling (esp C/C++) How do you like to do it?
« Reply #12 on: March 04, 2016, 09:34:33 PM »
DistCC seems neat for a speed bump. It seems like folks use different things all over the board. It's fantastic that there's still plenty of viable options.

@Varthall Thank you for the links!
________________________________________________
Amiga 1200 ACA1231|IDE2CF|16GB CF|Indivision|3ComLAN
Morphos Mini G4 1.4Ghz|1GB RAM
 

Offline EDanaII

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 579
    • Show only replies by EDanaII
    • http://www.EdwardGDanaII.info
Re: Compiling (esp C/C++) How do you like to do it?
« Reply #13 on: March 04, 2016, 10:02:25 PM »
@ jennadk

Looks like others have found the tool chain for you. So, here's the instructions on how to set it up: http://www.amigacoding.de/index.php?topic=17.0

I actually used AmiDevCpp to set it up, simply because I started with it first and then, when I discovered I could compile with Eclipse, had it there already. :)
Ed.
 

Offline Trev

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 1550
  • Country: 00
    • Show only replies by Trev
Re: Compiling (esp C/C++) How do you like to do it?
« Reply #14 on: March 04, 2016, 11:57:27 PM »
I never targeted AROS, but for the others, I used a combination of vbcc and GCC running on Windows.

vbcc is great, but when compiled from source on Windows, the host binaries do not emulate the target's floating point environment. It's been years since I've done any Amiga programming, so I'm not sure how vbcc handles that today.

I usually built my own native GCC binaries from the adtools repository under MinGW. Cygwin is probably easier to manage, but at the time, Cygwin support for 64-bit Windows was very poor.