English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 09 October 2018, 12:31   #1
asymetrix
Registered User
 
Join Date: Jul 2009
Location: UK
Posts: 112
Amiga GCC 6.2 developer guide appreciated

How hard is it to compile GCC 6 on AmigaOS 3.x ?
I am finding it very difficult in finding up to date guide in creating a nice dev system.

A nice source code repository with apt-get like features would be nice.

Precompiled Amiga 68k binary setup guide ?

I wish all the files were documented in what they are for, and up to date drawer location/structure guidelines.
asymetrix is offline  
Old 09 October 2018, 12:45   #2
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
The amount of RAM required to run such a recent version of GCC would mean it couldn't work on a 32-bit OS like AmigaOS 3.x.
Samurai_Crow is offline  
Old 09 October 2018, 14:56   #3
asymetrix
Registered User
 
Join Date: Jul 2009
Location: UK
Posts: 112
Do you know what the minimum and recommended memory requirements are ?

Maybe these base requirements can also be used for basic hardware memory requirements for new systems.

Do embedded devices use GCC in their systems, can we make a stripped down version ?

Do we have any regression tests specific for Amiga systems, EG structure packing tests ?

I found a pdf for some optimizations, not sure which we are using :
http://events17.linuxfoundation.org/.../elc14_raj.pdf
asymetrix is offline  
Old 10 October 2018, 18:42   #4
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 652
I’m unclear if you’re aware that the gcc toolchain will not run on the Amiga itself. It’s a cross compilation toolchain. You develop & compile Amiga code on a PC and only transfer the resulting executable over to the Amiga.
pipper is offline  
Old 10 October 2018, 21:09   #5
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,160
the gcc toolchain has been ported to amiga, but that was a long time ago with an old version, and it was slow, and used a lot of crap like ixemul.library, and crashed a lot.

Nowadays, I don't even imagine running assemblers or C compilers on the Amiga... Better off with cross-development tools and newest GCC versions on modern machines. The new 6.2 cross 68k is excellent.
jotd is offline  
Old 10 October 2018, 21:32   #6
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
Quote:
Originally Posted by jotd View Post
Nowadays, I don't even imagine running assemblers or C compilers on the Amiga... Better off with cross-development tools and newest GCC versions on modern machines.
Some people would even claim that the same can be said for the results of those cross development tools.
Hedeon is offline  
Old 10 October 2018, 23:06   #7
asymetrix
Registered User
 
Join Date: Jul 2009
Location: UK
Posts: 112
Quote:
Originally Posted by pipper View Post
I’m unclear if you’re aware that the gcc toolchain will not run on the Amiga itself. It’s a cross compilation toolchain. You develop & compile Amiga code on a PC and only transfer the resulting executable over to the Amiga.

I thought because we now have an updated GCC cross toolchain, we can now begin to compile GCC native on amiga.


We had SAS C, Dice C, so how hard can it be to get an updated C/C++ compiler suite running on Amiga ?


If not GCC, then we need to find an uptodate micro C/C++ with latest standards that can be ported easily.
asymetrix is offline  
Old 10 October 2018, 23:09   #8
asymetrix
Registered User
 
Join Date: Jul 2009
Location: UK
Posts: 112
Quote:
Originally Posted by jotd View Post
the gcc toolchain has been ported to amiga, but that was a long time ago with an old version, and it was slow, and used a lot of crap like ixemul.library, and crashed a lot.

Nowadays, I don't even imagine running assemblers or C compilers on the Amiga... Better off with cross-development tools and newest GCC versions on modern machines. The new 6.2 cross 68k is excellent.

I guess I was a bit concerned that if I compile without errors, only to find the Amiga program may not execute, i would be stuck.
asymetrix is offline  
Old 10 October 2018, 23:11   #9
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 652
It’ll be hard finding someone that will do the porting.

I wonder, what advantages you see in having gcc native on the Amiga? Someone already stated that it’ll be eating up lots of memory, and compile slow.
I also appreciate the fast turnaround time in a cross compile setup and the ability to use modern tools and IDEs that are not available on the Amiga.
pipper is offline  
Old 10 October 2018, 23:50   #10
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
Clang is more modular than GCC but that only helps if if doesn't have to be loaded in all at once.
Samurai_Crow is offline  
Old 11 October 2018, 06:30   #11
Minuous
Coder/webmaster/gamer
 
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,630
Does GCC really require more than 2Gb RAM? If so, seems like severe bugs in the memory handling.

Isn't SAS/C much faster and produces better code anyway? Why would anyone want to use GCC instead?

Last edited by Minuous; 11 October 2018 at 07:51.
Minuous is online now  
Old 11 October 2018, 08:20   #12
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by Minuous View Post
Does GCC really require more than 2Gb RAM? If so, seems like severe bugs in the memory handling.

Isn't SAS/C much faster and produces better code anyway? Why would anyone want to use GCC instead?
GCC never really free’s any ram. It allocates the ram it needs the lets the OS free the ram when it quits. This technique is quite incompatible with AmigaOS obviously.

