Gyorgy Szing | 4909180 | 2020-11-24 00:33:09 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Gyorgy Szing | d80f856 | 2021-02-11 19:31:43 +0100 | [diff] [blame] | 2 | # Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved. |
Gyorgy Szing | 4909180 | 2020-11-24 00:33:09 +0100 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | #GNUARM v8 and v9 compilers use a different triplet. |
Gyorgy Szing | d80f856 | 2021-02-11 19:31:43 +0100 | [diff] [blame] | 9 | if(NOT CROSS_COMPILE AND NOT DEFINED ENV{CROSS_COMPILE}) |
Gyorgy Szing | daf2efd | 2021-03-09 07:30:34 +0100 | [diff] [blame^] | 10 | set(CROSS_COMPILE "aarch64-elf-;aarch64-none-elf-;aarch64-linux-gnu-;aarch64-none-linux-gnu-" CACHE STRING "List of GCC prefix triplets to use.") |
Gyorgy Szing | 4909180 | 2020-11-24 00:33:09 +0100 | [diff] [blame] | 11 | endif() |
| 12 | |
| 13 | set(CMAKE_CROSSCOMPILING True) |
| 14 | set(CMAKE_SYSTEM_NAME Generic) |
| 15 | set(CMAKE_SYSTEM_PROCESSOR arm) |
| 16 | set(CMAKE_POSITION_INDEPENDENT_CODE True) |
| 17 | |
| 18 | #set(CMAKE_C_FLAGS_INIT --specs=nosys.specs) |
| 19 | #set(CMAKE_CXX_FLAGS_INIT --specs=nosys.specs) |
| 20 | #set(CMAKE_EXE_LINKER_FLAGS_INIT --specs=nosys.specs) |
| 21 | |
| 22 | include($ENV{TS_ROOT}/tools/cmake/compiler/GCC.cmake REQUIRED) |