From ab27430a2b8f0fe5bbafe3ae920126b7179aca9e Mon Sep 17 00:00:00 2001
From: Dima Kogan <dima@secretsauce.net>
Date: Mon, 23 Dec 2019 22:29:45 -0800
Subject: [PATCH 03/10] Compilers now depend on cpp instead of gcc-base

that's where the doc-package links came from when crossing, so the dep on
gcc-base was wrong.
---
 debian/control.m4 | 121 +++++++++++++++++++++++-----------------------
 debian/rules.conf |   2 +
 2 files changed, 63 insertions(+), 60 deletions(-)

diff --git a/debian/control.m4 b/debian/control.m4
index c1e84b6..630739e 100644
--- a/debian/control.m4
+++ b/debian/control.m4
@@ -1017,7 +1017,7 @@ Package: gcc`'PV`'-for-host
 Architecture: ifdef(`TARGET',`TARGET',`any')
 TARGET_PACKAGE`'dnl
 Multi-Arch: same
-Depends: BASEDEP, gcc`'PV`'${target:suffix} (= ${gcc:Version}),
+Depends: ${dep:crossbase}, gcc`'PV`'${target:suffix} (= ${gcc:Version}),
   cpp`'PV`'-for-host (= ${gcc:Version})
 BUILT_USING`'dnl
 Description: GNU C compiler for the host architecture
@@ -1070,7 +1070,7 @@ Package: gcc`'PV-multilib`'TS
 Architecture: ifdef(`TARGET',`any',MULTILIB_ARCHS)
 ifdef(`TARGET',`Multi-Arch: foreign
 ')dnl
-Depends: BASEDEP, gcc`'PV`'TS (= ${gcc:Version}), ${dep:libcbiarchdev}, ${dep:libgccbiarchdev}, ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, gcc`'PV`'TS (= ${gcc:Version}), ${dep:libcbiarchdev}, ${dep:libgccbiarchdev}, ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
 Description: GNU C compiler (multilib support)`'ifdef(`TARGET',` (cross compiler for TARGET architecture)', `')
  This is the GNU C compiler, a fairly portable optimizing compiler for C.
@@ -1082,7 +1082,7 @@ Description: GNU C compiler (multilib support)`'ifdef(`TARGET',` (cross compiler
 ifenabled(`testresults',`
 Package: gcc`'PV-test-results
 Architecture: any
-Depends: BASEDEP, ${misc:Depends}
+Depends: ${dep:crossbase}, ${misc:Depends}
 Replaces: g++-5 (<< 5.2.1-28)
 BUILT_USING`'dnl
 Description: Test results for the GCC test suite
@@ -1095,7 +1095,7 @@ Package: gcc`'PV-plugin-dev`'TS
 Architecture: any
 ifdef(`TARGET',`Multi-Arch: foreign
 ')dnl
-Depends: BASEDEP, gcc`'PV`'TS (= ${gcc:Version}), GMP_BUILD_DEP MPC_BUILD_DEP ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, gcc`'PV`'TS (= ${gcc:Version}), GMP_BUILD_DEP MPC_BUILD_DEP ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
 Description: Files for GNU GCC plugin development.
  This package contains (header) files for GNU GCC plugin development. It
@@ -1109,7 +1109,7 @@ Package: gcc`'PV-hppa64-linux-gnu
 Architecture: ifdef(`TARGET',`any',hppa amd64 i386 x32)
 ifdef(`TARGET',`Multi-Arch: foreign
 ')dnl
-Depends: BASEDEP, gcc`'PV`'TS (= ${gcc:Version}),
+Depends: ${dep:crossbase}, gcc`'PV`'TS (= ${gcc:Version}),
   binutils-hppa64-linux-gnu | binutils-hppa64,
   ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
@@ -1123,7 +1123,7 @@ Package: cpp`'PV`'arch_gnusuffix
 Architecture: ifdef(`TARGET',`any',arch_deb)
 Multi-Arch: foreign
 ifdef(`TARGET',`dnl',`Section: interpreters')
-Depends: BASEDEP, ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, ${shlibs:Depends}, ${misc:Depends}
 Suggests: gcc`'PV-locales (>= ${gcc:SoftVersion}), cpp`'PV-doc (>= ${gcc:SoftVersion})
 Breaks: libmagics++-dev (<< 2.28.0-4), hardening-wrapper (<< 2.8+nmu3), cpp`'PV (<< 13.2.0-11)
 Replaces: cpp`'PV (<< 13.2.0-11)
@@ -1142,7 +1142,7 @@ Architecture: ifdef(`TARGET',`TARGET',`any')
 TARGET_PACKAGE`'dnl
 Multi-Arch: same
 Section: ifdef(`TARGET',`devel',`interpreters')
-Depends: BASEDEP, cpp`'PV`'${target:suffix} (= ${gcc:Version})
+Depends: ${dep:crossbase}, cpp`'PV`'${target:suffix} (= ${gcc:Version})
 BUILT_USING`'dnl
 Description: GNU C preprocessor for the host architecture
  A macro processor that is used automatically by the GNU C compiler
@@ -1175,7 +1175,7 @@ Description: GNU C preprocessor for the build architecture
 Package: cpp`'PV
 Architecture: any
 Section: interpreters
-Depends: BASEDEP, cpp`'PV`'${target:suffix} (= ${gcc:Version}), ${misc:Depends}
+Depends: ${dep:crossbase}, cpp`'PV`'${target:suffix} (= ${gcc:Version}), ${misc:Depends}
 Suggests: gcc`'PV-locales (>= ${gcc:SoftVersion})
 Breaks: libmagics++-dev (<< 2.28.0-4), hardening-wrapper (<< 2.8+nmu3)
 BUILT_USING`'dnl
@@ -1213,16 +1213,16 @@ Description: GCC, the GNU compiler collection (native language support files)
 ')`'dnl cdev
 
 ifenabled(`c++',`
-ifenabled(`c++dev',`dnl
-for_each_arch(`
-Package: g++`'PV`'arch_gnusuffix
-Architecture: ifdef(`TARGET',`any',arch_deb)
-Multi-Arch: foreign
-Depends: BASEDEP, gcc`'PV`'arch_gnusuffix (= ${gcc:Version}), libidevdep(stdc++`'PV-dev,,=), ${shlibs:Depends}, ${misc:Depends}
-Provides: c++-compiler`'arch_gnusuffix
-Suggests: gcc`'PV-doc (>= ${gcc:SoftVersion}), libdbgdep(stdc++CXX_SO`'PV-dbg,)
-Breaks: g++`'PV (<< 13.2.0-11)
-Replaces: g++`'PV (<< 13.2.0-11)
+ifenabled(`c++dev',`
+Package: g++`'PV`'TS
+Architecture: any
+ifdef(`TARGET',`Multi-Arch: foreign
+')dnl
+Section: devel
+Priority: optional
+Depends: ${dep:crossbase}, gcc`'PV`'TS (= ${gcc:Version}), libidevdep(stdc++`'PV-dev,,=), ${shlibs:Depends}, ${misc:Depends}
+Provides: c++-compiler`'TS`'ifdef(`TARGET',`',`, c++abi2-dev')
+Suggests: ${gxx:multilib}, gcc`'PV-doc (>= ${gcc:SoftVersion}), libdbgdep(stdc++CXX_SO`'PV-dbg),
 BUILT_USING`'dnl
 Description: GNU C++ compiler for arch_gnu architecture
  This is the GNU C++ compiler, a fairly portable optimizing compiler for C++.
@@ -1234,7 +1234,7 @@ Package: g++`'PV`'-for-host
 Architecture: ifdef(`TARGET',`TARGET',`any')
 TARGET_PACKAGE`'dnl
 Multi-Arch: same
-Depends: BASEDEP, g++`'PV`'${target:suffix} (= ${gcc:Version}),
+Depends: ${dep:crossbase}, g++`'PV`'${target:suffix} (= ${gcc:Version}),
   gcc`'PV`'-for-host (= ${gcc:Version})
 BUILT_USING`'dnl
 Description: GNU C++ compiler for the host architecture
@@ -1273,7 +1273,7 @@ Package: g++`'PV-multilib`'TS
 Architecture: ifdef(`TARGET',`any',MULTILIB_ARCHS)
 ifdef(`TARGET',`Multi-Arch: foreign
 ')dnl
-Depends: BASEDEP, g++`'PV`'TS (= ${gcc:Version}), gcc`'PV-multilib`'TS (= ${gcc:Version}), ${dep:libcxxbiarchdev}, ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, g++`'PV`'TS (= ${gcc:Version}), gcc`'PV-multilib`'TS (= ${gcc:Version}), ${dep:libcxxbiarchdev}, ${shlibs:Depends}, ${misc:Depends}
 Suggests: ${dep:libcxxbiarchdbg}
 BUILT_USING`'dnl
 Description: GNU C++ compiler (multilib support)`'ifdef(`TARGET',` (cross compiler for TARGET architecture)', `')
@@ -3216,7 +3216,7 @@ Architecture: ifdef(`TARGET',`CROSS_ARCH',`any')
 ifdef(`MULTIARCH', `Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
 ')`'dnl
-Depends: BASEDEP, ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
 Description: GCC cc1 plugin for GDB
  libcc1 is a plugin for GDB.
@@ -3229,7 +3229,7 @@ Architecture: ifdef(`TARGET',`CROSS_ARCH',`any')
 ifdef(`MULTIARCH', `Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
 ')`'dnl
-Depends: BASEDEP, libgcc`'PV-dev, binutils, ${dep:libcdev},
+Depends: ${dep:crossbase}, libgcc`'PV-dev, binutils, ${dep:libcdev},
   ${shlibs:Depends}, ${misc:Depends}
 Breaks: python-gccjit (<< 0.4-4), python3-gccjit (<< 0.4-4)
 BUILT_USING`'dnl
@@ -3244,7 +3244,7 @@ Architecture: ifdef(`TARGET',`CROSS_ARCH',`any')
 ifdef(`MULTIARCH', `Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
 ')`'dnl
-Depends: BASEDEP, libgccjit`'GCCJIT_SO (= ${gcc:Version}),
+Depends: ${dep:crossbase}, libgccjit`'GCCJIT_SO (= ${gcc:Version}),
  ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
 Description: GCC just-in-time compilation (debug information)
@@ -3270,7 +3270,7 @@ Architecture: ifdef(`TARGET',`CROSS_ARCH',`any')
 ifdef(`MULTIARCH', `Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
 ')`'dnl
-Depends: BASEDEP, libgccjit`'GCCJIT_SO (>= ${gcc:Version}),
+Depends: ${dep:crossbase}, libgccjit`'GCCJIT_SO (>= ${gcc:Version}),
  ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
 Suggests: libgccjit`'PV-dbg
@@ -3285,7 +3285,7 @@ for_each_arch(`
 Package: gobjc++`'PV`'arch_gnusuffix
 Architecture: ifdef(`TARGET',`any',arch_deb)
 Multi-Arch: foreign
-Depends: BASEDEP, gobjc`'PV`'arch_gnusuffix (= ${gcc:Version}), g++`'PV`'arch_gnusuffix (= ${gcc:Version}), ${shlibs:Depends}, libidevdep(objc`'PV-dev,,=), ${misc:Depends}
+Depends: ${dep:crossbase}, gobjc`'PV`'arch_gnusuffix (= ${gcc:Version}), g++`'PV`'arch_gnusuffix (= ${gcc:Version}), ${shlibs:Depends}, libidevdep(objc`'PV-dev,,=), ${misc:Depends}
 Breaks: gobjc++`'PV (<< 13.2.0-11)
 Replaces: gobjc++`'PV (<< 13.2.0-11)
 Suggests: ${gobjcxx:multilib}, gcc`'PV-doc (>= ${gcc:SoftVersion})
@@ -3301,7 +3301,7 @@ Package: gobjc++`'PV`'-for-host
 Architecture: ifdef(`TARGET',`TARGET',`any')
 TARGET_PACKAGE`'dnl
 Multi-Arch: same
-Depends: BASEDEP, gobjc++`'PV`'${target:suffix} (= ${gcc:Version}),
+Depends: ${dep:crossbase}, gobjc++`'PV`'${target:suffix} (= ${gcc:Version}),
   gobjc`'PV`'-for-host (= ${gcc:Version}), g++`'PV`'-for-host (= ${gcc:Version})
 BUILT_USING`'dnl
 Description: GNU Objective-C++ compiler for the host architecture
@@ -3328,7 +3328,7 @@ Description: GNU Objective-C++ compiler for the build architecture
 
 Package: gobjc++`'PV
 Architecture: any
-Depends: BASEDEP, gobjc++`'PV`'${target:suffix} (= ${gcc:Version}), gobjc`'PV (= ${gcc:Version}), g++`'PV (= ${gcc:Version}), ${misc:Depends}
+Depends: ${dep:crossbase}, gobjc++`'PV`'${target:suffix} (= ${gcc:Version}), gobjc`'PV (= ${gcc:Version}), g++`'PV (= ${gcc:Version}), ${misc:Depends}
 Suggests: ${gobjcxx:multilib}, gcc`'PV-doc (>= ${gcc:SoftVersion})
 Provides: objc++-compiler
 BUILT_USING`'dnl
@@ -3344,7 +3344,7 @@ Package: gobjc++`'PV-multilib`'TS
 Architecture: ifdef(`TARGET',`any',MULTILIB_ARCHS)
 ifdef(`TARGET',`Multi-Arch: foreign
 ')dnl
-Depends: BASEDEP, gobjc++`'PV`'TS (= ${gcc:Version}), g++`'PV-multilib`'TS (= ${gcc:Version}), gobjc`'PV-multilib`'TS (= ${gcc:Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, gobjc++`'PV`'TS (= ${gcc:Version}), g++`'PV-multilib`'TS (= ${gcc:Version}), gobjc`'PV-multilib`'TS (= ${gcc:Version}), ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
 Description: GNU Objective-C++ compiler (multilib support)
  This is the GNU Objective-C++ compiler, which compiles Objective-C++ on
@@ -3361,7 +3361,7 @@ for_each_arch(`
 Package: gobjc`'PV`'arch_gnusuffix
 Architecture: ifdef(`TARGET',`any',arch_deb)
 Multi-Arch: foreign
-Depends: BASEDEP, gcc`'PV`'arch_gnusuffix (= ${gcc:Version}), ${dep:libcdev}, ${shlibs:Depends}, libidevdep(objc`'PV-dev,,=), ${misc:Depends}
+Depends: ${dep:crossbase}, gcc`'PV`'arch_gnusuffix (= ${gcc:Version}), ${dep:libcdev}, ${shlibs:Depends}, libidevdep(objc`'PV-dev,,=), ${misc:Depends}
 Breaks: gobjc`'PV (<< 13.2.0-11)
 Replaces: gobjc`'PV (<< 13.2.0-11)
 Suggests: gcc`'PV-doc (>= ${gcc:SoftVersion}), libdbgdep(objc`'OBJC_SO-dbg,)
@@ -3377,7 +3377,7 @@ Package: gobjc`'PV`'-for-host
 Architecture: ifdef(`TARGET',`TARGET',`any')
 TARGET_PACKAGE`'dnl
 Multi-Arch: same
-Depends: BASEDEP, gobjc`'PV`'${target:suffix} (= ${gcc:Version}),
+Depends: ${dep:crossbase}, gobjc`'PV`'${target:suffix} (= ${gcc:Version}),
   gobjc`'PV`'-for-host (= ${gcc:Version})
 BUILT_USING`'dnl
 Description: GNU Objective-C compiler for the host architecture
@@ -3403,7 +3403,7 @@ Description: GNU Objective-C compiler for the build architecture
 
 Package: gobjc`'PV
 Architecture: any
-Depends: BASEDEP, gobjc`'PV`'${target:suffix} (= ${gcc:Version}), gcc`'PV (= ${gcc:Version}), ${misc:Depends}
+Depends: ${dep:crossbase}, gobjc`'PV`'${target:suffix} (= ${gcc:Version}), gcc`'PV (= ${gcc:Version}), ${misc:Depends}
 Suggests: ${gobjc:multilib}, gcc`'PV-doc (>= ${gcc:SoftVersion})
 Provides: objc-compiler
 BUILT_USING`'dnl
@@ -3417,7 +3417,7 @@ Package: gobjc`'PV-multilib`'TS
 Architecture: ifdef(`TARGET',`any',MULTILIB_ARCHS)
 ifdef(`TARGET',`Multi-Arch: foreign
 ')dnl
-Depends: BASEDEP, gobjc`'PV`'TS (= ${gcc:Version}), gcc`'PV-multilib`'TS (= ${gcc:Version}), ${dep:libobjcbiarchdev}, ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, gobjc`'PV`'TS (= ${gcc:Version}), gcc`'PV-multilib`'TS (= ${gcc:Version}), ${dep:libobjcbiarchdev}, ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
 Description: GNU Objective-C compiler (multilib support)`'ifdef(`TARGET',` (cross compiler for TARGET architecture)', `')
  This is the GNU Objective-C compiler, which compiles Objective-C on platforms
@@ -3677,15 +3677,16 @@ Description: Runtime library for GNU Objective-C applications (soft float ABI de
 ')`'dnl objc
 
 ifenabled(`fortran',`
-ifenabled(`fdev',`dnl
-for_each_arch(`ifelse(index(` 'fortran_no_archs` ',` !'arch_deb` '),`-1',`
-Package: gfortran`'PV`'arch_gnusuffix
-Architecture: ifdef(`TARGET',`any',arch_deb)
-Multi-Arch: foreign
-Depends: BASEDEP, gcc`'PV`'arch_gnusuffix (= ${gcc:Version}), libidevdep(gfortran`'PV-dev,,=), ${dep:libcdev}, ${shlibs:Depends}, ${misc:Depends}
-Breaks: gfortran`'PV (<< 13.2.0-11)
-Replaces: gfortran`'PV (<< 13.2.0-11)
-Suggests: gfortran`'PV-doc,
+ifenabled(`fdev',`
+Package: gfortran`'PV`'TS
+Architecture: any
+ifdef(`TARGET',`Multi-Arch: foreign
+')dnl
+Priority: optional
+Depends: ${dep:crossbase}, gcc`'PV`'TS (= ${gcc:Version}), libidevdep(gfortran`'PV-dev,,=), ${dep:libcdev}, ${shlibs:Depends}, ${misc:Depends}
+ifdef(`TARGET',`',`Provides: fortran95-compiler, ${fortran:mod-version}
+')dnl
+Suggests: ${gfortran:multilib}, gfortran`'PV-doc,
  libdbgdep(gfortran`'FORTRAN_SO-dbg),
  libcoarrays-dev
 BUILT_USING`'dnl
@@ -3699,7 +3700,7 @@ Package: gfortran`'PV`'-for-host
 Architecture: ifdef(`TARGET',`TARGET',`any')
 TARGET_PACKAGE`'dnl
 Multi-Arch: same
-Depends: BASEDEP, gfortran`'PV`'${target:suffix} (= ${gcc:Version}),
+Depends: ${dep:crossbase}, gfortran`'PV`'${target:suffix} (= ${gcc:Version}),
   gcc`'PV`'-for-host (= ${gcc:Version})
 BUILT_USING`'dnl
 Description: GNU Fortran compiler for the host architecture
@@ -3740,7 +3741,7 @@ Package: gfortran`'PV-multilib`'TS
 Architecture: ifdef(`TARGET',`any',MULTILIB_ARCHS)
 ifdef(`TARGET',`Multi-Arch: foreign
 ')dnl
-Depends: BASEDEP, gfortran`'PV`'TS (= ${gcc:Version}), gcc`'PV-multilib`'TS (= ${gcc:Version}), ${dep:libgfortranbiarchdev}, ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, gfortran`'PV`'TS (= ${gcc:Version}), gcc`'PV-multilib`'TS (= ${gcc:Version}), ${dep:libgfortranbiarchdev}, ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
 Description: GNU Fortran compiler (multilib support)`'ifdef(`TARGET',` (cross compiler for TARGET architecture)', `')
  This is the GNU Fortran compiler, which compiles Fortran on platforms
@@ -4028,7 +4029,7 @@ for_each_arch(`ifelse(index(` 'go_no_archs` ',` !'arch_deb` '),`-1',`
 Package: gccgo`'PV`'arch_gnusuffix
 Architecture: ifdef(`TARGET',`any',arch_deb)
 Multi-Arch: foreign
-Depends: BASEDEP, ifdef(`STANDALONEGO',`${dep:libcc1}, ',`gcc`'PV`'arch_gnusuffix (= ${gcc:Version}), ')libidevdep(go`'PV-dev,,>=), ${dep:libcdev}, ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, ifdef(`STANDALONEGO',`${dep:libcc1}, ',`gcc`'PV`'arch_gnusuffix (= ${gcc:Version}), ')libidevdep(go`'PV-dev,,>=), ${dep:libcdev}, ${shlibs:Depends}, ${misc:Depends}
 Suggests: gccgo`'PV-doc, libdbgdep(go`'GO_SO-dbg),
 Conflicts: ${golang:Conflicts}
 Breaks: libgo12`'LS (<< 8-20171209-2), gccgo`'PV (<< 13.2.0-11)
@@ -4044,7 +4045,7 @@ Package: gccgo`'PV`'-for-host
 Architecture: ifdef(`TARGET',`TARGET',`any')
 TARGET_PACKAGE`'dnl
 Multi-Arch: same
-Depends: BASEDEP, gccgo`'PV`'${target:suffix} (= ${gcc:Version}),
+Depends: ${dep:crossbase}, gccgo`'PV`'${target:suffix} (= ${gcc:Version}),
   gcc`'PV`'-for-host (= ${gcc:Version})
 BUILT_USING`'dnl
 Description: GNU Go compiler for the host architecture
@@ -4070,7 +4071,7 @@ Description: GNU Go compiler for the build architecture
 
 Package: gccgo`'PV
 Architecture: any
-Depends: BASEDEP, gccgo`'PV`'${target:suffix} (= ${gcc:Version}), ifdef(`STANDALONEGO',`',`gcc`'PV (= ${gcc:Version}), ')${misc:Depends}
+Depends: ${dep:crossbase}, gccgo`'PV`'${target:suffix} (= ${gcc:Version}), ifdef(`STANDALONEGO',`',`gcc`'PV (= ${gcc:Version}), ')${misc:Depends}
 Provides: go-compiler
 Suggests: ${go:multilib}, gccgo`'PV-doc, libdbgdep(go`'GO_SO-dbg),
 Conflicts: ${golang:Conflicts}
@@ -4085,7 +4086,7 @@ Package: gccgo`'PV-multilib`'TS
 Architecture: ifdef(`TARGET',`any',MULTILIB_ARCHS)
 ifdef(`TARGET',`Multi-Arch: foreign
 ')dnl
-Depends: BASEDEP, gccgo`'PV`'TS (= ${gcc:Version}), ifdef(`STANDALONEGO',,`gcc`'PV-multilib`'TS (= ${gcc:Version}), ')${dep:libgobiarchdev}, ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, gccgo`'PV`'TS (= ${gcc:Version}), ifdef(`STANDALONEGO',,`gcc`'PV-multilib`'TS (= ${gcc:Version}), ')${dep:libgobiarchdev}, ${shlibs:Depends}, ${misc:Depends}
 Suggests: ${dep:libgobiarchdbg}
 BUILT_USING`'dnl
 Description: GNU Go compiler (multilib support)`'ifdef(`TARGET',` (cross compiler for TARGET architecture)', `')
@@ -4904,7 +4905,7 @@ Architecture: ifdef(`TARGET',`any',arch_deb)
 Multi-Arch: foreign
 ifdef(`MULTIARCH', `Pre-Depends: ${misc:Pre-Depends}
 ')`'dnl
-Depends: BASEDEP, gcc`'PV`'${target:suffix} (>= ${gcc:SoftVersion}), ${dep:libgnat}, ${dep:libcdev}, ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, gcc`'PV`'${target:suffix} (>= ${gcc:SoftVersion}), ${dep:libgnat}, ${dep:libcdev}, ${shlibs:Depends}, ${misc:Depends}
 Breaks: gnat`'-GNAT_V (<< 13.2.0-11)
 Replaces: gnat`'-GNAT_V (<< 13.2.0-11)
 Suggests: gnat`'PV-doc, ada-reference-manual-2012
@@ -4925,7 +4926,7 @@ Package: gnat`'PV`'-for-host
 Architecture: ifdef(`TARGET',`TARGET',`any')
 TARGET_PACKAGE`'dnl
 Multi-Arch: same
-Depends: BASEDEP, gnat`'PV`'${target:suffix} (= ${gcc:Version}),
+Depends: ${dep:crossbase}, gnat`'PV`'${target:suffix} (= ${gcc:Version}),
   gcc`'PV`'-for-host (= ${gcc:Version})
 BUILT_USING`'dnl
 Description: GNU Ada compiler for the host architecture
@@ -4979,7 +4980,7 @@ ifdef(`TARGET',`Multi-Arch: foreign
 ')dnl
 ifdef(`MULTIARCH', `Pre-Depends: ${misc:Pre-Depends}
 ')`'dnl
-Depends: BASEDEP, gnat`'-GNAT_V`'TS (= ${gnat:Version}), ${misc:Depends}
+Depends: ${dep:crossbase}, gnat`'-GNAT_V`'TS (= ${gnat:Version}), ${misc:Depends}
 BUILT_USING`'dnl
 Description: GNU Ada compiler (setjump/longjump runtime library)
  GNAT is a compiler for the Ada programming language. It produces optimized
@@ -5088,7 +5089,7 @@ Package: gdc`'PV`'-for-host
 Architecture: ifdef(`TARGET',`TARGET',`any')
 TARGET_PACKAGE`'dnl
 Multi-Arch: same
-Depends: BASEDEP, gdc`'PV`'${target:suffix} (= ${gcc:Version}),
+Depends: ${dep:crossbase}, gdc`'PV`'${target:suffix} (= ${gcc:Version}),
   gcc`'PV`'-for-host (= ${gcc:Version})
 BUILT_USING`'dnl
 Description: GNU D compiler (version 2) for the host architecture
@@ -5454,7 +5455,7 @@ Package: gm2`'PV`'-for-host
 Architecture: ifdef(`TARGET',`TARGET',`any')
 TARGET_PACKAGE`'dnl
 Multi-Arch: same
-Depends: BASEDEP, gm2`'PV`'${target:suffix} (= ${gcc:Version}),
+Depends: ${dep:crossbase}, gm2`'PV`'${target:suffix} (= ${gcc:Version}),
   gcc`'PV`'-for-host (= ${gcc:Version})
 BUILT_USING`'dnl
 Description: GNU Modula-2 compiler for the host architecture
@@ -5778,7 +5779,7 @@ Package: gccrs`'PV`'-for-host
 Architecture: ifdef(`TARGET',`TARGET',`any')
 TARGET_PACKAGE`'dnl
 Multi-Arch: same
-Depends: BASEDEP, gccrs`'PV`'${target:suffix} (= ${gcc:Version}),
+Depends: ${dep:crossbase}, gccrs`'PV`'${target:suffix} (= ${gcc:Version}),
   gcc`'PV`'-for-host (= ${gcc:Version})
 BUILT_USING`'dnl
 Description: GNU Rust compiler for the host architecture
@@ -5835,7 +5836,7 @@ ifdef(`TARGET',`',`dnl
 ifenabled(`libs',`
 #Package: gcc`'PV-soft-float
 #Architecture: arm armel armhf
-#Depends: BASEDEP, depifenabled(`cdev',`gcc`'PV (= ${gcc:Version}),') ${shlibs:Depends}, ${misc:Depends}
+#Depends: ${dep:crossbase}, depifenabled(`cdev',`gcc`'PV (= ${gcc:Version}),') ${shlibs:Depends}, ${misc:Depends}
 #Conflicts: gcc-4.4-soft-float, gcc-4.5-soft-float, gcc-4.6-soft-float
 #BUILT_USING`'dnl
 #Description: GCC soft-floating-point gcc libraries (ARM)
@@ -5865,7 +5866,7 @@ Architecture: nvptx_archs
 ifdef(`TARGET',`Multi-Arch: foreign
 ')dnl
 Priority: optional
-Depends: BASEDEP, gcc`'PV (= ${gcc:Version}), ${dep:libcdev},
+Depends: ${dep:crossbase}, gcc`'PV (= ${gcc:Version}), ${dep:libcdev},
   nvptx-tools, libgomp-plugin-nvptx`'GOMP_SO (>= ${gcc:Version}),
   ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
@@ -5879,7 +5880,7 @@ Package: libgomp-plugin-nvptx`'GOMP_SO
 Architecture: nvptx_archs
 Multi-Arch: same
 Section: libs
-Depends: BASEDEP, libgomp`'GOMP_SO`'LS, ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, libgomp`'GOMP_SO`'LS, ${shlibs:Depends}, ${misc:Depends}
 Suggests: libcuda1 [amd64] | libnvidia-tesla-cuda1 [amd64 ppc64el] | libcuda1-any
 BUILT_USING`'dnl
 Description: GCC OpenMP v4.5 plugin for offloading to NVPTX
@@ -5895,7 +5896,7 @@ Architecture: gcn_archs
 ifdef(`TARGET',`Multi-Arch: foreign
 ')dnl
 Priority: optional
-Depends: BASEDEP, gcc`'PV (= ${gcc:Version}), ${dep:libcdev},
+Depends: ${dep:crossbase}, gcc`'PV (= ${gcc:Version}), ${dep:libcdev},
   libgomp-plugin-amdgcn`'GOMP_SO (>= ${gcc:Version}),
   LLVM_DEP ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
@@ -5909,7 +5910,7 @@ Package: libgomp-plugin-amdgcn`'GOMP_SO
 Architecture: gcn_archs
 Multi-Arch: same
 Section: libs
-Depends: BASEDEP, libgomp`'GOMP_SO`'LS, ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, libgomp`'GOMP_SO`'LS, ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
 Description: GCC OpenMP v4.5 plugin for offloading to GCN
  This package contains libgomp plugin for offloading to AMD GCN.
@@ -5922,7 +5923,7 @@ Package: libgomp-plugin-hsa`'GOMP_SO
 Architecture: amd64
 Multi-Arch: same
 Section: libs
-Depends: BASEDEP, libgomp`'GOMP_SO`'LS, ${shlibs:Depends}, ${misc:Depends}
+Depends: ${dep:crossbase}, libgomp`'GOMP_SO`'LS, ${shlibs:Depends}, ${misc:Depends}
 BUILT_USING`'dnl
 Description: GCC OpenMP v4.5 plugin for offloading to HSA
  This package contains libgomp plugin for offloading to HSA.
@@ -5933,7 +5934,7 @@ ifdef(`TARGET',`',`dnl
 ifenabled(`libnof',`
 #Package: gcc`'PV-nof
 #Architecture: powerpc
-#Depends: BASEDEP, ${shlibs:Depends}ifenabled(`cdev',`, gcc`'PV (= ${gcc:Version})'), ${misc:Depends}
+#Depends: ${dep:crossbase}, ${shlibs:Depends}ifenabled(`cdev',`, gcc`'PV (= ${gcc:Version})'), ${misc:Depends}
 #Conflicts: gcc-3.2-nof
 #BUILT_USING`'dnl
 #Description: GCC no-floating-point gcc libraries (powerpc)
diff --git a/debian/rules.conf b/debian/rules.conf
index 4cf13d8..e045ba3 100644
--- a/debian/rules.conf
+++ b/debian/rules.conf
@@ -1281,6 +1281,8 @@ endif
 ifeq ($(DEB_CROSS),yes)
 	echo 'dep:gdccross=gdc$(pkg_ver) (>= $(DEB_GCC_SOFT_VERSION))' \
 		>> debian/substvars.local.tmp
+	echo 'dep:crossbase=cpp$(pkg_ver)$(TS) (>= $${gcc:Version})' \
+		>> debian/substvars.local.tmp
 endif
 ifeq ($(with_phobos),yes)
 	echo 'dep:phobosdev=libgphobos$(pkg_ver)-dev$(LS)$(AQ) (>= $(DEB_GCC_SOFT_VERSION))' \
-- 
2.42.0

