adtools / amigaos-cross-toolchain

AmigaOS cross compiler for Linux / MacOSX / Windows
184 stars 48 forks source link

some fixes for clean build and osx #1

Closed cnvogelg closed 12 years ago

cnvogelg commented 12 years ago

Hi!

First of all thanks for this great little project!

I tried it here on my 10.7.3 Mac OS X machine and find two little issues I fixed with the attached patches:

Cheers, Chris

cahirwpz commented 12 years ago

Hi Chris,

Firstly, excuse me for late answer. My life's been quite hectic lately - I moved back to Poland from the US.

First of all thanks for this great little project!

I'm very pleased that someone found it out and actually is using it :)

May I know how did it happen you started using it? What software do you write? Is there something more you'd expect from this toolchain? Generally speaking, I'd like you to give me some feedback on this project.

I tried it here on my 10.7.3 Mac OS X machine and find two little issues I

fixed with the attached patches:

  • A diff in gas/configure does not apply cleanly and aborts patching. I removed the section as it only applies to a m68k hosted toolchain and is not required for the cross toolchain we build here

That's somewhat unexpected. Anyway it can be safely removed, so I accepted it.

  • Vanilla find on osx does not support the -printf switch. I worked around this by writing an own copy command

In this case the explanation is that so far I used Gentoo in Prefix, but very lately I switched to MacPorts. I guess that Gentoo used GNU coreutils and I'm a Linux guy.

Thanks! Have you worked out how code reviews work with github. I'd like to review further changes before pulling it.

Kind regards Krystian Bacławski

cnvogelg commented 12 years ago

Hi Krystian,

Am 09.05.12 11:51, schrieb Krystian Bacławski:

May I know how did it happen you started using it? What software do you write? Is there something more you'd expect from this toolchain? Generally speaking, I'd like you to give me some feedback on this project.

I got my first Amiga 500 almost 25 years ago. After some years of playing around I lost interest in it and now a few months again I found my goold old machine again and I am back ;) I played a bit with network access and created plip2slip [1]. For that I needed to recompile a plip SANA driver and thus the need for a Amiga C compiler emerged.

First I began using old my SAS C copy with E-UAE, but I'd prefer a cross compiler running on osx. So I started a search on the net for a suitable solution: I tried DICE, vbcc and tested the gcc 4.x used in AROS/m68k. But all of them did not compile a SAS C source out of the box. So finally, I wrote vamos [2] a WINE-like API-emulator but for AmigaDOS m68k binaries. With that I am now able to run the SAS C compiler directly on osx and I have a new project that gives me great insight into Amiga development (again).

Since then I am always looking/googling around for cross compiler solutions for m68k classic Amiga development. Lately, I stumbled across your project and was happy to find another solution. So one might say, collecting cross-compilers for the Amiga became a hobby of mine :)

[1] http://lallafa.de/blog/plip2slip/ [2] http://lallafa.de/blog/amitools/

In this case the explanation is that so far I used Gentoo in Prefix, but very lately I switched to MacPorts. I guess that Gentoo used GNU coreutils and I'm a Linux guy.

Ah, I see... then you are using find of GNU findutils and that supports the printf switch...

Thanks! Have you worked out how code reviews work with github. I'd like to review further changes before pulling it.

Hmm.. I mostly use only the command line git when working with github. So pulling/merging is always done in Terminal and "reviewing" is cherry picking patches. I heard about the GitHub review feature but never used it. Just have a look at their help pages, they are really detailed...

Regards, Chris

cahirwpz commented 12 years ago

Hi Chris,

I got my first Amiga 500 almost 25 years ago. After some years of playing around I lost interest in it and now a few months again I found my goold old machine again and I am back ;) I played a bit with network access and created plip2slip [1]. For that I needed to recompile a plip SANA driver and thus the need for a Amiga C compiler emerged.

First I began using old my SAS C copy with E-UAE, but I'd prefer a cross compiler running on osx. So I started a search on the net for a suitable solution: I tried DICE, vbcc and tested the gcc 4.x used in AROS/m68k. But all of them did not compile a SAS C source out of the box. So finally, I wrote vamos [2] a WINE-like API-emulator but for AmigaDOS m68k binaries. With that I am now able to run the SAS C compiler directly on osx and I have a new project that gives me great insight into Amiga development (again).

Whoa, that's a comeback! I have to admit that I'm quite impressed by the work you did. The idea of mixing musashi with trap handlers is really awesome. I had a certain need to play with Amiga Hunk format. Because you've already wrote a tool, half of the work is done :)

