Skip to content

Commit c550375

Browse files
authored
Remove support for Linux x86 builds (#626)
We stopped shipping the distributions in 6fa8fe9 in October 2023. At the time we preserved build support just in case. I don't believe anyone has complained about the loss of x86 Linux distributions. I don't believe there is compelling value in PBS supporting x86 Linux distributions. If someone wants to run Python on x86 Linux, they can always use CPython's official build systen, which still supports targeting x86 Linux. This commit rips out our support building for x86 Linux.
1 parent 482a9bc commit c550375

File tree

6 files changed

+3
-66
lines changed

6 files changed

+3
-66
lines changed

cpython-unix/base.Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ RUN for s in debian_jessie debian_jessie-updates debian-security_jessie/updates;
2929
echo 'Acquire::Retries "5";'; \
3030
) > /etc/apt/apt.conf.d/99cpython-portable
3131

32-
RUN ( echo 'amd64'; \
33-
echo 'i386'; \
34-
) > /var/lib/dpkg/arch
35-
3632
# apt iterates all available file descriptors up to rlim_max and calls
3733
# fcntl(fd, F_SETFD, FD_CLOEXEC). This can result in millions of system calls
3834
# (we've seen 1B in the wild) and cause operations to take seconds to minutes.

cpython-unix/build-cpython.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ fi
9191

9292
# Configure nerfs RUNSHARED when cross-compiling, which prevents PGO from running when
9393
# we can in fact run the target binaries (e.g. x86_64 host and i686 target). Undo that.
94+
# TODO this may not be needed after removing support for i686 builds. But it
95+
# may still be useful since CPython's definition of cross-compiling has historically
96+
# been very liberal and kicks in when it arguably shouldn't.
9497
if [ -n "${CROSS_COMPILING}" ]; then
9598
if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]; then
9699
patch -p1 -i ${ROOT}/patch-dont-clear-runshared-14.patch
@@ -1058,9 +1061,6 @@ armv7-unknown-linux-gnueabi)
10581061
armv7-unknown-linux-gnueabihf)
10591062
PYTHON_ARCH="arm-linux-gnueabihf"
10601063
;;
1061-
i686-unknown-linux-gnu)
1062-
PYTHON_ARCH="i386-linux-gnu"
1063-
;;
10641064
mips-unknown-linux-gnu)
10651065
PYTHON_ARCH="mips-linux-gnu"
10661066
;;

cpython-unix/build-libX11.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ if [ -n "${CROSS_COMPILING}" ]; then
5454
armv7-unknown-linux-gnueabihf)
5555
EXTRA_FLAGS="${EXTRA_FLAGS} --enable-malloc0returnsnull"
5656
;;
57-
i686-unknown-linux-gnu)
58-
EXTRA_FLAGS="${EXTRA_FLAGS} --enable-malloc0returnsnull"
59-
;;
6057
mips-unknown-linux-gnu)
6158
EXTRA_FLAGS="${EXTRA_FLAGS} --enable-malloc0returnsnull"
6259
;;
@@ -81,9 +78,6 @@ if [ -n "${CROSS_COMPILING}" ]; then
8178
aarch64-unknown-linux-musl)
8279
EXTRA_FLAGS="${EXTRA_FLAGS} --enable-malloc0returnsnull"
8380
;;
84-
i686-unknown-linux-musl)
85-
EXTRA_FLAGS="${EXTRA_FLAGS} --enable-malloc0returnsnull"
86-
;;
8781
mips-unknown-linux-musl)
8882
EXTRA_FLAGS="${EXTRA_FLAGS} --enable-malloc0returnsnull"
8983
;;

cpython-unix/build.Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{% include 'base.Dockerfile' %}
22

3-
# libc6-dev:i386 pulls in 32-bit system libraries to enable cross-compiling
4-
# to i386.
5-
#
63
# libffi-dev and zlib1g-dev are present so host Python (during cross-builds)
74
# can build the ctypes and zlib extensions. So comment in build-cpython.sh
85
# for more context.
@@ -14,7 +11,6 @@ RUN ulimit -n 10000 && apt-get install \
1411
bzip2 \
1512
file \
1613
libc6-dev \
17-
libc6-dev:i386 \
1814
libffi-dev \
1915
make \
2016
patch \

cpython-unix/extension-modules.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ _decimal:
249249
- define: CONFIG_32=1
250250
targets:
251251
- armv7-.*
252-
- i686-.*
253252
- mips-.*
254253
- mipsel-.*
255254
- define: CONFIG_64=1
@@ -299,7 +298,6 @@ _hashlib:
299298
# a static library so there isn't a runtime dependency.
300299
- name: ':libatomic.a'
301300
targets:
302-
- i686-unknown-linux-gnu
303301
- mips-unknown-linux-gnu
304302
- mipsel-unknown-linux-gnu
305303
- x86_64.*-unknown-linux-gnu
@@ -570,7 +568,6 @@ _ssl:
570568
# a static library so there isn't a runtime dependency.
571569
- name: ':libatomic.a'
572570
targets:
573-
- i686-unknown-linux-gnu
574571
- mips-unknown-linux-gnu
575572
- mipsel-unknown-linux-gnu
576573
- x86_64.*-unknown-linux-gnu

cpython-unix/targets.yml

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -318,52 +318,6 @@ armv7-unknown-linux-gnueabihf:
318318
- zlib
319319
openssl_target: linux-armv4
320320

321-
i686-unknown-linux-gnu:
322-
host_platforms:
323-
- linux_x86_64
324-
pythons_supported:
325-
- '3.9'
326-
- '3.10'
327-
- '3.11'
328-
- '3.12'
329-
- '3.13'
330-
- '3.14'
331-
needs_toolchain: true
332-
host_cc: clang
333-
host_cxx: clang++
334-
target_cc: clang
335-
target_cxx: clang++
336-
target_cflags:
337-
- '-m32'
338-
- '-fvisibility=hidden'
339-
target_ldflags:
340-
- '-m32'
341-
needs:
342-
- autoconf
343-
- bdb
344-
- binutils
345-
- bzip2
346-
- expat
347-
- libedit
348-
- libffi
349-
- libX11
350-
- libXau
351-
- libxcb
352-
- m4
353-
- mpdecimal
354-
- ncurses
355-
- openssl-3.0
356-
- patchelf
357-
- sqlite
358-
- tcl
359-
- tk
360-
- tix
361-
- uuid
362-
- xorgproto
363-
- xz
364-
- zlib
365-
openssl_target: linux-x86-clang
366-
367321
mips-unknown-linux-gnu:
368322
host_platforms:
369323
- linux_x86_64

0 commit comments

Comments
 (0)