32-bit package guidelines

Legacy 32-bit software can be built and installed on machines of another native architecture, such as x86_64. This article explains the production and conventions of such packages.

Arch package guidelines

32-bitCLRCMakeCrossDKMSEclipseElectronFontFree PascalGNOMEGoHaskellJavaKDEKernelLispMesonMinGWNode.jsNonfreeOCamlPerlPHPPythonRRubyRustShellVCSWebWine

Package naming

  • Package decriptions should distinguish these from native counterparts, ie pkgdesc+=" (32-bit)".

Variables and parameters

lib32

Specify these bash variables in a PKGBUILD to tell the compiler to output 32-bit code:

export CFLAGS+=" -m32"
export CXXFLAGS+=" -m32"
export LDFLAGS+=" -m32"
export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'

File placement

Ensure lib32 package files do not conflict with native package files and include all necessary files, such as architecture-specific includes. For example, if a package builds using GNU Autoconf, specify the following to configure:

--program-suffix="-32" \
--lib{exec,}dir=/usr/lib32 \
--includedir=/usr/include/"$pkgbase"32 \
--build=i686-pc-linux-gnu
gollark: I'm an ageless entity from beyond space and time.
gollark: Anyone want to try my Linux test virus? It doesn't really have great cross-platform compatibility, and indeed may break if you happen to run it on a system different to what it was compiled on.
gollark: I used to infect osmarks.tk visitors with viruses as a Java applet.
gollark: Yes.
gollark: Perhaps future web applications will just be blobs of WASM which render straight to a canvas.
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.