From d84615d4b53c6de36c3d62f197f5e35f9f3b881e Mon Sep 17 00:00:00 2001 From: Kunal Shah <25btec038@iiitu.ac.in> Date: Mon, 23 Nov 2026 00:27:38 +0530 Subject: [PATCH] docs: clarify Linux cross-compilation --- getting-started/setup-building.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/getting-started/setup-building.rst b/getting-started/setup-building.rst index 25259156e..b6a347107 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -367,7 +367,21 @@ and how to build. .. _PCBuild readme: https://github.com/python/cpython/blob/main/PCbuild/readme.txt .. _Git for Windows download from the official Git website: https://git-scm.com/download/win +Linux Cross-Compilation +----------------------- +CPython supports cross-compilation on Linux for building Python +for a different target architecture. This requires a C compiler +and toolchain for the target platform, as well as a build Python +interpreter matching the version being built. + +Cross-compilation can be configured using the ``--build`` and +``--host`` options. The ``--with-build-python`` option specifies +the Python interpreter used during the build. + +For detailed instructions and configuration options, see the +`CPython cross-compilation documentation +`_. .. _wasi-compiling: WASI