diff --git a/Meta/build-root-filesystem.sh b/Meta/build-root-filesystem.sh index e2a9addfe8..de0784d203 100755 --- a/Meta/build-root-filesystem.sh +++ b/Meta/build-root-filesystem.sh @@ -35,6 +35,7 @@ umask 0022 printf "installing base system... " $CP -PdR "$SERENITY_ROOT"/Base/* mnt/ +$CP "$SERENITY_ROOT"/Toolchain/Local/i686-pc-serenity/lib/libgcc_s.so mnt/usr/lib/ $CP -PdR Root/* mnt/ # If umask was 027 or similar when the repo was cloned, # file permissions in Base/ are too restrictive. Restore diff --git a/Toolchain/Patches/gcc.patch b/Toolchain/Patches/gcc.patch index 0db4682b89..8ef1458f10 100644 --- a/Toolchain/Patches/gcc.patch +++ b/Toolchain/Patches/gcc.patch @@ -182,11 +182,11 @@ index 1ff415923..38aa1c972 100644 ;; +i[34567]86-*-serenity*) + extra_parts="$extra_parts crti.o crtbegin.o crtbeginS.o crtend.o crtendS.o crtn.o" -+ tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic" ++ tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic t-slibgcc" + ;; +x86_64-*-serenity*) + extra_parts="$extra_parts crti.o crtbegin.o crtbeginS.o crtend.o crtendS.o crtn.o" -+ tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic" ++ tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic t-slibgcc" + ;; +arm-*-serenity*) + tmake_file="${tmake_file} t-fixedpoint-gnu-prefix t-crtfm" @@ -6208,3 +6208,23 @@ index fe1828835..2775c3646 100644 arm*-*-symbianelf*) # This is a freestanding configuration; there is nothing to do here. ;; +diff -ru a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc +--- a/libgcc/config/t-slibgcc 2020-07-23 09:35:18.796400548 +0300 ++++ b/libgcc/config/t-slibgcc 2020-10-17 14:29:19.936792298 +0300 +@@ -26,7 +26,6 @@ + SHLIB_OBJS = @shlib_objs@ + SHLIB_DIR = @multilib_dir@ + SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ +-SHLIB_LC = -lc + SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) + SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ + $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) +@@ -34,7 +33,7 @@ + SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ + $(SHLIB_LDFLAGS) \ + -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \ +- $(SHLIB_OBJS) $(SHLIB_LC) && \ ++ $(SHLIB_OBJS) && \ + rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ + if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \ + mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \