From 074fbbdf4ca413d227415ec91b9c89b080498d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Sat, 17 Nov 2018 00:00:01 +0000 Subject: [PATCH] build: fix arm gcc package names for arm hosts --- build | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/build b/build index aa271f4..c24c4e9 100755 --- a/build +++ b/build @@ -2,6 +2,7 @@ import argparse import collections +import platform import re import os @@ -345,7 +346,6 @@ for component_name in components: selected_components.append(component) todo.extend(component.dependencies) - if args.download_dependencies: apt_get_pkgs = { # Core requirements for this repo. @@ -355,13 +355,20 @@ if args.download_dependencies: 'tmux', 'vinagre', 'wget', - - # Userland. - 'gcc-aarch64-linux-gnu', - 'gcc-arm-linux-gnueabihf', - 'g++-aarch64-linux-gnu', - 'g++-arm-linux-gnueabihf', } + # E.e. on an ARM host, the package gcc-arm-linux-gnueabihf + # is called just gcc. + processor = platform.processor() + if processor != 'arm': + apt_get_pkgs.update({ + 'gcc-arm-linux-gnueabihf', + 'g++-arm-linux-gnueabihf', + }) + if processor != 'aarch64': + apt_get_pkgs.update({ + 'gcc-aarch64-linux-gnu', + 'g++-aarch64-linux-gnu', + }) apt_build_deps = set() submodules = set() submodules_shallow = set()