taviso / 123elf

A native port of Lotus 1-2-3 to Linux.
1.16k stars 59 forks source link

Port to FreeBSD #86

Open vrza opened 2 years ago

vrza commented 2 years ago

Caveat: needs GNU binutils 2.38 which is not yet in the FreeBSD ports tree, and binutils.sh will not compile it cleanly as configuration fails to include headers /usr/local/include. Did not want to go down this rabbit hole for now, as perhaps arrival of binutils 2.38 in FreeBSD ports will solve it.

Closes https://github.com/taviso/123elf/issues/81

taviso commented 2 years ago

Thanks so much for working on this - I think we can merge most of this!

I think must be alloca() defined somewhere, and if not we can just use #define alloca __builtin_alloca, but we can't just s/alloca/malloc/, because it will leak memory.

vrza commented 2 years ago

@taviso Yeah, good catch. While BSD does not have strndupa(3), it does have plain alloca(3), but it's declared in stdlib.h rather than alloca.h. Fixed.

taviso commented 2 years ago

Sorry for the slow response here - I've been working on tests and the showme bug! Now that I have some tests I'm less worried about big changes.

vrza commented 2 years ago

Great, having a regression test suite is super helpful.

Perhaps setting up an automated CI workflow is in order.

Not sure about a cheap way to run CI for FreeBSD, OpenBSD, Solaris etc. GitHub Actions is free (as in beer), integrates with the GitHub workflow out of the box, and supports Linux and MacOS runners out of the box, so might be a decent starting point. Maybe there's a way to spin up VMs in their CI runner hosts.

The regression test suite should be portable as well.

emaste commented 1 year ago

Not sure about a cheap way to run CI for FreeBSD, OpenBSD, Solaris etc.

FreeBSD CI can be done via Cirrus-CI, although that still leaves the others.