We were previously missing `Kernel/Arch`, which gets included by
`Kernel/API`.
While at it, remove `AK` from the list of copied headers for the
toolchain, as nothing in our LibC headers should ever publicly depend on
AK.
Also update the comment so that people remember to update the port at
the same time, and clarify that updating `cmake-version.cmake` is not
required if there is no change in cmake that we need in our buildsystem.
This is needed to avoid including LibC headers in Lagom builds.
Unfortunately, we cannot rely on the build machine to provide a
fully POSIX-compatible ELF header for Lagom builds, so we have to
use our own.
This service automatically redirects to a mirror that's geographically
closer, which should make downloading the tarballs faster. The GNU
project recommends this instead of bombarding their top-level downloads
site.
These are not useful for us, and unnecessarily waste time when building
the toolchain. Even if we used libstdc++ more heavily, our use of
uncommon, PCH-affecting flags and our frequent LibC header changes would
make these ineligible for use anyways.
Instead of manually compressing/decompressing a toolchain tarball if
`TRY_USE_LOCAL_TOOLCHAIN` is set, let's use the cache action's automatic
built-in compression (which is zstd, I believe).
The BFD linker requires the `COMMONPAGESIZE` emulation parameter to be
set in order to enable RELRO support for AArch64. As we are adding a
custom `emulparams` file anyways, let's also tell LD that our ELF
interpreter is called `/usr/lib/Loader.so`.
This commit also removes some vestigial references to i686 SerenityOS.
The one in `gas/configure.tgt` is still needed, as it also handles
x86_64.
This is a mostly straight-forward rebase of our patches on top of
13.1.0. The spec files needed a change, as GCC no longer supports STABS
debug information, but we were building GCC with support for it.
Highlights of this release include static `operator()`, The Equality
Operator You Are Looking For and extended `constexpr` support.
For some reason (for me) on Ubuntu 22.04 the standard make generator
fails:
---------------------------------------------
CMake has bootstrapped. Now run gmake.
make: make: Permission denied
make: *** [Makefile:166: all] Error 127
This seems to be because Source/kwsys/CMakeFiles/cmsys.dir/depend is
missing or not generated. Using ninja works fine though, and as it is
already the default for Serenity proper, it seems reasonable to switch
it here too.
If the SDL libraries are present on the system, QEMU will attempt to use
that for rendering the UI. This causes a crash when the AArch64 port
starts up with the following message:
> NSWindow drag regions should only be invalidated on the Main Thread!
Fix this by explicitly disabling SDL support.
This consolidates version information, archive's download location,
filename and SHA256 checksum into version.sh. This file is then sourced
from the port script and toolchain build script.
The version.sh script contains the following variables:
- QEMU_VERSION - Version number
- QEMU_ARCHIVE - Filename
- QEMU_ARCHIVE_URL - Full url to download location
- QEMU_ARCHIVE_SHA256SUM - The SHA256 checksum
Target GDB is only used for debugging the kernel, which is not relevant
to most people. Starting with 924758c6f8, GDB would always be built
as part of the toolchain if the user didn't have it installed. This is
unnecessary.
This commit adds a separate script for building GDB, which the user
needs to explicitly invoke. A message is added to Meta/debug-kernel.sh
which alerts the user to this fact.
Previously, we would unconditionally build GDB from source for the
AArch64 toolchain. This commit makes it possible to use the system's
`gdb` binary if it supports the architecture, or `aarch64-elf-gdb` if
such a package is installed.
An `aarch64-elf-gdb` package will be available through Homebrew once
this PR is merged: https://github.com/Homebrew/homebrew-core/pull/127323
The latter is problematic as it may be contained in the username (e.g.
email address-like) and thus the $SRC_ROOT path. This would cause an
invalid sed command to be created, breaking both of these scripts.
aarch64 required this to successfully build, but the actual fix to that
is to just make sure that crtbeginS and crtendS get built as a part of
the toolchain.
This partially reverts commit c18c84dbfd.
Without this tag, executables that link libgcc_s.so.1, which is every
executable, end up with the host path to libgcc_s.so.1 as the path for
the dynamic dependency (DT_NEEDED) of the executable. By making sure
that the libgcc_s.so.1 shared object includes the DT_SONAME tag, the
path to libgcc_s.so.1 dynamic dependency will only contain the basename,
instead of the absolute host path.
Since we upstreamed CMake support for Serenity, we can use the Platform
files from upstream instead of keeping our local copy. While not added
in this commit, we can add patching capabilities for the platform files
similar to what we do for gdb, llvm, gcc, and binutils later.
This is necessary to build on MacOS. As discussed in #15530, Serenity
no longer appears to build on MacOS Ventura. This attempts to fix that
by enforcing it at the command level.