diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2022-02-05 15:48:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-11 18:07:53 +0100 |
commit | ba5bbde7ee9aaa8667e54c220efce54eb4e833ec (patch) | |
tree | dadf009c7c6282902b59a784288cd9d08d520aad /Meta | |
parent | 7ab6816b4916adb68faa4a2ae256d5d7328071ff (diff) | |
download | serenity-ba5bbde7ee9aaa8667e54c220efce54eb4e833ec.zip |
Meta: Enable RELR relocations
Also add a check to serenity.sh to ensure that the toolchain is new
enough for this feature to work.
Diffstat (limited to 'Meta')
-rwxr-xr-x | Meta/serenity.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Meta/serenity.sh b/Meta/serenity.sh index 1ca60f52f5..44773cad66 100755 --- a/Meta/serenity.sh +++ b/Meta/serenity.sh @@ -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() { |