build: Remove unneeded libgcc files in make dist

This commit is contained in:
mintsuki 2022-09-02 01:08:19 +02:00
parent c945ebc4b2
commit 37d3e80757
2 changed files with 11 additions and 14 deletions

View File

@ -207,6 +207,16 @@ dist:
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/freestanding-headers/.git"
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries/.git"
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries/.gitignore"
libgcc_needed="i686 x86_64-no-red-zone"; \
for f in $$libgcc_needed; do \
mv '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries/libgcc-$$f.a" '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries/libgcc-$$f.a.save"; \
done; \
rm '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries"/*.a; \
for f in $$libgcc_needed; do \
mv '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries/libgcc-$$f.a.save" '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries/libgcc-$$f.a"; \
done
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/limine-efi/.git"
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/limine-efi/.gitignore"
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/stivale/.git"

View File

@ -11,20 +11,7 @@ cd "$srcdir"
[ -d freestanding-headers ] || git clone https://github.com/mintsuki/freestanding-headers.git
[ -d stivale ] || git clone https://github.com/stivale/stivale.git
[ -d limine-efi ] || git clone https://github.com/limine-bootloader/limine-efi.git
if ! [ -d libgcc-binaries ]; then
git clone https://github.com/mintsuki/libgcc-binaries.git
# Remove the libgcc files we don't need
libgcc_needed="i686 x86_64-no-red-zone"
for f in $libgcc_needed; do
mv libgcc-binaries/libgcc-$f.a libgcc-binaries/libgcc-$f.a.save
done
rm libgcc-binaries/*.a
for f in $libgcc_needed; do
mv libgcc-binaries/libgcc-$f.a.save libgcc-binaries/libgcc-$f.a
done
fi
[ -d libgcc-binaries ] || git clone https://github.com/mintsuki/libgcc-binaries.git
automake_libdir="$(automake --print-libdir)"