ladybird/Toolchain
Linus Groh 39af1f8519 Ports: Add Python 3.9
The current version of our Python port (3.6.0) is over four years old by
now and has (or had, I haven't actually tried it in a while) some
limitations - time for an upgrade! The latest Python release is 3.9.1,
so I used that version. It's a from-scratch port, no patches are taken
from the previous port to ensure the smallest possible amount of code is
patched. The BuildPython.sh script is useful so I kept it, with some
tweaks. I added a short document explaining each patch to ease judging
their underlying problem and necessity in the future.

Compared to the old Python port, this one does support both the time
module as well as threading (at least _thread) just fine. Importing
modules written in C (everything in /usr/local/lib/python3.9/lib-dynload)
currently asserts in Serenity's dynamic loader, which is unfortunate but
probably solvable. Possibly related to #4642. I didn't try building
Python statically, which might be one possibility to circumvent this
issue.

I also renamed the directory to just "python3", which is analogous to
the Python 3.x package most Linux distributions provide. That implicitly
means that we likely will not support multiple versions of the Python
port at any given time, but again, neither do many other systems by
default. Recent versions are usually backwards compatible anyway though,
so having the latest shouldn't be a problem.
On the other hand bumping the version should now be be as simple as
updating the variables in version.sh, given that no new patches are
required.

These core modules to currently not build - I chose to ignore that for
now rather than adding more patches to make them work somehow, which
means they're fully unavailable. This should probably be fixed in
Serenity itself.

    _ctypes, _decimal, _socket, mmap, resource, termios

These optional modules requiring 3rd-party dependencies do currently not
build (even with depends="ncurses openssl zlib"). Especially the absence
of a readline port makes the REPL a bit painful to use. :^)

    _bz2, _curses, _curses_panel, _dbm, _gdbm, _hashlib, _lzma, _sqlite3,
    _ssl, _tkinter, _uuid, nis, ossaudiodev, readline, spwd, zlib

I did some work on LibC and LibM beforehand to add at least stubs of
missing required functions, it still encounters an ASSERT_NOT_REACHED()
/ TODO() every now and then, notably frexp() (implementations of that
can be found online easily if you want to get that working right now).
But then again that's our fault and not this port's. :^)
2021-01-18 22:28:56 +01:00
..
Patches Toolchain: Disable exceptions by default 2021-01-04 21:57:03 +01:00
.dockerignore Build: Add Dockerfile 2020-05-22 01:19:15 +02:00
.gitignore Travis: Cache toolchain 2020-03-08 14:09:08 +01:00
BuildFuseExt2.sh Build: Allow building serenityOS ext2 root filesystem on macOS host 2019-12-27 02:19:55 +01:00
BuildIt.sh Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
BuildPython.sh Ports: Add Python 3.9 2021-01-18 22:28:56 +01:00
BuildQemu.sh Build: Support non-i686 toolchains 2020-12-29 17:42:04 +01:00
CMakeToolchain.txt Toolchain+LibTTF: Remove some blank line at the end of CMake files. 2021-01-03 23:58:54 +01:00
Dockerfile Toolchain: Bump Ubuntu version to 20.10 in the Dockerfile (#4401) 2020-12-13 11:00:00 +01:00
README.md Toolchain: Update README to point to the current build instructions 2020-08-15 00:15:20 +02:00

Serenity Toolchain

This directory contains all toolchain related files. E.g. build scripts for the cross compilation toolchain and build toolchain for ports.

This document previously contained outdated build instructions. Click here for the latest build instructions.