Sets `$LD` to `$HOST_LD` in `.port_include.sh` if it is defined as well,
else it will be set to `ld`.
Makes libiconv build with the Clang toolchain.
This also impacts other ports when building them with the Clang
toolchain, and might result in more ports building correctly.
If a developer built cmake (or we built it for them) from source, make
sure that port builds can find that version of CMake that has the
SerenityOS platform files included.
This is a preparation to check if our users find noticeable bugs in the
x86-64 target, before we can decide if we want to remove the i686 target
for good.
Those have been added to the Clang build script in
d4d6f2d945, and now that the Clang version
has been updated, everyone should have those symlinks already anyways.
This lets us eliminate the extra arguments on CC and CXX for ports that
care about CC and CXX pointing to actual filenames they can invoke
realpath or basename on.
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).
Ports such as python require a distinction between host readelf and
target readelf. Set a toolchain-specific varaible for these, but be sure
save off the host readelf binary in case anyone needs it later.
This is part of allowing python to build with the Clang toolchain.
This commit introduces the changes needed in the port build system that
will allow us to compile ports with Clang. Note that many ports still
don't build, especially due to linker differences. Fixing these is
outside the scope of this PR.
For now, building bash, ncurses and nano is known to work. Bash runs
fine, while nano crashes due to DT_VERSYM not being supported by our
dynamic loader.
- SERENITY_ROOT is being kept around for compatibility reasons, and will
be removed gradually
- SERENITY_INSTALL_ROOT points to DESTDIR but will be preferred over
that in the future
- SERENITY_SOURCE_DIR points to the root folder of the repository. Let's
keep the root terminology in the directory structure sort of sense out
of here
install-ports copys the necessary files from Ports/ to /usr/Ports. Also
refactor the compiler and destiation variables from .port_include.sh
into .hosted_defs.sh. .hosted_defs.sh does not exists when ports are
built in serenity