gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnugo-devel] Cross-compile patch


From: Tom Parker-Shemilt
Subject: [gnugo-devel] Cross-compile patch
Date: Fri, 6 Oct 2023 16:53:37 +0100

Hi folks. Wasn't sure how much dev was still being done on this, but
hopefully this is still of use to others. I wanted to get GNU Go
running on a Remarkable (and then eventually build a frontend), but
cross-compilation was hard, due to the fun of the programs in the
"patterns" folder being used at build time. I've seen earlier methods
described with multiple configure runs and deleting some files, but I
wanted something a little more reproducible. The attached patch
against the "ttn-maint" branch (which as best I could tell was the
most up-to-date branch so I didn't need half a dozen other fixes as
well) enables cross-compile in a single configure/make sequence. The
hard part was that the programs in "patterns" use libraries from other
folders that are also used by the host machine. To solve this, the
relevant folders now have a lib<foo>-host.a build as well as a
lib<foo>.a build. The latter is for the compile target, the former is
for the host target. This is done in a pretty crude way, but seems to
work so far. There's a little bit of hardcoding of the ranlib build
machine command name that I haven't fixed, as couldn't find an
equivalent of AX_PROG_CC_FOR_BUILD for ranlib.

https://github.com/palfrey/gnugo/pull/1 also has some other patches so
I could do a CI run using the Toltec (https://toltec-dev.org/) build
images for Remarkable but I'm assuming you've got no interest in
Github actions patches, and TBH once you've got cross-compile working
the Remarkable works just fine.

Enjoy!

Tom Parker-Shemilt

Attachment: 0001-Working-cross-compile-build.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]