What packages do I need for cross compile on Debian Linux for: freebsd, openbsd, apple-darwin, apple-ios, android

using Debian 12 (x86_64) (bookworm).

I like to know what Packages I need to install that can cross compile on Linux

openBSD (x86_64)
freeBSD (x86_64)
MacOS (x86_64, aarch64 (M1,M2))
Linux (PowerPC64le, aarch64)
Android ( x86_64, arm....... )
Windows (aarch64)
Haiku OS (x86_64)

Just found a solution for Windows (x86_64)

found some on reddit

for a in arm64 armel armhf i386 ppc64el s390x; do dpkg --add-architecture $a; done
apt update
apt install rust-all libstd-rust-dev:{arm64,armel,armhf,i386,ppc64el,s390x} gcc-{aarch64,i686,powerpc64le,s390x}-linux-gnu gcc-arm-linux-gnueabi{,hf} qemu-user

Add to ~/.cargo/config.toml:

linker = "/usr/bin/aarch64-linux-gnu-gcc"
runner = "/usr/bin/qemu-aarch64"
linker = "/usr/bin/arm-linux-gnueabihf-gcc"
runner = "/usr/bin/qemu-arm"
linker = "/usr/bin/arm-linux-gnueabi-gcc"
runner = "/usr/bin/qemu-arm"
linker = "/usr/bin/i686-linux-gnu-gcc"
#runner = Heh. Multiarch.
linker = "/usr/bin/powerpc64le-linux-gnu-gcc"
runner = "/usr/bin/qemu-ppc64le"
linker = "/usr/bin/s390x-linux-gnu-gcc"
runner = "/usr/bin/qemu-s390x"

looks at it works, but not for all platform I like to cross compile

Not all platforms you want to support even give you the ability to just cross-compile just like that.

Apple, in particular, wants to ensure that it knows every developer which produces code for MacOS and/or iOS and thus you can only, officially, build stuff for MacOS and/or iOS on MacOS.

Unofficially you may do that on Linux but you would still need to grab the appropriate keys from apple (and become a developer and pay a license fee if you want to create binaries which are usable not just on your particular device but more widely).

You can find more info about how to do that here.


thank you