Score:0

Why is there no cross-compiler in Arm64 version of Ubuntu?

us flag

In the Amd64 version of Ubuntu, there's the gcc-{version}-{architecture}-linux-gnu packages that I can use to build binaries for different architectures, of which, the built binaries can be tested using qemu-user. But in Arm64 version of Ubuntu, there isn't such cross compiler.

Q1: Why isn't there such packages (as of 20.04 TLS)?

Next, I'd like to use the Clang/LLVM toolchain to build binaries in place of the GCC toolchain. Q2: What are the necessary library packages that I need for testing programs built for: Amd64, AArch64, PowerPC64, Sparc64? Preferablly virtual packages.

Score:0
us flag

Unlike the main gcc package, the GCC cross compilers are in the universe repository, which means they're maintained by the community on a "best-effort" basis. The main gcc package is from the main repository, which is fully supported by Ubuntu.

The library packages needed, according to me tracing through the dependencies of the GCC cross compiler for PowerPC64 architecture, seems to consist of the following:

  • libgcc-${ver_of_gcc}-dev-${arch}-cross
  • libc-dev-${arch}-cross # this is a virtual package.

And if C++ development is desired:

  • libstdc++-dev-${arch}-cross # this is a virtual package.

As said in the OP, the Clang/LLVM toolchain is used. The toolchain comes with the Clang C/C++/Obj-C compiler, and a functioning linker.


Additionally

One can enable "Multiarch" and run cross compiler built for x86_64 on arm64 through user-space QEMU program. Relevant article: https://wiki.debian.org/Multiarch/HOWTO

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.