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