My story goes like this... I'm a demoscene coder. I started my adventure around 1996. I got my first Amiga in 1994. I'm planning a comeback this year with new demos / intros. Obviously I need a convenient developer's environment. My target is 68060 + FPU, though I have in mind a production for A500. After trying and comparing VBCC, SAS/C & GCC I decided to invest my time into the latest one. There're a few reasons for that. Namely:

I can review your Python code if you wish. The reason I'm offering help is that I noticed you don't use many convenient features of Python that make code more compact, readable and sometimes faster.

Since then I am always looking/googling around for cross compiler solutions for m68k classic Amiga development. Lately, I stumbled across your project and was happy to find another solution. So one might say, collecting cross-compilers for the Amiga became a hobby of mine :)

That's interesting. My further plans for this project is to add newer version of binutils and gcc (3.4). I'd love to use some of newer extensions to C language provided by GCC. I have some minor knowledge about gcc's backend, so I can also debug and fix code generation. If you looked more closely at the build, ixemul library is not compiled - that's another thing that needs to be fixed. A set of tools manipulating with a.out and amiga hunk format would be very handy. So... there's a lot to be done, before I consider this project to be complete.

Kind regards Krystian Bacławski

cnvogelg commented 12 years ago

Hi Krystian,

Am 14.05.12 09:50, schrieb Krystian Bacławski:

Whoa, that's a comeback! I have to admit that I'm quite impressed by the work you did. The idea of mixing musashi with trap handlers is really awesome. I had a certain need to play with Amiga Hunk format. Because you've already wrote a tool, half of the work is done :)

Thanks! Have fun working with my code. All is planned to be used as libraries for your own projects but I must admit that not all have a clean API yet - and docs are (as usual :) missing completely... Its still work in progress but nevertheless already quite useable - at least for my purposes ;)

My story goes like this... I'm a demoscene coder. I started my adventure around 1996. I got my first Amiga in 1994. I'm planning a comeback this year with new demos / intros. Obviously I need a convenient developer's environment. My target is 68060 + FPU, though I

Hey cool! What's your handle? I'd like to look up and watch some of your old productions..

'060 - wow! never reached that generation in Motorola CPUs. I only had a plain 68k back in the days. Now with the Amiga retro hobby emerging again, I just bought an A1200 from EBay and added a ACA1231 CPU accelerator board with an 68030+MMU. Currently, I am playing around with WHDLoad and watch lots of old demo stuff.

Compared to the 8-Bit Commodore scene the Amiga platform is quite wide spread regarding CPU power and available addons and thus it makes the productions very difficult to compare...

I'll try to stick with classic Amiga setups sold by Commodore...

have in mind a production for A500. After trying and comparing VBCC, SAS/C& GCC I decided to invest my time into the latest one. There're a few reasons for that. Namely:

  • GCC is open-source (whatever is broken I can fix it; if I spot an opportunity for optimisation I can try to add it; etc),
  • it offers new C language standard (C99) and cool language extensions not available in other compilers,
  • it optimises code really well (at least version 2.95.3),
  • gcc uses binutils that offer a set of really cool tools like objdump, nm, etc.
  • I can use GccFindHit to locate source line that reference invalid memory (detected by Enforcer),
  • offers special language for assembly inlines,
  • it's the only reasonable C++ compiler for AmigaOS (it delivers Standard Template Library!),
  • libnix offers great compatibility with C standard library.

Full ACK. GCC is one of the most popular and best compilers out there. Being a professional embedded sw engineer, I use lots of gcc (cross) compilers every day...

Using gcc with Amigas IMHO has the following major aspects:

I never played with gcc source directly, but I heard from collegues that had to work with it, that it is really a large, aged, and somewhat messy codebase. Is that right?

On the other hand, there would be LLVM and clang. I think with the availability of a m68k backend for this compiler toolset the ultimate Amiga compiler could be derived from it. Unfortunately, this sounds like a lot of work and too heavy for a hobby project :(

I can review your Python code if you wish. The reason I'm offering help is that I noticed you don't use many convenient features of Python that make code more compact, readable and sometimes faster.

Hey, that would be great! I'd always appreciate feedback on how to improve my skills at coding...

That's interesting. My further plans for this project is to add newer version of binutils and gcc (3.4). I'd love to use some of newer extensions to C language provided by GCC. I have some minor knowledge about gcc's backend, so I can also debug and fix code generation. If you looked more closely at the build, ixemul library is not compiled - that's another thing that needs to be fixed. A set of tools manipulating with a.out and amiga hunk format would be very handy. So... there's a lot to be done, before I consider this project to be complete.

Sounds great! You have cool things in your project pipeline! I'd always be happy to help out beta testing and stuff like that. Just drop me a mail...

Cheers, Chris