We may want to change the interface for some of these things later, but this is a fairly minimal patch to open access to the things that we do need to get at. --- debian/rules.conf | 16 ++++++++-------- debian/rules.defs | 15 +++++++++++++-- debian/rules2 | 27 ++++++++++++++++----------- 3 files changed, 37 insertions(+), 21 deletions(-) diff --git a/debian/rules.conf b/debian/rules.conf index 72c6fd8..e46b6a4 100644 --- a/debian/rules.conf +++ b/debian/rules.conf @@ -122,22 +122,22 @@ else endif # libc-dev dependencies -libc_ver := 2.5 +libc_ver ?= 2.5 ifeq ($(DEB_TARGET_ARCH_OS),linux) ifneq (,$(findstring $(DEB_TARGET_ARCH),alpha ia64)) - LIBC_DEP = libc6.1 + LIBC_DEP ?= libc6.1 else - LIBC_DEP = libc6 + LIBC_DEP ?= libc6 endif else ifeq ($(DEB_TARGET_ARCH_OS),hurd) - LIBC_DEP = libc0.3 + LIBC_DEP ?= libc0.3 endif ifeq ($(DEB_TARGET_ARCH_OS),kfreebsd) - LIBC_DEP = libc0.1 + LIBC_DEP ?= libc0.1 endif endif -LIBC_DEV_DEP = $(LIBC_DEP)-dev +LIBC_DEV_DEP ?= $(LIBC_DEP)-dev # this is about Debian archs name, *NOT* GNU target triplet biarch_deb_map := \ @@ -486,8 +486,8 @@ endif control: control-file readme-bugs-file parameters-file copyright-file substvars-file versioned-files ifeq ($(DEB_CROSS),yes) - languages = c c++ objc objpp - addons = libgcc lib64gcc lib32gcc libcxx lib32cxx lib64cxx libn32cxx cdev c++dev libobjc objcdev objppdev gccxbase + languages ?= c c++ objc objpp + addons ?= libgcc lib64gcc lib32gcc libcxx lib32cxx lib64cxx libn32cxx cdev c++dev libobjc objcdev objppdev gccxbase else languages = ada c c++ fortran java objc objpp # pascal addons = gccbase cdev c++dev fdev libgcj libgcjdev gcjdoc libgnat libs \ diff --git a/debian/rules.defs b/debian/rules.defs index d4ec4d8..24377d3 100644 --- a/debian/rules.defs +++ b/debian/rules.defs @@ -696,6 +696,13 @@ ifeq ($(extra_package),yes) with_cxxdev := no endif else + # dynamic libs ------------ + with_shared := yes + with_shared := $(call envfilt, shared, , , $(with_shared)) + + # threads ----------------- + with_threads ?= posix + # libssp ------------------ ifeq ($(with_ssp)-$(with_common_libs),yes-yes) ifneq ($(DEB_CROSS),yes) @@ -729,7 +736,7 @@ else # Shared libgcc -------------------- ifeq ($(with_common_libs),yes) with_libgcc := yes - with_shared_libgcc := yes + with_shared_libgcc := $(with_shared) endif # libgcc-math -------------------- @@ -1019,8 +1026,12 @@ ifeq ($(biarchn32),yes) $(shell CC="gcc -mabi=n32" bash debian/runcheck.sh))) endif +# multiarch +with_multiarch := yes +with_multiarch := $(call envfilt, multiarch, , , $(with_multiarch)) + # GNU locales -force_gnu_locales := yes +force_gnu_locales ?= yes locale_no_cpus := m68k locale_no_systems := knetbsd-gnu ifneq (,$(findstring $(DEB_TARGET_GNU_SYSTEM),$(locale_no_systems))) diff --git a/debian/rules2 b/debian/rules2 index dbd8f72..6592e3a 100644 --- a/debian/rules2 +++ b/debian/rules2 @@ -117,15 +117,19 @@ CONFARGS = -v \ CONFARGS += \ --enable-languages=$(subst $(SPACE),$(COMMA),$(enabled_languages)) \ --prefix=/$(PF) \ - --enable-shared \ - --enable-multiarch \ --with-system-zlib \ +ifeq ($(with_shared),yes) + CONFARGS += --enable-shared +else + CONFARGS += --disable-shared +endif + ifneq ($(PKGSOURCE),gcc-snapshot) CONFARGS += \ --libexecdir=/$(libexecdir) \ --without-included-gettext \ - --enable-threads=posix \ + --enable-threads=$(with_threads) \ --with-gxx-include-dir=/$(cxx_inc_dir) endif @@ -332,6 +336,10 @@ ifneq (,$(findstring s390-linux,$(DEB_TARGET_GNU_TYPE))) endif endif +ifeq ($(with_multiarch),yes) + CONFARGS += --enable-multiarch +endif + ifeq ($(PKGSOURCE),gcc-snapshot) ifeq ($(findstring --disable-werror, $(CONFARGS)),) CONFARGS += --disable-werror @@ -340,19 +348,16 @@ else CONFARGS += --enable-checking=release endif -ifneq ($(DEB_CROSS),yes) - CONFARGS += \ - --build=$(DEB_BUILD_GNU_TYPE) \ - --host=$(DEB_HOST_GNU_TYPE) \ - --target=$(TARGET_ALIAS) -else +ifeq ($(DEB_CROSS),yes) CONFARGS += \ --program-prefix=$(TARGET_ALIAS)- \ - --includedir=/$(PF)/$(DEB_TARGET_GNU_TYPE)/include \ + --includedir=/$(PF)/$(DEB_TARGET_GNU_TYPE)/include +endif + +CONFARGS += \ --build=$(DEB_BUILD_GNU_TYPE) \ --host=$(DEB_HOST_GNU_TYPE) \ --target=$(TARGET_ALIAS) -endif ifeq ($(with_bootstrap),) # no profiledbootstrap on the following architectures -- 1.6.3.3