1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:07:45 +00:00

Meta: Enable RELR relocations

Also add a check to serenity.sh to ensure that the toolchain is new
enough for this feature to work.
This commit is contained in:
Daniel Bertalan 2022-02-05 15:48:32 +01:00 committed by Andreas Kling
parent 7ab6816b49
commit ba5bbde7ee
3 changed files with 25 additions and 1 deletions

View file

@ -242,6 +242,21 @@ build_toolchain() {
ensure_toolchain() {
[ -d "$TOOLCHAIN_DIR" ] || build_toolchain
# FIXME: Remove this check when most people have already updated their toolchain
if [ "$TOOLCHAIN_TYPE" = "GNU" ]; then
local ld_version
ld_version="$("$TOOLCHAIN_DIR"/bin/"$TARGET"-pc-serenity-ld -v)"
local expected_version="GNU ld (GNU Binutils) 2.38"
if [ "$ld_version" != "$expected_version" ]; then
echo "Your toolchain has an old version of binutils installed."
echo " installed version: \"$ld_version\""
echo " expected version: \"$expected_version\""
echo "Please run $ARG0 rebuild-toolchain $TARGET to update it."
exit 1
fi
fi
}
delete_toolchain() {