Skip to content

Commit 074fbbd

Browse files
committed
build: fix arm gcc package names for arm hosts
1 parent c2ac65a commit 074fbbd

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

build

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import argparse
44
import collections
5+
import platform
56
import re
67
import os
78

@@ -345,7 +346,6 @@ for component_name in components:
345346
selected_components.append(component)
346347
todo.extend(component.dependencies)
347348

348-
349349
if args.download_dependencies:
350350
apt_get_pkgs = {
351351
# Core requirements for this repo.
@@ -355,13 +355,20 @@ if args.download_dependencies:
355355
'tmux',
356356
'vinagre',
357357
'wget',
358-
359-
# Userland.
360-
'gcc-aarch64-linux-gnu',
361-
'gcc-arm-linux-gnueabihf',
362-
'g++-aarch64-linux-gnu',
363-
'g++-arm-linux-gnueabihf',
364358
}
359+
# E.e. on an ARM host, the package gcc-arm-linux-gnueabihf
360+
# is called just gcc.
361+
processor = platform.processor()
362+
if processor != 'arm':
363+
apt_get_pkgs.update({
364+
'gcc-arm-linux-gnueabihf',
365+
'g++-arm-linux-gnueabihf',
366+
})
367+
if processor != 'aarch64':
368+
apt_get_pkgs.update({
369+
'gcc-aarch64-linux-gnu',
370+
'g++-aarch64-linux-gnu',
371+
})
365372
apt_build_deps = set()
366373
submodules = set()
367374
submodules_shallow = set()

0 commit comments

Comments
 (0)