cross-toolchain-base-devs team mailing list archive
-
cross-toolchain-base-devs team
-
Mailing list archive
-
Message #00056
Bug#956855: consider reducing toolchain bootstrap stages
Hi Aurelien and Matthias,
On Wed, Apr 15, 2020 at 10:58:45PM +0200, Helmut Grohne wrote:
> I've implemented this for cross-toolchain-base (patch attached) and a
> performed a successful testbuild. Using diffoscope to compare the
> resulting packages with the ones from the archive was not a useful thing
> to do as the build-ids changed.
Given Matthias' request on IRC, I updated the patch to the current c-t-b
and incorporated Aurelien's update to a glibc patch (thank you). After
fixing my own mistakes, it now finally builds.
Here goes the patch. Maybe you can take less than two years to look into
this now, Matthias?
Helmut
diff --minimal -Nru cross-toolchain-base-60/debian/changelog cross-toolchain-base-60+nmu1/debian/changelog
--- cross-toolchain-base-60/debian/changelog 2022-08-16 14:17:09.000000000 +0200
+++ cross-toolchain-base-60+nmu1/debian/changelog 2022-08-25 15:22:17.000000000 +0200
@@ -1,3 +1,12 @@
+cross-toolchain-base (60+nmu1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTBFS:
+ + Update patches/glibc/debian/no-libaudit.diff (Aurelien Jarno)
+ + Remove glibc stage1 and gcc stage2. (Closes: #956855)
+
+ -- Helmut Grohne <helmut@xxxxxxxxxx> Thu, 25 Aug 2022 15:22:17 +0200
+
cross-toolchain-base (60) unstable; urgency=medium
[ Debian Janitor ]
diff --minimal -Nru cross-toolchain-base-60/debian/patches/glibc/debian/no-libaudit.diff cross-toolchain-base-60+nmu1/debian/patches/glibc/debian/no-libaudit.diff
--- cross-toolchain-base-60/debian/patches/glibc/debian/no-libaudit.diff 2022-08-16 12:58:56.000000000 +0200
+++ cross-toolchain-base-60+nmu1/debian/patches/glibc/debian/no-libaudit.diff 2022-08-25 15:22:17.000000000 +0200
@@ -1,10 +1,10 @@
--- a/debian/debhelper.in/libc-dev.install
+++ b/debian/debhelper.in/libc-dev.install
-@@ -15,7 +15,6 @@
-
- TMPDIR/LIBDIR/*.o LIBDIR
- TMPDIR/LIBDIR/*.so LIBDIR
--TMPDIR/LIBDIR/audit/* LIBDIR/audit
-
- TMPDIR/usr/include/* usr/include
- TMPDIR/usr/share/gdb/* usr/share/gdb
+@@ -1,7 +1,6 @@
+ usr/include
+ usr/lib/*/*.o
+ usr/lib/*/*.so
+-usr/lib/*/audit
+ usr/lib/*/libBrokenLocale.a
+ usr/lib/*/libanl.a
+ usr/lib/*/libc.a
diff --minimal -Nru cross-toolchain-base-60/debian/rules cross-toolchain-base-60+nmu1/debian/rules
--- cross-toolchain-base-60/debian/rules 2022-08-16 14:07:33.000000000 +0200
+++ cross-toolchain-base-60+nmu1/debian/rules 2022-08-25 15:22:17.000000000 +0200
@@ -348,96 +348,6 @@
ln -sf ${CROSS_GNU_TYPE}-gcov-${VER_GCC_BASE} ${CROSS_GNU_TYPE}-gcov
endef
-$(stamp)build-gcc2.%: $(stamp)init-gcc $(stamp)install-glibc1.%
- @echo START $@
- cd debian/tmp.${CROSS_ARCH}/$(PF)/bin/ && \
- rm -f ${CROSS_GNU_TYPE}-gcc-${VER_GCC_BASE} ${CROSS_GNU_TYPE}-gcc && \
- rm -f ${CROSS_GNU_TYPE}-cpp-${VER_GCC_BASE} ${CROSS_GNU_TYPE}-cpp && \
- rm -f ${CROSS_GNU_TYPE}-gcov-${VER_GCC_BASE} ${CROSS_GNU_TYPE}-gcov
- cd gcc && \
- PATH=${CURDIR}/debian/tmp.${CROSS_ARCH}/$(PF)/bin:${PATH} \
- LD_LIBRARY_PATH=$(call binutils_ldpath,$*):${CURDIR}/debian/tmp.${CROSS_ARCH}/usr/lib:${CURDIR}/debian/tmp.${CROSS_ARCH}/lib \
- DH_VERBOSE=1 \
- WITH_SYSROOT=/ \
- WITH_BUILD_SYSROOT=${CURDIR}/debian/tmp.${CROSS_ARCH} \
- DEB_STAGE=stage2 \
- PKG_IGNORE_CURRENTLY_BUILDING=1 \
- BACKPORT=false \
- DEB_BUILD_OPTIONS="$(DEB_BUILD_OPTIONS) nocheck nopgo nolto nohppa64 nojit nonvptx" \
- WITHOUT_LANG="hppa64 jit nvptx" \
- $(if $(filter $(HOST_ARCH),$(CROSS_ARCH)),FORCE_CROSS_LAYOUT=yes WITH_BOOTSTRAP=off) \
- dpkg-buildpackage -b -uc -us -d
- touch $@
-
-$(stamp)install-gcc2.%: $(stamp)build-gcc2.%
- @echo START $@
- $(call install_gcc)
- dpkg-deb -x lib$(libgcc_base)[124]-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}
-ifneq (,$(ARM32_MULTILIBS))
- $(if $(filter $(CROSS_ARCH),armhf), \
- dpkg-deb -x libsfgcc1-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libsfgcc-${VER_GCC_BASE}-dev-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),armel), \
- dpkg-deb -x libhfgcc1-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libhfgcc-${VER_GCC_BASE}-dev-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH} \
- )
-endif
- $(if $(filter $(CROSS_ARCH),amd64 ppc64 s390x sparc64 x32), \
- dpkg-deb -x lib32gcc1-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x lib32gcc-${VER_GCC_BASE}-dev-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),i386 powerpc x32), \
- dpkg-deb -x lib64gcc1-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x lib64gcc-${VER_GCC_BASE}-dev-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),amd64 i386), \
- dpkg-deb -x libx32gcc1-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libx32gcc-${VER_GCC_BASE}-dev-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),mips mipsel mipsr6 mipsr6el), \
- dpkg-deb -x lib64gcc1-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x lib64gcc-${VER_GCC_BASE}-dev-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libn32gcc1-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libn32gcc-${VER_GCC_BASE}-dev-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),mipsn32 mipsn32el mipsn32r6 mipsn32r6el), \
- dpkg-deb -x lib64gcc1-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x lib64gcc-${VER_GCC_BASE}-dev-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x lib32gcc1-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x lib32gcc-${VER_GCC_BASE}-dev-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),mips64 mips64el mips64r6 mips64r6el), \
- dpkg-deb -x lib32gcc1-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x lib32gcc-${VER_GCC_BASE}-dev-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libn32gcc1-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libn32gcc-${VER_GCC_BASE}-dev-${CROSS_ARCH}-cross_${DEB_VER_GCC}_all.deb \
- debian/tmp.${CROSS_ARCH} \
- )
- touch $@
-
$(stamp)build-gcc3.%: $(stamp)init-gcc $(stamp)install-glibc2.%
@echo START $@
cd debian/tmp.${CROSS_ARCH}/$(PF)/bin/ && \
@@ -473,88 +383,7 @@
# fi
touch $@
-$(stamp)build-glibc1.%: $(stamp)init-glibc $(stamp)install-linux.% $(stamp)install-gcc1.%
- @echo START $@
-# FIXME: why debian/libgcc1-armel-cross?
- cd glibc-${VER_GLIBC} && \
- PATH=${CURDIR}/debian/tmp.${CROSS_ARCH}/$(PF)/bin/:${PATH} \
- LD_LIBRARY_PATH=$(call binutils_ldpath,$*):${CURDIR}/gcc/debian/lib$(libgcc_base)1-armel-cross/usr/${CROSS_GNU_TYPE}/lib/ \
- LINUX_SOURCE=${CURDIR}/debian/tmp.${CROSS_ARCH}/usr \
- PATCHED_SOURCES=yes \
- WITH_BUILD_SYSROOT=${CURDIR}/debian/tmp.${CROSS_ARCH} \
- DEB_BUILD_PROFILES=stage1 \
- PKG_IGNORE_CURRENTLY_BUILDING=1 \
- BACKPORT=false \
- DEB_BUILD_OPTIONS="$(DEB_BUILD_OPTIONS) nocheck" \
- CTB_LIBC_DEV_DEPENDS='$(CTB_LIBC_DEV_DEPENDS)' \
- fakeroot dpkg-buildpackage -B -uc -us -a${CROSS_ARCH} -d -Pstage1
- : # FIXME: a libc6.1-alphaev67 package is built on alpha
- $(if $(filter $(CROSS_ARCH),alpha), rm -f libc6.1-alphaev67*.deb)
- touch $@
-
-$(stamp)install-glibc1.%: $(stamp)build-glibc1.%
- @echo START $@
- $(if $(filter $(CROSS_ARCH),alpha ia64), \
- dpkg-deb -x libc6.1-dev_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH}, \
- dpkg-deb -x libc6-dev_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
-
-ifneq (,$(ARM32_MULTILIBS))
- $(if $(filter $(CROSS_ARCH),armhf), \
- dpkg-deb -x libc6-dev-armel_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),armel), \
- dpkg-deb -x libc6-dev-armhf_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
-endif
- $(if $(filter $(CROSS_ARCH),ppc64), \
- dpkg-deb -x libc6-dev-powerpc_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),s390x), \
- dpkg-deb -x libc6-dev-s390_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),sparc64), \
- dpkg-deb -x libc6-dev-sparc_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),powerpc), \
- dpkg-deb -x libc6-dev-ppc64_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),mips mipsel mipsr6 mipsr6el), \
- dpkg-deb -x libc6-dev-mips64_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libc6-dev-mipsn32_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),mipsn32 mipsn32el mipsn32r6 mipsn32r6el), \
- dpkg-deb -x libc6-dev-mips64_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libc6-dev-mips32_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),mips64 mips64el mips64r6 mips64r6el), \
- dpkg-deb -x libc6-dev-mips32_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libc6-dev-mipsn32_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),amd64), \
- dpkg-deb -x libc6-dev-i386_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libc6-dev-x32_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),i386), \
- dpkg-deb -x libc6-dev-amd64_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libc6-dev-x32_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
- $(if $(filter $(CROSS_ARCH),x32), \
- dpkg-deb -x libc6-dev-amd64_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH}; \
- dpkg-deb -x libc6-dev-i386_${DEB_VER_GLIBC}_${CROSS_ARCH}.deb debian/tmp.${CROSS_ARCH} \
- )
- : # FIXME: why is this needed?
- cd debian/tmp.${CROSS_ARCH}/usr/lib ;\
- for crt in ${CROSS_GNU_TYPE}/crt*; do \
- ln -sf $$crt `basename $$crt`; \
- done
- : # dpkg-shlibdeps for the stage2 gcc needs these
- for d in $$(find debian/tmp.${CROSS_ARCH}/usr/lib -name libc.so -printf '%h\n'); do \
- ln -sf libc.so $$d/libc.so.6; \
- done
- touch $@
-
-$(stamp)build-glibc2.%: $(stamp)init-glibc $(stamp)install-gcc2.%
+$(stamp)build-glibc2.%: $(stamp)init-glibc $(stamp)install-gcc1.% $(stamp)install-linux.%
@echo START $@
# FIXME: why debian/libgcc1-armel-cross?
cd glibc-${VER_GLIBC} && \
@@ -1359,12 +1188,8 @@
$(stamp)init-gcc \
$(stamp)build-gcc1.% \
$(stamp)install-gcc1.% \
- $(stamp)build-gcc2.% \
- $(stamp)install-gcc2.% \
$(stamp)build-gcc3.% \
$(stamp)init-glibc \
- $(stamp)build-glibc1.% \
- $(stamp)install-glibc1.% \
$(stamp)build-glibc2.% \
$(stamp)install-glibc2.% \
$(stamp)debian-files-base \
References