Skip to content

Commit 07326e8

Browse files
committed
unix: add support for Python 3.8 on aarch64-unknown-linux-gnu
This appears to be rather straightforward. I'm unsure why this wasn't implemented in the first place. It may have been due to historical issues with cross-compiles. I think I may have made these issues go away with a batch of commits in January 2022. I haven't tested these distributions very thoroughly. But they are built similarly to 3.9 and 3.10 so hopefully they work just as well. Closes #135.
1 parent 36610f6 commit 07326e8

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

.github/workflows/linux.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,17 @@ jobs:
4444
fail-fast: false
4545
matrix:
4646
build:
47-
# Cross-compiles can't do PGO and require Python 3.9.
47+
# Cross-compiles can't do PGO.
48+
- target_triple: 'aarch64-unknown-linux-gnu'
49+
py: 'cpython-3.8'
50+
optimizations: 'debug'
51+
- target_triple: 'aarch64-unknown-linux-gnu'
52+
py: 'cpython-3.8'
53+
optimizations: 'noopt'
54+
- target_triple: 'aarch64-unknown-linux-gnu'
55+
py: 'cpython-3.8'
56+
optimizations: 'lto'
57+
4858
- target_triple: 'aarch64-unknown-linux-gnu'
4959
py: 'cpython-3.9'
5060
optimizations: 'debug'
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Setup.dist doesn't have entries for all modules. This file defines
2+
# what's missing. The content here is reconstructed from logic in
3+
# setup.py and what was observed to execute in a normal build via setup.py.
4+
# We should audit this every time we upgrade CPython.
5+
6+
_bz2 _bz2module.c -lbz2
7+
_crypt _cryptmodule.c -lcrypt
8+
_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c -DHAVE_FFI_PREP_CIF_VAR=1 -DHAVE_FFI_PREP_CLOSURE_LOC=1 -DHAVE_FFI_CLOSURE_ALLOC=1 -I/tools/deps/include -L/tools/deps/lib -lffi -ldl
9+
_ctypes_test _ctypes/_ctypes_test.c -lm
10+
_curses _cursesmodule.c -DHAVE_NCURSESW=1 -I/tools/deps/include/ncursesw -L/tools/deps/lib -lncursesw
11+
_curses_panel _curses_panel.c -DHAVE_NCURSESW=1 -I/tools/deps/include/ncursesw -L/tools/deps/lib -lpanelw -lncursesw
12+
_dbm _dbmmodule.c -DHAVE_BERKDB_H -DDB_DBM_HSEARCH -I/tools/deps/include -L/tools/deps/lib -ldb
13+
_decimal _decimal/_decimal.c _decimal/libmpdec/basearith.c _decimal/libmpdec/constants.c _decimal/libmpdec/context.c _decimal/libmpdec/convolute.c _decimal/libmpdec/crt.c _decimal/libmpdec/difradix2.c _decimal/libmpdec/fnt.c _decimal/libmpdec/fourstep.c _decimal/libmpdec/io.c _decimal/libmpdec/memory.c _decimal/libmpdec/mpdecimal.c _decimal/libmpdec/numbertheory.c _decimal/libmpdec/sixstep.c _decimal/libmpdec/transpose.c -DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1 -IModules/_decimal/libmpdec
14+
_elementtree _elementtree.c -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI -IModules/expat
15+
_gdbm _gdbmmodule.c -DHAVE_NDBM_H -I/tools/deps/include -L/tools/deps/lib -lgdbm
16+
_hashlib _hashopenssl.c -I/tools/deps/include -L/tools/deps/lib -lssl -lcrypto
17+
_json _json.c
18+
_lsprof _lsprof.c rotatingtree.c
19+
_lzma _lzmamodule.c -I/tools/deps/include -L/tools/deps/lib -llzma
20+
# TODO check setup.py logic for semaphore.c and possibly fix missing
21+
# dependency.
22+
_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
23+
_opcode _opcode.c
24+
_posixshmem _multiprocessing/posixshmem.c -IModules/_multiprocessing -lrt
25+
_queue _queuemodule.c
26+
_sqlite3 _sqlite/cache.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -I/tools/deps/include -IModules/_sqlite -DMODULE_NAME=\"sqlite3\" -L/tools/deps/lib -lsqlite3
27+
_ssl _ssl.c -I/tools/deps/include -lssl -lcrypto
28+
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -I/tools/deps/include/X11 -L/tools/deps/lib -ltcl8.6 -ltk8.6 -lX11 -lxcb -lXau
29+
_uuid _uuidmodule.c -I/tools/deps/include/uuid -luuid
30+
ossaudiodev ossaudiodev.c
31+
pyexpat pyexpat.c expat/xmlparse.c expat/xmlrole.c expat/xmltok.c -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI -IModules/expat
32+
# readline variant needs to come first because libreadline is in /tools/deps and is
33+
# picked up by build. We /could/ make libedit first. But since we employ a hack to
34+
# coerce use of libedit on Linux, it seems prudent for the build system to pick
35+
# up readline.
36+
readline VARIANT=readline readline.c -I/tools/deps/include -I/tools/deps/include/ncursesw -L/tools/deps/lib -lreadline -lncursesw
37+
readline VARIANT=libedit readline-libedit.c -DUSE_LIBEDIT=1 -I/tools/deps/libedit/include -I/tools/deps/libedit/include/ncursesw -L/tools/deps/libedit/lib -ledit -lncursesw

cpython-unix/targets.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ aarch64-unknown-linux-gnu:
135135
host_platforms:
136136
- linux64
137137
pythons_supported:
138+
- '3.8'
138139
- '3.9'
139140
- '3.10'
140141
docker_image_suffix: .cross

0 commit comments

Comments
 (0)