• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1############################################################################
2# Copyright 2016-2017 Intel Corporation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15############################################################################
16# pylint: disable=locally-disabled, invalid-name, wildcard-import, unused-wildcard-import
17"""
18Configure gcc ARM toolchain
19"""
20
21from parts.platform_info import SystemPlatform
22from parts.tools.Common.Finders import PathFinder
23import parts.tools.GnuCommon.common
24# import gcc tool from parts ( we only need to add configurations to be loaded)
25from parts.tools.gcc import *
26
27parts.tools.GnuCommon.common.gcc.Register(
28    # compilation for Linux armel architecture system can be done from any Linux x86_64 system
29    hosts=[SystemPlatform('posix', 'x86_64')],
30    targets=[SystemPlatform('posix', 'arm')],
31    info=[
32        parts.tools.GnuCommon.common.GnuInfo(
33            # default binary location for arm-linux-gnueabi-gcc compiler
34            install_scanner=[PathFinder(['/usr/bin'])],
35            opt_dirs=['/opt/'],
36            script=None,
37            subst_vars={},
38            shell_vars={'PATH': '${GCC.INSTALL_ROOT}'},
39            test_file='arm-linux-gnueabi-gcc')
40    ]
41)
42
43parts.tools.GnuCommon.common.gcc.Register(
44    # compilation for Linux armhf architecture system can be done from any Linux x86_64 system
45    hosts=[SystemPlatform('posix', 'x86_64')],
46    targets=[SystemPlatform('posix', 'arm_hf')],
47    info=[
48        parts.tools.GnuCommon.common.GnuInfo(
49            # default binary location for arm-linux-gnueabihf-gcc compiler
50            install_scanner=[PathFinder(['/usr/bin'])],
51            opt_dirs=['/opt/'],
52            script=None,
53            subst_vars={},
54            shell_vars={'PATH': '${GCC.INSTALL_ROOT}'},
55            test_file='arm-linux-gnueabihf-gcc')
56    ]
57)
58
59parts.tools.GnuCommon.common.gcc.Register(
60    # compilation for Linux arm 64bit can be done from any Linux x86_64 system
61    hosts=[SystemPlatform('posix', 'x86_64')],
62    targets=[SystemPlatform('posix', 'aarch64')],
63    info=[
64        parts.tools.GnuCommon.common.GnuInfo(
65            # default binary location for aarch64-linux-gnu-gcc compiler
66            install_scanner=[PathFinder(['/usr/bin'])],
67            opt_dirs=['/opt/'],
68            script=None,
69            subst_vars={},
70            shell_vars={'PATH': '${GCC.INSTALL_ROOT}'},
71            test_file='aarch64-linux-gnu-gcc')
72    ]
73)
74