From 3a802e365cffdd266d51f69e7fa1bb46c48e4397 Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Tue, 24 Jan 2023 22:22:19 +0100 Subject: [PATCH] Meta: Unify installing GCC dependencies in disk image This makes sure that the aarch64 disk image also contains the correct dynamic shared objects, specifically libgcc_s.so.1, as that one is a dynamic dependency of every aarch64 executable. To unify the x86_64 and aarch64 code paths, this commit just installs everything from the compilers lib directory into the disk image lib directory. This also happens for the Clang toolchain. This copies a few extra files related to libsupc++ and libstdc++, increasing the size of the disk image by 1.6MB. However, we were already copying libstdc++.a manually anyway. --- Meta/build-root-filesystem.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Meta/build-root-filesystem.sh b/Meta/build-root-filesystem.sh index 242af08bde..f986475c0b 100755 --- a/Meta/build-root-filesystem.sh +++ b/Meta/build-root-filesystem.sh @@ -50,9 +50,8 @@ if [ "$SERENITY_TOOLCHAIN" = "Clang" ]; then mkdir -p mnt/usr/include/"$SERENITY_ARCH"-pc-serenity $CP --preserve=timestamps -r "$TOOLCHAIN_DIR"/include/c++ mnt/usr/include $CP --preserve=timestamps -r "$TOOLCHAIN_DIR"/include/"$SERENITY_ARCH"-pc-serenity/c++ mnt/usr/include/"$SERENITY_ARCH"-pc-serenity -elif [ "$SERENITY_ARCH" != "aarch64" ]; then - $CP --preserve=timestamps "$SERENITY_SOURCE_DIR"/Toolchain/Local/"$SERENITY_ARCH"/"$SERENITY_ARCH"-pc-serenity/lib/libgcc_s.so mnt/usr/lib - $CP --preserve=timestamps "$SERENITY_SOURCE_DIR"/Toolchain/Local/"$SERENITY_ARCH"/"$SERENITY_ARCH"-pc-serenity/lib/libstdc++.a mnt/usr/lib +else + $CP --preserve=timestamps -r "$SERENITY_SOURCE_DIR"/Toolchain/Local/"$SERENITY_ARCH"/"$SERENITY_ARCH"-pc-serenity/lib/* mnt/usr/lib $CP --preserve=timestamps -r "$SERENITY_SOURCE_DIR"/Toolchain/Local/"$SERENITY_ARCH"/"$SERENITY_ARCH"-pc-serenity/include/c++ mnt/usr/include fi