32-bit package guidelines: Difference between revisions

From ArchWiki
(add zh-hans link)
(→‎Package naming: https://bugs.archlinux.org/task/78274)
 
(7 intermediate revisions by 5 users not shown)
Line 9: Line 9:
== Package naming ==
== Package naming ==


* Prefix [https://aur.archlinux.org/packages/?O=0&K=lib32- 32-bit versions] of native packages with [[#lib32|lib32-]].  
* Prefix [https://aur.archlinux.org/packages/?O=0&K=lib32- 32-bit versions] of native packages with [[#lib32|lib32-]].
 
* [[PKGBUILD#pkgdesc|Package decriptions]] should distinguish these from native counterparts, i.e. {{ic|1=pkgdesc+=" (32-bit)"}}.
* Suffix [https://aur.archlinux.org/packages/?O=0&K=-x32 packages] that utilize the [[Wikipedia:x32_ABI|x32 ABI]] with [[#x32|-x32]].
 
* [[PKGBUILD#pkgdesc|Package decriptions]] should distinguish these from native counterparts, ie {{ic|1=pkgdesc+=" (32-bit)"}}.


== Variables and parameters ==
== Variables and parameters ==
Line 32: Line 29:
  --program-suffix="-32" \
  --program-suffix="-32" \
  --lib{exec,}dir=/usr/lib32 \
  --lib{exec,}dir=/usr/lib32 \
  --includedir=/usr/include/"$pkgbase"32 \  
  --includedir=/usr/include/"$pkgbase"32 \
  --build=i686-pc-linux-gnu
  --build=i686-pc-linux-gnu
=== x32 ===
{{Expansion|Add any information on how x32 packages could be built here.|section=-x32?}}

Latest revision as of 17:32, 28 September 2023

Arch package guidelines

32-bitCLRCMakeCrossDKMSEclipseElectronFontFree PascalGNOMEGoHaskellJavaKDEKernelLispMesonMinGWNode.jsNonfreeOCamlPerlPHPPythonRRubyRustShellVCSWebWine

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.

Package naming

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