This required updating a bunch of patches which had conflicts
in the latest version.
New Patches:
- serenity: Add bogus O_NDELAY just to allow the port to compile
- serenity: Disable nice() stress workload as we do not implement it
- serenity: Disable prctl stressor on serenity
CMake defaults to the current directory if the source or build
directory is not specified. Harfbuzz builds into an alternate
directory so it fails. This change specifies the directory prior
to any additional parameters so the build can succeed with
cmake 3.18.4.
Only 'sha256' or 'sig' are allowed in the 'auth_type' field in order for
the linter to pass. Reflect that into the README and give a description
on what to do to create a hash.
Also expand the examples to include a SHA256 hash.
The config.guess file needs to know about the SerenityOS `uname -m`
system name if we want to build ports inside Serenity. Support was only
added in January 2022, so most ports don't have a new enough version
yet.
This commit adds facilities for fetching a fresh config.guess file that
supports SerenityOS, similarly to what we do for config.sub. As its
first user, we make the bash port buildable inside the system.
We don't have a perl port, so let's use GNU sed's in-place option for
doing substitutions when running inside Serenity.
Note that we can't do this unconditionally, as `sed -i` is not portable
and works differently on BSD systems.
We now download a versioned tarball instead of the latest release to
avoid breaking the port build due to a signature mismatch when a new
version is released.
This depends on both the `libmpeg2` and `libmad` ports. Since `monkey4`
is currently an experimental engine in ScummVM, we need to explicitly
enable it during configuration.
Relying on host tools working correctly is not a good idea, as they may
be outdated (and therefore not support features like RELR relocations)
or may not exist at all (like objcopy on macOS).
While troubleshooting why gdb wasn't working when attempting to debug
serenity programs I noticed two things:
- The contract of serenity's `waitpid(..)` appears to be slightly
different than the generic ptrace target expects. We need to make
sure we pass `WSTOPPED`, and it can return different errno values
that we would want to re-try on.
- The contract of serenity's `ptrace(..)` implementation appears to
diverge as well, as we are expected to call `PT_ATTACH` before we
call `PT_CONTINUE`, otherwise `ptrace(..)` will just error out.
These two patches fix the behavior of wait and mourn_inferior so that
they work as expected on serenity and allow us to attach and then wait
for a process to exit while running under gdb.