diff --git a/debian/arch/alpha/defines b/debian/arch/alpha/defines index 31a79e033..908021d60 100644 --- a/debian/arch/alpha/defines +++ b/debian/arch/alpha/defines @@ -1,4 +1,5 @@ [base] +compiler: gcc-3.3 flavours: alpha-generic alpha-smp suggests: aboot, fdutils diff --git a/debian/arch/arm/defines b/debian/arch/arm/defines index 02432cefb..75b1a06d5 100644 --- a/debian/arch/arm/defines +++ b/debian/arch/arm/defines @@ -1,4 +1,5 @@ [base] +compiler: gcc-3.3 flavours: footbridge ixp4xx diff --git a/debian/arch/m68k/defines b/debian/arch/m68k/defines index a897f7cb8..38b4ad199 100644 --- a/debian/arch/m68k/defines +++ b/debian/arch/m68k/defines @@ -1,4 +1,5 @@ [base] +compiler: gcc-3.3 flavours: amiga atari diff --git a/debian/arch/sparc/defines b/debian/arch/sparc/defines index 4345251cc..222d1d44f 100644 --- a/debian/arch/sparc/defines +++ b/debian/arch/sparc/defines @@ -1,4 +1,5 @@ [base] +compiler: gcc-3.3 flavours: sparc64 sparc64-smp kpkg-subarch: sparc64 suggests: silo, fdutils diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index e0a1bb5bd..2565fdd9b 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -320,8 +320,9 @@ def process_real_flavour(packages, makefile, config, arch, subarch, flavour, var makefile.append(("%s-%s-%s-%s:: %s-%s-%s-%s-real" % (i, arch, subarch, flavour, i, arch, subarch, flavour), None)) makeflags['FLAVOUR'] = flavour - if config_entry.has_key('kpkg-subarch'): - makeflags['KPKG_SUBARCH'] = config_entry['kpkg-subarch'] + for i in (('compiler', 'COMPILER'), ('kpkg-subarch', 'KPKG_SUBARCH')): + if config_entry.has_key(i[0]): + makeflags[i[1]] = config_entry[i[0]] makeflags_string = ' '.join(["%s='%s'" % i for i in makeflags.iteritems()]) cmds_binary_arch = [] @@ -413,8 +414,9 @@ def process_real_subarch(packages, makefile, config, arch, subarch, vars, makefl makefile.append(("%s-%s-%s:: %s-%s-%s-real" % (i, arch, subarch, i, arch, subarch), None)) makeflags['SUBARCH'] = subarch - if config_entry.has_key('kpkg-subarch'): - makeflags['KPKG_SUBARCH'] = config_entry['kpkg-subarch'] + for i in (('compiler', 'COMPILER'), ('kpkg-subarch', 'KPKG_SUBARCH')): + if config_entry.has_key(i[0]): + makeflags[i[1]] = config_entry[i[0]] makeflags_string = ' '.join(["%s='%s'" % i for i in makeflags.iteritems()]) cmds_binary_arch = [] diff --git a/debian/lib/python/debian_linux.py b/debian/lib/python/debian_linux.py index d522f8051..7c62ac32e 100644 --- a/debian/lib/python/debian_linux.py +++ b/debian/lib/python/debian_linux.py @@ -27,6 +27,7 @@ class config(dict): 'arches': schema_item_list, 'available': schema_item_boolean, 'class': schema_item_string, + 'compiler': schema_item_string, 'depends': schema_item_string, 'desc': schema_item_string, 'flavours': schema_item_list, diff --git a/debian/rules.real b/debian/rules.real index d01a65d8e..a4f67921a 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -16,10 +16,8 @@ DEB_BUILD_ARCH := $(shell dpkg-architecture -a$(ARCH) -qDEB_BUILD_ARCH) # ifeq ($(SUBARCH),none) basedir := debian/arch/$(ARCH) - append := else basedir := debian/arch/$(ARCH)/$(SUBARCH) - append := $(SUBARCH)- endif configs := $(notdir $(wildcard $(basedir)/config.*)) @@ -40,7 +38,7 @@ include debian/rules.defs # replaced by the flavour for which the command is run. # kpkg_header := HEADER_CLEAN_HOOK='$(CURDIR)/$(BUILD_DIR)/header-install-$(ARCH)-$(SUBARCH)' -kpkg_header += make-kpkg --append-to-version "$(append)$(KPKG_ABINAME)" +kpkg_header += make-kpkg --append-to-version "$(KPKG_ABINAME)" kpkg_header += --arch $(ARCH) kpkg_header += --stem linux kpkg_header += --config defconfig @@ -57,11 +55,11 @@ ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) endif setup_env := env -u ABINAME -u ARCH -u SUBARCH -u FLAVOUR -u VERSION setup_env += DEBIAN_ABINAME=$(ABINAME) DEBIAN_FLAVOUR=$(FLAVOUR) DEBIAN_VERSION=$(VERSION) -ifdef build_makeflags - setup_env += MAKEFLAGS=$(build_makeflags) -else - setup_env += MAKEFLAGS= +setup_makeflags = +ifdef COMPILER + setup_makeflags += CC=$(COMPILER) endif +setup_env += MAKEFLAGS="$(setup_makeflags)" ifndef headers_dirs headers_dirs = $(DEB_HOST_ARCH) endif @@ -82,11 +80,7 @@ setup-subarch: $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH) setup-flavour: $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(BUILD_DIR)/header-install-$(ARCH)-$(SUBARCH): $(TEMPLATES_DIR)/header-install.in - sed -e 's,@kbpkg@,$(kbpkg),g' \ - -e 's,@ksource_dir@,$(CURDIR)/$(kdir),g' \ - -e 's,@flavours@,$(flavours),g' \ - -e 's,@headers_dirs@,$(headers_dirs),g' \ - $< > $@ + sed -e 's,@headers_dirs@,$(headers_dirs),g' $< > $@ chmod u+x $@ # # The way to make the correct package names is to make a @@ -99,7 +93,6 @@ else endif $(BUILD_DIR)/post-install-$(ARCH)-$(SUBARCH): $(TEMPLATES_DIR)/post-install.in sed -e 's,@initrd_modules@,$(initrd_modules),' \ - -e 's,@append_subarch@,$(append),' \ -e 's,@extra_postinstall_command@,$(extra_command),' \ -e 's,@headers_dirs@,$(headers_dirs),g' \ $< > $@ diff --git a/debian/templates/header-install.in b/debian/templates/header-install.in index 8bb78a85c..3e3830b3b 100644 --- a/debian/templates/header-install.in +++ b/debian/templates/header-install.in @@ -11,10 +11,6 @@ set -e # archs do some *very* strange things... rm -rf scripts -# Let's add the flavours that are built for a given arch. -# XXX: will probably need rethinking once the common headers are Arch: all. -echo @flavours@ >flavours - # XXX: once we're using a linux-headers-$(version)-$(debnum) that's Arch: all, # we'll want to drop this bit of code. The asm-* directories should remain. diff --git a/debian/templates/post-install.in b/debian/templates/post-install.in index a1175e9d8..3ee13d4f1 100644 --- a/debian/templates/post-install.in +++ b/debian/templates/post-install.in @@ -30,11 +30,8 @@ debhelper_post() { # prefix is then used to form a destination directory # to link to. For cases with subarch we need to link # to linux-headers-$(subarch)-$(version)-$(abiname), -# not just linux-headers-$(version)-$(abiname). Note -# that the append_subarch substitution must contain a -# trailing dash, if it is non-empty. +# not just linux-headers-$(version)-$(abiname). # -append='@append_subarch@' prefix=$DEBIAN_VERSION-$DEBIAN_ABINAME pkg=linux-headers-$prefix-$DEBIAN_FLAVOUR top=$PWD/debian/$pkg