Source: gcc-11 Tags: patch User: helm...@debian.org Usertags: rebootstrap Hi Matthias,
I noticed that building a stage1 cross compiler does not issue exactly the right Build-Depends. rebootstrap has traditionally ignored gcc's Build-Depends and just installed what it thinks was right, but maybe that's not the best of solutions. In particular, gcc Build-Depends on a pile of glibc stuff, which is quite obviously unavailable when building stage1. I'm attaching a patch that drops these unused dependencies. Please consider applying it. Helmut
--- a/debian/control.m4 +++ b/debian/control.m4 @@ -68,7 +68,7 @@ LIBC_BUILD_DEP, LIBC_BIARCH_BUILD_DEP kfreebsd-kernel-headers (>= 0.84) [kfreebsd-any], linux-libc-dev [m68k], dwz, LIBUNWIND_BUILD_DEP LIBATOMIC_OPS_BUILD_DEP AUTO_BUILD_DEP - SOURCE_BUILD_DEP CROSS_BUILD_DEP + SOURCE_BUILD_DEP CROSS_BUILD_DEP dnl ISL_BUILD_DEP MPC_BUILD_DEP MPFR_BUILD_DEP GMP_BUILD_DEP, libzstd-dev, zlib1g-dev, gawk, lzma, xz-utils, patchutils, pkg-config, libgc-dev, --- a/debian/rules.conf +++ b/debian/rules.conf @@ -384,6 +384,10 @@ endif endif +ifeq ($(DEB_STAGE),stage1) + LIBC_BUILD_DEP := +endif + # needed for the include/asm symlink to run the testsuite for # non default multilibs ifneq (,$(multilib_archs)) @@ -391,8 +395,12 @@ endif LIBUNWIND_DEV_DEP := libunwind8-dev$(LS)$(AQ) -LIBUNWIND_BUILD_DEP := $(LIBUNWIND_DEV_DEP) [ia64], -LIBATOMIC_OPS_BUILD_DEP := libatomic-ops-dev$(LS) [ia64], +LIBUNWIND_BUILD_DEP := +LIBATOMIC_OPS_BUILD_DEP := +ifneq ($(DEB_STAGE),stage1) + LIBUNWIND_BUILD_DEP += $(LIBUNWIND_DEV_DEP) [ia64], + LIBATOMIC_OPS_BUILD_DEP += libatomic-ops-dev$(LS) [ia64], +endif ifneq ($(DEB_TARGET_ARCH),ia64) LIBUNWIND_DEV_DEP := # nothing else ifneq (,$(filter $(DEB_STAGE),stage1 stage2)) @@ -592,6 +600,9 @@ ifneq (,$(findstring cross-build-,$(build_type))) CROSS_BUILD_DEP += zlib1g-dev$(cross_lib_arch), libmpfr-dev$(cross_lib_arch), endif +ifeq ($(DEB_STAGE),stage1) + CROSS_BUILD_DEP := +endif SOURCE_BUILD_DEP := ifeq (,$(findstring gcc,$(PKGSOURCE))) SOURCE_BUILD_DEP := gcc-$(BASE_VERSION)-source (>= $(GCC_SOURCE_VERSION)), gcc-$(BASE_VERSION)-source (<< $(NEXT_GCC_SOURCE_VERSION)),