Welcome, Guest. Please login or register.

Author Topic: GCC 4.x or Clang for 68k  (Read 6302 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: GCC 4.x or Clang for 68k
« on: May 13, 2014, 01:43:03 PM »
Quote from: SamuraiCrow;764346
Clang would require a new backend be written for LLVM and a new memory handler since a full Clang executable requires 1gig to run.


Are you sure? I run clang on both my 256meg and my 512meg Raspberry Pis

Quote


It works on AROS 68k but uses the ELF loader so it probably won't backport to AmigaOS easily.


Doesn't AROS 68k support  both Amiga Hunks and ELF!?

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: GCC 4.x or Clang for 68k
« Reply #1 on: May 13, 2014, 02:13:34 PM »
Quote from: psxphill;764368
I believe so, but I got the impression that the m68k gcc 4 port for aros compiler only generates elf.


Oh right, yeah. The idea has always to eventually move away from the archaic HUNK format.

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: GCC 4.x or Clang for 68k
« Reply #2 on: May 14, 2014, 09:12:40 AM »
Quote from: nyteschayde;764395


I've managed to some degree but I just noticed that in order to build something like GNUstep (in order to get the appropriate Foundation frameworks which would make Objective-C useful on the Amiga) you need at least 2.9.5.3. Now we do have that version, but I can't help but then wish for more ObjC features that exist in the newer compilers such as blocks, automatic property synthesis, etc...


Start with ObjFW as it's a much lighter weight foundation than GNUStep!

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: GCC 4.x or Clang for 68k
« Reply #3 on: May 15, 2014, 11:56:24 AM »
Quote from: AJCopland;764464
I'd prefer to use another higher level language, maybe C# or Java, but better yet something more suited to the problem domain that is without pointers entirely.


Burn the heretic!!! Pointers are good. Java is a language I really dislike on so many levels, and C# I've never used... And I am unlikely to ever use it now.

C/C++ is a nice compromise between High level and low level programming languages.

If I'm going high level, I'm using Obj-C.

Quote

If I had no choice but to use C or C++ then I'd pick C++ since I can at least hope to catch some of the blindingly obvious issues and deliberately avoid using raw pointers which cause most of these kinds of bugs.


C++ is a must for any medium to large project. But I tend to mix C, C++ and Obj-C into a single project depending on the complexity of what I'm doing.

Quote

The issues that people are spouting about C vs C++ here are weird, it's like stepping back to the 1990s when I started coding in C - they're outdated. You don't need to know all of C++ to use it, you use the bits you need, learn something new now and then. The same as you do with C, if I want to get as low-level as C with C++ then I do, if I don't then I don't. Nothing more too it.


I agree. Mixing and matching is also possible, not sure how to do something in C++, do it that way you would in C... etc...

[/quote]
I think the Amiga needs a modern version of GCC / LLVM / CLang just to disspell these myths! :)

So how do we go about doing that productively? Even if GCC 4.8 spews poor integer code for 68k now, that doesn't mean we have to leave it that way.[/QUOTE]

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: GCC 4.x or Clang for 68k
« Reply #4 on: May 15, 2014, 09:35:21 PM »
Quote from: AJCopland;764471

Trouble is once someone knows C they think that's it, it's the ultimate hammer, it can do anything. No one ever stops to think if they "should" be using it for everything.

I think the problem is that C is actually beautiful... No programming language syntax before it even came close (B and BCPL excluded)... Hence why all modern languages follow the C syntax.

C is beautiful, and those who know it understand that.
« Last Edit: May 15, 2014, 09:39:41 PM by bloodline »