Switch (again) to new arm cross-compilation toolchain.
This introduce a difference between armv6 and armv8.
This commit is contained in:
parent
01eda7a44f
commit
897e7f292c
|
@ -1,36 +1,44 @@
|
||||||
from .base import Dependency, ReleaseDownload, NoopBuilder
|
from .base import Dependency, ReleaseDownload, NoopBuilder
|
||||||
from kiwixbuild.utils import Remotefile
|
from kiwixbuild.utils import Remotefile
|
||||||
|
|
||||||
|
# The arm toolchains
|
||||||
|
# This is based on toolchains published here : https://github.com/tttapa/docker-arm-cross-toolchain
|
||||||
|
|
||||||
base_url = 'https://master.dl.sourceforge.net/project/raspberry-pi-cross-compilers/'
|
base_url = "https://github.com/tttapa/docker-arm-cross-toolchain/releases/download/0.1.0/"
|
||||||
|
|
||||||
# This is Gcc 10.3.0 and Raspberry Pi 2 and 3 only !
|
class armv6_toolchain(Dependency):
|
||||||
armhf_base_url = base_url + 'Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Stretch/GCC%2010.3.0/Raspberry%20Pi%202%2C%203/'
|
|
||||||
|
|
||||||
# This is Gcc 10.3.0 and ALL rapsberry Pi arch64
|
|
||||||
aarch_base_url = base_url + 'Bonus%20Raspberry%20Pi%20GCC%2064-Bit%20Toolchains/Raspberry%20Pi%20GCC%2064-Bit%20Cross-Compiler%20Toolchains/Stretch/GCC%206.3.0/'
|
|
||||||
|
|
||||||
class armhf_toolchain(Dependency):
|
|
||||||
dont_skip = True
|
dont_skip = True
|
||||||
neutral = True
|
neutral = True
|
||||||
name = 'armhf'
|
name = 'armv6'
|
||||||
|
|
||||||
class Source(ReleaseDownload):
|
class Source(ReleaseDownload):
|
||||||
archive = Remotefile('cross-gcc-10.3.0-pi_2-3.tar.gz',
|
archive = Remotefile('x-tools-armv6-rpi-linux-gnueabihf.tar.xz',
|
||||||
'6aef31703fb7bfd63065dda7fb525f1f86a0509c4358c57631a51025805278b3',
|
'4c371c4c5b55ebd1f3d7dd26b14703632d9ba47423f901bcd9303d83ad444434',
|
||||||
armhf_base_url + 'cross-gcc-10.3.0-pi_2-3.tar.gz')
|
base_url + 'x-tools-armv6-rpi-linux-gnueabihf.tar.xz')
|
||||||
|
|
||||||
Builder = NoopBuilder
|
Builder = NoopBuilder
|
||||||
|
|
||||||
|
|
||||||
|
class armv8_toolchain(Dependency):
|
||||||
|
dont_skip = True
|
||||||
|
neutral = True
|
||||||
|
name = 'armv8'
|
||||||
|
|
||||||
|
class Source(ReleaseDownload):
|
||||||
|
archive = Remotefile('x-tools-armv8-rpi-linux-gnueabihf.tar.xz',
|
||||||
|
'cc28f5c3f6a3e7d9985f98779c4e72224b4eb5a7e4dc2bcdefd90cb241fb94a5',
|
||||||
|
base_url + 'x-tools-armv8-rpi3-linux-gnueabihf.tar.xz')
|
||||||
|
|
||||||
|
Builder = NoopBuilder
|
||||||
|
|
||||||
class aarch64_toolchain(Dependency):
|
class aarch64_toolchain(Dependency):
|
||||||
dont_skip = True
|
dont_skip = True
|
||||||
neutral = True
|
neutral = True
|
||||||
name = "aarch64"
|
name = "aarch64"
|
||||||
|
|
||||||
class Source(ReleaseDownload):
|
class Source(ReleaseDownload):
|
||||||
archive = Remotefile('cross-gcc-6.3.0-pi_64.tar.gz',
|
archive = Remotefile('x-tools-aarch64-rpi3-linux-gnu.tar.xz',
|
||||||
'1b048bb8886ad63d21797cd9129fc37b9ea0dfaac7e3c36f888aa16fbec1d320',
|
'8be81d3fc47b1b280bf003646d2b623477badec4ec931944131bf412317b6332',
|
||||||
aarch_base_url + 'cross-gcc-6.3.0-pi_64.tar.gz')
|
base_url + 'x-tools-aarch64-rpi3-linux-gnu.tar.xz')
|
||||||
|
|
||||||
Builder = NoopBuilder
|
Builder = NoopBuilder
|
||||||
|
|
|
@ -4,10 +4,8 @@ from kiwixbuild.utils import pj
|
||||||
from kiwixbuild._global import get_target_step
|
from kiwixbuild._global import get_target_step
|
||||||
|
|
||||||
|
|
||||||
class ArmhfPlatformInfo(PlatformInfo):
|
# Base platform
|
||||||
build = 'armhf'
|
class ArmPlatformInfo(PlatformInfo):
|
||||||
arch_full = 'arm-linux-gnueabihf'
|
|
||||||
toolchain_names = ['armhf']
|
|
||||||
compatible_hosts = ['fedora', 'debian']
|
compatible_hosts = ['fedora', 'debian']
|
||||||
|
|
||||||
def get_cross_config(self):
|
def get_cross_config(self):
|
||||||
|
@ -20,20 +18,24 @@ class ArmhfPlatformInfo(PlatformInfo):
|
||||||
'host_machine': {
|
'host_machine': {
|
||||||
'system': 'linux',
|
'system': 'linux',
|
||||||
'lsystem': 'linux',
|
'lsystem': 'linux',
|
||||||
'cpu_family': 'arm',
|
'cpu_family': self.cpu_family,
|
||||||
'cpu': 'armhf',
|
'cpu': self.cpu,
|
||||||
'endian': 'little',
|
'endian': 'little',
|
||||||
'abi': ''
|
'abi': ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def libdir(self):
|
||||||
|
return "lib/{}".format(self.arch_full)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def tlc_source(self):
|
def tlc_source(self):
|
||||||
return get_target_step(self.build, 'source')
|
return get_target_step(self.build, 'source')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def root_path(self):
|
def root_path(self):
|
||||||
return self.tlc_source.source_path
|
return pj(self.tlc_source.source_path, self.arch_full)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def binaries(self):
|
def binaries(self):
|
||||||
|
@ -99,25 +101,52 @@ class ArmhfPlatformInfo(PlatformInfo):
|
||||||
self.buildEnv.cmake_crossfile = self._gen_crossfile('cmake_cross_file.txt')
|
self.buildEnv.cmake_crossfile = self._gen_crossfile('cmake_cross_file.txt')
|
||||||
self.buildEnv.meson_crossfile = self._gen_crossfile('meson_cross_file.txt')
|
self.buildEnv.meson_crossfile = self._gen_crossfile('meson_cross_file.txt')
|
||||||
|
|
||||||
|
class Armv6(ArmPlatformInfo):
|
||||||
|
build = "armv6"
|
||||||
|
arch_full = "armv6-rpi-linux-gnueabihf"
|
||||||
|
toolchain_names = ['armv6']
|
||||||
|
cpu_family = 'arm'
|
||||||
|
cpu = 'armv6'
|
||||||
|
|
||||||
class ArmhfDyn(ArmhfPlatformInfo):
|
class Armv6Dyn(Armv6):
|
||||||
name = 'armhf_dyn'
|
name = 'armv6_dyn'
|
||||||
static = False
|
static = False
|
||||||
|
|
||||||
class ArmhfStatic(ArmhfPlatformInfo):
|
class Armv6Static(Armv6):
|
||||||
name = 'armhf_static'
|
name = 'armv6_static'
|
||||||
static = True
|
static = True
|
||||||
|
|
||||||
class ArmhfMixed(MixedMixin('armhf_static'), ArmhfPlatformInfo):
|
class Armv6Mixed(MixedMixin('armv6_static'), Armv6):
|
||||||
name = 'armhf_mixed'
|
name = 'armv6_mixed'
|
||||||
static = False
|
static = False
|
||||||
|
|
||||||
|
|
||||||
class Aarch64(ArmhfPlatformInfo):
|
class Armv8(ArmPlatformInfo):
|
||||||
|
build = "armv8"
|
||||||
|
arch_full = "armv8-rpi3-linux-gnueabihf"
|
||||||
|
toolchain_names = ['armv8']
|
||||||
|
cpu_family = 'arm'
|
||||||
|
cpu = 'armv8'
|
||||||
|
|
||||||
|
class Armv8Dyn(Armv8):
|
||||||
|
name = 'armv8_dyn'
|
||||||
|
static = False
|
||||||
|
|
||||||
|
class Armv8Static(Armv8):
|
||||||
|
name = 'armv8_static'
|
||||||
|
static = True
|
||||||
|
|
||||||
|
class Armv8Mixed(MixedMixin('armv8_static'), Armv8):
|
||||||
|
name = 'armv8_mixed'
|
||||||
|
static = False
|
||||||
|
|
||||||
|
|
||||||
|
class Aarch64(ArmPlatformInfo):
|
||||||
build = 'aarch64'
|
build = 'aarch64'
|
||||||
arch_full = 'aarch64-linux-gnu'
|
arch_full = 'aarch64-rpi3-linux-gnu'
|
||||||
toolchain_names = ['aarch64']
|
toolchain_names = ['aarch64']
|
||||||
libdir = "lib/aarch64-linux-gnu"
|
cpu_family = 'aarch64'
|
||||||
|
cpu = 'aarch64'
|
||||||
|
|
||||||
class Aarch64Dyn(Aarch64):
|
class Aarch64Dyn(Aarch64):
|
||||||
name = 'aarch64_dyn'
|
name = 'aarch64_dyn'
|
||||||
|
|
Loading…
Reference in New Issue