On 2022-12-13, Janne Johansson <icepic...@gmail.com> wrote:
> Den sön 11 dec. 2022 kl 17:42 skrev void <v...@f-m.fm>:
>> Alternatively, is it feasible to build an amd64 vm and cross-compile
>> there, for mips64/octeon?
>
> I think it is. I think I have tried it for simpler stuff but unless I
> am very mistaken you just set GOARCH and fire off the build, then move
> the binary over.

For go, generally yes, though you will have different binaries compared
to a native build. In particular it links with libc differently; native
build records a dependency on the libc version on the machine, go's
crosscompiling just records it as "libc.so" (see objdump -p).

There's no infrastructure for cross-compiling in the ports tree (and it's
not particularly wanted in general) - you might be able to tweak
individual ports to get usable binaries out of them with some languages
and copy them out of the fake-install dir, but producing installable tgz
packages will be trickier.


-- 
Please keep replies on the mailing list.

Reply via email to