debian/control: Fix build-dependencies for cross-building
The current cross-compiler packages don't set the Multi-Arch field, so specify that the cross-compiler package must be native, rather than any architecture. flex doesn't support multi-arch, and this would require splitting it (#611230, #761449). Force use of the native package for now. openssl doesn't support multi-arch but probably easily could (#827028). Force use of the native package for now. We need the native libssl-dev while building the kernel itself and the host libssl-dev while building tools for linux-kbuild. Document the state of cross-building in README.source.
This commit is contained in:
parent
cc2ac0be61
commit
0aceb8739a
|
@ -233,3 +233,6 @@ Several build profiles are understood and supported:
|
||||||
- nodoc: Exclude most documentation
|
- nodoc: Exclude most documentation
|
||||||
- pkg.linux.notools: Exclude userland tool packages (linux-kbuild-<version>,
|
- pkg.linux.notools: Exclude userland tool packages (linux-kbuild-<version>,
|
||||||
linux-perf-<version>, etc.)
|
linux-perf-<version>, etc.)
|
||||||
|
- cross: Needed when cross-building. Currently this must be used
|
||||||
|
together with pkg.linux.notools as not all the userland tools can be
|
||||||
|
cross-built.
|
||||||
|
|
|
@ -134,6 +134,17 @@ class Gencontrol(Base):
|
||||||
|
|
||||||
self._setup_makeflags(self.arch_makeflags, makeflags, config_base)
|
self._setup_makeflags(self.arch_makeflags, makeflags, config_base)
|
||||||
|
|
||||||
|
try:
|
||||||
|
gnu_type_bytes = subprocess.check_output(['dpkg-architecture',
|
||||||
|
'-a', arch,
|
||||||
|
'-q', 'DEB_HOST_GNU_TYPE'],
|
||||||
|
stderr=subprocess.DEVNULL)
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
# This sometimes happens for the newest ports :-/
|
||||||
|
print('W: Unable to get GNU type for %s' % arch, file=sys.stderr)
|
||||||
|
else:
|
||||||
|
vars['gnu-type-package'] = gnu_type_bytes.decode('utf-8').strip().replace('_', '-')
|
||||||
|
|
||||||
def do_arch_packages(self, packages, makefile, arch, vars, makeflags, extra):
|
def do_arch_packages(self, packages, makefile, arch, vars, makeflags, extra):
|
||||||
if self.version.linux_modifier is None:
|
if self.version.linux_modifier is None:
|
||||||
try:
|
try:
|
||||||
|
@ -296,16 +307,22 @@ class Gencontrol(Base):
|
||||||
|
|
||||||
compiler = config_entry_base.get('compiler', 'gcc')
|
compiler = config_entry_base.get('compiler', 'gcc')
|
||||||
|
|
||||||
# Work out dependency from linux-headers to compiler. Strip
|
# Work out dependency from linux-headers to compiler. Drop
|
||||||
|
# dependencies for cross-builds. Strip any remaining
|
||||||
# restrictions, as they don't apply to binary Depends.
|
# restrictions, as they don't apply to binary Depends.
|
||||||
relations_compiler_headers = PackageRelation(
|
relations_compiler_headers = PackageRelation(
|
||||||
config_entry_relations.get('headers%' + compiler) or
|
self.substitute(config_entry_relations.get('headers%' + compiler) or
|
||||||
config_entry_relations.get(compiler))
|
config_entry_relations.get(compiler), vars))
|
||||||
|
relations_compiler_headers = PackageRelation(
|
||||||
|
PackageRelationGroup(entry for entry in group
|
||||||
|
if 'cross' not in entry.restrictions)
|
||||||
|
for group in relations_compiler_headers)
|
||||||
for group in relations_compiler_headers:
|
for group in relations_compiler_headers:
|
||||||
for entry in group:
|
for entry in group:
|
||||||
entry.restrictions = []
|
entry.restrictions = []
|
||||||
|
|
||||||
relations_compiler_build_dep = PackageRelation(config_entry_relations[compiler])
|
relations_compiler_build_dep = PackageRelation(
|
||||||
|
self.substitute(config_entry_relations[compiler], vars))
|
||||||
for group in relations_compiler_build_dep:
|
for group in relations_compiler_build_dep:
|
||||||
for item in group:
|
for item in group:
|
||||||
item.arches = [arch]
|
item.arches = [arch]
|
||||||
|
|
|
@ -16,6 +16,7 @@ linux (4.7~rc2-1~exp1) UNRELEASED; urgency=medium
|
||||||
userland headers
|
userland headers
|
||||||
* linux-cpupower: Define PACKAGE_BUGREPORT to refer to reportbug, not upstream
|
* linux-cpupower: Define PACKAGE_BUGREPORT to refer to reportbug, not upstream
|
||||||
* debian/README.source: Document the supported build profiles
|
* debian/README.source: Document the supported build profiles
|
||||||
|
* debian/control: Fix build-dependencies for cross-building
|
||||||
|
|
||||||
-- Ben Hutchings <ben@decadent.org.uk> Tue, 07 Jun 2016 19:37:55 +0100
|
-- Ben Hutchings <ben@decadent.org.uk> Tue, 07 Jun 2016 19:37:55 +0100
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ initramfs-generators: initramfs-tools initramfs-fallback
|
||||||
|
|
||||||
[relations]
|
[relations]
|
||||||
# compilers
|
# compilers
|
||||||
gcc-5: gcc-5 <!stage1>
|
gcc-5: gcc-5 <!stage1 !cross>, gcc-5-@gnu-type-package@:native <!stage1 cross>
|
||||||
|
|
||||||
# initramfs-generators
|
# initramfs-generators
|
||||||
initramfs-fallback: linux-initramfs-tool
|
initramfs-fallback: linux-initramfs-tool
|
||||||
|
|
|
@ -24,5 +24,5 @@ hardware: multiprocessor 64-bit PA-RISC
|
||||||
hardware-long: HP PA-RISC 64-bit SMP systems with support for more than 4 GB RAM
|
hardware-long: HP PA-RISC 64-bit SMP systems with support for more than 4 GB RAM
|
||||||
|
|
||||||
[relations]
|
[relations]
|
||||||
gcc-5: gcc-5 <!stage1>, binutils-hppa64-linux-gnu <!stage1>, gcc-5-hppa64-linux-gnu <!stage1>
|
gcc-5: gcc-5 <!stage1 !cross>, binutils-hppa64-linux-gnu <!stage1 !cross>, gcc-5-hppa64-linux-gnu <!stage1 !cross>, gcc-5-hppa-linux-gnu:native <!stage1 cross>, binutils-hppa64-linux-gnu:native <!stage1 cross>, gcc-5-hppa64-linux-gnu:native <!stage1 cross>
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,14 @@ Build-Depends:
|
||||||
# used by upstream to build include/generated/timeconst.h
|
# used by upstream to build include/generated/timeconst.h
|
||||||
bc <!stage1>,
|
bc <!stage1>,
|
||||||
# used by upstream to build signing tools and to process certificates
|
# used by upstream to build signing tools and to process certificates
|
||||||
libssl-dev <!stage1>,
|
libssl-dev:native <!stage1>, libssl-dev <!stage1 !pkg.linux.notools cross>,
|
||||||
openssl <!stage1>,
|
openssl:native <!stage1>,
|
||||||
# used by upstream to build perf documentation
|
# used by upstream to build perf documentation
|
||||||
asciidoc <!stage1 !nodoc !pkg.linux.notools>,
|
asciidoc <!stage1 !nodoc !pkg.linux.notools>,
|
||||||
xmlto <!stage1 !nodoc !pkg.linux.notools>,
|
xmlto <!stage1 !nodoc !pkg.linux.notools>,
|
||||||
# used by upstream to build perf
|
# used by upstream to build perf
|
||||||
bison <!stage1 !pkg.linux.notools>,
|
bison <!stage1 !pkg.linux.notools>,
|
||||||
flex <!stage1 !pkg.linux.notools>,
|
flex:native <!stage1 !pkg.linux.notools>,
|
||||||
gcc-multilib [amd64 ppc64 s390x sparc64] <!stage1 !pkg.linux.notools>,
|
gcc-multilib [amd64 ppc64 s390x sparc64] <!stage1 !pkg.linux.notools>,
|
||||||
libaudit-dev <!stage1 !pkg.linux.notools>,
|
libaudit-dev <!stage1 !pkg.linux.notools>,
|
||||||
libdw-dev <!stage1 !pkg.linux.notools>,
|
libdw-dev <!stage1 !pkg.linux.notools>,
|
||||||
|
|
Loading…
Reference in New Issue