English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. General (https://eab.abime.net/forumdisplay.php?f=37)
-   -   Looking for an open source cross assembler/linker (https://eab.abime.net/showthread.php?t=107584)

hjalfi 09 July 2021 15:55

Looking for an open source cross assembler/linker
 
Hello,


I want to write some 68k Amiga software, cross-compiled from Linux (porting a compiler). It's a combination of C and asm using gcc.


Unfortunately it looks like GNU binutils doesn't support the Amiga, and Amiga binaries are rather hard to generate by hand. It looks like most people use vasm and vlink but I can't use those due to the restrictive licenses.


There's got to be others --- I just can't find any! Can anyone point me at anything? It doesn't need to complex as I only need a single code and data segment.


Thanks!

roondar 09 July 2021 15:57

There is an GCC port for making Amiga software that is reasonably up to date and includes the binutils, maybe that can help?
See here: https://github.com/bebbo/amiga-gcc

Samurai_Crow 09 July 2021 15:58

https://github.com/bebbo/amiga-gcc has an Amiga Hunk-compatible binutils package.
Edit- ninja'd

roondar 09 July 2021 16:05

Quote:

Originally Posted by Samurai_Crow (Post 1494994)
https://github.com/bebbo/amiga-gcc has an Amiga Hunk-compatible binutils package.
Edit- ninja'd

/flex :p

hjalfi 09 July 2021 16:05

D'oh! I saw that, but as the list of software included vlink I thought binutils was just being used as an assembler. Building it now. Thanks!

phx 09 July 2021 20:38

Quote:

Originally Posted by hjalfi (Post 1494992)
It looks like most people use vasm and vlink but I can't use those due to the restrictive licenses.

What is restricting you exactly?

hjalfi 09 July 2021 21:18

The usage restrictions (no commercial use) will keep it out of nearly all Linux distributions, such as Debian. It prevents them from selling CDs or DVDs with the software on it. See 12.A.j or 34.A.0 here: https://people.debian.org/~bap/dfsg-faq.html The exemption clause for targeting Amiga binaries doesn't help because in source form the program isn't targeted at anything, which means it doesn't kick in.

In addition to that, distributing modifications is completely disallowed, which violates 34.A.1 and 34.A.3. (And also makes it useless for my purposes as I can't, e.g., integrate it into my build system.)

Bruce Abbott 10 July 2021 01:33

Quote:

Originally Posted by hjalfi (Post 1495029)
In addition to that, distributing modifications is completely disallowed, which violates 34.A.1 and 34.A.3. (And also makes it useless for my purposes as I can't, e.g., integrate it into my build system.)

So you're not just talking about using it, but distributing a modified version of the assembler and linker? Why would you need to do that?

redblade 10 July 2021 02:30

Maybe www.aminet.net A68k by Charlie Gibbs and Pdc (Sozoban Compiler) will be ok for what you need?

Samurai_Crow 10 July 2021 03:21

Quote:

Originally Posted by redblade (Post 1495053)
Maybe www.aminet.net A68k by Charlie Gibbs and Pdc (Sozoban Compiler) will be ok for what you need?

They both used a closed-source linker IIRC. BLink is closed source.

alkis 10 July 2021 08:57

Quote:

Originally Posted by Samurai_Crow (Post 1495057)
They both used a closed-source linker IIRC. BLink is closed source.

It's not that a68k is binded to blink. It produces standard amiga object files and you can use any linker. m68k-amigaos-ld from bebbo's toolchain should work (untested).

hjalfi 10 July 2021 10:54

I've managed to build bebbo's toolchain, so I'll give that a try. Thanks very much.

Re not being able to distribute modifications: it means I can't check the source code into my VCS, edit the Makefile to preconfigure it, add a file to make it build with my non-Make-based build system, or fix any bugs. I'd have to distribute the original source archive, and add machinery to my build system to unpack it and apply an external patch in order to build it. And it still wouldn't be allowed in Debian.

I've actually done this before with vbcc (see https://cowlark.com/vbcc-z-compiler) and it just isn't worth it, especially if I can find a different toolchain.

phx 10 July 2021 12:14

Quote:

Originally Posted by hjalfi (Post 1495029)
The usage restrictions (no commercial use) will keep it out of nearly all Linux distributions, such as Debian.

Which is not really a problem. The source is downloaded and compiled in a few seconds. Pure ANSI-C. There are no dependencies, as in most bloated GNU tools.

Quote:

It prevents them from selling CDs or DVDs with the software on it.
Software? You're talking about the vasm source? Why should we allow anybody to make money from our hard work, which we already offer for free?

Quote:

The exemption clause for targeting Amiga binaries doesn't help because in source form the program isn't targeted at anything, which means it doesn't kick in.
This clause is dealing with binaries you are generating with our tools. The source is always free to distribute, when unmodified.

Quote:

In addition to that, distributing modifications is completely disallowed
For a good reason. We don't want forks. We are doing (pretty good) free support for our tools, and we certainly don't want to do that for a version which somebody else modified.

Quote:

Originally Posted by hjalfi (Post 1495083)
it means I can't check the source code into my VCS, edit the Makefile to preconfigure it, add a file to make it build with my non-Make-based build system

You can always add files. This is no modification.

Quote:

or fix any bugs.
Bugs should be reported, so they will be fixed in all future versions.

Quote:

I'd have to distribute the original source archive, and add machinery to my build system to unpack it and apply an external patch in order to build it
Do you always include the full source of your tool chains in all your projects? If the only reason is to fix bugs, or to add new features, see above.

hjalfi 10 July 2021 12:30

That's fine --- it's your software, you can do what you like with it! It's just that those decisions mean that I can't use it.

hmn 13 September 2021 21:44

A couple of years ago I was also doing some cross-development with A68k, and I was missing a cross-platform blink counterpart. So I wrote a little toy linker in Python called "hunky" that mimics blink. The idea was that I could use A68k/hunky for cross development and A68k/blink natively on KS1.3.

Reading this thread reminded me of that little project, so I decided to put it online.

Again, this is only a toy that just implements the bare minimum of functionality to link an executable. I am not actively working on it at the moment, but maybe it is of interest to someone.


All times are GMT +2. The time now is 19:04.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.06050 seconds with 11 queries