andwn / marsdev

Cross platform Mega Drive / 32X toolchain
MIT License
168 stars 18 forks source link

Option to use installed version of m68k-elf-toolchain #39

Closed HTV04 closed 1 year ago

HTV04 commented 1 year ago

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 1 year ago

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 1 year ago

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 1 year ago

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 1 year ago

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.