[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

John Paul Adrian Glaubitz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 8 14:18:28 PST 2020


glaubitz added a comment.

In D52050#2441094 <https://reviews.llvm.org/D52050#2441094>, @hvdijk wrote:

> I've been able to check what Ubuntu 20.10 offers in terms of x32 support. Its kernel supports x32 binaries, it provides x32 versions of core system libraries in separate packages (e.g. libc6-x32, libx32stdc++6, libx32z1), and it provides a compiler that targets x32 by default (gcc-x86-64-linux-gnux32).

I did that, too. In fact, Ubuntu is ndentical to Debian in this regard as both the Ubuntu and the Debian gcc packages are maintained by the same maintainer (Matthias Klose whom I also happen to know personally) who first uploads these packages to Debian unstable, then syncs to Ubuntu.

However:

> These Ubuntu packages do not use the Debian/Ubuntu multiarch approach: the packages are completely independent of the corresponding x64 and i386 versions with separate names, and nothing in Ubuntu installs any libraries into any /lib/x86_64-linux-gnux32-like path. They are intended to allow x32 cross compilation on an Ubuntu system, not intended to act as a basis for running an x32 Ubuntu system. This appears to be very different from Debian's x32 support. That said, cross-compiled binaries do run on Ubuntu and it should be possible to build an x32-native LLVM with the Ubuntu-provided toolchain.

Well, Debian has both as - as I already mentioned - the gcc packages in Debian and Ubuntu are the same. The only difference is that Ubuntu does not provide an x32 port so there is no possibility to install Ubuntu x32 packages in the commonly known MultiArch manner.

Since MultiArch and the -cross packages are somewhat redundant, I'm not so sure yet which approach to address this issue would be best. I will talk to Matthias regarding this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D52050/new/

https://reviews.llvm.org/D52050



More information about the cfe-commits mailing list