Skip to content

Commit efc7cc9

Browse files
committed
Perform shallow clones of submodules
Greatly reduces the time it takes to checkout the various submodules, and also reduces required storage. Signed-off-by: Nick Kossifidis <[email protected]>
1 parent 7ec4c00 commit efc7cc9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.gitmodules

+13-1
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,56 @@
22
path = binutils
33
url = https://sourceware.org/git/binutils-gdb.git
44
branch = binutils-2_43-branch
5+
shallow = true
56
[submodule "gcc"]
67
path = gcc
78
url = https://gcc.gnu.org/git/gcc.git
89
branch = releases/gcc-14
10+
shallow = true
911
[submodule "glibc"]
1012
path = glibc
1113
url = https://sourceware.org/git/glibc.git
14+
shallow = true
1215
[submodule "dejagnu"]
1316
path = dejagnu
1417
url = https://git.savannah.gnu.org/git/dejagnu.git
1518
branch = master
19+
shallow = true
1620
[submodule "newlib"]
1721
path = newlib
1822
url = https://sourceware.org/git/newlib-cygwin.git
1923
branch = master
24+
shallow = true
2025
[submodule "gdb"]
2126
path = gdb
2227
url = https://sourceware.org/git/binutils-gdb.git
2328
branch = gdb-15-branch
29+
shallow = true
2430
[submodule "qemu"]
2531
path = qemu
2632
url = https://gitlab.com/qemu-project/qemu.git
33+
shallow = true
2734
[submodule "musl"]
2835
path = musl
2936
url = https://git.musl-libc.org/git/musl
3037
branch = master
38+
shallow = true
3139
[submodule "spike"]
3240
path = spike
3341
url = https://github.com/riscv-software-src/riscv-isa-sim.git
3442
branch = master
43+
shallow = true
3544
[submodule "pk"]
3645
path = pk
3746
url = https://github.com/riscv-software-src/riscv-pk.git
3847
branch = master
48+
shallow = true
3949
[submodule "llvm"]
4050
path = llvm
4151
url = https://github.com/llvm/llvm-project.git
4252
branch = release/18.x
53+
shallow = true
4354
[submodule "uclibc-ng"]
4455
path = uclibc-ng
45-
url = https://git.uclibc-ng.org/git/uclibc-ng.git
56+
url = https://github.com/wbx-github/uclibc-ng.git
57+
shallow = true

Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ endif
347347
$(srcdir)/%/.git:
348348
cd $(srcdir) && \
349349
flock `git rev-parse --git-dir`/config git submodule init $(dir $@) && \
350-
flock `git rev-parse --git-dir`/config git submodule update --progress $(dir $@)
350+
flock `git rev-parse --git-dir`/config git submodule update --progress --depth 1 $(dir $@)
351351

352352
stamps/install-host-gcc: $(GCC_SRCDIR) $(GCC_SRC_GIT)
353353
if test -f $</contrib/download_prerequisites && test "@NEED_GCC_EXTERNAL_LIBRARIES@" = "true"; then cd $< && ./contrib/download_prerequisites; fi

0 commit comments

Comments
 (0)