Bug#347484: gcc-4.0: Give option not to depend on system -base package for cross compiler
Package: gcc-4.0
Version: 4.0.2-6
Severity: wishlist
Tags: patch
Hi,
Thanks for making it quite easy to build a cross compiler on Debian.
The only problem I have had is that the packages by default depend on
the -base package used by the system gcc.
This means whenever I upgrade my system gcc I need to rebuild my cross
compiler to have the right dependencies. I think this breaks the way
many people use cross compilers -- they want fairly static versions to
build specific things. I'm happy to run with the latest and greatest
on my system, but I'd prefer if the cross compiler stayed how it was
until I explicitly touched it.
The following patch implements an option DEB_CROSS_INDEPENDENT which,
if set, builds against a cross compiler specific -base package. If
not set, the old semantics remain.
The patch looks big because it changes the dependency field of all the
packages in control.m4, but otherwise I think it is quite straight
forward. I included some documentation in README.cross. I have
tested this building with and without and it behaves as I expect.
Thanks for considering it,
-i
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Versions of packages gcc-4.0 depends on:
ii binutils 2.16.1cvs20051214-1 The GNU assembler, linker and bina
ii cpp-4.0 4.0.2-6 The GNU C preprocessor
ii gcc-4.0-base 4.0.2-6 The GNU Compiler Collection (base
ii libc6 2.3.5-11 GNU C Library: Shared libraries an
ii libgcc1 1:4.0.2-6 GCC support library
Versions of packages gcc-4.0 recommends:
ii libc6-dev 2.3.5-11 GNU C Library: Development Librari
pn libmudflap0-dev <none> (no description available)
-- no debconf information
README.cross | 13 +++++--
control.m4 | 107 ++++++++++++++++++++++++++++++++++++-----------------------
rules.conf | 3 +
rules.defs | 6 +++
rules2 | 7 +++
5 files changed, 91 insertions(+), 45 deletions(-)
Index: debian/rules2
===================================================================
--- debian/rules2 (revision 963)
+++ debian/rules2 (working copy)
@@ -973,7 +973,8 @@
p_cxx = g++$(pkg_ver)
p_doc = gcc$(pkg_ver)-doc
else
- p_base = gcc$(pkg_ver)-base
+ # only triggered if DEB_CROSS_INDEPENDENT set
+ p_base = gcc$(pkg_ver)$(cross_bin_arch)-base
p_cpp = cpp$(pkg_ver)$(cross_bin_arch)
p_gcc = gcc$(pkg_ver)$(cross_bin_arch)
p_cxx = g++$(pkg_ver)$(cross_bin_arch)
@@ -1088,6 +1089,10 @@
# ----------------------------------------
# cross target
+ifeq ($(with_gccxbase),yes)
+ include debian/rules.d/binary-base.mk
+endif
+
ifeq ($(with_libgcc),yes)
include debian/rules.d/binary-libgcc-cross.mk
endif
Index: debian/control.m4
===================================================================
--- debian/control.m4 (revision 963)
+++ debian/control.m4 (working copy)
@@ -53,8 +53,14 @@
versions of gcc.
',`dnl gcc-X.Y
+dnl default base package dependencies
+define(`BASETARGET', `')
+define(`BASEDEP', `gcc`'PV-base (= ${gcc:Version})')
+define(`SOFTBASEDEP', `gcc`'PV-base (>= $gcc:SoftVersion})')
+
ifdef(`TARGET', `', `
ifenabled(`gccbase',`
+
Package: gcc`'PV-base
Architecture: any
Section: devel
@@ -72,12 +78,31 @@
')`'dnl
')`'dnl native
+ifenabled(`gccxbase',`
+dnl override default base package dependencies to cross version
+dnl This creates a toolchain that doesnt depend on the system -base packages
+dnl set via DEB_CROSS_INDEPENDENT=yes
+define(`BASETARGET', `PV`'TS')
+define(`BASEDEP', `gcc`'BASETARGET-base (= ${gcc:Version})')
+define(`SOFTBASEDEP', `gcc`'BASETARGET-base (>= $gcc:SoftVersion})')
+
+Package: gcc`'BASETARGET-base
+Architecture: any
+Section: devel
+Priority: PRI(required)
+Conflicts: gcc-3.5-base
+Replaces: gcc-3.5-base
+Description: The GNU Compiler Collection (base package)
+ This package contains files common to all languages and libraries
+ contained in the GNU Compiler Collection (GCC).
+')`'dnl
+
ifenabled(`libgcc',`
Package: libgcc1`'LS
Architecture: ifdef(`TARGET',`all',`any')
Section: ifdef(`TARGET',`devel',`libs')
Priority: ifdef(`TARGET',`extra',required)
-Depends: gcc`'PV-base (= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, ${shlibs:Depends}
Description: GCC support library`'ifdef(`TARGET)',` (TARGET)', `')
Shared version of the support library, a library of internal subroutines
that GCC uses to overcome shortcomings of particular machines, or
@@ -92,7 +117,7 @@
Architecture: ifdef(`TARGET',`all',`hppa m68k')
Section: ifdef(`TARGET',`devel',`libs')
Priority: ifdef(`TARGET',`extra',required)
-Depends: gcc`'PV-base (= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, ${shlibs:Depends}
Description: GCC support library`'ifdef(`TARGET)',` (TARGET)', `')
Shared version of the support library, a library of internal subroutines
that GCC uses to overcome shortcomings of particular machines, or
@@ -109,7 +134,7 @@
Architecture: ifdef(`TARGET',`all',`biarch64_archs')
Section: ifdef(`TARGET',`devel',`libs')
Priority: ifdef(`TARGET',`extra',PRI(optional))
-Depends: gcc`'PV-base (= ${gcc:Version}), ${dep:libcbiarch}
+Depends: BASEDEP, ${dep:libcbiarch}
Conflicts: libgcc`'GCC_SO`'LS (<= 1:3.3-0pre9)
Description: GCC support library`'ifdef(`TARGET)',` (TARGET)', `') (64bit)
Shared version of the support library, a library of internal subroutines
@@ -128,7 +153,7 @@
Architecture: biarch32_archs
Section: libs
Priority: optional
-Depends: gcc`'PV-base (= ${gcc:Version}), ${dep:libcbiarch}
+Depends: BASEDEP, ${dep:libcbiarch}
ifelse(DIST,`Ubuntu', `Replaces: ia32-libs-openoffice.org (<< 1ubuntu3)', `dnl')
Description: GCC support library (32 bit Version)
Shared version of the support library, a library of internal subroutines
@@ -142,7 +167,7 @@
Architecture: any
Section: devel
Priority: ifdef(`TARGET',`extra',`PRI(standard)')
-Depends: gcc`'PV-base (= ${gcc:Version}), cpp`'PV`'TS (= ${gcc:Version}), binutils`'TS (>= ${binutils:Version}), ${dep:libgcc}, ${dep:libunwinddev}, ${shlibs:Depends}
+Depends: BASEDEP, cpp`'PV`'TS (= ${gcc:Version}), binutils`'TS (>= ${binutils:Version}), ${dep:libgcc}, ${dep:libunwinddev}, ${shlibs:Depends}
Recommends: ${dep:libcdev}, libmudflap`'MF_SO-dev`'LS (>= ${gcc:Version})
Conflicts: gcc-3.2`'TS (<= 1:3.2.3-0pre8), gcc-3.5`'ifelse(DIST,`Ubuntu', `, amd64-libs-dev (<= 1.1ubuntu1)')
Replaces: gcc-3.5
@@ -162,7 +187,7 @@
Architecture: hppa
Section: devel
Priority: PRI(standard)
-Depends: gcc`'PV-base (= ${gcc:Version}), ${dep:libcdev}, ${shlibs:Depends}
+Depends: BASEDEP, ${dep:libcdev}, ${shlibs:Depends}
Conflicts: gcc-3.3-hppa64 (<= 1:3.3.4-5), gcc-3.4-hppa64 (<= 3.4.1-3), gcc-3.5-hppa64
Replaces: gcc-3.5-hppa64
Description: The GNU C compiler (cross compiler for hppa64)
@@ -175,7 +200,7 @@
Architecture: any
Section: ifdef(`TARGET',`devel',`interpreters')
Priority: ifdef(`TARGET',`extra',`PRI(standard)')
-Depends: gcc`'PV-base (= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, ${shlibs:Depends}
Replaces: cpp-3.5
Suggests: gcc`'PV-locales (>= ${gcc:SoftVersion})
Description: The GNU C preprocessor
@@ -194,7 +219,7 @@
Architecture: all
Section: doc
Priority: PRI(optional)
-Depends: gcc`'PV-base (>= ${gcc:SoftVersion})
+Depends: SOFTBASEDEP
Conflicts: cpp-3.5-doc
Replaces: cpp (<= 1:2.93.12), cpp-3.5-doc
Description: Documentation for the GNU C preprocessor (cpp)
@@ -206,7 +231,7 @@
Architecture: all
Section: devel
Priority: PRI(optional)
-Depends: gcc`'PV-base (>= ${gcc:SoftVersion}), cpp`'PV (>= ${gcc:SoftVersion})
+Depends: SOFTBASEDEP, cpp`'PV (>= ${gcc:SoftVersion})
Recommends: gcc`'PV (>= ${gcc:SoftVersion})
Replaces: cpp-4.0 (<< 4.0-0pre8), gcc-4.0 (<< 4.0-0pre8)
Description: The GNU C compiler (native language support files)
@@ -220,7 +245,7 @@
Architecture: any
Section: devel
Priority: ifdef(`TARGET',`extra',`PRI(standard)')
-Depends: gcc`'PV-base (= ${gcc:Version}), gcc`'PV`'TS (= ${gcc:Version}), libstdc++CXX_SO`'PV-dev`'LS (= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, gcc`'PV`'TS (= ${gcc:Version}), libstdc++CXX_SO`'PV-dev`'LS (= ${gcc:Version}), ${shlibs:Depends}
Conflicts: g++-3.5
Replaces: gcc`'TS (<= 2.7.2.3-3), g++-3.5
Provides: c++-compiler`'TS, c++abi2-dev
@@ -240,7 +265,7 @@
Architecture: any
Section: libs
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, ${shlibs:Depends}
Description: GCC mudflap shared support libraries
The libmudflap libraries are used by GCC for instrumenting pointer and array
dereferencing operations.
@@ -249,7 +274,7 @@
Architecture: any
Section: libdevel
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), ${dep:libcdev}, libmudflap`'MF_SO (>= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, ${dep:libcdev}, libmudflap`'MF_SO (>= ${gcc:Version}), ${shlibs:Depends}
Description: GCC mudflap support libraries (development files)
The libmudflap libraries are used by GCC for instrumenting pointer and array
dereferencing operations.
@@ -262,7 +287,7 @@
Package: protoize
Architecture: any
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), gcc`'PV (>= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, gcc`'PV (>= ${gcc:Version}), ${shlibs:Depends}
Description: Create/remove ANSI prototypes from C code
"protoize" can be used to add prototypes to a program, thus converting
the program to ANSI C in one respect. The companion program "unprotoize"
@@ -275,7 +300,7 @@
Package: gobjc`'PV
Architecture: any
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), gcc`'PV (= ${gcc:Version}), ${dep:libcdev}, ${shlibs:Depends}, libobjc`'OBJC_SO (>= ${gcc:EpochVersion})
+Depends: BASEDEP, gcc`'PV (= ${gcc:Version}), ${dep:libcdev}, ${shlibs:Depends}, libobjc`'OBJC_SO (>= ${gcc:EpochVersion})
Suggests: gcc`'PV-doc (>= ${gcc:SoftVersion})
Conflicts: gobjc-3.5
Replaces: gobjc-3.5
@@ -293,7 +318,7 @@
Section: libs
Architecture: any
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, ${shlibs:Depends}
Description: Runtime library for GNU Objective-C applications
Library needed for GNU ObjC applications linked against the shared library.
')`'dnl libobjc
@@ -303,7 +328,7 @@
Section: libs
Architecture: biarch64_archs
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), ${dep:libcbiarch}, ${shlibs:Depends}
+Depends: BASEDEP, ${dep:libcbiarch}, ${shlibs:Depends}
Description: Runtime library for GNU Objective-C applications (64bit)
Library needed for GNU ObjC applications linked against the shared library.
')`'dnl lib64objc
@@ -324,7 +349,7 @@
Package: gfortran`'PV
Architecture: any
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), gcc`'PV (= ${gcc:Version}), libgfortran`'FORTRAN_SO-dev (= ${gcc:Version}), ${dep:libcdev}, ${shlibs:Depends}
+Depends: BASEDEP, gcc`'PV (= ${gcc:Version}), libgfortran`'FORTRAN_SO-dev (= ${gcc:Version}), ${dep:libcdev}, ${shlibs:Depends}
Provides: fortran95-compiler
Suggests: gfortran`'PV-doc
Conflicts: gfortran-3.5
@@ -338,7 +363,7 @@
Architecture: all
Section: doc
Priority: PRI(optional)
-Depends: gcc`'PV-base (>= ${gcc:SoftVersion})
+Depends: SOFTBASEDEP
Conflicts: gfortran-3.5-doc
Replaces: gfortran-3.5-doc
Description: Documentation for the GNU Fortran compiler (gfortran)
@@ -350,7 +375,7 @@
Section: libs
Architecture: any
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, ${shlibs:Depends}
Description: Runtime library for GNU Fortran applications
Library needed for GNU Fortran applications linked against the
shared library.
@@ -359,7 +384,7 @@
Section: libdevel
Architecture: any
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), libgfortran`'FORTRAN_SO (>= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, libgfortran`'FORTRAN_SO (>= ${gcc:Version}), ${shlibs:Depends}
Replaces: gfortran-4.0 (<< 4.0.1-3)
Description: GNU Fortran library development
Headers and static libraries for gfortran.
@@ -370,7 +395,7 @@
Section: libs
Architecture: biarch64_archs
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), ${dep:libcbiarch}, ${shlibs:Depends}
+Depends: BASEDEP, ${dep:libcbiarch}, ${shlibs:Depends}
Description: Runtime library for GNU Fortran applications (64bit)
Library needed for GNU Fortran applications linked against the
shared library.
@@ -381,7 +406,7 @@
Section: libs
Architecture: biarch32_archs
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), ${dep:libcbiarch}, ${shlibs:Depends}
+Depends: BASEDEP, ${dep:libcbiarch}, ${shlibs:Depends}
Description: Runtime library for GNU Fortran applications (32bit)
Library needed for GNU Fortran applications linked against the
shared library.
@@ -611,7 +636,7 @@
Architecture: ifdef(`TARGET',`all',`any')
Section: ifdef(`TARGET',`devel',`libs')
Priority: ifdef(`TARGET',`extra',PRI(required))
-Depends: gcc`'PV-base (= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, ${shlibs:Depends}
Description: The GNU Standard C++ Library v3`'ifdef(`TARGET)',` (TARGET)', `')
This package contains an additional runtime library for C++ programs
built with the GNU compiler.
@@ -630,7 +655,7 @@
Architecture: ifdef(`TARGET',`all',`biarch32_archs')
Section: ifdef(`TARGET',`devel',`libs')
Priority: ifdef(`TARGET',`extra',PRI(optional))
-Depends: gcc`'PV-base (= ${gcc:Version}), lib32gcc1`'LS
+Depends: BASEDEP, lib32gcc1`'LS
Description: The GNU Standard C++ Library v3 (32 bit Version)
This package contains an additional runtime library for C++ programs
built with the GNU compiler.
@@ -645,7 +670,7 @@
Architecture: ifdef(`TARGET',`all',`biarch64_archs')
Section: ifdef(`TARGET',`devel',`libs')
Priority: ifdef(`TARGET',`extra',PRI(optional))
-Depends: gcc`'PV-base (= ${gcc:Version}), ${shlibs:Depends}, lib64gcc1`'LS
+Depends: BASEDEP, ${shlibs:Depends}, lib64gcc1`'LS
Description: The GNU Standard C++ Library v3`'ifdef(`TARGET)',` (TARGET)', `') (64bit)
This package contains an additional runtime library for C++ programs
built with the GNU compiler.
@@ -665,7 +690,7 @@
Architecture: ifdef(`TARGET',`all',`any')
Section: ifdef(`TARGET',`devel',`libdevel')
Priority: ifdef(`TARGET',`extra',PRI(standard))
-Depends: gcc`'PV-base (= ${gcc:Version}), g++`'PV`'TS (= ${gcc:Version}), libstdc++CXX_SO`'LS (>= ${gcc:Version}), ${dep:libcdev}
+Depends: BASEDEP, g++`'PV`'TS (= ${gcc:Version}), libstdc++CXX_SO`'LS (>= ${gcc:Version}), ${dep:libcdev}
ifdef(`TARGET',`',`dnl native
Conflicts: libg++27-dev, libg++272-dev (<< 2.7.2.8-1), libstdc++2.8-dev, libg++2.8-dev, libstdc++2.9-dev, libstdc++2.9-glibc2.1-dev, libstdc++2.10-dev (<< 1:2.95.3-2), libstdc++3.0-dev, libstdc++6-0-dev
Replaces: libstdc++6-0-dev
@@ -689,7 +714,7 @@
Architecture: ifdef(`TARGET',`all',`any')
Section: ifdef(`TARGET',`devel',`libdevel')
Priority: extra
-Depends: gcc`'PV-base (= ${gcc:Version}), libstdc++CXX_SO`'LS (>= ${gcc:Version}), libstdc++CXX_SO`'PV-dev`'LS (= ${gcc:Version})
+Depends: BASEDEP, libstdc++CXX_SO`'LS (>= ${gcc:Version}), libstdc++CXX_SO`'PV-dev`'LS (= ${gcc:Version})
Description: The GNU Standard C++ Library v3 (shared library subset kit)`'ifdef(`TARGET)',` (TARGET)', `')
This is used to develop subsets of the libstdc++ shared libraries for
use on custom installation floppies and in embedded systems.
@@ -705,7 +730,7 @@
Architecture: ifdef(`TARGET',`all',`any')
Section: ifdef(`TARGET',`devel',`libdevel')
Priority: extra
-Depends: gcc`'PV-base (= ${gcc:Version}), libstdc++CXX_SO`'LS (>= ${gcc:Version})
+Depends: BASEDEP, libstdc++CXX_SO`'LS (>= ${gcc:Version})
Recommends: libstdc++CXX_SO`'PV-dev`'LS (= ${gcc:Version})
Conflicts: libstdc++5-dbg`'LS, libstdc++5-3.3-dbg`'LS, libstdc++6-dbg`'LS, libstdc++6-0-dbg
Replaces: libstdc++6-0-dbg
@@ -722,7 +747,7 @@
Architecture: ifdef(`TARGET',`all',`biarch32_archs')
Section: ifdef(`TARGET',`devel',`libdevel')
Priority: extra
-Depends: gcc`'PV-base (= ${gcc:Version}), lib32stdc++CXX_SO`'LS (>= ${gcc:Version}), libstdc++CXX_SO`'PV-dev`'LS (= ${gcc:Version})
+Depends: BASEDEP, lib32stdc++CXX_SO`'LS (>= ${gcc:Version}), libstdc++CXX_SO`'PV-dev`'LS (= ${gcc:Version})
Conflicts: libstdc++5-dbg`'LS, libstdc++5-3.3-dbg`'LS, libstdc++6-dbg`'LS, libstdc++6-0-dbg, libstdc++6-4.0-dbg (<< 4.0.0-7ubuntu7)
Replaces: libstdc++6-0-dbg
Description: The GNU Standard C++ Library v3 (debugging files)`'ifdef(`TARGET)',` (TARGET)', `')
@@ -738,7 +763,7 @@
Architecture: ifdef(`TARGET',`all',`biarch64_archs')
Section: ifdef(`TARGET',`devel',`libdevel')
Priority: extra
-Depends: gcc`'PV-base (= ${gcc:Version}), lib64stdc++CXX_SO`'LS (>= ${gcc:Version}), libstdc++CXX_SO`'PV-dev`'LS (= ${gcc:Version})
+Depends: BASEDEP, lib64stdc++CXX_SO`'LS (>= ${gcc:Version}), libstdc++CXX_SO`'PV-dev`'LS (= ${gcc:Version})
Conflicts: libstdc++5-dbg`'LS, libstdc++5-3.3-dbg`'LS, libstdc++6-dbg`'LS, libstdc++6-0-dbg, libstdc++6-4.0-dbg (<< 4.0.0-7ubuntu7)
Replaces: libstdc++6-0-dbg
Description: The GNU Standard C++ Library v3 (debugging files)`'ifdef(`TARGET)',` (TARGET)', `')
@@ -755,7 +780,7 @@
Architecture: all
Section: doc
Priority: PRI(optional)
-Depends: gcc`'PV-base (>= ${gcc:SoftVersion})
+Depends: SOFTBASEDEP
Conflicts: libstdc++5-doc, libstdc++5-3.3-doc, libstdc++6-doc
Description: The GNU Standard C++ Library v3 (documentation files)
This package contains documentation files for the GNU stdc++ library.
@@ -772,7 +797,7 @@
Package: gnat`'-GNAT_V
Architecture: any
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), gcc`'PV (= ${gcc:Version}), ${dep:libgnat}, ${dep:libcdev}, ${shlibs:Depends}
+Depends: BASEDEP, gcc`'PV (= ${gcc:Version}), ${dep:libgnat}, ${dep:libcdev}, ${shlibs:Depends}
Suggests: gnat`'PV-doc, ada-reference-manual
Provides: ada-compiler, gnat
Conflicts: gnat, gnat-3.1, gnat-3.2, gnat-3.3, gnat-3.4, gnat-3.5
@@ -786,7 +811,7 @@
Section: libs
Architecture: any
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, ${shlibs:Depends}
Conflicts: libgnat-3.5
Replaces: libgnat-3.5
Description: Runtime library for GNU Ada applications
@@ -797,7 +822,7 @@
Architecture: all
Section: doc
Priority: PRI(optional)
-Depends: gcc`'PV-base (>= ${gcc:SoftVersion})
+Depends: SOFTBASEDEP
Suggests: gnat`'PV
Conflicts: gnat-3.5-doc
Replaces: gnat-3.5-doc
@@ -809,7 +834,7 @@
Package: gpc`'GPC_PV
Architecture: any
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), gcc`'PV (= ${gcc:Version}), ${dep:libcdev}, ${shlibs:Depends}
+Depends: BASEDEP, gcc`'PV (= ${gcc:Version}), ${dep:libcdev}, ${shlibs:Depends}
Recommends: libgmp3-dev, libncurses5-dev
Suggests: gpc`'GPC_PV-doc (>= ${gpc:Version})
Provides: pascal-compiler
@@ -824,7 +849,7 @@
Architecture: all
Section: doc
Priority: PRI(optional)
-Depends: gcc`'PV-base (>= ${gcc:SoftVersion})
+Depends: SOFTBASEDEP
Replaces: gpc (<= 2.91.58-3)
Suggests: gpc`'GPC_PV
Description: Documentation for the GNU Pascal compiler (gpc)
@@ -838,7 +863,7 @@
Package: treelang`'PV
Architecture: any
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), gcc`'PV (= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, gcc`'PV (= ${gcc:Version}), ${shlibs:Depends}
Conflicts: treelang-3.5
Replaces: treelang-3.5
Description: The GNU Treelang compiler
@@ -854,7 +879,7 @@
Package: gcc`'PV-soft-float
Architecture: arm armeb
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), ifenabled(`cdev',`gcc`'PV (= ${gcc:Version}),') ${shlibs:Depends}
+Depends: BASEDEP, ifenabled(`cdev',`gcc`'PV (= ${gcc:Version}),') ${shlibs:Depends}
Replaces: gcc-soft-float-ss
Description: The soft-floating-point gcc libraries (arm)
These are versions of basic static libraries such as libgcc.a compiled
@@ -866,7 +891,7 @@
Package: fixincludes
Architecture: any
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), gcc`'PV (= ${gcc:Version}), ${shlibs:Depends}
+Depends: BASEDEP, gcc`'PV (= ${gcc:Version}), ${shlibs:Depends}
Description: Fix non-ANSI header files
FixIncludes was created to fix non-ANSI system header files. Many
system manufacturers supply proprietary headers that are not ANSI compliant.
@@ -884,7 +909,7 @@
Architecture: all
Section: doc
Priority: PRI(optional)
-Depends: gcc`'PV-base (>= ${gcc:SoftVersion})
+Depends: SOFTBASEDEP
Conflicts: gcc-docs (<< 2.95.2), gcc-3.5-doc
Replaces: gcc (<=2.7.2.3-4.3), gcc-docs (<< 2.95.2), gcc-3.5-doc
Description: Documentation for the GNU compilers (gcc, gobjc, g++)
@@ -897,7 +922,7 @@
Package: gcc`'PV-nof
Architecture: powerpc
Priority: PRI(optional)
-Depends: gcc`'PV-base (= ${gcc:Version}), ${shlibs:Depends}ifenabled(`cdev',`, gcc`'PV (= ${gcc:Version})')
+Depends: BASEDEP, ${shlibs:Depends}ifenabled(`cdev',`, gcc`'PV (= ${gcc:Version})')
Conflicts: gcc-3.2-nof
Description: The no-floating-point gcc libraries (powerpc)
These are versions of basic static libraries such as libgcc.a compiled
Index: debian/rules.defs
===================================================================
--- debian/rules.defs (revision 963)
+++ debian/rules.defs (working copy)
@@ -134,6 +134,12 @@
with_gccbase := yes
with_dev := yes
+# when DEB_CROSS_INDEPENDENT is set we build and depend on a
+# separate -base package for the cross compiler.
+ifeq ($(DEB_CROSS_INDEPENDENT),yes)
+ with_gccxbase := yes
+endif
+
#no_dummy_cpus := ia64 i386 hppa s390 sparc
#with_base_only := yes
#ifneq (, $(filter $(DEB_TARGET_ARCH_CPU),$(no_dummy_cpus)))
Index: debian/README.cross
===================================================================
--- debian/README.cross (revision 963)
+++ debian/README.cross (working copy)
@@ -100,11 +100,18 @@
debian/target file. If both GCC_TARGET is defined and debian/target file
exists, GCC_TARGET is used.
-Run debian/rules control. This will change debian/control file, adjusting
-build-depends.
+Run debian/rules control. This will change debian/control file,
+adjusting build-depends. By default, the packages will depend on the
+system -base package. This means future upgrades of the system gcc
+will require you to keep your cross compilers in sync by rebuilding.
+If you want to depend on a separate -base package for your cross
+compiler, specify DEB_CROSS_INDEPENDENT=yes on the command line,
-Build the package using dpkg-buildpackage.
+You can then build with either
+$ GCC_TARGET=[arch] dpkg-buildpackage -rfakeroot
+or
+$ GCC_TARGET=[arch] DEB_CROSS_INDEPENDENT=yes dpkg-buildpackage -rfakeroot
3. Using crosshurd
Index: debian/rules.conf
===================================================================
--- debian/rules.conf (revision 963)
+++ debian/rules.conf (working copy)
@@ -282,6 +282,9 @@
ifdef DEB_CROSS
languages = c c++
addons = libgcc lib64gcc libcxx lib64cxx cdev c++dev
+ ifdef DEB_CROSS_INDEPENDENT
+ addons += gccxbase
+ endif
else
languages = ada c c++ f95 java objc treelang # pascal
addons = gccbase cdev c++dev fastjar fdev fixincl libcxx libg2c \
Reply to: