diff options
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/control.m4 | 8 | ||||
-rw-r--r-- | debian/rules.conf | 40 | ||||
-rw-r--r-- | debian/rules.d/binary-base.mk | 8 | ||||
-rw-r--r-- | debian/rules.d/binary-cpp.mk | 10 | ||||
-rw-r--r-- | debian/rules.d/binary-cxx.mk | 8 | ||||
-rw-r--r-- | debian/rules.d/binary-d.mk | 90 | ||||
-rw-r--r-- | debian/rules.d/binary-gcc.mk | 28 | ||||
-rw-r--r-- | debian/rules.d/binary-go.mk | 16 | ||||
-rw-r--r-- | debian/rules.d/binary-libgcc.mk | 44 | ||||
-rw-r--r-- | debian/rules.d/binary-libstdcxx.mk | 86 | ||||
-rw-r--r-- | debian/rules.d/binary-objc.mk | 8 | ||||
-rw-r--r-- | debian/rules.d/binary-objcxx.mk | 8 | ||||
-rw-r--r-- | debian/rules.defs | 82 | ||||
-rw-r--r-- | debian/rules2 | 24 |
15 files changed, 300 insertions, 161 deletions
diff --git a/debian/changelog b/debian/changelog index f1815f5..4f727d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ gcc-5 (5.1.1-7) UNRELEASED; urgency=medium * Add description for the ada-gnattools-cross patch (YunQiang Su). + * Provide a rtlibs stage to build a subset of target library packages. -- Matthias Klose <doko@debian.org> Tue, 19 May 2015 23:32:50 +0200 diff --git a/debian/control.m4 b/debian/control.m4 index f47affb..09a4133 100644 --- a/debian/control.m4 +++ b/debian/control.m4 @@ -22,7 +22,7 @@ define(`depifenabled', `ifelse(index(enabled_languages, `$1'), -1, `', `$2')') define(`ifenabled', `ifelse(index(enabled_languages, `$1'), -1, `dnl', `$2')') ifdef(`TARGET',`ifdef(`CROSS_ARCH',`',`undefine(`MULTIARCH')')') -define(`CROSS_ARCH',`all') +define(`CROSS_ARCH', ifdef(`CROSS_ARCH', CROSS_ARCH, `all')) define(`libdep', `lib$2$1`'LS`'AQ (ifelse(`$3',`',`>=',`$3') ifelse(`$4',`',`${gcc:Version}',`$4'))') define(`libdevdep', `lib$2$1`'LS`'AQ (ifelse(`$3',`',`=',`$3') ifelse(`$4',`',`${gcc:Version}',`$4'))') define(`libdbgdep', `lib$2$1`'LS`'AQ (ifelse(`$3',`',`>=',`$3') ifelse(`$4',`',`${gcc:Version}',`$4'))') @@ -116,8 +116,8 @@ Description: A SNAPSHOT of the GNU Compiler Collection dnl default base package dependencies define(`BASETARGET', `') -define(`BASEDEP', `gcc`'PV-base (= ${gcc:Version})') -define(`SOFTBASEDEP', `gcc`'PV-base (>= ${gcc:SoftVersion})') +define(`BASEDEP', `gcc`'PV`'TS-base (= ${gcc:Version})') +define(`SOFTBASEDEP', `gcc`'PV`'TS-base (>= ${gcc:SoftVersion})') dnl base, when building libgcc out of the gcj source; needed if new symbols dnl in libgcc are used in libgcj. @@ -133,7 +133,7 @@ define(`SOFTBASEDEP', `gnat`'PV-base (>= ${gnat:SoftVersion})') ifenabled(`gccbase',` -Package: gcc`'PV-base +Package: gcc`'PV`'TS-base Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') ifdef(`MULTIARCH', `Multi-Arch: same ')`'dnl diff --git a/debian/rules.conf b/debian/rules.conf index 8e1613c..e53cb5d 100644 --- a/debian/rules.conf +++ b/debian/rules.conf @@ -649,6 +649,9 @@ ifeq ($(DEB_CROSS),yes) -DTARGET=$(DEB_TARGET_ARCH) \ -DLIBUNWIND_BUILD_DEP="$(LIBUNWIND_BUILD_DEP)" \ -DLIBATOMIC_OPS_BUILD_DEP="$(LIBATOMIC_OPS_BUILD_DEP)" + ifeq ($(DEB_STAGE),rtlibs) + ctrl_flags += -DCROSS_ARCH=$(DEB_TARGET_ARCH) + endif else # add '-DPRI=optional' to ctrl_flags if this is not the default compiler # ctrl_flags += \ @@ -668,7 +671,7 @@ endif control: control-file readme-bugs-file parameters-file symbols-files copyright-file substvars-file versioned-files check-versions # stage1 and stage2 compilers are only C -ifdef DEB_STAGE +ifneq (,$(filter $(DEB_STAGE),stage1 stage2)) languages = c addons = cdev plugindev ifeq ($(multilib),yes) @@ -690,14 +693,33 @@ ifdef DEB_STAGE endif else languages = c c++ fortran objc objpp +ifeq ($(DEB_STAGE),rtlibs) + ifeq (,$(filter libgfortran, $(with_rtlibs))) + languages := $(filter-out fortran, $(languages)) + endif + ifeq (,$(filter libobjc, $(with_rtlibs))) + languages := $(filter-out objc objpp, $(languages)) + endif +endif ifeq ($(with_gccbase),yes) addons += gccbase endif ifeq ($(with_gccxbase),yes) addons += gccxbase endif -addons += cdev c++dev fdev objcdev source objppdev multilib -addons += plugindev +ifneq ($(DEB_STAGE),rtlibs) + addons += cdev c++dev source multilib + ifneq (,$(filter fortran, $(languages))) + addons += fdev + endif + ifneq (,$(filter objc, $(languages))) + addons += objcdev + endif + ifneq (,$(filter objpp, $(languages))) + addons += objppdev + endif + addons += plugindev +endif addons += $(if $(findstring armel,$(biarchhfarchs)),armml) addons += $(if $(findstring armhf,$(biarchsfarchs)),armml) addons += $(if $(findstring amd64,$(biarchx32archs)),x32dev) @@ -819,25 +841,27 @@ ifeq ($(with_go),yes) addons += $(if $(findstring amd64,$(biarchx32archs)),libx32ggo) endif endif - +ifeq ($(with_ada),yes) languages += ada - addons += libgnat libs source # libgmath libnof lib64gnat ssp + addons += libgnat libs # libgmath libnof lib64gnat ssp ifeq ($(with_gnatsjlj),yes) addons += adasjlj endif - +endif +ifeq ($(with_java),yes) languages += java addons += gcj ifneq ($(DEB_CROSS),yes) addons += libgcj libgcjdev gcjdoc gcjsrc endif +endif ifneq ($(DEB_CROSS),yes) ifneq (,$(neon_archs)) addons += libneongcc libneongomp libneonitm libneonobjc libneongfortran libneoncxx endif ifeq ($(with_fixincl),yes) - addons += fixincl + addons += $(if $(DEB_STAGE),,fixincl) endif ifeq ($(with_libgcj_doc),yes) addons += gcjdoc @@ -1297,6 +1321,7 @@ parameters-file: symbols-files: ifeq ($(DEB_CROSS),yes) + ifneq ($(DEB_STAGE),rtlibs) for f in debian/*.symbols; do \ [ -f "$$f" ] || continue; \ [ -L "$$f" ] && continue; \ @@ -1309,6 +1334,7 @@ ifeq ($(DEB_CROSS),yes) b=$$(basename $$f .symbols.$(DEB_TARGET_ARCH)); \ ln -sf $$f debian/$$b$(LS).symbols; \ done + endif endif versioned-files: diff --git a/debian/rules.d/binary-base.mk b/debian/rules.d/binary-base.mk index 8e4664e..8842834 100644 --- a/debian/rules.d/binary-base.mk +++ b/debian/rules.d/binary-base.mk @@ -18,19 +18,21 @@ $(binary_stamp)-base: $(install_dependencies) dh_installdirs -p$(p_base) \ $(gcc_lexec_dir) +ifneq ($(DEB_STAGE),rtlibs) ln -sf $(BASE_VERSION) \ $(d_base)/$(subst /$(BASE_VERSION),/$(GCC_VERSION),$(gcc_lib_dir)) for link in $(additional_links); do \ ln -sf $(BASE_VERSION) \ $(d_base)/$$(dirname $(gcc_lib_dir))/$$link; \ done -ifneq ($(gcc_lib_dir),$(gcc_lexec_dir)) + ifneq ($(gcc_lib_dir),$(gcc_lexec_dir)) ln -sf $(BASE_VERSION) \ $(d_base)/$(subst /$(BASE_VERSION),/$(GCC_VERSION),$(gcc_lexec_dir)) for link in $(additional_links); do \ ln -sf $(BASE_VERSION) \ $(d_base)/$$(dirname $(gcc_lexec_dir))/$$link; \ done + endif endif ifeq ($(with_base_only),yes) @@ -42,7 +44,11 @@ endif dh_installchangelogs -p$(p_base) dh_compress -p$(p_base) dh_fixperms -p$(p_base) +ifeq ($(DEB_STAGE)-$(DEB_CROSS),rtlibs-yes) + $(cross_gencontrol) dh_gencontrol -p$(p_base) -- -v$(DEB_VERSION) $(common_substvars) +else dh_gencontrol -p$(p_base) -- -v$(DEB_VERSION) $(common_substvars) +endif dh_installdeb -p$(p_base) dh_md5sums -p$(p_base) dh_builddeb -p$(p_base) diff --git a/debian/rules.d/binary-cpp.mk b/debian/rules.d/binary-cpp.mk index 7a600b8..d20b482 100644 --- a/debian/rules.d/binary-cpp.mk +++ b/debian/rules.d/binary-cpp.mk @@ -1,7 +1,9 @@ -arch_binaries := $(arch_binaries) cpp -ifneq ($(DEB_CROSS),yes) - ifneq ($(GFDL_INVARIANT_FREE),yes) - indep_binaries := $(indep_binaries) cpp-doc +ifneq ($(DEB_STAGE),rtlibs) + arch_binaries := $(arch_binaries) cpp + ifneq ($(DEB_CROSS),yes) + ifneq ($(GFDL_INVARIANT_FREE),yes) + indep_binaries := $(indep_binaries) cpp-doc + endif endif endif diff --git a/debian/rules.d/binary-cxx.mk b/debian/rules.d/binary-cxx.mk index dcb7803..8a2136b 100644 --- a/debian/rules.d/binary-cxx.mk +++ b/debian/rules.d/binary-cxx.mk @@ -1,7 +1,9 @@ -ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchx32) $(biarchhf) $(biarchsf))) - arch_binaries := $(arch_binaries) cxx-multi +ifneq ($(DEB_STAGE),rtlibs) + ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchx32) $(biarchhf) $(biarchsf))) + arch_binaries := $(arch_binaries) cxx-multi + endif + arch_binaries := $(arch_binaries) cxx endif -arch_binaries := $(arch_binaries) cxx dirs_cxx = \ $(docdir)/$(p_xbase)/C++ \ diff --git a/debian/rules.d/binary-d.mk b/debian/rules.d/binary-d.mk index 855ebcf..ffa943f 100644 --- a/debian/rules.d/binary-d.mk +++ b/debian/rules.d/binary-d.mk @@ -1,50 +1,52 @@ -ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchx32) $(biarchsf))) - arch_binaries := $(arch_binaries) gdc-multi -endif -arch_binaries := $(arch_binaries) gdc +ifneq ($(DEB_STAGE),rtlibs) + ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchx32) $(biarchsf))) + arch_binaries := $(arch_binaries) gdc-multi + endif + arch_binaries := $(arch_binaries) gdc -ifeq ($(with_libphobos),yes) - arch_binaries += libphobos-dev -endif + ifeq ($(with_libphobos),yes) + arch_binaries += libphobos-dev + endif -ifeq ($(with_lib64phobosdev),yes) - $(lib_binaries) += lib64phobos-dev -endif -ifeq ($(with_lib32phobosdev),yes) - $(lib_binaries) += lib32phobos-dev -endif -ifeq ($(with_libn32phobosdev),yes) - $(lib_binaries) += libn32phobos-dev -endif -ifeq ($(with_libx32phobosdev),yes) - $(lib_binaries) += libx32phobos-dev -endif -ifeq ($(with_libhfphobosdev),yes) - $(lib_binaries) += libhfphobos-dev -endif -ifeq ($(with_libsfphobosdev),yes) - $(lib_binaries) += libsfphobos-dev -endif + ifeq ($(with_lib64phobosdev),yes) + $(lib_binaries) += lib64phobos-dev + endif + ifeq ($(with_lib32phobosdev),yes) + $(lib_binaries) += lib32phobos-dev + endif + ifeq ($(with_libn32phobosdev),yes) + $(lib_binaries) += libn32phobos-dev + endif + ifeq ($(with_libx32phobosdev),yes) + $(lib_binaries) += libx32phobos-dev + endif + ifeq ($(with_libhfphobosdev),yes) + $(lib_binaries) += libhfphobos-dev + endif + ifeq ($(with_libsfphobosdev),yes) + $(lib_binaries) += libsfphobos-dev + endif -ifeq (0,1) -ifeq ($(with_lib64phobos),yes) - $(lib_binaries) += lib64phobos -endif -ifeq ($(with_lib32phobos),yes) - $(lib_binaries) += lib32phobos -endif -ifeq ($(with_libn32phobos),yes) - $(lib_binaries) += libn32phobos -endif -ifeq ($(with_libx32phobos),yes) - $(lib_binaries) += libx32phobos -endif -ifeq ($(with_libhfphobos),yes) - $(lib_binaries) += libhfphobos -endif -ifeq ($(with_libsfphobos),yes) - $(lib_binaries) += libsfphobos -endif + ifeq (0,1) + ifeq ($(with_lib64phobos),yes) + $(lib_binaries) += lib64phobos + endif + ifeq ($(with_lib32phobos),yes) + $(lib_binaries) += lib32phobos + endif + ifeq ($(with_libn32phobos),yes) + $(lib_binaries) += libn32phobos + endif + ifeq ($(with_libx32phobos),yes) + $(lib_binaries) += libx32phobos + endif + ifeq ($(with_libhfphobos),yes) + $(lib_binaries) += libhfphobos + endif + ifeq ($(with_libsfphobos),yes) + $(lib_binaries) += libsfphobos + endif + endif endif p_gdc = gdc$(pkg_ver)$(cross_bin_arch) diff --git a/debian/rules.d/binary-gcc.mk b/debian/rules.d/binary-gcc.mk index 6194456..f09467d 100644 --- a/debian/rules.d/binary-gcc.mk +++ b/debian/rules.d/binary-gcc.mk @@ -1,18 +1,20 @@ -ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchx32) $(biarchhf) $(biarchsf))) - arch_binaries := $(arch_binaries) gcc-multi -endif -ifeq ($(with_plugins),yes) - arch_binaries := $(arch_binaries) gcc-plugindev -endif +ifneq ($(DEB_STAGE),rtlibs) + ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchx32) $(biarchhf) $(biarchsf))) + arch_binaries := $(arch_binaries) gcc-multi + endif + ifeq ($(with_plugins),yes) + arch_binaries := $(arch_binaries) gcc-plugindev + endif -arch_binaries := $(arch_binaries) gcc + arch_binaries := $(arch_binaries) gcc -ifneq ($(DEB_CROSS),yes) - ifneq ($(GFDL_INVARIANT_FREE),yes) - indep_binaries := $(indep_binaries) gcc-doc - endif - ifeq ($(with_nls),yes) - indep_binaries := $(indep_binaries) gcc-locales + ifneq ($(DEB_CROSS),yes) + ifneq ($(GFDL_INVARIANT_FREE),yes) + indep_binaries := $(indep_binaries) gcc-doc + endif + ifeq ($(with_nls),yes) + indep_binaries := $(indep_binaries) gcc-locales + endif endif endif diff --git a/debian/rules.d/binary-go.mk b/debian/rules.d/binary-go.mk index a9542f7..b62e48a 100644 --- a/debian/rules.d/binary-go.mk +++ b/debian/rules.d/binary-go.mk @@ -14,13 +14,15 @@ ifeq ($(with_libx32go),yes) $(lib_binaries) += libx32go endif -arch_binaries := $(arch_binaries) gccgo -ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchx32))) - arch_binaries := $(arch_binaries) gccgo-multi -endif -ifneq ($(DEB_CROSS),yes) - ifneq ($(GFDL_INVARIANT_FREE),yes) - indep_binaries := $(indep_binaries) go-doc +ifneq ($(DEB_STAGE),rtlibs) + arch_binaries := $(arch_binaries) gccgo + ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchx32))) + arch_binaries := $(arch_binaries) gccgo-multi + endif + ifneq ($(DEB_CROSS),yes) + ifneq ($(GFDL_INVARIANT_FREE),yes) + indep_binaries := $(indep_binaries) go-doc + endif endif endif diff --git a/debian/rules.d/binary-libgcc.mk b/debian/rules.d/binary-libgcc.mk index e264606..e353c85 100644 --- a/debian/rules.d/binary-libgcc.mk +++ b/debian/rules.d/binary-libgcc.mk @@ -1,45 +1,47 @@ ifeq ($(with_libgcc),yes) $(lib_binaries) += libgcc endif -ifeq ($(with_cdev),yes) - $(lib_binaries) += libgcc-dev -endif - ifeq ($(with_lib64gcc),yes) $(lib_binaries) += lib64gcc endif -ifeq ($(with_lib64gccdev),yes) - $(lib_binaries) += lib64gcc-dev -endif ifeq ($(with_lib32gcc),yes) $(lib_binaries) += lib32gcc endif -ifeq ($(with_lib32gccdev),yes) - $(lib_binaries) += lib32gcc-dev -endif ifeq ($(with_libn32gcc),yes) $(lib_binaries) += libn32gcc endif -ifeq ($(with_libn32gccdev),yes) - $(lib_binaries) += libn32gcc-dev -endif ifeq ($(with_libx32gcc),yes) $(lib_binaries) += libx32gcc endif -ifeq ($(with_libx32gccdev),yes) - $(lib_binaries) += libx32gcc-dev -endif ifeq ($(with_libhfgcc),yes) $(lib_binaries) += libhfgcc endif -ifeq ($(with_libhfgccdev),yes) - $(lib_binaries) += libhfgcc-dev -endif ifeq ($(with_libsfgcc),yes) $(lib_binaries) += libsfgcc endif -ifeq ($(with_libsfgccdev),yes) - $(lib_binaries) += libsfgcc-dev + +ifneq ($(DEB_STAGE),rtlibs) + ifeq ($(with_cdev),yes) + $(lib_binaries) += libgcc-dev + endif + ifeq ($(with_lib64gccdev),yes) + $(lib_binaries) += lib64gcc-dev + endif + ifeq ($(with_lib32gccdev),yes) + $(lib_binaries) += lib32gcc-dev + endif + ifeq ($(with_libn32gccdev),yes) + $(lib_binaries) += libn32gcc-dev + endif + ifeq ($(with_libx32gccdev),yes) + $(lib_binaries) += libx32gcc-dev + endif + ifeq ($(with_libhfgccdev),yes) + $(lib_binaries) += libhfgcc-dev + endif + ifeq ($(with_libsfgccdev),yes) + $(lib_binaries) += libsfgcc-dev + endif endif header_files = \ diff --git a/debian/rules.d/binary-libstdcxx.mk b/debian/rules.d/binary-libstdcxx.mk index 29f21d5..b9ea030 100644 --- a/debian/rules.d/binary-libstdcxx.mk +++ b/debian/rules.d/binary-libstdcxx.mk @@ -1,66 +1,68 @@ - ifeq ($(with_libcxx),yes) $(lib_binaries) += libstdcxx endif ifeq ($(with_lib64cxx),yes) $(lib_binaries) += lib64stdcxx endif -ifeq ($(with_lib64cxxdev),yes) - $(lib_binaries) += lib64stdcxx-dev -endif -ifeq ($(with_lib64cxxdbg),yes) - $(lib_binaries) += lib64stdcxxdbg -endif ifeq ($(with_lib32cxx),yes) $(lib_binaries) += lib32stdcxx endif -ifeq ($(with_lib32cxxdev),yes) - $(lib_binaries) += lib32stdcxx-dev -endif -ifeq ($(with_lib32cxxdbg),yes) - $(lib_binaries) += lib32stdcxxdbg -endif ifeq ($(with_libn32cxx),yes) $(lib_binaries) += libn32stdcxx endif -ifeq ($(with_libn32cxxdev),yes) - $(lib_binaries) += libn32stdcxx-dev -endif -ifeq ($(with_libn32cxxdbg),yes) - $(lib_binaries) += libn32stdcxxdbg -endif ifeq ($(with_libx32cxx),yes) $(lib_binaries) += libx32stdcxx endif -ifeq ($(with_libx32cxxdev),yes) - $(lib_binaries) += libx32stdcxx-dev -endif -ifeq ($(with_libx32cxxdbg),yes) - $(lib_binaries) += libx32stdcxxdbg -endif ifeq ($(with_libhfcxx),yes) $(lib_binaries) += libhfstdcxx endif -ifeq ($(with_libhfcxxdev),yes) - $(lib_binaries) += libhfstdcxx-dev -endif -ifeq ($(with_libhfcxxdbg),yes) - $(lib_binaries) += libhfstdcxxdbg -endif ifeq ($(with_libsfcxx),yes) $(lib_binaries) += libsfstdcxx endif -ifeq ($(with_libsfcxxdev),yes) - $(lib_binaries) += libsfstdcxx-dev -endif -ifeq ($(with_libsfcxxdbg),yes) - $(lib_binaries) += libsfstdcxxdbg -endif -ifeq ($(with_cxxdev),yes) - $(lib_binaries) += libstdcxx-dev - ifneq ($(DEB_CROSS),yes) - indep_binaries := $(indep_binaries) libstdcxx-doc +ifneq ($(DEB_STAGE),rtlibs) + ifeq ($(with_lib64cxxdev),yes) + $(lib_binaries) += lib64stdcxx-dev + endif + ifeq ($(with_lib64cxxdbg),yes) + $(lib_binaries) += lib64stdcxxdbg + endif + ifeq ($(with_lib32cxxdev),yes) + $(lib_binaries) += lib32stdcxx-dev + endif + ifeq ($(with_lib32cxxdbg),yes) + $(lib_binaries) += lib32stdcxxdbg + endif + ifeq ($(with_libn32cxxdev),yes) + $(lib_binaries) += libn32stdcxx-dev + endif + ifeq ($(with_libn32cxxdbg),yes) + $(lib_binaries) += libn32stdcxxdbg + endif + ifeq ($(with_libx32cxxdev),yes) + $(lib_binaries) += libx32stdcxx-dev + endif + ifeq ($(with_libx32cxxdbg),yes) + $(lib_binaries) += libx32stdcxxdbg + endif + ifeq ($(with_libhfcxxdev),yes) + $(lib_binaries) += libhfstdcxx-dev + endif + ifeq ($(with_libhfcxxdbg),yes) + $(lib_binaries) += libhfstdcxxdbg + endif + ifeq ($(with_libsfcxxdev),yes) + $(lib_binaries) += libsfstdcxx-dev + endif + ifeq ($(with_libsfcxxdbg),yes) + $(lib_binaries) += libsfstdcxxdbg + endif + + ifeq ($(with_cxxdev),yes) + $(lib_binaries) += libstdcxx-dev + ifneq ($(DEB_CROSS),yes) + indep_binaries := $(indep_binaries) libstdcxx-doc + endif endif endif @@ -200,7 +202,7 @@ define __do_libstdcxx debian/dh_doclink -p$(p_l) $(p_base) debian/dh_rmemptydirs -p$(p_l) - dh_strip -p$(p_l) --dbg-package=$(1)-$(BASE_VERSION)-dbg$(cross_lib_arch) + dh_strip -p$(p_l) $(if $(filter rtlibs,$(DEB_STAGE)),,--dbg-package=$(1)-$(BASE_VERSION)-dbg$(cross_lib_arch)) dh_compress -p$(p_l) dh_fixperms -p$(p_l) diff --git a/debian/rules.d/binary-objc.mk b/debian/rules.d/binary-objc.mk index d803358..7b4d891 100644 --- a/debian/rules.d/binary-objc.mk +++ b/debian/rules.d/binary-objc.mk @@ -1,7 +1,9 @@ -ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchx32) $(biarchhf) $(biarchsf))) - arch_binaries := $(arch_binaries) objc-multi +ifneq ($(DEB_STAGE),rtlibs) + ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchx32) $(biarchhf) $(biarchsf))) + arch_binaries := $(arch_binaries) objc-multi + endif + arch_binaries := $(arch_binaries) objc endif -arch_binaries := $(arch_binaries) objc p_objc = gobjc$(pkg_ver)$(cross_bin_arch) d_objc = debian/$(p_objc) diff --git a/debian/rules.d/binary-objcxx.mk b/debian/rules.d/binary-objcxx.mk index f27d183..1c3ad27 100644 --- a/debian/rules.d/binary-objcxx.mk +++ b/debian/rules.d/binary-objcxx.mk @@ -1,7 +1,9 @@ -ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchx32) $(biarchhf) $(biarchsf))) - arch_binaries := $(arch_binaries) objcxx-multi +ifneq ($(DEB_STAGE),rtlibs) + ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchx32) $(biarchhf) $(biarchsf))) + arch_binaries := $(arch_binaries) objcxx-multi + endif + arch_binaries := $(arch_binaries) objcxx endif -arch_binaries := $(arch_binaries) objcxx p_objcx = gobjc++$(pkg_ver)$(cross_bin_arch) d_objcx = debian/$(p_objcx) diff --git a/debian/rules.defs b/debian/rules.defs index 81ab4a4..d7eedf2 100644 --- a/debian/rules.defs +++ b/debian/rules.defs @@ -268,6 +268,7 @@ ifneq ($(findstring nostrap, $(DEB_BUILD_OPTIONS)),) with_bootstrap := off endif +DEB_STAGE=rtlibs # ------------------------------------------------------------------- # stage options ifdef DEB_STAGE @@ -275,6 +276,7 @@ ifdef DEB_STAGE separate_lang := yes # "stage1" is minimal compiler with static libgcc # "stage2" is minimal compiler with shared libgcc + # "rtlibs" is a subset of target libraries, without compilers ifeq ($(DEB_STAGE),stage1) with_shared_libgcc := no endif @@ -282,6 +284,13 @@ ifdef DEB_STAGE with_libgcc := yes with_shared_libgcc := yes endif + ifeq ($(DEB_STAGE),rtlibs) + with_rtlibs := libgcc libgomp libstdc++ libgfortran libquadmath + ifeq ($(DEB_CROSS),yes) + LS := + cross_lib_arch := + endif + endif endif ifeq ($(BACKPORT),true) @@ -450,7 +459,10 @@ multilib_multiarch_map = \ mlib_to_march = $(patsubst $(DEB_TARGET_ARCH)/$(1)=%,%, \ $(filter $(DEB_TARGET_ARCH)/$(1)=%,$(multilib_multiarch_map))) -ifneq ($(DEB_STAGE),stage1) +ifeq ($(DEB_STAGE),rtlibs) + with_gccbase := yes + with_gccxbase := +else ifneq ($(DEB_STAGE),stage1) # build a -base package. ifneq ($(DEB_CROSS),yes) with_gccbase := yes @@ -460,7 +472,9 @@ ifneq ($(DEB_STAGE),stage1) endif # build dev packages. -with_dev := yes +ifneq ($(DEB_STAGE),rtlibs) + with_dev := yes +endif with_cpp := yes @@ -510,7 +524,9 @@ jit_no_cpus := none ifneq (,$(filter $(DEB_TARGET_ARCH_CPU),$(jit_no_cpus))) with_jit := disabled for cpu $(DEB_TARGET_ARCH_CPU) endif - +ifneq (,$(with_rtlibs)) + with_jit := disabled for rtlibs stage +endif with_jit := $(call envfilt, jit, , , $(with_jit)) ifeq (,$(findstring gcc-,$(PKGSOURCE))) @@ -528,6 +544,9 @@ ifeq ($(with_cc1),yes) with_libcc1 := yes endif endif +ifneq (,$(with_rtlibs)) + with_libcc1 := disabled for rtlibs stage +endif # Build all packages needed for C development ifneq ($(with_base_only),yes) @@ -536,7 +555,7 @@ ifneq ($(with_base_only),yes) endif endif -ifndef DEB_STAGE +ifeq (,$(filter $(DEB_STAGE),stage1 stage2)) # Ada -------------------- ada_no_cpus := m32r sh3 sh3eb sh4 sh4eb # no Debian builds ... some of these should exist @@ -586,6 +605,11 @@ ifneq (,$(filter $(distrelease),lucid)) endif with_ada := $(call envfilt, ada, , , $(with_ada)) + +ifeq ($(DEB_STAGE)-$(filter libgnat, $(with_rtlibs)),rtlibs-) + with_ada := disabled for rtlibs stage +endif + #ifneq ($(single_package),yes) # with_separate_gnat := yes #endif @@ -710,6 +734,10 @@ ifeq ($(java_no_cross)-$(DEB_CROSS),yes-yes) endif with_java := $(call envfilt, java, , c++, $(with_java)) +ifeq ($(DEB_STAGE)-$(filter libgcj, $(with_rtlibs)),rtlibs-) + with_java := disabled for rtlibs stage +endif + ifneq (,$(findstring gccgo, $(PKGSOURCE))) with_java := endif @@ -819,6 +847,9 @@ endif ifeq ($(go_no_cross)-$(DEB_CROSS),yes-yes) with_go := disabled for cross compiler package endif +ifeq ($(DEB_STAGE)-$(filter libgo, $(with_rtlibs)),rtlibs-) + with_go := disabled for rtlibs stage +endif with_go := $(call envfilt, go, , , $(with_go)) # Build all packages needed for Go development @@ -864,6 +895,9 @@ endif ifeq ($(d_no_snap)-$(single_package),yes-yes) with_d := disabled for snapshot build endif +ifeq ($(DEB_STAGE)-$(filter libphobos, $(with_rtlibs)),rtlibs-) + with_d := disabled for rtlibs stage +endif with_d := $(call envfilt, d, , , $(with_d)) ifeq ($(with_base_only),yes) @@ -915,12 +949,18 @@ endif ifeq ($(fortran_no_cross)-$(DEB_CROSS),yes-yes) with_fortran := disabled for cross compiler package endif +ifeq ($(DEB_STAGE)-$(filter libgfortran libquadmath, $(with_rtlibs)),rtlibs-) + with_fortran := disabled for rtlibs stage +endif + with_fortran := $(call envfilt, fortran, , , $(with_fortran)) # Build all packages needed for Fortran development ifeq ($(with_fortran),yes) ifeq ($(with_dev),yes) - with_fdev := yes + ifneq ($(DEB_STAGE)-$(filter libgfortran libquadmath, $(with_rtlibs)),rtlibs-) + with_fdev := yes + endif endif ifeq ($(with_common_libs),yes) with_libgfortran := yes @@ -957,6 +997,9 @@ endif ifeq ($(objc_no_cross)-$(DEB_CROSS),yes-yes) with_objc := disabled for cross compiler package endif +ifeq ($(DEB_STAGE)-$(filter libobjc, $(with_rtlibs)),rtlibs-) + with_objc := disabled for rtlibs stage +endif with_objc := $(call envfilt, objc, obj-c++, , $(with_objc)) ifeq ($(with_objc),yes) @@ -1021,7 +1064,9 @@ with_nls := $(call envfilt, nls, , , $(with_nls)) with_libnof := no ifneq (,$(findstring gcc-5,$(PKGSOURCE))) - with_source := yes + ifeq (,$(with_rtlibs)) + with_source := yes + endif endif with_source := $(call envfilt, source, , , $(with_source)) @@ -1149,8 +1194,11 @@ endif # plugins -------------------- with_plugins := yes +ifneq (,$(with_rtlibs)) + with_plugins := disabled for rtlibs stage +endif -endif # ifndef DEB_STAGE +endif # ifeq (,$(filter $(DEB_STAGE),stage1 stage2)) # Don't include docs with GFDL invariant sections GFDL_INVARIANT_FREE := yes @@ -1307,6 +1355,17 @@ else endif with_hppa64 := $(call envfilt, hppa64, , , $(with_hppa64)) + ifeq ($(DEB_STAGE),rtlibs) + with_libatomic := disabled for rtlibs stage + with_libasan := disabled for rtlibs stage + with_liblsan := disabled for rtlibs stage + with_libtsan := disabled for rtlibs stage + with_libubsan := disabled for rtlibs stage + with_libcilkrts := disabled for rtlibs stage + with_fixincl := disabled for rtlibs stage + with_hppa64 := disabled for rtlibs stage + endif + # neon build ------------------- # FIXME: build as a cross compiler to build on armv4 as well ifneq (,$(findstring gcc-5, $(PKGSOURCE))) @@ -1332,6 +1391,9 @@ endif ifneq (,$(findstring cross-build-,$(build_type))) with_check := disabled for cross building the compiler endif +ifneq (,$(with_rtlibs)) + with_check := disabled for rtlibs stage +endif check_no_cpus := m68k check_no_systems := # gnu kfreebsd-gnu ifneq (,$(filter $(DEB_TARGET_ARCH_CPU),$(check_no_cpus))) @@ -1874,6 +1936,12 @@ else endif endif endif +ifeq ($(DEB_STAGE),rtlibs) + define cross_mangle_shlibs + endef + define cross_mangle_substvars + endef +endif # takes a *list* of package names as $1, the multilib dirname as $2 _shlibdirs = \ diff --git a/debian/rules2 b/debian/rules2 index 9b9e0dd..152f34f 100644 --- a/debian/rules2 +++ b/debian/rules2 @@ -161,7 +161,7 @@ ifeq ($(versioned_packages),yes) CONFARGS += --program-suffix=-$(BASE_VERSION) endif -ifdef DEB_STAGE +ifneq (,$(filter $(DEB_STAGE),stage1 stage2)) CONFARGS += \ --disable-decimal-float \ --disable-libatomic \ @@ -867,6 +867,13 @@ else usr_libsf = $(PFL)/lib/arm-linux-gnueabi endif +ifeq ($(DEB_STAGE)-$(DEB_CROSS),rtlibs-yes) + PFL = $(PF) + RPF = + libdir = lib/$(DEB_TARGET_MULTIARCH) + usr_lib = $(PF)/lib/$(DEB_TARGET_MULTIARCH) +endif + gcc_lib_dir32 = $(gcc_lib_dir)/$(biarch32subdir) gcc_lib_dirn32 = $(gcc_lib_dir)/$(biarchn32subdir) gcc_lib_dirx32 = $(gcc_lib_dir)/$(biarchx32subdir) @@ -2150,11 +2157,24 @@ endif mandir=/$(PF)/share/man \ install -ifneq ($(configured_libdir),$(libdir)) +ifeq ($(DEB_STAGE)-$(DEB_CROSS),rtlibs-yes) + @echo configured_libdir=$(configured_libdir) / libdir=$(libdir) / usr_lib=$(usr_lib) + ls $(d)/$(PF)/$(TARGET_ALIAS)/lib + set -x; \ + if [ -d $(d)/$(PF)/$(TARGET_ALIAS)/lib ]; then \ + cp -a $(d)/$(PF)/$(TARGET_ALIAS)/lib/* $(d)/$(PF)/lib/$(DEB_TARGET_MULTIARCH)/.; \ + fi + for d in $$(cd $(d)/$(PF)/$(TARGET_ALIAS); echo lib?*); do \ + [ -d $(d)/$(PF)/$(TARGET_ALIAS)/$$d ] || continue; \ + cp -a $(d)/$(PF)/$(TARGET_ALIAS)/$$d/* $(d)/$(PF)/$$d/.; \ + done +else + ifneq ($(configured_libdir),$(libdir)) for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.o' '*.py' '*.spec'; do \ mv $(d)/$(PF)/$(configured_libdir)/$$i \ $(d)/$(PF)/$(libdir)/. || true; \ done + endif endif ifeq ($(with_libcxxdbg),yes) |