Update armhf toolschain.
This commit is contained in:
parent
bc3a73f26d
commit
b8cd12a360
|
@ -7,7 +7,9 @@ class armhf_toolchain(Dependency):
|
||||||
name = 'armhf'
|
name = 'armhf'
|
||||||
|
|
||||||
class Source(ReleaseDownload):
|
class Source(ReleaseDownload):
|
||||||
archive = Remotefile('raspberrypi-tools.tar.gz',
|
archive = Remotefile('cross-gcc-10.3.0-pi_64.tar.gz',
|
||||||
'e72b35436f2f23f2f7df322d6c318b9be57b21596b5ff0b8936af4ad94e04f2e')
|
'82bf781d0cf6e4e4809a86c402e1a1dd4de70ed54cff66197ca5a244d4ae5144',
|
||||||
|
'https://deac-ams.dl.sourceforge.net/project/raspberry-pi-cross-compilers/Bonus%20Raspberry%20Pi%20GCC%2064-Bit%20Toolchains/Raspberry%20Pi%20GCC%2064-Bit%20Cross-Compiler%20Toolchains/Bullseye/GCC%2010.3.0/cross-gcc-10.3.0-pi_64.tar.gz',
|
||||||
|
)
|
||||||
|
|
||||||
Builder = NoopBuilder
|
Builder = NoopBuilder
|
||||||
|
|
|
@ -44,3 +44,10 @@ class zlib(Dependency):
|
||||||
binary_path=pj(self.buildEnv.install_dir, 'bin'),
|
binary_path=pj(self.buildEnv.install_dir, 'bin'),
|
||||||
)
|
)
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def make_target(self):
|
||||||
|
if self.buildEnv.platformInfo.static:
|
||||||
|
return "static"
|
||||||
|
else:
|
||||||
|
return "shared"
|
||||||
|
|
|
@ -6,7 +6,7 @@ from kiwixbuild._global import get_target_step
|
||||||
|
|
||||||
class ArmhfPlatformInfo(PlatformInfo):
|
class ArmhfPlatformInfo(PlatformInfo):
|
||||||
build = 'armhf'
|
build = 'armhf'
|
||||||
arch_full = 'arm-linux-gnueabihf'
|
arch_full = 'aarch64-linux-gnu'
|
||||||
toolchain_names = ['armhf']
|
toolchain_names = ['armhf']
|
||||||
compatible_hosts = ['fedora', 'debian']
|
compatible_hosts = ['fedora', 'debian']
|
||||||
|
|
||||||
|
@ -33,10 +33,7 @@ class ArmhfPlatformInfo(PlatformInfo):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def root_path(self):
|
def root_path(self):
|
||||||
return pj(self.tlc_source.source_path,
|
return self.tlc_source.source_path
|
||||||
'raspberrypi-tools',
|
|
||||||
'arm-bcm2708',
|
|
||||||
'gcc-linaro-{}-raspbian-x64'.format(self.arch_full))
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def binaries(self):
|
def binaries(self):
|
||||||
|
@ -47,7 +44,9 @@ class ArmhfPlatformInfo(PlatformInfo):
|
||||||
('STRIP', 'strip'),
|
('STRIP', 'strip'),
|
||||||
('WINDRES', 'windres'),
|
('WINDRES', 'windres'),
|
||||||
('RANLIB', 'ranlib'),
|
('RANLIB', 'ranlib'),
|
||||||
('LD', 'ld'))
|
('LD', 'ld'),
|
||||||
|
('LDSHARED', 'g++ -shared')
|
||||||
|
)
|
||||||
)
|
)
|
||||||
binaries = {k:pj(self.root_path, 'bin', v)
|
binaries = {k:pj(self.root_path, 'bin', v)
|
||||||
for k,v in binaries}
|
for k,v in binaries}
|
||||||
|
@ -72,8 +71,13 @@ class ArmhfPlatformInfo(PlatformInfo):
|
||||||
|
|
||||||
def get_env(self):
|
def get_env(self):
|
||||||
env = super().get_env()
|
env = super().get_env()
|
||||||
|
env['LD_LIBRARY_PATH'] = ':'.join([
|
||||||
|
pj(self.root_path, self.arch_full, 'lib64'),
|
||||||
|
pj(self.root_path, 'lib'),
|
||||||
|
env['LD_LIBRARY_PATH']
|
||||||
|
])
|
||||||
env['PKG_CONFIG_LIBDIR'] = pj(self.root_path, 'lib', 'pkgconfig')
|
env['PKG_CONFIG_LIBDIR'] = pj(self.root_path, 'lib', 'pkgconfig')
|
||||||
env['QEMU_LD_PREFIX'] = pj(self.root_path, "arm-linux-gnueabihf", "libc")
|
env['QEMU_LD_PREFIX'] = pj(self.root_path, "aarch64-linux-gnu", "libc")
|
||||||
env['QEMU_SET_ENV'] = "LD_LIBRARY_PATH={}".format(
|
env['QEMU_SET_ENV'] = "LD_LIBRARY_PATH={}".format(
|
||||||
':'.join([
|
':'.join([
|
||||||
pj(self.root_path, self.arch_full, "lib"),
|
pj(self.root_path, self.arch_full, "lib"),
|
||||||
|
@ -83,8 +87,8 @@ class ArmhfPlatformInfo(PlatformInfo):
|
||||||
|
|
||||||
def set_comp_flags(self, env):
|
def set_comp_flags(self, env):
|
||||||
super().set_comp_flags(env)
|
super().set_comp_flags(env)
|
||||||
env['CFLAGS'] = " -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 "+env['CFLAGS']
|
env['CFLAGS'] = " -fPIC -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 "+env['CFLAGS']
|
||||||
env['CXXFLAGS'] = " -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 "+env['CXXFLAGS']
|
env['CXXFLAGS'] = " -fPIC -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 "+env['CXXFLAGS']
|
||||||
|
|
||||||
def set_compiler(self, env):
|
def set_compiler(self, env):
|
||||||
for k, v in self.binaries.items():
|
for k, v in self.binaries.items():
|
||||||
|
|
Loading…
Reference in New Issue