I ported gcc 5 to an OS that didn’t have an MMU and I needed a custom allocator to keep track of all the ram so I could free it on exit.

It certainly didn’t need 2gb of ram to run (from memory my OS had more like 0.5gb of ram).
alpine9000 is offline  
Old 11 October 2018, 11:35   #13
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Quote:
Originally Posted by Minuous View Post
Isn't SAS/C much faster and produces better code anyway? Why would anyone want to use GCC instead?
Gcc hasn't been ported to amiga, so we can't compare the speed on the same hardware. If we compare amiga sas/c compilation speed and gcc linux hosted amiga cross-compiler then I'd guess gcc is a few thousands times faster.

No, SAS/C does not produce better code. It's the other way around.

Gcc is good for development speed, new dialect features, c++, excellent code generation. But if you can't tell, then it doesn't matter I guess.

PS: In this context when I say gcc I mean bebbo's gcc-6 port

Last edited by alkis; 11 October 2018 at 11:37. Reason: added ps
alkis is offline  
Old 11 October 2018, 12:56   #14
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by Samurai_Crow View Post
The amount of RAM required to run such a recent version of GCC would mean it couldn't work on a 32-bit OS like AmigaOS 3.x.
thats plain wrong. i am using gcc-6.3.0 and even ocassionally 8.1.0 to compile aros on a 32 bit linux host all the time. (inclusive m68k target)
wawa is offline  
Old 11 October 2018, 13:21   #15
asymetrix
Registered User
 
Join Date: Jul 2009
Location: UK
Posts: 112
Quote:
Originally Posted by pipper View Post
It’ll be hard finding someone that will do the porting.

I wonder, what advantages you see in having gcc native on the Amiga? Someone already stated that it’ll be eating up lots of memory, and compile slow.
I also appreciate the fast turnaround time in a cross compile setup and the ability to use modern tools and IDEs that are not available on the Amiga.

I should have said an upto date C/C++ compiler.


One has pride in having decent tools to work with on a platform they love.
asymetrix is offline  
Old 11 October 2018, 14:59   #16
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by wawa View Post
thats plain wrong. i am using gcc-6.3.0 and even ocassionally 8.1.0 to compile aros on a 32 bit linux host all the time. (inclusive m68k target)
Guess you have more than 64MB Ram on your linux system...
bebbo is offline  
Old 11 October 2018, 19:18   #17
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by bebbo View Post
Guess you have more than 64MB Ram on your linux system...
sure. but what does 64mb have to do with 32bit?
wawa is offline  
Old 11 October 2018, 19:35   #18
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,309
Just for fun I managed to compile Bebbo's GCC v6 on a Raspberry PI 3 with some minor hacking. It ran out of RAM a few times but I was able to continue. Took forever. The resulting compiler seemed to work.
nogginthenog is offline  
Old 11 October 2018, 19:37   #19
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,309
Quote:
Originally Posted by asymetrix View Post
I should have said an upto date C/C++ compiler.
One has pride in having decent tools to work with on a platform they love.
There are no other up to date C compilers that support 68k. It's as simple as that.
nogginthenog is offline  
Old 11 October 2018, 23:58   #20
Bruce Abbott
Registered User
 
Bruce Abbott's Avatar
 
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 2,544
Quote:
Originally Posted by asymetrix View Post
I thought because we now have an updated GCC cross toolchain, we can now begin to compile GCC native on amiga.
You might think so, but a cross compiler can't necessarily compile itself for the target platform. GCC has over 15 million lines of source code, and requires several libraries and tools that have no Amiga equivalents. Chances of successfully compiling it with a native Amiga compiler (even an older version of GCC) are practically nil.

Quote:
If not GCC, then we need to find an uptodate micro C/C++ with latest standards that can be ported easily.
Why? So we can port PC bloatware that won't work well on the Amiga anyway? Anything that can be done in C++ can be done in C, with a lot less effort than trying to port a modern C++ compiler or update an older one.

The biggest problem with porting C++ code is not the lack of a modern compiler, it's all the other platform-specific crap that has to be dealt to. Also a lot of code is poorly written and full of latent bugs that become apparent when using a different compiler (or even a different version of the same compiler). Even if you could get a modern C++ compiler into a suitably powerful Amiga it wouldn't solve all the potential compatibility issues, so why bother? Better to put the time into writing code that is compatible with an existing Amiga compiler.
Bruce Abbott is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
New to Amiga, advice appreciated! ca_groundhog New to Emulation or Amiga scene 13 06 September 2018 16:35
All input appreciated billy_wiz New to Emulation or Amiga scene 6 02 January 2018 16:57
Help with this one appreciated. adewakd support.Other 1 16 March 2008 14:51
Amiga GCC Where to find it? _ThEcRoW request.Apps 10 02 March 2006 00:44
Amiga GCC Where can i find? _ThEcRoW request.Apps 1 22 October 2005 18:17

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:00.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.15373 seconds with 13 queries