From 1f377f7c3b5ae38b713f4c1c5c0b67592833396c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 18 Jun 2012 14:50:18 +0000 Subject: [PATCH] [x32] Build a linux-libc-dev package svn path=/dists/trunk/linux/; revision=19166 --- debian/bin/gencontrol.py | 12 ++++++++++-- debian/changelog | 1 + debian/config/defines | 1 + debian/config/x32/defines | 4 ++++ debian/rules.real | 4 +++- 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 debian/config/x32/defines diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 9426eb4e9..65b7ee8c2 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -86,6 +86,10 @@ class Gencontrol(Base): self._setup_makeflags(self.arch_makeflags, makeflags, config_base) def do_arch_packages(self, packages, makefile, arch, vars, makeflags, extra): + # Some userland architectures require kernels from another + # (Debian) architecture, e.g. x32/amd64. + foreign_kernel = not self.config['base', arch].get('featuresets') + if self.version.linux_modifier is None: try: vars['abiname'] = '-%s' % self.config['abi', arch]['abiname'] @@ -93,8 +97,12 @@ class Gencontrol(Base): vars['abiname'] = self.abiname makeflags['ABINAME'] = vars['abiname'] - headers_arch = self.templates["control.headers.arch"] - packages_headers_arch = self.process_packages(headers_arch, vars) + if foreign_kernel: + packages_headers_arch = [] + makeflags['FOREIGN_KERNEL'] = True + else: + headers_arch = self.templates["control.headers.arch"] + packages_headers_arch = self.process_packages(headers_arch, vars) libc_dev = self.templates["control.libc-dev"] packages_headers_arch[0:0] = self.process_packages(libc_dev, {}) diff --git a/debian/changelog b/debian/changelog index 63dde9232..39f4d5f6e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ linux (3.4.3-1~experimental.1) UNRELEASED; urgency=low * [x86] Enable BATTERY_SBS as module (Closes: #662902) * team: Enable NET_TEAM_MODE_LOADBALANCE as module * [rt] Update to 3.4.2-rt10 (no functional change) + * [x32] Build a linux-libc-dev package -- Ben Hutchings Thu, 07 Jun 2012 04:45:03 +0100 diff --git a/debian/config/defines b/debian/config/defines index 86465be82..6b3621201 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -20,6 +20,7 @@ arches: sh4 sparc sparc64 + x32 compiler: gcc-4.6 featuresets: none diff --git a/debian/config/x32/defines b/debian/config/x32/defines new file mode 100644 index 000000000..0a19846d4 --- /dev/null +++ b/debian/config/x32/defines @@ -0,0 +1,4 @@ +[base] +kernel-arch: x86 +featuresets: +# empty; x32 must be part of a multiarch installation with an amd64 kernel diff --git a/debian/rules.real b/debian/rules.real index 7a3bb0a5a..702d82496 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -35,7 +35,9 @@ MAKEOVERRIDES = # # Targets # -binary-arch-arch: install-headers_$(ARCH) +ifneq ($(FOREIGN_KERNEL),True) + binary-arch-arch: install-headers_$(ARCH) +endif binary-arch-arch: install-libc-dev_$(ARCH) binary-arch-featureset: install-headers_$(ARCH)_$(FEATURESET) binary-arch-flavour: install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_$(TYPE)