32-bit package guidelines (简体中文)

From ArchWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
翻译状态:本文是 32-bit package guidelines翻译。上次翻译日期:2020-05-03。如果英文版本有所更改,则您可以帮助同步翻译。
Arch 软件包准则

32-bitCLRCMakeCrossDKMSEclipseElectronFontFree PascalGNOMEGoHaskellJavaKDEKernelLispMesonMinGWNode.jsNonfreeOCamlPerlPHPPythonRRubyRustVCSWebWine

可以在其他本地体系结构(例如 x86_64)的计算机上构建和安装旧版 32 位软件。本文介绍了此类软件包的生产和约定。

软件包命名

变量和参数

lib32

PKGBUILD 中指定这些 bash 变量,以告诉编译器输出 32-bit 代码:

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

文件放置

确保 lib32 软件包文件与本机软件包文件不冲突,并且包括所有必需的文件,例如特定于体系结构的包含文件。例如,如果使用 GNU Autoconf构建软件包,则将 configure 内容指定为:

--program-suffix="-32" \
--lib{exec,}dir=/usr/lib32 \
--includedir=/usr/include/"$pkgbase"32 \ 
--build=i686-pc-linux-gnu

x32