andwn/marsdev

Option to use installed version of m68k-elf-toolchain

htv04 opened this issue · 4 comments

htv04 commented

On my system, I prefer to install m68k-elf-gcc from a repo because it allows me to automatically install updates. However, this method requires me to manually create symlinks to where the files would normally installed in the mars install directory, and requires me to edit the Makefile due to the standard build dependency.

Perhaps an option to create symlinks for all the required files could be added? I can provide a list of necessary files, or even a PR that adds this functionality.

andwn commented

I don't want to rely on filesystem features. Instead I think the Makefile could be edited to have a separate variable for the toolchain path and other tools. Might give that a shot later.

By repo you mean you are using something like this?
https://packages.debian.org/stable/gcc-m68k-linux-gnu

htv04 commented

By repo you mean you are using something like this? https://packages.debian.org/stable/gcc-m68k-linux-gnu

The AUR equivalent of that, yep

andwn commented

I have attempted to get a build working using a distro-supplied m68k-elf toolchain. After some tweaking I was able to compile and run simple Hello World ROM. Unfortunately, when trying to build my actual projects the compiler itself would crash. Specifically, when attempting to use -mshort:

image

I've decided not to implement this as it seems like it would be a nightmare to support.

htv04 commented

Seems like that's the Linux-specifc variant of the M68K toolchain, so it's probably trying to link against some Linux stuff that errors out like that. My toolchain is m68k-elf (like the one your script builds), I was mistaken when I said that I was using the AUR equivalent of your repo package.

Anyways, it's cool if you don't end up implementing this, I made a symlink script so updating and using my installed toolchain is no problem for me.